diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..1fad82a6a2 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @mongodb/dbx-go diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000000..6f7a5433cb --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,21 @@ +changelog: + exclude: + labels: + - ignore-for-release + - submodules + authors: + - mongodb-drivers-pr-bot + categories: + - title: Breaking Changes 🛠 + labels: + - breaking-change + - title: New Features + labels: + - enhancement + - title: Fixed + labels: + - bug + - fixed + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 0000000000..fc621065e4 --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,78 @@ +# This workflow uses actions that are not certified by GitHub. They are provided +# by a third-party and are governed by separate terms of service, privacy +# policy, and support documentation. + +name: Scorecard supply-chain security +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '24 21 * * 1' + push: + branches: [ "master" ] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + # `publish_results: true` only works when run from the default branch. conditional can be removed if disabled. + if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request' + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Needed to publish results and get a badge (see publish_results below). + id-token: write + # Uncomment the permissions below if installing in a private repository. + # contents: read + # actions: read + + steps: + - name: "Checkout code" + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1 + with: + results_file: results.sarif + results_format: sarif + # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: + # - you want to enable the Branch-Protection check on a *public* repository, or + # - you are installing Scorecard on a *private* repository + # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional. + # repo_token: ${{ secrets.SCORECARD_TOKEN }} + + # Public repositories: + # - Publish results to OpenSSF REST API for easy access by consumers + # - Allows the repository to include the Scorecard badge. + # - See https://github.com/ossf/scorecard-action#publishing-results. + # For private repositories: + # - `publish_results` will always be set to `false`, regardless + # of the value entered here. + publish_results: true + + # (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore + # file_mode: git + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard (optional). + # Commenting out will disable upload of results to your repo's Code Scanning dashboard + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: results.sarif diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 571868de35..27f3bd3147 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -65,3 +65,9 @@ repos: require_serial: true pass_filenames: false entry: etc/golangci-lint.sh + + - id: check-licenses + name: check-licenses + language: system + types: [go] + entry: etc/check_license.sh diff --git a/README.md b/README.md index ea1d9e8b1d..6fab3db04d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ docs docs + + OpenSSF Scorecard +

# MongoDB Go Driver @@ -15,9 +18,11 @@ See the following resources to learn more about upgrading from version 1.x to 2. - [v2.0 Migration Guide](docs/migration-2.0.md) - [v2.0 What's New](https://www.mongodb.com/docs/drivers/go/upcoming/whats-new/#what-s-new-in-2.0) +The MongoDB Go driver follows [semantic versioning](https://semver.org/) for its releases. + ## Requirements -- Go 1.18 or higher. We aim to support the latest versions of Go. +- Go 1.19 or higher. We aim to support the latest versions of Go. - Go 1.23 or higher is required to run the driver test suite. - MongoDB 4.0 and higher. diff --git a/Taskfile.yml b/Taskfile.yml index ab552205f5..3473cb4981 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -34,7 +34,7 @@ tasks: build-compile-check-all: bash etc/run-compile-check-test.sh - build-aws-ecs-test: go build ${BUILD_TAGS} ./internal/cmd/testaws/main.go + build-aws-ecs-test: go test -c ./internal/test/aws -o aws.testbin cross-compile: - GOOS=linux GOARCH=386 go build ./... diff --git a/bson/benchmark_test.go b/bson/benchmark_test.go index c77f2dde6b..2b7d6d293a 100644 --- a/bson/benchmark_test.go +++ b/bson/benchmark_test.go @@ -19,6 +19,20 @@ import ( "testing" ) +var encodetestBsonD D + +func init() { + b, err := Marshal(encodetestInstance) + if err != nil { + panic(fmt.Sprintf("error marshling struct: %v", err)) + } + + err = Unmarshal(b, &encodetestBsonD) + if err != nil { + panic(fmt.Sprintf("error unmarshaling BSON: %v", err)) + } +} + type encodetest struct { Field1String string Field1Int64 int64 @@ -184,7 +198,7 @@ func readExtJSONFile(filename string) map[string]interface{} { func BenchmarkMarshal(b *testing.B) { cases := []struct { desc string - value interface{} + value any }{ { desc: "simple struct", @@ -194,6 +208,10 @@ func BenchmarkMarshal(b *testing.B) { desc: "nested struct", value: nestedInstance, }, + { + desc: "simple D", + value: encodetestBsonD, + }, { desc: "deep_bson.json.gz", value: readExtJSONFile("deep_bson.json.gz"), @@ -208,119 +226,211 @@ func BenchmarkMarshal(b *testing.B) { }, } - for _, tc := range cases { - b.Run(tc.desc, func(b *testing.B) { - b.Run("BSON", func(b *testing.B) { - for i := 0; i < b.N; i++ { - _, err := Marshal(tc.value) - if err != nil { - b.Errorf("error marshalling BSON: %s", err) + b.Run("BSON", func(b *testing.B) { + for _, tc := range cases { + tc := tc // Capture range variable. + + b.Run(tc.desc, func(b *testing.B) { + b.ReportAllocs() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + _, err := Marshal(tc.value) + if err != nil { + b.Errorf("error marshalling BSON: %s", err) + } } - } + }) }) + } + }) - b.Run("extJSON", func(b *testing.B) { - for i := 0; i < b.N; i++ { - _, err := MarshalExtJSON(tc.value, true, false) - if err != nil { - b.Errorf("error marshalling extended JSON: %s", err) + b.Run("extJSON", func(b *testing.B) { + for _, tc := range cases { + tc := tc // Capture range variable. + + b.Run(tc.desc, func(b *testing.B) { + b.ReportAllocs() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + _, err := MarshalExtJSON(tc.value, true, false) + if err != nil { + b.Errorf("error marshalling extended JSON: %s", err) + } } - } + }) }) + } + }) - b.Run("JSON", func(b *testing.B) { - for i := 0; i < b.N; i++ { - _, err := json.Marshal(tc.value) - if err != nil { - b.Errorf("error marshalling JSON: %s", err) + b.Run("JSON", func(b *testing.B) { + for _, tc := range cases { + tc := tc // Capture range variable. + + b.Run(tc.desc, func(b *testing.B) { + b.ReportAllocs() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + _, err := json.Marshal(tc.value) + if err != nil { + b.Errorf("error marshalling JSON: %s", err) + } } - } + }) }) - }) - } + } + }) } func BenchmarkUnmarshal(b *testing.B) { - cases := []struct { + type testcase struct { desc string - value interface{} - }{ + value any + dst func() any + } + + cases := []testcase{ { desc: "simple struct", value: encodetestInstance, + dst: func() any { return &encodetest{} }, }, { desc: "nested struct", value: nestedInstance, + dst: func() any { return &encodetest{} }, }, + } + + inputs := []struct { + name string + value any + }{ { - desc: "deep_bson.json.gz", + name: "simple", + value: encodetestInstance, + }, + { + name: "nested", + value: nestedInstance, + }, + { + name: "deep_bson.json.gz", value: readExtJSONFile("deep_bson.json.gz"), }, { - desc: "flat_bson.json.gz", + name: "flat_bson.json.gz", value: readExtJSONFile("flat_bson.json.gz"), }, { - desc: "full_bson.json.gz", + name: "full_bson.json.gz", value: readExtJSONFile("full_bson.json.gz"), }, } - for _, tc := range cases { - b.Run(tc.desc, func(b *testing.B) { - b.Run("BSON", func(b *testing.B) { + destinations := []struct { + name string + dst func() any + }{ + { + name: "to map", + dst: func() any { return &map[string]any{} }, + }, + { + name: "to D", + dst: func() any { return &D{} }, + }, + } + + for _, input := range inputs { + for _, dest := range destinations { + cases = append(cases, testcase{ + desc: input.name + " " + dest.name, + value: input.value, + dst: dest.dst, + }) + } + } + + b.Run("BSON", func(b *testing.B) { + for _, tc := range cases { + tc := tc // Capture range variable. + + b.Run(tc.desc, func(b *testing.B) { + b.ReportAllocs() data, err := Marshal(tc.value) if err != nil { b.Errorf("error marshalling BSON: %s", err) return } + b.SetBytes(int64(len(data))) b.ResetTimer() - var v2 map[string]interface{} - for i := 0; i < b.N; i++ { - err := Unmarshal(data, &v2) - if err != nil { - b.Errorf("error unmarshalling BSON: %s", err) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + val := tc.dst() + err := Unmarshal(data, val) + if err != nil { + b.Errorf("error unmarshalling BSON: %s", err) + } } - } + }) }) + } + }) + + b.Run("extJSON", func(b *testing.B) { + for _, tc := range cases { + tc := tc // Capture range variable. - b.Run("extJSON", func(b *testing.B) { + b.Run(tc.desc, func(b *testing.B) { + b.ReportAllocs() data, err := MarshalExtJSON(tc.value, true, false) if err != nil { b.Errorf("error marshalling extended JSON: %s", err) return } + b.SetBytes(int64(len(data))) b.ResetTimer() - var v2 map[string]interface{} - for i := 0; i < b.N; i++ { - err := UnmarshalExtJSON(data, true, &v2) - if err != nil { - b.Errorf("error unmarshalling extended JSON: %s", err) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + val := tc.dst() + err := UnmarshalExtJSON(data, true, val) + if err != nil { + b.Errorf("error unmarshalling extended JSON: %s", err) + } } - } + }) }) + } + }) + + b.Run("JSON", func(b *testing.B) { + for _, tc := range cases { + tc := tc // Capture range variable. - b.Run("JSON", func(b *testing.B) { + b.Run(tc.desc, func(b *testing.B) { + b.ReportAllocs() data, err := json.Marshal(tc.value) if err != nil { b.Errorf("error marshalling JSON: %s", err) return } + b.SetBytes(int64(len(data))) b.ResetTimer() - var v2 map[string]interface{} - for i := 0; i < b.N; i++ { - err := json.Unmarshal(data, &v2) - if err != nil { - b.Errorf("error unmarshalling JSON: %s", err) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + val := tc.dst() + err := json.Unmarshal(data, val) + if err != nil { + b.Errorf("error unmarshalling JSON: %s", err) + } } - } + }) }) - }) - } + } + }) } // The following benchmarks are copied from the Go standard library's @@ -389,13 +499,13 @@ func codeInit() { } func BenchmarkCodeUnmarshal(b *testing.B) { - b.ReportAllocs() if codeJSON == nil { b.StopTimer() codeInit() b.StartTimer() } b.Run("BSON", func(b *testing.B) { + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { var r codeResponse @@ -407,6 +517,7 @@ func BenchmarkCodeUnmarshal(b *testing.B) { b.SetBytes(int64(len(codeBSON))) }) b.Run("JSON", func(b *testing.B) { + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { var r codeResponse @@ -420,13 +531,13 @@ func BenchmarkCodeUnmarshal(b *testing.B) { } func BenchmarkCodeMarshal(b *testing.B) { - b.ReportAllocs() if codeJSON == nil { b.StopTimer() codeInit() b.StartTimer() } b.Run("BSON", func(b *testing.B) { + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { if _, err := Marshal(&codeStruct); err != nil { @@ -437,6 +548,7 @@ func BenchmarkCodeMarshal(b *testing.B) { b.SetBytes(int64(len(codeBSON))) }) b.Run("JSON", func(b *testing.B) { + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { if _, err := json.Marshal(&codeStruct); err != nil { diff --git a/bson/bson_binary_vector_spec_test.go b/bson/bson_binary_vector_spec_test.go index 56516c61b6..33b5af595d 100644 --- a/bson/bson_binary_vector_spec_test.go +++ b/bson/bson_binary_vector_spec_test.go @@ -9,7 +9,6 @@ package bson import ( "encoding/hex" "encoding/json" - "math" "os" "path" "testing" @@ -27,13 +26,13 @@ type bsonBinaryVectorTests struct { } type bsonBinaryVectorTestCase struct { - Description string `json:"description"` - Valid bool `json:"valid"` - Vector []interface{} `json:"vector"` - DtypeHex string `json:"dtype_hex"` - DtypeAlias string `json:"dtype_alias"` - Padding int `json:"padding"` - CanonicalBson string `json:"canonical_bson"` + Description string `json:"description"` + Valid bool `json:"valid"` + Vector json.RawMessage `json:"vector"` + DtypeHex string `json:"dtype_hex"` + DtypeAlias string `json:"dtype_alias"` + Padding int `json:"padding"` + CanonicalBson string `json:"canonical_bson"` } func TestBsonBinaryVectorSpec(t *testing.T) { @@ -83,21 +82,19 @@ func TestBsonBinaryVectorSpec(t *testing.T) { }) } -func convertSlice[T int8 | float32 | byte](s []interface{}) []T { +func decodeTestSlice[T int8 | float32 | byte](t *testing.T, data []byte) []T { + t.Helper() + + if len(data) == 0 { + return nil + } + var s []float64 + err := UnmarshalExtJSON(data, true, &s) + require.NoError(t, err) + v := make([]T, len(s)) for i, e := range s { - f := math.NaN() - switch val := e.(type) { - case float64: - f = val - case string: - if val == "inf" { - f = math.Inf(0) - } else if val == "-inf" { - f = math.Inf(-1) - } - } - v[i] = T(f) + v[i] = T(e) } return v } @@ -108,17 +105,17 @@ func runBsonBinaryVectorTest(t *testing.T, testKey string, test bsonBinaryVector case "0x03": testVector[testKey] = Vector{ dType: Int8Vector, - int8Data: convertSlice[int8](test.Vector), + int8Data: decodeTestSlice[int8](t, test.Vector), } case "0x27": testVector[testKey] = Vector{ dType: Float32Vector, - float32Data: convertSlice[float32](test.Vector), + float32Data: decodeTestSlice[float32](t, test.Vector), } case "0x10": testVector[testKey] = Vector{ dType: PackedBitVector, - bitData: convertSlice[byte](test.Vector), + bitData: decodeTestSlice[byte](t, test.Vector), bitPadding: uint8(test.Padding), } default: diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 0c39558c66..6f954fb56e 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -17,7 +17,7 @@ Before starting to write code, look for existing [tickets](https://jira.mongodb. The Go Driver team uses GitHub to manage and review all code changes. Patches should generally be made against the master (default) branch and include relevant tests, if applicable. -Code should compile and tests should pass under all Go versions which the driver currently supports. Currently the Go Driver supports a minimum version of Go 1.18 and requires Go 1.23 for development. Please run the following `Taskfile` targets to validate your changes: +Code should compile and tests should pass under all Go versions which the driver currently supports. Currently the Go Driver supports a minimum version of Go 1.19 and requires Go 1.23 for development. Please run the following `Taskfile` targets to validate your changes: - `task fmt` - `task lint` @@ -30,8 +30,6 @@ If any tests do not pass, or relevant tests are not included, the patch will not If you are working on a bug or feature listed in Jira, please include the ticket number prefixed with GODRIVER in the commit message and GitHub pull request title, (e.g. GODRIVER-123). For the patch commit message itself, please follow the [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/) guide. -\======= - ### Linting on commit The Go team uses [pre-commit](https://pre-commit.com/#installation) to lint both source and text files. @@ -49,6 +47,125 @@ After that, the checks will run on any changed files when committing. To manual pre-commit run --all-files ``` +### Merge up GitHub Action + +PR [#1962](https://github.com/mongodb/mongo-go-driver/pull/1962) added the "Merge up" GitHub Actions workflow to automatically roll changes from old branches into new ones. This section outlines how this process works. + +#### Regression + +If a regression is identified in an older branch, the fix should be applied directly to the latest +release branch. Once the pull request with the fix is merged into latest, the "Merge up" GitHub Action will +automatically create a pull request to merge these changes into the master branch. This ensures that all bug fixes are +incorporated into the latest codebase and actively supported versions. + +For example, suppose we have four minor release branches: release/2.0, release/2.1, release/2.2, and release/2.3. If a +regression is found in the release/2.1 branch, you would create a pull request to fix the issue in the latest supported +branch, release/2.3. Once this pull request is merged, the "Merge up" GitHub Action will automatically create a pull +request to merge the changes from release/2.3 into the master branch. Then you can proceed to release release/2.3.latest+1. + +```mermaid +gitGraph + commit tag: "Initial main setup" + + branch release/2.0 + checkout release/2.0 + commit tag: "Initial release/2.0" + + checkout main + branch release/2.1 + checkout release/2.1 + commit tag: "Bug introduced" + + checkout main + branch release/2.2 + checkout release/2.2 + commit tag: "Initial release/2.2" + + checkout main + branch release/2.3 + checkout release/2.3 + commit tag: "Initial release/2.3" + + checkout release/2.1 + commit tag: "Bug found in release/2.1" + + checkout release/2.3 + commit tag: "Bug fix applied in release/2.3 (Manual PR)" + + checkout main + merge release/2.3 tag: "Merge fix from release/2.3 into master (GitHub Actions)" + commit +``` + +If necessary, it is also possible to apply the fix to the older branch where the bug was originally found. In our example, +once the pull request is merged into release/2.1, the "Merge up" GitHub Action will initiate a series of pull requests +to roll the fix forward: first into release/2.2, then into release/2.3, and finally into master. This process makes sure +that the change cascades through every intermediate supported version. + +```mermaid +gitGraph + commit tag: "Initial main setup" + + branch release/2.0 + checkout release/2.0 + commit tag: "Initial release/2.0" + + checkout main + branch release/2.1 + checkout release/2.1 + commit tag: "Bug introduced" + + checkout main + branch release/2.2 + checkout release/2.2 + commit tag: "Initial release/2.2" + + checkout main + branch release/2.3 + checkout release/2.3 + commit tag: "Initial release/2.3" + + checkout release/2.1 + commit tag: "Bug fix in release/2.1 (Manual PR)" + + checkout release/2.2 + merge release/2.1 tag: "Merge fix from release/2.1 (GitHub Actions)" + commit + + checkout release/2.3 + merge release/2.2 tag: "Merge updates from release/2.2 (GitHub Actions)" + commit + + checkout main + merge release/2.3 tag: "Merge updates from release/2.3 (GitHub Actions)" + commit +``` + +#### Pull Request Management + +When the "Merge up" GitHub Action is enabled, multiple merge-up pull requests (such as PR1, PR2, and PR3) can be +automatically created at the same time for different bug fixes or features that all target, for example, the +release/2.x branch. At first, PR1, PR2, and PR3 exist side by side—each handling separate changes. When PR1 and PR2 are +closed, the Action automatically combines their changes into PR3. This final PR3 then contains all updates, +allowing you to merge everything into release/2.x+1 in a single, streamlined step. + +```mermaid +flowchart LR + A[PR1: Merge up from release/2.x] --> B[Close PR1] + C[PR2: Merge up from release/2.x] --> D[Close PR2] + + B --> E[PR3: Consolidated Final Pull Request] + D --> E + E --> F[release/2.x+1] + B[Close PR1] + D[Close PR2] + E[PR3: Includes changes from both PR1 and PR2] +``` + +#### Evergreen Config Merge Strategy + +Changes to the testing workflow should persist through all releases in a major version. + ### Cherry-picking between branches #### Using the GitHub App diff --git a/docs/migration-2.0.md b/docs/migration-2.0.md index b98bf6bffd..badee70de5 100644 --- a/docs/migration-2.0.md +++ b/docs/migration-2.0.md @@ -1,7 +1,5 @@ # Migrating from 1.x to 2.0 -The minimum supported version of Go for v2 is 1.18. - To upgrade imports of the Go Driver from v1 to v2, we recommend using [marwan-at-work/mod ](https://github.com/marwan-at-work/mod): diff --git a/etc/check_license.sh b/etc/check_license.sh index 5d13fa68e3..5ea046daa5 100755 --- a/etc/check_license.sh +++ b/etc/check_license.sh @@ -8,7 +8,7 @@ copyright=$"// Copyright (C) MongoDB, Inc. $year-present. // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 " -add_copyright() { +check_or_add_copyright() { file=$1 # Check if first 24 bytes match first 24 bytes of copyright notice. @@ -54,10 +54,23 @@ do esac done -# Find all .go files and try to write a license notice. -GO_FILES=$(find . -type f -name "*.go" -print) +# Shift script arguments so $1 contains only optional filename args. +# E.g. check_license.sh -a ./mongo/cursor.go +shift "$((OPTIND - 1))" +FILES=$1 -for file in $GO_FILES +# If no filenames were passed, find all .go files and try to write a license +# notice. +if [ -z "$FILES" ]; then + FILES=$(find . -type f -name "*.go" -print) +fi + +for file in $FILES do - add_copyright "$file" + # Skip any files that aren't .go files. + if [[ ! "$file" =~ .go$ ]]; then + continue + fi + + check_or_add_copyright "$file" done diff --git a/etc/compile_check.sh b/etc/compile_check.sh index 7f5e6965de..457b8e9e92 100755 --- a/etc/compile_check.sh +++ b/etc/compile_check.sh @@ -2,7 +2,7 @@ set -e # exit when any command fails set -x # show all commands being run -: ${GC:=go${GO_VERSION="1.18"}} +: ${GC:=go${GO_VERSION="1.19"}} COMPILE_CHECK_DIR="internal/cmd/compilecheck" ARCHITECTURES=("386" "arm" "arm64" "ppc64le" "s390x") diff --git a/etc/run-mongodb-aws-ecs-test.sh b/etc/run-mongodb-aws-ecs-test.sh index 4e4b794da9..d5aa2f9598 100755 --- a/etc/run-mongodb-aws-ecs-test.sh +++ b/etc/run-mongodb-aws-ecs-test.sh @@ -2,8 +2,8 @@ set -eu if [ "${SKIP_ECS_AUTH_TEST:-}" = "true" ]; then - echo "This platform does not support the ECS auth test, skipping..." - exit 0 + echo "This platform does not support the ECS auth test, skipping..." + exit 0 fi task build-aws-ecs-test @@ -13,7 +13,7 @@ ECS_SRC_DIR=$AUTH_AWS_DIR/src # pack up project directory to ssh it to the container mkdir -p $ECS_SRC_DIR/.evergreen -cp ${PROJECT_DIRECTORY}/main $ECS_SRC_DIR +cp ${PROJECT_DIRECTORY}/aws.testbin $ECS_SRC_DIR/main cp ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-ecs-test.sh $ECS_SRC_DIR/.evergreen tar -czf $ECS_SRC_DIR/src.tgz -C ${PROJECT_DIRECTORY} . diff --git a/etc/run-mongodb-aws-test.sh b/etc/run-mongodb-aws-test.sh index 6438b5810b..ceca8b9c01 100755 --- a/etc/run-mongodb-aws-test.sh +++ b/etc/run-mongodb-aws-test.sh @@ -31,4 +31,4 @@ set -x # For Go 1.16+, Go builds requires a go.mod file in the current working directory or a parent # directory. Spawn a new subshell, "cd" to the project directory, then run "go run". -(cd ${PROJECT_DIRECTORY} && go run "./internal/cmd/testaws/main.go" | tee test.suite) +(cd ${PROJECT_DIRECTORY} && go test -timeout 30m -v ./internal/test/aws/... | tee -a test.suite) diff --git a/examples/_logger/logrus/go.mod b/examples/_logger/logrus/go.mod index d2f507630a..88daedd351 100644 --- a/examples/_logger/logrus/go.mod +++ b/examples/_logger/logrus/go.mod @@ -1,4 +1,4 @@ -module go.mongodb.go/mongo-driver/examples/logger/logrus +module go.mongodb.go/mongo-driver/v2/examples/logger/logrus go 1.23 diff --git a/examples/_logger/zap/go.mod b/examples/_logger/zap/go.mod index 97ea2a974c..9a090c2d82 100644 --- a/examples/_logger/zap/go.mod +++ b/examples/_logger/zap/go.mod @@ -1,4 +1,4 @@ -module go.mongodb.go/mongo-driver/examples/logger/zap +module go.mongodb.go/mongo-driver/v2/examples/logger/zap go 1.23 diff --git a/examples/_logger/zerolog/go.mod b/examples/_logger/zerolog/go.mod index dedc1d77cf..c2e9905cc1 100644 --- a/examples/_logger/zerolog/go.mod +++ b/examples/_logger/zerolog/go.mod @@ -1,4 +1,4 @@ -module go.mongodb.go/mongo-driver/examples/logger/zerolog +module go.mongodb.go/mongo-driver/v2/examples/logger/zerolog go 1.23 diff --git a/go.mod b/go.mod index 1a36332fcb..d418fcc8ce 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.mongodb.org/mongo-driver/v2 -go 1.18 +go 1.19 require ( github.com/davecgh/go-spew v1.1.1 diff --git a/internal/cmd/benchmark/go.mod b/internal/cmd/benchmark/go.mod index 5822332b26..600af003d5 100644 --- a/internal/cmd/benchmark/go.mod +++ b/internal/cmd/benchmark/go.mod @@ -1,6 +1,6 @@ -module go.mongodb.go/mongo-driver/internal/cmd/benchmark +module go.mongodb.go/mongo-driver/v2/internal/cmd/benchmark -go 1.18 +go 1.19 replace go.mongodb.org/mongo-driver/v2 => ../../../ diff --git a/internal/cmd/compilecheck/go.mod b/internal/cmd/compilecheck/go.mod index 94cdce400e..879d07f193 100644 --- a/internal/cmd/compilecheck/go.mod +++ b/internal/cmd/compilecheck/go.mod @@ -1,6 +1,6 @@ -module go.mongodb.go/mongo-driver/internal/cmd/compilecheck +module go.mongodb.go/mongo-driver/v2/internal/cmd/compilecheck -go 1.18 +go 1.19 replace go.mongodb.org/mongo-driver/v2 => ../../../ diff --git a/internal/cmd/compilecheck/main.go b/internal/cmd/compilecheck/main.go index 6a56997de2..1661c6e097 100644 --- a/internal/cmd/compilecheck/main.go +++ b/internal/cmd/compilecheck/main.go @@ -12,9 +12,13 @@ import ( "go.mongodb.org/mongo-driver/v2/bson" "go.mongodb.org/mongo-driver/v2/mongo" "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/xoptions" ) func main() { + opts := options.Client() + xoptions.SetInternalClientOptions(opts, "foo", "bar") + _, _ = mongo.Connect(options.Client()) fmt.Println(bson.D{{Key: "key", Value: "value"}}) } diff --git a/internal/cmd/faas/awslambda/mongodb/go.mod b/internal/cmd/faas/awslambda/mongodb/go.mod index b9c63a4ea8..8cb4f8b421 100644 --- a/internal/cmd/faas/awslambda/mongodb/go.mod +++ b/internal/cmd/faas/awslambda/mongodb/go.mod @@ -1,4 +1,4 @@ -module go.mongodb.go/mongo-driver/internal/test/mongodb +module go.mongodb.go/mongo-driver/v2/internal/cmd/faas/awslambda/mongodb go 1.23 diff --git a/internal/driverutil/operation.go b/internal/driverutil/operation.go index e37cba5903..74142a56e8 100644 --- a/internal/driverutil/operation.go +++ b/internal/driverutil/operation.go @@ -6,6 +6,12 @@ package driverutil +import ( + "context" + "math" + "time" +) + // Operation Names should be sourced from the command reference documentation: // https://www.mongodb.com/docs/manual/reference/command/ const ( @@ -30,3 +36,34 @@ const ( UpdateOp = "update" // UpdateOp is the name for updating BulkWriteOp = "bulkWrite" // BulkWriteOp is the name for client-level bulk write ) + +// CalculateMaxTimeMS calculates the maxTimeMS value to send to the server +// based on the context deadline and the minimum round trip time. If the +// calculated maxTimeMS is likely to cause a socket timeout, then this function +// will return 0 and false. +func CalculateMaxTimeMS(ctx context.Context, rttMin time.Duration) (int64, bool) { + deadline, ok := ctx.Deadline() + if !ok { + return 0, true + } + + remainingTimeout := time.Until(deadline) + + // Always round up to the next millisecond value so we never truncate the calculated + // maxTimeMS value (e.g. 400 microseconds evaluates to 1ms, not 0ms). + maxTimeMS := int64((remainingTimeout - rttMin + time.Millisecond - 1) / time.Millisecond) + if maxTimeMS <= 0 { + return 0, false + } + + // The server will return a "BadValue" error if maxTimeMS is greater + // than the maximum positive int32 value (about 24.9 days). If the + // user specified a timeout value greater than that, omit maxTimeMS + // and let the client-side timeout handle cancelling the op if the + // timeout is ever reached. + if maxTimeMS > math.MaxInt32 { + return 0, true + } + + return maxTimeMS, true +} diff --git a/internal/driverutil/operation_test.go b/internal/driverutil/operation_test.go new file mode 100644 index 0000000000..474c3e1aa1 --- /dev/null +++ b/internal/driverutil/operation_test.go @@ -0,0 +1,113 @@ +// Copyright (C) MongoDB, Inc. 2025-present. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + +package driverutil + +import ( + "context" + "math" + "testing" + "time" + + "go.mongodb.org/mongo-driver/v2/internal/assert" +) + +func TestCalculateMaxTimeMS(t *testing.T) { + tests := []struct { + name string + ctx context.Context + rttMin time.Duration + wantZero bool + wantOk bool + wantPositive bool + wantExact int64 + }{ + { + name: "no deadline", + ctx: context.Background(), + rttMin: 10 * time.Millisecond, + wantZero: true, + wantOk: true, + wantPositive: false, + }, + { + name: "deadline expired", + ctx: func() context.Context { + ctx, _ := context.WithDeadline(context.Background(), time.Now().Add(-1*time.Second)) //nolint:govet + return ctx + }(), + wantZero: true, + wantOk: false, + wantPositive: false, + }, + { + name: "remaining timeout < rttMin", + ctx: func() context.Context { + ctx, _ := context.WithDeadline(context.Background(), time.Now().Add(1*time.Millisecond)) //nolint:govet + return ctx + }(), + rttMin: 10 * time.Millisecond, + wantZero: true, + wantOk: false, + wantPositive: false, + }, + { + name: "normal positive result", + ctx: func() context.Context { + ctx, _ := context.WithDeadline(context.Background(), time.Now().Add(100*time.Millisecond)) //nolint:govet + return ctx + }(), + wantZero: false, + wantOk: true, + wantPositive: true, + }, + { + name: "beyond maxInt32", + ctx: func() context.Context { + dur := time.Now().Add(time.Duration(math.MaxInt32+1000) * time.Millisecond) + ctx, _ := context.WithDeadline(context.Background(), dur) //nolint:govet + return ctx + }(), + wantZero: true, + wantOk: true, + wantPositive: false, + }, + { + name: "round up to 1ms", + ctx: func() context.Context { + ctx, _ := context.WithDeadline(context.Background(), time.Now().Add(999*time.Microsecond)) //nolint:govet + return ctx + }(), + wantOk: true, + wantExact: 1, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, got1 := CalculateMaxTimeMS(tt.ctx, tt.rttMin) + + assert.Equal(t, tt.wantOk, got1) + + if tt.wantExact > 0 && got != tt.wantExact { + t.Errorf("CalculateMaxTimeMS() got = %v, want %v", got, tt.wantExact) + } + + if tt.wantZero && got != 0 { + t.Errorf("CalculateMaxTimeMS() got = %v, want 0", got) + } + + if !tt.wantZero && got == 0 { + t.Errorf("CalculateMaxTimeMS() got = %v, want > 0", got) + } + + if !tt.wantZero && tt.wantPositive && got <= 0 { + t.Errorf("CalculateMaxTimeMS() got = %v, want > 0", got) + } + }) + } + +} diff --git a/internal/httputil/httputil.go b/internal/httputil/httputil.go index db0dd5f127..761ad14df5 100644 --- a/internal/httputil/httputil.go +++ b/internal/httputil/httputil.go @@ -10,9 +10,17 @@ import ( "net/http" ) -// DefaultHTTPClient is the default HTTP client used across the driver. -var DefaultHTTPClient = &http.Client{ - Transport: http.DefaultTransport.(*http.Transport).Clone(), +var DefaultHTTPClient = &http.Client{} + +// NewHTTPClient will return the globally-defined DefaultHTTPClient, updating +// the transport if it differs from the http package DefaultTransport. +func NewHTTPClient() *http.Client { + client := DefaultHTTPClient + if _, ok := http.DefaultTransport.(*http.Transport); !ok { + client.Transport = http.DefaultTransport + } + + return client } // CloseIdleHTTPConnections closes any connections which were previously diff --git a/internal/httputil/httputil_test.go b/internal/httputil/httputil_test.go new file mode 100644 index 0000000000..124a704904 --- /dev/null +++ b/internal/httputil/httputil_test.go @@ -0,0 +1,41 @@ +// Copyright (C) MongoDB, Inc. 2022-present. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + +package httputil + +import ( + "net/http" + "testing" + + "go.mongodb.org/mongo-driver/v2/internal/assert" +) + +type nonDefaultTransport struct{} + +func (*nonDefaultTransport) RoundTrip(*http.Request) (*http.Response, error) { return nil, nil } + +func TestDefaultHTTPClientTransport(t *testing.T) { + t.Run("default", func(t *testing.T) { + client := NewHTTPClient() + + val := assert.ObjectsAreEqual(http.DefaultClient, client) + + assert.True(t, val) + assert.Equal(t, DefaultHTTPClient, client) + }) + + t.Run("non-default global transport", func(t *testing.T) { + http.DefaultTransport = &nonDefaultTransport{} + + client := NewHTTPClient() + + val := assert.ObjectsAreEqual(&nonDefaultTransport{}, client.Transport) + + assert.True(t, val) + assert.Equal(t, DefaultHTTPClient, client) + assert.NotEqual(t, http.DefaultClient, client) // Sanity Check + }) +} diff --git a/internal/integration/cursor_test.go b/internal/integration/cursor_test.go index 5ee9986ec2..6376e78e74 100644 --- a/internal/integration/cursor_test.go +++ b/internal/integration/cursor_test.go @@ -17,6 +17,7 @@ import ( "go.mongodb.org/mongo-driver/v2/internal/assert" "go.mongodb.org/mongo-driver/v2/internal/failpoint" "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" + "go.mongodb.org/mongo-driver/v2/internal/require" "go.mongodb.org/mongo-driver/v2/mongo" "go.mongodb.org/mongo-driver/v2/mongo/options" ) @@ -303,6 +304,75 @@ func TestCursor(t *testing.T) { batchSize = sizeVal.Int32() assert.Equal(mt, int32(4), batchSize, "expected batchSize 4, got %v", batchSize) }) + + tailableAwaitDataCursorOpts := mtest.NewOptions().MinServerVersion("4.4"). + Topologies(mtest.ReplicaSet, mtest.Sharded, mtest.LoadBalanced, mtest.Single) + + mt.RunOpts("tailable awaitData cursor", tailableAwaitDataCursorOpts, func(mt *mtest.T) { + mt.Run("apply remaining timeoutMS if less than maxAwaitTimeMS", func(mt *mtest.T) { + initCollection(mt, mt.Coll) + mt.ClearEvents() + + // Create a find cursor + opts := options.Find().SetBatchSize(1).SetMaxAwaitTime(100 * time.Millisecond) + + cursor, err := mt.Coll.Find(context.Background(), bson.D{}, opts) + require.NoError(mt, err) + + _ = mt.GetStartedEvent() // Empty find from started list. + + defer cursor.Close(context.Background()) + + ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond) + defer cancel() + + // Iterate twice to force a getMore + cursor.Next(ctx) + cursor.Next(ctx) + + cmd := mt.GetStartedEvent().Command + + maxTimeMSRaw, err := cmd.LookupErr("maxTimeMS") + require.NoError(mt, err) + + got, ok := maxTimeMSRaw.AsInt64OK() + require.True(mt, ok) + + assert.LessOrEqual(mt, got, int64(50)) + }) + + mt.RunOpts("apply maxAwaitTimeMS if less than remaining timeout", tailableAwaitDataCursorOpts, func(mt *mtest.T) { + initCollection(mt, mt.Coll) + mt.ClearEvents() + + // Create a find cursor + opts := options.Find().SetBatchSize(1).SetMaxAwaitTime(50 * time.Millisecond) + + cursor, err := mt.Coll.Find(context.Background(), bson.D{}, opts) + require.NoError(mt, err) + + _ = mt.GetStartedEvent() // Empty find from started list. + + defer cursor.Close(context.Background()) + + ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) + defer cancel() + + // Iterate twice to force a getMore + cursor.Next(ctx) + cursor.Next(ctx) + + cmd := mt.GetStartedEvent().Command + + maxTimeMSRaw, err := cmd.LookupErr("maxTimeMS") + require.NoError(mt, err) + + got, ok := maxTimeMSRaw.AsInt64OK() + require.True(mt, ok) + + assert.LessOrEqual(mt, got, int64(50)) + }) + }) } type tryNextCursor interface { diff --git a/internal/integration/unified/client_operation_execution.go b/internal/integration/unified/client_operation_execution.go index 2bb2ec9326..75948ff8a0 100644 --- a/internal/integration/unified/client_operation_execution.go +++ b/internal/integration/unified/client_operation_execution.go @@ -245,10 +245,11 @@ func executeClientBulkWrite(ctx context.Context, operation *operation) (*operati if errors.As(err, &bwe) { res = bwe.PartialResult } - if res == nil || !res.Acknowledged { + if res == nil { return newDocumentResult(emptyCoreDocument, err), nil } rawBuilder := bsoncore.NewDocumentBuilder(). + AppendBoolean("acknowledged", res.Acknowledged). AppendInt64("deletedCount", res.DeletedCount). AppendInt64("insertedCount", res.InsertedCount). AppendInt64("matchedCount", res.MatchedCount). diff --git a/internal/integration/unified/collection_operation_execution.go b/internal/integration/unified/collection_operation_execution.go index 6c8b38145a..c3e7040256 100644 --- a/internal/integration/unified/collection_operation_execution.go +++ b/internal/integration/unified/collection_operation_execution.go @@ -10,6 +10,7 @@ import ( "context" "errors" "fmt" + "strings" "time" "go.mongodb.org/mongo-driver/v2/bson" @@ -1485,6 +1486,20 @@ func createFindCursor(ctx context.Context, operation *operation) (*cursorResult, opts.SetSkip(int64(val.Int32())) case "sort": opts.SetSort(val.Document()) + case "timeoutMode": + return nil, newSkipTestError("timeoutMode is not supported") + case "cursorType": + switch strings.ToLower(val.StringValue()) { + case "tailable": + opts.SetCursorType(options.Tailable) + case "tailableawait": + opts.SetCursorType(options.TailableAwait) + case "nontailable": + opts.SetCursorType(options.NonTailable) + } + case "maxAwaitTimeMS": + maxAwaitTimeMS := time.Duration(val.Int32()) * time.Millisecond + opts.SetMaxAwaitTime(maxAwaitTimeMS) default: return nil, fmt.Errorf("unrecognized find option %q", key) } diff --git a/internal/integration/unified/matches.go b/internal/integration/unified/matches.go index 52afdc283c..3d0f04030e 100644 --- a/internal/integration/unified/matches.go +++ b/internal/integration/unified/matches.go @@ -242,19 +242,32 @@ func evaluateSpecialComparison(ctx context.Context, assertionDoc bson.Raw, actua return fmt.Errorf("expected lsid %v, got %v", expectedID, actualID) } case "$$lte": - if assertionVal.Type != bson.TypeInt32 && assertionVal.Type != bson.TypeInt64 { - return fmt.Errorf("expected assertionVal to be an Int32 or Int64 but got a %s", assertionVal.Type) + if assertionVal.Type != bson.TypeInt32 && assertionVal.Type != bson.TypeInt64 && assertionVal.Type != bson.TypeDouble { + return fmt.Errorf("expected assertionVal to be an Int32, Int64, or Double but got a %s", assertionVal.Type) } - if actual.Type != bson.TypeInt32 && actual.Type != bson.TypeInt64 { - return fmt.Errorf("expected value to be an Int32 or Int64 but got a %s", actual.Type) + if actual.Type != bson.TypeInt32 && actual.Type != bson.TypeInt64 && assertionVal.Type != bson.TypeDouble { + return fmt.Errorf("expected value to be an Int32, Int64, or Double but got a %s", actual.Type) } // Numeric values can be compared even if their types are different (e.g. if expected is an int32 and actual // is an int64). - expectedInt64 := assertionVal.AsInt64() - actualInt64 := actual.AsInt64() - if actualInt64 > expectedInt64 { - return fmt.Errorf("expected numeric value %d to be less than or equal %d", actualInt64, expectedInt64) + + // TODO(GODRIVER-3594): If we decide to add AsDoubleOK() as a method to RawValue, this following conversion should be updated. + var expectedF64 float64 + if assertionVal.Type == bson.TypeDouble { + expectedF64 = assertionVal.Double() + } else { + expectedF64 = float64(assertionVal.AsInt64()) + } + var actualF64 float64 + if actual.Type == bson.TypeDouble { + actualF64 = actual.Double() + } else { + actualF64 = float64(actual.AsInt64()) + } + + if actualF64 > expectedF64 { + return fmt.Errorf("expected numeric value %f to be less than or equal %f", actualF64, expectedF64) } return nil case "$$matchAsDocument": diff --git a/internal/optionsutil/options.go b/internal/optionsutil/options.go new file mode 100644 index 0000000000..5e7527c99b --- /dev/null +++ b/internal/optionsutil/options.go @@ -0,0 +1,45 @@ +// Copyright (C) MongoDB, Inc. 2025-present. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + +package optionsutil + +// Options stores internal options. +type Options struct { + values map[string]any +} + +// WithValue sets an option value with the associated key. +func WithValue(opts Options, key string, option any) Options { + if opts.values == nil { + opts.values = make(map[string]any) + } + opts.values[key] = option + return opts +} + +// Value returns the value associated with the options for key. +func Value(opts Options, key string) any { + if opts.values == nil { + return nil + } + if val, ok := opts.values[key]; ok { + return val + } + return nil +} + +// Equal compares two Options instances for equality. +func Equal(opts1, opts2 Options) bool { + if len(opts1.values) != len(opts2.values) { + return false + } + for key, val1 := range opts1.values { + if val2, ok := opts2.values[key]; !ok || val1 != val2 { + return false + } + } + return true +} diff --git a/internal/spectest/skip.go b/internal/spectest/skip.go index 396590841d..70866530e1 100644 --- a/internal/spectest/skip.go +++ b/internal/spectest/skip.go @@ -11,10 +11,6 @@ import "testing" // skipTests is a map of "fully-qualified test name" to "the reason for skipping // the test". var skipTests = map[string][]string{ - // TODO(GODRIVER-3518): Test flexible numeric comparisons with $$lte - "Modifies $$lte operator test to also use floating point and Int64 types (GODRIVER-3518)": { - "TestUnifiedSpec/unified-test-format/tests/valid-pass/operator-lte.json/special_lte_matching_operator", - }, // SPEC-1403: This test checks to see if the correct error is thrown when auto // encrypting with a server < 4.2. Currently, the test will fail because a @@ -346,6 +342,10 @@ var skipTests = map[string][]string{ "TestUnifiedSpec/client-side-operations-timeout/tests/retryability-timeoutMS.json/operation_is_retried_multiple_times_for_non-zero_timeoutMS_-_aggregate_on_collection", "TestUnifiedSpec/client-side-operations-timeout/tests/retryability-timeoutMS.json/operation_is_retried_multiple_times_for_non-zero_timeoutMS_-_aggregate_on_database", "TestUnifiedSpec/client-side-operations-timeout/tests/gridfs-find.json/timeoutMS_applied_to_find_command", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/timeoutMS_applied_to_find", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/timeoutMS_is_refreshed_for_getMore_if_maxAwaitTimeMS_is_not_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/timeoutMS_is_refreshed_for_getMore_if_maxAwaitTimeMS_is_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/timeoutMS_is_refreshed_for_getMore_-_failure", }, // TODO(GODRIVER-3411): Tests require "getMore" with "maxTimeMS" settings. Not @@ -448,7 +448,6 @@ var skipTests = map[string][]string{ "TestUnifiedSpec/client-side-operations-timeout/tests/change-streams.json/change_stream_can_be_iterated_again_if_previous_iteration_times_out", "TestUnifiedSpec/client-side-operations-timeout/tests/change-streams.json/timeoutMS_is_refreshed_for_getMore_-_failure", "TestUnifiedSpec/client-side-operations-timeout/tests/change-streams.json/error_if_maxAwaitTimeMS_is_greater_than_timeoutMS", - "TestUnifiedSpec/client-side-operations-timeout/tests/change-streams.json/error_if_maxAwaitTimeMS_is_equal_to_timeoutMS", }, // Unknown CSOT: @@ -584,12 +583,10 @@ var skipTests = map[string][]string{ "TestUnifiedSpec/client-side-operations-timeout/tests/sessions-override-timeoutMS.json", "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/error_if_timeoutMode_is_cursor_lifetime", "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/error_if_maxAwaitTimeMS_is_greater_than_timeoutMS", - "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/error_if_maxAwaitTimeMS_is_equal_to_timeoutMS", "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/timeoutMS_applied_to_find", "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/timeoutMS_is_refreshed_for_getMore_if_maxAwaitTimeMS_is_not_set", "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/timeoutMS_is_refreshed_for_getMore_if_maxAwaitTimeMS_is_set", "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/timeoutMS_is_refreshed_for_getMore_-_failure", - "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/apply_remaining_timeoutMS_if_less_than_maxAwaitTimeMS", "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/apply_maxAwaitTimeMS_if_less_than_remaining_timeout", "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-non-awaitData.json/error_if_timeoutMode_is_cursor_lifetime", "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-non-awaitData.json/timeoutMS_applied_to_find", @@ -819,6 +816,21 @@ var skipTests = map[string][]string{ "TestUnifiedSpec/transactions-convenient-api/tests/unified/transaction-options.json/withTransaction_explicit_transaction_options_override_client_options", "TestUnifiedSpec/transactions-convenient-api/tests/unified/commit.json/withTransaction_commits_after_callback_returns", }, + + // GODRIVER-3473: the implementation of DRIVERS-2868 makes it clear that the + // Go Driver does not correctly implement the following validation for + // tailable awaitData cursors: + // + // Drivers MUST error if this option is set, timeoutMS is set to a + // non-zero value, and maxAwaitTimeMS is greater than or equal to + // timeoutMS. + // + // Once GODRIVER-3473 is completed, we can continue running these tests. + "When constructing tailable awaitData cusors must validate, timeoutMS is set to a non-zero value, and maxAwaitTimeMS is greater than or equal to timeoutMS (GODRIVER-3473)": { + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/apply_remaining_timeoutMS_if_less_than_maxAwaitTimeMS", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/error_if_maxAwaitTimeMS_is_equal_to_timeoutMS", + "TestUnifiedSpec/client-side-operations-timeout/tests/change-streams.json/error_if_maxAwaitTimeMS_is_equal_to_timeoutMS", + }, } // CheckSkip checks if the fully-qualified test name matches a list of skipped test names for a given reason. diff --git a/internal/cmd/testaws/main.go b/internal/test/aws/aws_test.go similarity index 52% rename from internal/cmd/testaws/main.go rename to internal/test/aws/aws_test.go index 0b037bd09c..947ad07e16 100644 --- a/internal/cmd/testaws/main.go +++ b/internal/test/aws/aws_test.go @@ -1,4 +1,4 @@ -// Copyright (C) MongoDB, Inc. 2017-present. +// Copyright (C) MongoDB, Inc. 2025-present. // // Licensed under the Apache License, Version 2.0 (the "License"); you may // not use this file except in compliance with the License. You may obtain @@ -9,32 +9,30 @@ package main import ( "context" "errors" - "fmt" "os" + "testing" "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/internal/require" "go.mongodb.org/mongo-driver/v2/mongo" "go.mongodb.org/mongo-driver/v2/mongo/options" ) -func main() { +func TestAWS(t *testing.T) { uri := os.Getenv("MONGODB_URI") - ctx := context.Background() client, err := mongo.Connect(options.Client().ApplyURI(uri)) - if err != nil { - panic(fmt.Sprintf("Connect error: %v", err)) - } + require.NoError(t, err, "Connect error") defer func() { - if err = client.Disconnect(ctx); err != nil { - panic(fmt.Sprintf("Disconnect error: %v", err)) - } + err = client.Disconnect(context.Background()) + require.NoError(t, err) }() - db := client.Database("aws") - coll := db.Collection("test") - if err = coll.FindOne(ctx, bson.D{{"x", 1}}).Err(); err != nil && !errors.Is(err, mongo.ErrNoDocuments) { - panic(fmt.Sprintf("FindOne error: %v", err)) + coll := client.Database("aws").Collection("test") + + err = coll.FindOne(context.Background(), bson.D{{Key: "x", Value: 1}}).Err() + if err != nil && !errors.Is(err, mongo.ErrNoDocuments) { + t.Logf("FindOne error: %v", err) } } diff --git a/internal/test/compilecheck/compile_check_test.go b/internal/test/compilecheck/compile_check_test.go index 35daaa787f..831b02053f 100644 --- a/internal/test/compilecheck/compile_check_test.go +++ b/internal/test/compilecheck/compile_check_test.go @@ -27,7 +27,7 @@ import ( // requires a version of klauspost/compress that is not compatible with the Go // Driver. Must use GOWORK=off to run this test. -const minSupportedVersion = "1.18" +const minSupportedVersion = "1.19" func TestCompileCheck(t *testing.T) { cwd, err := os.Getwd() diff --git a/internal/test/compilecheck/go.mod b/internal/test/compilecheck/go.mod index e36075c668..a9f29d458c 100644 --- a/internal/test/compilecheck/go.mod +++ b/internal/test/compilecheck/go.mod @@ -1,4 +1,4 @@ -module go.mongodb.go/mongo-driver/internal/test/compilecheck +module go.mongodb.go/mongo-driver/v2/internal/test/compilecheck go 1.23.0 @@ -56,8 +56,9 @@ require ( go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect - golang.org/x/crypto v0.31.0 // indirect - golang.org/x/sys v0.28.0 // indirect + golang.org/x/crypto v0.36.0 // indirect + golang.org/x/net v0.38.0 // indirect + golang.org/x/sys v0.31.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/internal/test/compilecheck/go.sum b/internal/test/compilecheck/go.sum index 24ab8ad6f0..566e970ebe 100644 --- a/internal/test/compilecheck/go.sum +++ b/internal/test/compilecheck/go.sum @@ -135,8 +135,8 @@ go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= @@ -145,8 +145,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= -golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -160,14 +160,14 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= -golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= +golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/internal/test/goleak/go.mod b/internal/test/goleak/go.mod index dc08892caa..1b819cf64b 100644 --- a/internal/test/goleak/go.mod +++ b/internal/test/goleak/go.mod @@ -1,4 +1,4 @@ -module go.mongodb.go/mongo-driver/internal/test/goleak +module go.mongodb.go/mongo-driver/v2/internal/test/goleak go 1.22 diff --git a/mongo/options/clientoptions.go b/mongo/options/clientoptions.go index 925325c6c5..6cfb3dc2f1 100644 --- a/mongo/options/clientoptions.go +++ b/mongo/options/clientoptions.go @@ -26,6 +26,7 @@ import ( "go.mongodb.org/mongo-driver/v2/bson" "go.mongodb.org/mongo-driver/v2/event" "go.mongodb.org/mongo-driver/v2/internal/httputil" + "go.mongodb.org/mongo-driver/v2/internal/optionsutil" "go.mongodb.org/mongo-driver/v2/mongo/readconcern" "go.mongodb.org/mongo-driver/v2/mongo/readpref" "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" @@ -286,14 +287,22 @@ type ClientOptions struct { // encryption. // // Deprecated: This option is for internal use only and should not be set (see GODRIVER-2149). It may be - // changed or removed in any release. + // changed in any release. This option will be removed in 3.0 and replaced with the Custom options.Options + // pattern: SetInternalClientOptions(clientOptions, "crypt", myCrypt) Crypt driver.Crypt // Deployment specifies a custom deployment to use for the new Client. // + // Deprecated: This option is for internal use only and should not be set. It may be changed in any release. + // This option will be removed in 3.0 and replaced with the Custom options.Options pattern: + // SetInternalClientOptions(clientOptions, "deployment", myDeployment) + Deployment driver.Deployment + + // Custom specifies internal options for the new Client. + // // Deprecated: This option is for internal use only and should not be set. It may be changed or removed in any // release. - Deployment driver.Deployment + Custom optionsutil.Options connString *connstring.ConnString err error diff --git a/mongo/options/clientoptions_test.go b/mongo/options/clientoptions_test.go index 907584d5f0..2a2471adb5 100644 --- a/mongo/options/clientoptions_test.go +++ b/mongo/options/clientoptions_test.go @@ -27,6 +27,7 @@ import ( "go.mongodb.org/mongo-driver/v2/event" "go.mongodb.org/mongo-driver/v2/internal/assert" "go.mongodb.org/mongo-driver/v2/internal/httputil" + "go.mongodb.org/mongo-driver/v2/internal/optionsutil" "go.mongodb.org/mongo-driver/v2/internal/ptrutil" "go.mongodb.org/mongo-driver/v2/mongo/readconcern" "go.mongodb.org/mongo-driver/v2/mongo/readpref" @@ -156,6 +157,7 @@ func TestClientOptions(t *testing.T) { cmp.Comparer(func(r1, r2 *bson.Registry) bool { return r1 == r2 }), cmp.Comparer(func(cfg1, cfg2 *tls.Config) bool { return cfg1 == cfg2 }), cmp.Comparer(func(fp1, fp2 *event.PoolMonitor) bool { return fp1 == fp2 }), + cmp.Comparer(optionsutil.Equal), cmp.AllowUnexported(ClientOptions{}), cmpopts.IgnoreFields(http.Client{}, "Transport"), ); diff != "" { @@ -1253,6 +1255,7 @@ func TestApplyURI(t *testing.T) { cmp.Comparer(func(r1, r2 *bson.Registry) bool { return r1 == r2 }), cmp.Comparer(compareTLSConfig), cmp.Comparer(compareErrors), + cmp.Comparer(optionsutil.Equal), cmpopts.SortSlices(stringLess), cmpopts.IgnoreFields(connstring.ConnString{}, "SSLClientCertificateKeyPassword"), cmpopts.IgnoreFields(http.Client{}, "Transport"), diff --git a/mongo/readpref/options.go b/mongo/readpref/options.go index f4671d5d36..5cd9c9f69c 100644 --- a/mongo/readpref/options.go +++ b/mongo/readpref/options.go @@ -71,10 +71,15 @@ func WithTagSets(tagSets ...tag.Set) Option { } } -// WithHedgeEnabled specifies whether or not hedged reads should be enabled in the server. This feature requires MongoDB -// server version 4.4 or higher. For more information about hedged reads, see -// https://www.mongodb.com/docs/manual/core/sharded-cluster-query-router/#mongos-hedged-reads. If not specified, the default -// is to not send a value to the server, which will result in the server defaults being used. +// WithHedgeEnabled specifies whether or not hedged reads should be enabled in +// the server. This feature requires MongoDB server version 4.4 or higher. For +// more information about hedged reads, see +// https://www.mongodb.com/docs/manual/core/sharded-cluster-query-router/#mongos-hedged-reads. +// If not specified, the default is to not send a value to the server, which +// will result in the server defaults being used. +// +// Deprecated: Hedged reads are deprecated in MongoDB 8.0 and may be removed in +// a future MongoDB version. func WithHedgeEnabled(hedgeEnabled bool) Option { return func(rp *ReadPref) error { rp.hedgeEnabled = &hedgeEnabled diff --git a/mongo/readpref/readpref.go b/mongo/readpref/readpref.go index 47e5b0cb8a..5f2320e222 100644 --- a/mongo/readpref/readpref.go +++ b/mongo/readpref/readpref.go @@ -103,8 +103,12 @@ func (r *ReadPref) TagSets() []tag.Set { return r.tagSets } -// HedgeEnabled returns whether or not hedged reads are enabled for this read preference. If this option was not -// specified during read preference construction, nil is returned. +// HedgeEnabled returns whether or not hedged reads are enabled for this read +// preference. If this option was not specified during read preference +// construction, nil is returned. +// +// Deprecated: Hedged reads are deprecated in MongoDB 8.0 and may be removed in +// a future MongoDB version. func (r *ReadPref) HedgeEnabled() *bool { return r.hedgeEnabled } diff --git a/testdata/atlas-data-lake-testing/aggregate.json b/testdata/atlas-data-lake-testing/aggregate.json deleted file mode 100644 index 99995bca41..0000000000 --- a/testdata/atlas-data-lake-testing/aggregate.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "collection_name": "driverdata", - "database_name": "test", - "tests": [ - { - "description": "Aggregate with pipeline (project, sort, limit)", - "operations": [ - { - "object": "collection", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 0 - } - }, - { - "$sort": { - "a": 1 - } - }, - { - "$limit": 2 - } - ] - }, - "result": [ - { - "a": 1, - "b": 2, - "c": 3 - }, - { - "a": 2, - "b": 3, - "c": 4 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "driverdata" - } - } - } - ] - } - ] -} diff --git a/testdata/atlas-data-lake-testing/aggregate.yml b/testdata/atlas-data-lake-testing/aggregate.yml deleted file mode 100644 index bbe813987d..0000000000 --- a/testdata/atlas-data-lake-testing/aggregate.yml +++ /dev/null @@ -1,23 +0,0 @@ -collection_name: &collection_name "driverdata" -database_name: &database_name "test" - -tests: - - - description: "Aggregate with pipeline (project, sort, limit)" - operations: - - - object: collection - name: aggregate - arguments: - pipeline: - - $project: { _id: 0 } - - $sort: { a: 1 } - - $limit: 2 - result: - - { a: 1, b: 2, c: 3 } - - { a: 2, b: 3, c: 4 } - expectations: - - - command_started_event: - command: - aggregate: *collection_name diff --git a/testdata/atlas-data-lake-testing/estimatedDocumentCount.json b/testdata/atlas-data-lake-testing/estimatedDocumentCount.json deleted file mode 100644 index 997a3ab3fc..0000000000 --- a/testdata/atlas-data-lake-testing/estimatedDocumentCount.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "collection_name": "driverdata", - "database_name": "test", - "tests": [ - { - "description": "estimatedDocumentCount succeeds", - "operations": [ - { - "object": "collection", - "name": "estimatedDocumentCount", - "result": 15 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "driverdata" - }, - "command_name": "count", - "database_name": "test" - } - } - ] - } - ] -} diff --git a/testdata/atlas-data-lake-testing/estimatedDocumentCount.yml b/testdata/atlas-data-lake-testing/estimatedDocumentCount.yml deleted file mode 100644 index 64c6bbd04f..0000000000 --- a/testdata/atlas-data-lake-testing/estimatedDocumentCount.yml +++ /dev/null @@ -1,18 +0,0 @@ -collection_name: &collection_name "driverdata" -database_name: &database_name "test" - -tests: - - - description: "estimatedDocumentCount succeeds" - operations: - - - object: collection - name: estimatedDocumentCount - result: 15 - expectations: - - - command_started_event: - command: - count: *collection_name - command_name: count - database_name: *database_name diff --git a/testdata/atlas-data-lake-testing/find.json b/testdata/atlas-data-lake-testing/find.json deleted file mode 100644 index 8a3468a135..0000000000 --- a/testdata/atlas-data-lake-testing/find.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "collection_name": "driverdata", - "database_name": "test", - "tests": [ - { - "description": "Find with projection and sort", - "operations": [ - { - "object": "collection", - "name": "find", - "arguments": { - "filter": { - "b": { - "$gt": 5 - } - }, - "projection": { - "_id": 0 - }, - "sort": { - "a": 1 - }, - "limit": 5 - }, - "result": [ - { - "a": 5, - "b": 6, - "c": 7 - }, - { - "a": 6, - "b": 7, - "c": 8 - }, - { - "a": 7, - "b": 8, - "c": 9 - }, - { - "a": 8, - "b": 9, - "c": 10 - }, - { - "a": 9, - "b": 10, - "c": 11 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "driverdata" - } - } - } - ] - } - ] -} diff --git a/testdata/atlas-data-lake-testing/find.yml b/testdata/atlas-data-lake-testing/find.yml deleted file mode 100644 index ed0f9fd530..0000000000 --- a/testdata/atlas-data-lake-testing/find.yml +++ /dev/null @@ -1,27 +0,0 @@ -collection_name: &collection_name "driverdata" -database_name: &database_name "test" - -tests: - - - description: "Find with projection and sort" - operations: - - - object: collection - name: find - arguments: - filter: { b: { $gt: 5 } } - projection: { _id: 0 } - sort: { a: 1 } - limit: 5 - result: - - {"a": 5, "b": 6, "c": 7} - - {"a": 6, "b": 7, "c": 8} - - {"a": 7, "b": 8, "c": 9} - - {"a": 8, "b": 9, "c": 10} - - {"a": 9, "b": 10, "c": 11} - expectations: - - - command_started_event: - command: - find: *collection_name - diff --git a/testdata/atlas-data-lake-testing/getMore.json b/testdata/atlas-data-lake-testing/getMore.json deleted file mode 100644 index fa1deab4f3..0000000000 --- a/testdata/atlas-data-lake-testing/getMore.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "collection_name": "driverdata", - "database_name": "test", - "tests": [ - { - "description": "A successful find event with getMore", - "operations": [ - { - "object": "collection", - "name": "find", - "arguments": { - "filter": { - "a": { - "$gte": 2 - } - }, - "sort": { - "a": 1 - }, - "batchSize": 3, - "limit": 4 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "driverdata", - "filter": { - "a": { - "$gte": 2 - } - }, - "sort": { - "a": 1 - }, - "batchSize": 3, - "limit": 4 - }, - "command_name": "find", - "database_name": "test" - } - }, - { - "command_started_event": { - "command": { - "batchSize": 1 - }, - "command_name": "getMore", - "database_name": "cursors" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/testdata/atlas-data-lake-testing/getMore.yml b/testdata/atlas-data-lake-testing/getMore.yml deleted file mode 100644 index c16c1224c5..0000000000 --- a/testdata/atlas-data-lake-testing/getMore.yml +++ /dev/null @@ -1,35 +0,0 @@ -collection_name: &collection_name "driverdata" -database_name: &database_name "test" - -tests: - - - description: "A successful find event with getMore" - operations: - - - object: collection - name: find - arguments: - filter: { a: { $gte: 2 }} - sort: { a: 1 } - batchSize: 3 - limit: 4 - expectations: - - - command_started_event: - command: - find: *collection_name - filter: { a: { $gte : 2 }} - sort: { a: 1 } - batchSize: 3 - limit: 4 - command_name: "find" - database_name: *database_name - - - command_started_event: - command: - # Assertions for "getMore" and "collection" fields are omitted, as they will have arbitrary values - # TODO: Those assertions can be added after wildcard matchers are available via SPEC-1215 - batchSize: 1 - command_name: "getMore" - # mongohoused always expects getMores on the "cursors" database - database_name: "cursors" diff --git a/testdata/atlas-data-lake-testing/listCollections.json b/testdata/atlas-data-lake-testing/listCollections.json deleted file mode 100644 index 8d8a8f6c1b..0000000000 --- a/testdata/atlas-data-lake-testing/listCollections.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "database_name": "test", - "tests": [ - { - "description": "ListCollections succeeds", - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command_name": "listCollections", - "database_name": "test", - "command": { - "listCollections": 1 - } - } - } - ] - } - ] -} \ No newline at end of file diff --git a/testdata/atlas-data-lake-testing/listCollections.yml b/testdata/atlas-data-lake-testing/listCollections.yml deleted file mode 100644 index 2b1fedcddb..0000000000 --- a/testdata/atlas-data-lake-testing/listCollections.yml +++ /dev/null @@ -1,17 +0,0 @@ -database_name: &database_name "test" - -tests: - - - description: "ListCollections succeeds" - operations: - - - name: listCollections - object: database - expectations: - - - command_started_event: - command_name: "listCollections" - database_name: *database_name - command: - listCollections: 1 - diff --git a/testdata/atlas-data-lake-testing/listDatabases.json b/testdata/atlas-data-lake-testing/listDatabases.json deleted file mode 100644 index f8ec9a0bf4..0000000000 --- a/testdata/atlas-data-lake-testing/listDatabases.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "tests": [ - { - "description": "ListDatabases succeeds", - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command_name": "listDatabases", - "database_name": "admin", - "command": { - "listDatabases": 1 - } - } - } - ] - } - ] -} \ No newline at end of file diff --git a/testdata/atlas-data-lake-testing/listDatabases.yml b/testdata/atlas-data-lake-testing/listDatabases.yml deleted file mode 100644 index b6e565b90f..0000000000 --- a/testdata/atlas-data-lake-testing/listDatabases.yml +++ /dev/null @@ -1,15 +0,0 @@ -tests: - - - description: "ListDatabases succeeds" - operations: - - - name: listDatabases - object: client - expectations: - - - command_started_event: - command_name: "listDatabases" - database_name: "admin" - command: - listDatabases: 1 - diff --git a/testdata/atlas-data-lake-testing/runCommand.json b/testdata/atlas-data-lake-testing/runCommand.json deleted file mode 100644 index f72e863ba5..0000000000 --- a/testdata/atlas-data-lake-testing/runCommand.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "database_name": "test", - "tests": [ - { - "description": "ping succeeds using runCommand", - "operations": [ - { - "name": "runCommand", - "object": "database", - "command_name": "ping", - "arguments": { - "command": { - "ping": 1 - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command_name": "ping", - "database_name": "test", - "command": { - "ping": 1 - } - } - } - ] - } - ] -} \ No newline at end of file diff --git a/testdata/atlas-data-lake-testing/runCommand.yml b/testdata/atlas-data-lake-testing/runCommand.yml deleted file mode 100644 index 14435c28d5..0000000000 --- a/testdata/atlas-data-lake-testing/runCommand.yml +++ /dev/null @@ -1,20 +0,0 @@ -database_name: &database_name "test" - -tests: - - - description: "ping succeeds using runCommand" - operations: - - - name: runCommand - object: database - command_name: ping - arguments: - command: - ping: 1 - expectations: - - - command_started_event: - command_name: ping - database_name: *database_name - command: - ping: 1 diff --git a/testdata/auth/connection-string.json b/testdata/auth/connection-string.json deleted file mode 100644 index 3a099c8137..0000000000 --- a/testdata/auth/connection-string.json +++ /dev/null @@ -1,651 +0,0 @@ -{ - "tests": [ - { - "description": "should use the default source and mechanism", - "uri": "mongodb://user:password@localhost", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "admin", - "mechanism": null, - "mechanism_properties": null - } - }, - { - "description": "should use the database when no authSource is specified", - "uri": "mongodb://user:password@localhost/foo", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "foo", - "mechanism": null, - "mechanism_properties": null - } - }, - { - "description": "should use the authSource when specified", - "uri": "mongodb://user:password@localhost/foo?authSource=bar", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "bar", - "mechanism": null, - "mechanism_properties": null - } - }, - { - "description": "should recognise the mechanism (GSSAPI)", - "uri": "mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI", - "valid": true, - "credential": { - "username": "user@DOMAIN.COM", - "password": null, - "source": "$external", - "mechanism": "GSSAPI", - "mechanism_properties": { - "SERVICE_NAME": "mongodb" - } - } - }, - { - "description": "should ignore the database (GSSAPI)", - "uri": "mongodb://user%40DOMAIN.COM@localhost/foo?authMechanism=GSSAPI", - "valid": true, - "credential": { - "username": "user@DOMAIN.COM", - "password": null, - "source": "$external", - "mechanism": "GSSAPI", - "mechanism_properties": { - "SERVICE_NAME": "mongodb" - } - } - }, - { - "description": "should accept valid authSource (GSSAPI)", - "uri": "mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI&authSource=$external", - "valid": true, - "credential": { - "username": "user@DOMAIN.COM", - "password": null, - "source": "$external", - "mechanism": "GSSAPI", - "mechanism_properties": { - "SERVICE_NAME": "mongodb" - } - } - }, - { - "description": "should accept generic mechanism property (GSSAPI)", - "uri": "mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:forward,SERVICE_HOST:example.com", - "valid": true, - "credential": { - "username": "user@DOMAIN.COM", - "password": null, - "source": "$external", - "mechanism": "GSSAPI", - "mechanism_properties": { - "SERVICE_NAME": "other", - "SERVICE_HOST": "example.com", - "CANONICALIZE_HOST_NAME": "forward" - } - } - }, - { - "description": "should accept forwardAndReverse hostname canonicalization (GSSAPI)", - "uri": "mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:forwardAndReverse", - "valid": true, - "credential": { - "username": "user@DOMAIN.COM", - "password": null, - "source": "$external", - "mechanism": "GSSAPI", - "mechanism_properties": { - "SERVICE_NAME": "other", - "CANONICALIZE_HOST_NAME": "forwardAndReverse" - } - } - }, - { - "description": "should accept no hostname canonicalization (GSSAPI)", - "uri": "mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:none", - "valid": true, - "credential": { - "username": "user@DOMAIN.COM", - "password": null, - "source": "$external", - "mechanism": "GSSAPI", - "mechanism_properties": { - "SERVICE_NAME": "other", - "CANONICALIZE_HOST_NAME": "none" - } - } - }, - { - "description": "must raise an error when the hostname canonicalization is invalid", - "uri": "mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:invalid", - "valid": false - }, - { - "description": "should accept the password (GSSAPI)", - "uri": "mongodb://user%40DOMAIN.COM:password@localhost/?authMechanism=GSSAPI&authSource=$external", - "valid": true, - "credential": { - "username": "user@DOMAIN.COM", - "password": "password", - "source": "$external", - "mechanism": "GSSAPI", - "mechanism_properties": { - "SERVICE_NAME": "mongodb" - } - } - }, - { - "description": "must raise an error when the authSource is empty", - "uri": "mongodb://user:password@localhost/foo?authSource=", - "valid": false - }, - { - "description": "must raise an error when the authSource is empty without credentials", - "uri": "mongodb://localhost/admin?authSource=", - "valid": false - }, - { - "description": "should throw an exception if authSource is invalid (GSSAPI)", - "uri": "mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI&authSource=foo", - "valid": false - }, - { - "description": "should throw an exception if no username (GSSAPI)", - "uri": "mongodb://localhost/?authMechanism=GSSAPI", - "valid": false - }, - { - "description": "should recognize the mechanism (MONGODB-X509)", - "uri": "mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/?authMechanism=MONGODB-X509", - "valid": true, - "credential": { - "username": "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry", - "password": null, - "source": "$external", - "mechanism": "MONGODB-X509", - "mechanism_properties": null - } - }, - { - "description": "should ignore the database (MONGODB-X509)", - "uri": "mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/foo?authMechanism=MONGODB-X509", - "valid": true, - "credential": { - "username": "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry", - "password": null, - "source": "$external", - "mechanism": "MONGODB-X509", - "mechanism_properties": null - } - }, - { - "description": "should accept valid authSource (MONGODB-X509)", - "uri": "mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/?authMechanism=MONGODB-X509&authSource=$external", - "valid": true, - "credential": { - "username": "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry", - "password": null, - "source": "$external", - "mechanism": "MONGODB-X509", - "mechanism_properties": null - } - }, - { - "description": "should recognize the mechanism with no username (MONGODB-X509)", - "uri": "mongodb://localhost/?authMechanism=MONGODB-X509", - "valid": true, - "credential": { - "username": null, - "password": null, - "source": "$external", - "mechanism": "MONGODB-X509", - "mechanism_properties": null - } - }, - { - "description": "should recognize the mechanism with no username when auth source is explicitly specified (MONGODB-X509)", - "uri": "mongodb://localhost/?authMechanism=MONGODB-X509&authSource=$external", - "valid": true, - "credential": { - "username": null, - "password": null, - "source": "$external", - "mechanism": "MONGODB-X509", - "mechanism_properties": null - } - }, - { - "description": "should throw an exception if supplied a password (MONGODB-X509)", - "uri": "mongodb://user:password@localhost/?authMechanism=MONGODB-X509", - "valid": false - }, - { - "description": "should throw an exception if authSource is invalid (MONGODB-X509)", - "uri": "mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/foo?authMechanism=MONGODB-X509&authSource=bar", - "valid": false - }, - { - "description": "should recognize the mechanism (PLAIN)", - "uri": "mongodb://user:password@localhost/?authMechanism=PLAIN", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "$external", - "mechanism": "PLAIN", - "mechanism_properties": null - } - }, - { - "description": "should use the database when no authSource is specified (PLAIN)", - "uri": "mongodb://user:password@localhost/foo?authMechanism=PLAIN", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "foo", - "mechanism": "PLAIN", - "mechanism_properties": null - } - }, - { - "description": "should use the authSource when specified (PLAIN)", - "uri": "mongodb://user:password@localhost/foo?authMechanism=PLAIN&authSource=bar", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "bar", - "mechanism": "PLAIN", - "mechanism_properties": null - } - }, - { - "description": "should throw an exception if no username (PLAIN)", - "uri": "mongodb://localhost/?authMechanism=PLAIN", - "valid": false - }, - { - "description": "should recognize the mechanism (SCRAM-SHA-1)", - "uri": "mongodb://user:password@localhost/?authMechanism=SCRAM-SHA-1", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "admin", - "mechanism": "SCRAM-SHA-1", - "mechanism_properties": null - } - }, - { - "description": "should use the database when no authSource is specified (SCRAM-SHA-1)", - "uri": "mongodb://user:password@localhost/foo?authMechanism=SCRAM-SHA-1", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "foo", - "mechanism": "SCRAM-SHA-1", - "mechanism_properties": null - } - }, - { - "description": "should accept valid authSource (SCRAM-SHA-1)", - "uri": "mongodb://user:password@localhost/foo?authMechanism=SCRAM-SHA-1&authSource=bar", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "bar", - "mechanism": "SCRAM-SHA-1", - "mechanism_properties": null - } - }, - { - "description": "should throw an exception if no username (SCRAM-SHA-1)", - "uri": "mongodb://localhost/?authMechanism=SCRAM-SHA-1", - "valid": false - }, - { - "description": "should recognize the mechanism (SCRAM-SHA-256)", - "uri": "mongodb://user:password@localhost/?authMechanism=SCRAM-SHA-256", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "admin", - "mechanism": "SCRAM-SHA-256", - "mechanism_properties": null - } - }, - { - "description": "should use the database when no authSource is specified (SCRAM-SHA-256)", - "uri": "mongodb://user:password@localhost/foo?authMechanism=SCRAM-SHA-256", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "foo", - "mechanism": "SCRAM-SHA-256", - "mechanism_properties": null - } - }, - { - "description": "should accept valid authSource (SCRAM-SHA-256)", - "uri": "mongodb://user:password@localhost/foo?authMechanism=SCRAM-SHA-256&authSource=bar", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "bar", - "mechanism": "SCRAM-SHA-256", - "mechanism_properties": null - } - }, - { - "description": "should throw an exception if no username (SCRAM-SHA-256)", - "uri": "mongodb://localhost/?authMechanism=SCRAM-SHA-256", - "valid": false - }, - { - "description": "URI with no auth-related info doesn't create credential", - "uri": "mongodb://localhost/", - "valid": true, - "credential": null - }, - { - "description": "database in URI path doesn't create credentials", - "uri": "mongodb://localhost/foo", - "valid": true, - "credential": null - }, - { - "description": "authSource without username doesn't create credential (default mechanism)", - "uri": "mongodb://localhost/?authSource=foo", - "valid": true, - "credential": null - }, - { - "description": "should throw an exception if no username provided (userinfo implies default mechanism)", - "uri": "mongodb://@localhost.com/", - "valid": false - }, - { - "description": "should throw an exception if no username/password provided (userinfo implies default mechanism)", - "uri": "mongodb://:@localhost.com/", - "valid": false - }, - { - "description": "should recognise the mechanism (MONGODB-AWS)", - "uri": "mongodb://localhost/?authMechanism=MONGODB-AWS", - "valid": true, - "credential": { - "username": null, - "password": null, - "source": "$external", - "mechanism": "MONGODB-AWS", - "mechanism_properties": null - } - }, - { - "description": "should recognise the mechanism when auth source is explicitly specified (MONGODB-AWS)", - "uri": "mongodb://localhost/?authMechanism=MONGODB-AWS&authSource=$external", - "valid": true, - "credential": { - "username": null, - "password": null, - "source": "$external", - "mechanism": "MONGODB-AWS", - "mechanism_properties": null - } - }, - { - "description": "should throw an exception if username and no password (MONGODB-AWS)", - "uri": "mongodb://user@localhost/?authMechanism=MONGODB-AWS", - "valid": false, - "credential": null - }, - { - "description": "should use username and password if specified (MONGODB-AWS)", - "uri": "mongodb://user%21%40%23%24%25%5E%26%2A%28%29_%2B:pass%21%40%23%24%25%5E%26%2A%28%29_%2B@localhost/?authMechanism=MONGODB-AWS", - "valid": true, - "credential": { - "username": "user!@#$%^&*()_+", - "password": "pass!@#$%^&*()_+", - "source": "$external", - "mechanism": "MONGODB-AWS", - "mechanism_properties": null - } - }, - { - "description": "should use username, password and session token if specified (MONGODB-AWS)", - "uri": "mongodb://user:password@localhost/?authMechanism=MONGODB-AWS&authMechanismProperties=AWS_SESSION_TOKEN:token%21%40%23%24%25%5E%26%2A%28%29_%2B", - "valid": true, - "credential": { - "username": "user", - "password": "password", - "source": "$external", - "mechanism": "MONGODB-AWS", - "mechanism_properties": { - "AWS_SESSION_TOKEN": "token!@#$%^&*()_+" - } - } - }, - { - "description": "should recognise the mechanism with test environment (MONGODB-OIDC)", - "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:test", - "valid": true, - "credential": { - "username": null, - "password": null, - "source": "$external", - "mechanism": "MONGODB-OIDC", - "mechanism_properties": { - "ENVIRONMENT": "test" - } - } - }, - { - "description": "should recognise the mechanism when auth source is explicitly specified and with environment (MONGODB-OIDC)", - "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC&authSource=$external&authMechanismProperties=ENVIRONMENT:test", - "valid": true, - "credential": { - "username": null, - "password": null, - "source": "$external", - "mechanism": "MONGODB-OIDC", - "mechanism_properties": { - "ENVIRONMENT": "test" - } - } - }, - { - "description": "should throw an exception if supplied a password (MONGODB-OIDC)", - "uri": "mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:test", - "valid": false, - "credential": null - }, - { - "description": "should throw an exception if username is specified for test (MONGODB-OIDC)", - "uri": "mongodb://principalName@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:test", - "valid": false, - "credential": null - }, - { - "description": "should throw an exception if specified environment is not supported (MONGODB-OIDC)", - "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:invalid", - "valid": false, - "credential": null - }, - { - "description": "should throw an exception if neither environment nor callbacks specified (MONGODB-OIDC)", - "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC", - "valid": false, - "credential": null - }, - { - "description": "should throw an exception when unsupported auth property is specified (MONGODB-OIDC)", - "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=UnsupportedProperty:unexisted", - "valid": false, - "credential": null - }, - { - "description": "should recognise the mechanism with azure provider (MONGODB-OIDC)", - "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:foo", - "valid": true, - "credential": { - "username": null, - "password": null, - "source": "$external", - "mechanism": "MONGODB-OIDC", - "mechanism_properties": { - "ENVIRONMENT": "azure", - "TOKEN_RESOURCE": "foo" - } - } - }, - { - "description": "should accept a username with azure provider (MONGODB-OIDC)", - "uri": "mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:foo", - "valid": true, - "credential": { - "username": "user", - "password": null, - "source": "$external", - "mechanism": "MONGODB-OIDC", - "mechanism_properties": { - "ENVIRONMENT": "azure", - "TOKEN_RESOURCE": "foo" - } - } - }, - { - "description": "should accept a url-encoded TOKEN_RESOURCE (MONGODB-OIDC)", - "uri": "mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:mongodb%3A%2F%2Ftest-cluster", - "valid": true, - "credential": { - "username": "user", - "password": null, - "source": "$external", - "mechanism": "MONGODB-OIDC", - "mechanism_properties": { - "ENVIRONMENT": "azure", - "TOKEN_RESOURCE": "mongodb://test-cluster" - } - } - }, - { - "description": "should accept an un-encoded TOKEN_RESOURCE (MONGODB-OIDC)", - "uri": "mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:mongodb://test-cluster", - "valid": true, - "credential": { - "username": "user", - "password": null, - "source": "$external", - "mechanism": "MONGODB-OIDC", - "mechanism_properties": { - "ENVIRONMENT": "azure", - "TOKEN_RESOURCE": "mongodb://test-cluster" - } - } - }, - { - "description": "should handle a complicated url-encoded TOKEN_RESOURCE (MONGODB-OIDC)", - "uri": "mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:abcd%25ef%3Ag%26hi", - "valid": true, - "credential": { - "username": "user", - "password": null, - "source": "$external", - "mechanism": "MONGODB-OIDC", - "mechanism_properties": { - "ENVIRONMENT": "azure", - "TOKEN_RESOURCE": "abcd%ef:g&hi" - } - } - }, - { - "description": "should url-encode a TOKEN_RESOURCE (MONGODB-OIDC)", - "uri": "mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:a$b", - "valid": true, - "credential": { - "username": "user", - "password": null, - "source": "$external", - "mechanism": "MONGODB-OIDC", - "mechanism_properties": { - "ENVIRONMENT": "azure", - "TOKEN_RESOURCE": "a$b" - } - } - }, - { - "description": "should accept a username and throw an error for a password with azure provider (MONGODB-OIDC)", - "uri": "mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:foo", - "valid": false, - "credential": null - }, - { - "description": "should throw an exception if no token audience is given for azure provider (MONGODB-OIDC)", - "uri": "mongodb://username@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure", - "valid": false, - "credential": null - }, - { - "description": "should recognise the mechanism with gcp provider (MONGODB-OIDC)", - "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:gcp,TOKEN_RESOURCE:foo", - "valid": true, - "credential": { - "username": null, - "password": null, - "source": "$external", - "mechanism": "MONGODB-OIDC", - "mechanism_properties": { - "ENVIRONMENT": "gcp", - "TOKEN_RESOURCE": "foo" - } - } - }, - { - "description": "should throw an error for a username and password with gcp provider (MONGODB-OIDC)", - "uri": "mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:gcp,TOKEN_RESOURCE:foo", - "valid": false, - "credential": null - }, - { - "description": "should throw an error if not TOKEN_RESOURCE with gcp provider (MONGODB-OIDC)", - "uri": "mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:gcp", - "valid": false, - "credential": null - }, - { - "description": "should recognise the mechanism with k8s provider (MONGODB-OIDC)", - "uri": "mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:k8s", - "valid": true, - "credential": { - "username": null, - "password": null, - "source": "$external", - "mechanism": "MONGODB-OIDC", - "mechanism_properties": { - "ENVIRONMENT": "k8s" - } - } - }, - { - "description": "should throw an error for a username and password with k8s provider (MONGODB-OIDC)", - "uri": "mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:k8s", - "valid": false, - "credential": null - } - ] -} diff --git a/testdata/auth/connection-string.yml b/testdata/auth/connection-string.yml deleted file mode 100644 index 1f5d470041..0000000000 --- a/testdata/auth/connection-string.yml +++ /dev/null @@ -1,471 +0,0 @@ ---- -tests: -- description: should use the default source and mechanism - uri: mongodb://user:password@localhost - valid: true - credential: - username: user - password: password - source: admin - mechanism: - mechanism_properties: -- description: should use the database when no authSource is specified - uri: mongodb://user:password@localhost/foo - valid: true - credential: - username: user - password: password - source: foo - mechanism: - mechanism_properties: -- description: should use the authSource when specified - uri: mongodb://user:password@localhost/foo?authSource=bar - valid: true - credential: - username: user - password: password - source: bar - mechanism: - mechanism_properties: -- description: should recognise the mechanism (GSSAPI) - uri: mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI - valid: true - credential: - username: user@DOMAIN.COM - password: - source: "$external" - mechanism: GSSAPI - mechanism_properties: - SERVICE_NAME: mongodb -- description: should ignore the database (GSSAPI) - uri: mongodb://user%40DOMAIN.COM@localhost/foo?authMechanism=GSSAPI - valid: true - credential: - username: user@DOMAIN.COM - password: - source: "$external" - mechanism: GSSAPI - mechanism_properties: - SERVICE_NAME: mongodb -- description: should accept valid authSource (GSSAPI) - uri: mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI&authSource=$external - valid: true - credential: - username: user@DOMAIN.COM - password: - source: "$external" - mechanism: GSSAPI - mechanism_properties: - SERVICE_NAME: mongodb -- description: should accept generic mechanism property (GSSAPI) - uri: mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:forward,SERVICE_HOST:example.com - valid: true - credential: - username: user@DOMAIN.COM - password: - source: "$external" - mechanism: GSSAPI - mechanism_properties: - SERVICE_NAME: other - SERVICE_HOST: example.com - CANONICALIZE_HOST_NAME: forward -- description: should accept forwardAndReverse hostname canonicalization (GSSAPI) - uri: mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:forwardAndReverse - valid: true - credential: - username: user@DOMAIN.COM - password: - source: "$external" - mechanism: GSSAPI - mechanism_properties: - SERVICE_NAME: other - CANONICALIZE_HOST_NAME: forwardAndReverse -- description: should accept no hostname canonicalization (GSSAPI) - uri: mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:none - valid: true - credential: - username: user@DOMAIN.COM - password: - source: "$external" - mechanism: GSSAPI - mechanism_properties: - SERVICE_NAME: other - CANONICALIZE_HOST_NAME: none -- description: must raise an error when the hostname canonicalization is invalid - uri: mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:invalid - valid: false -- description: should accept the password (GSSAPI) - uri: mongodb://user%40DOMAIN.COM:password@localhost/?authMechanism=GSSAPI&authSource=$external - valid: true - credential: - username: user@DOMAIN.COM - password: password - source: "$external" - mechanism: GSSAPI - mechanism_properties: - SERVICE_NAME: mongodb -- description: must raise an error when the authSource is empty - uri: mongodb://user:password@localhost/foo?authSource= - valid: false -- description: must raise an error when the authSource is empty without credentials - uri: mongodb://localhost/admin?authSource= - valid: false -- description: should throw an exception if authSource is invalid (GSSAPI) - uri: mongodb://user%40DOMAIN.COM@localhost/?authMechanism=GSSAPI&authSource=foo - valid: false -- description: should throw an exception if no username (GSSAPI) - uri: mongodb://localhost/?authMechanism=GSSAPI - valid: false -- description: should recognize the mechanism (MONGODB-X509) - uri: mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/?authMechanism=MONGODB-X509 - valid: true - credential: - username: CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry - password: - source: "$external" - mechanism: MONGODB-X509 - mechanism_properties: -- description: should ignore the database (MONGODB-X509) - uri: mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/foo?authMechanism=MONGODB-X509 - valid: true - credential: - username: CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry - password: - source: "$external" - mechanism: MONGODB-X509 - mechanism_properties: -- description: should accept valid authSource (MONGODB-X509) - uri: mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/?authMechanism=MONGODB-X509&authSource=$external - valid: true - credential: - username: CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry - password: - source: "$external" - mechanism: MONGODB-X509 - mechanism_properties: -- description: should recognize the mechanism with no username (MONGODB-X509) - uri: mongodb://localhost/?authMechanism=MONGODB-X509 - valid: true - credential: - username: - password: - source: "$external" - mechanism: MONGODB-X509 - mechanism_properties: -- description: should recognize the mechanism with no username when auth source is - explicitly specified (MONGODB-X509) - uri: mongodb://localhost/?authMechanism=MONGODB-X509&authSource=$external - valid: true - credential: - username: - password: - source: "$external" - mechanism: MONGODB-X509 - mechanism_properties: -- description: should throw an exception if supplied a password (MONGODB-X509) - uri: mongodb://user:password@localhost/?authMechanism=MONGODB-X509 - valid: false -- description: should throw an exception if authSource is invalid (MONGODB-X509) - uri: mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/foo?authMechanism=MONGODB-X509&authSource=bar - valid: false -- description: should recognize the mechanism (PLAIN) - uri: mongodb://user:password@localhost/?authMechanism=PLAIN - valid: true - credential: - username: user - password: password - source: "$external" - mechanism: PLAIN - mechanism_properties: -- description: should use the database when no authSource is specified (PLAIN) - uri: mongodb://user:password@localhost/foo?authMechanism=PLAIN - valid: true - credential: - username: user - password: password - source: foo - mechanism: PLAIN - mechanism_properties: -- description: should use the authSource when specified (PLAIN) - uri: mongodb://user:password@localhost/foo?authMechanism=PLAIN&authSource=bar - valid: true - credential: - username: user - password: password - source: bar - mechanism: PLAIN - mechanism_properties: -- description: should throw an exception if no username (PLAIN) - uri: mongodb://localhost/?authMechanism=PLAIN - valid: false -- description: should recognize the mechanism (SCRAM-SHA-1) - uri: mongodb://user:password@localhost/?authMechanism=SCRAM-SHA-1 - valid: true - credential: - username: user - password: password - source: admin - mechanism: SCRAM-SHA-1 - mechanism_properties: -- description: should use the database when no authSource is specified (SCRAM-SHA-1) - uri: mongodb://user:password@localhost/foo?authMechanism=SCRAM-SHA-1 - valid: true - credential: - username: user - password: password - source: foo - mechanism: SCRAM-SHA-1 - mechanism_properties: -- description: should accept valid authSource (SCRAM-SHA-1) - uri: mongodb://user:password@localhost/foo?authMechanism=SCRAM-SHA-1&authSource=bar - valid: true - credential: - username: user - password: password - source: bar - mechanism: SCRAM-SHA-1 - mechanism_properties: -- description: should throw an exception if no username (SCRAM-SHA-1) - uri: mongodb://localhost/?authMechanism=SCRAM-SHA-1 - valid: false -- description: should recognize the mechanism (SCRAM-SHA-256) - uri: mongodb://user:password@localhost/?authMechanism=SCRAM-SHA-256 - valid: true - credential: - username: user - password: password - source: admin - mechanism: SCRAM-SHA-256 - mechanism_properties: -- description: should use the database when no authSource is specified (SCRAM-SHA-256) - uri: mongodb://user:password@localhost/foo?authMechanism=SCRAM-SHA-256 - valid: true - credential: - username: user - password: password - source: foo - mechanism: SCRAM-SHA-256 - mechanism_properties: -- description: should accept valid authSource (SCRAM-SHA-256) - uri: mongodb://user:password@localhost/foo?authMechanism=SCRAM-SHA-256&authSource=bar - valid: true - credential: - username: user - password: password - source: bar - mechanism: SCRAM-SHA-256 - mechanism_properties: -- description: should throw an exception if no username (SCRAM-SHA-256) - uri: mongodb://localhost/?authMechanism=SCRAM-SHA-256 - valid: false -- description: URI with no auth-related info doesn't create credential - uri: mongodb://localhost/ - valid: true - credential: -- description: database in URI path doesn't create credentials - uri: mongodb://localhost/foo - valid: true - credential: -- description: authSource without username doesn't create credential (default mechanism) - uri: mongodb://localhost/?authSource=foo - valid: true - credential: -- description: should throw an exception if no username provided (userinfo implies - default mechanism) - uri: mongodb://@localhost.com/ - valid: false -- description: should throw an exception if no username/password provided (userinfo - implies default mechanism) - uri: mongodb://:@localhost.com/ - valid: false -- description: should recognise the mechanism (MONGODB-AWS) - uri: mongodb://localhost/?authMechanism=MONGODB-AWS - valid: true - credential: - username: - password: - source: "$external" - mechanism: MONGODB-AWS - mechanism_properties: -- description: should recognise the mechanism when auth source is explicitly specified - (MONGODB-AWS) - uri: mongodb://localhost/?authMechanism=MONGODB-AWS&authSource=$external - valid: true - credential: - username: - password: - source: "$external" - mechanism: MONGODB-AWS - mechanism_properties: -- description: should throw an exception if username and no password (MONGODB-AWS) - uri: mongodb://user@localhost/?authMechanism=MONGODB-AWS - valid: false - credential: -- description: should use username and password if specified (MONGODB-AWS) - uri: mongodb://user%21%40%23%24%25%5E%26%2A%28%29_%2B:pass%21%40%23%24%25%5E%26%2A%28%29_%2B@localhost/?authMechanism=MONGODB-AWS - valid: true - credential: - username: user!@#$%^&*()_+ - password: pass!@#$%^&*()_+ - source: "$external" - mechanism: MONGODB-AWS - mechanism_properties: -- description: should use username, password and session token if specified (MONGODB-AWS) - uri: mongodb://user:password@localhost/?authMechanism=MONGODB-AWS&authMechanismProperties=AWS_SESSION_TOKEN:token%21%40%23%24%25%5E%26%2A%28%29_%2B - valid: true - credential: - username: user - password: password - source: "$external" - mechanism: MONGODB-AWS - mechanism_properties: - AWS_SESSION_TOKEN: token!@#$%^&*()_+ -- description: should recognise the mechanism with test environment (MONGODB-OIDC) - uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:test - valid: true - credential: - username: - password: - source: "$external" - mechanism: MONGODB-OIDC - mechanism_properties: - ENVIRONMENT: test -- description: should recognise the mechanism when auth source is explicitly specified and with environment (MONGODB-OIDC) - uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authSource=$external&authMechanismProperties=ENVIRONMENT:test - valid: true - credential: - username: - password: - source: "$external" - mechanism: MONGODB-OIDC - mechanism_properties: - ENVIRONMENT: test -- description: should throw an exception if supplied a password (MONGODB-OIDC) - uri: mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:test - valid: false - credential: -- description: should throw an exception if username is specified for test (MONGODB-OIDC) - uri: mongodb://principalName@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:test - valid: false - credential: -- description: should throw an exception if specified environment is not supported (MONGODB-OIDC) - uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:invalid - valid: false - credential: -- description: should throw an exception if neither environment nor callbacks specified (MONGODB-OIDC) - uri: mongodb://localhost/?authMechanism=MONGODB-OIDC - valid: false - credential: -- description: should throw an exception when unsupported auth property is specified (MONGODB-OIDC) - uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=UnsupportedProperty:unexisted - valid: false - credential: -- description: should recognise the mechanism with azure provider (MONGODB-OIDC) - uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:foo - valid: true - credential: - username: null - password: null - source: $external - mechanism: MONGODB-OIDC - mechanism_properties: - ENVIRONMENT: azure - TOKEN_RESOURCE: foo -- description: should accept a username with azure provider (MONGODB-OIDC) - uri: mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:foo - valid: true - credential: - username: user - password: null - source: $external - mechanism: MONGODB-OIDC - mechanism_properties: - ENVIRONMENT: azure - TOKEN_RESOURCE: foo -- description: should accept a url-encoded TOKEN_RESOURCE (MONGODB-OIDC) - uri: mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:mongodb%3A%2F%2Ftest-cluster - valid: true - credential: - username: user - password: null - source: $external - mechanism: MONGODB-OIDC - mechanism_properties: - ENVIRONMENT: azure - TOKEN_RESOURCE: 'mongodb://test-cluster' -- description: should accept an un-encoded TOKEN_RESOURCE (MONGODB-OIDC) - uri: mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:mongodb://test-cluster - valid: true - credential: - username: user - password: null - source: $external - mechanism: MONGODB-OIDC - mechanism_properties: - ENVIRONMENT: azure - TOKEN_RESOURCE: 'mongodb://test-cluster' -- description: should handle a complicated url-encoded TOKEN_RESOURCE (MONGODB-OIDC) - uri: mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:abcd%25ef%3Ag%26hi - valid: true - credential: - username: user - password: null - source: $external - mechanism: MONGODB-OIDC - mechanism_properties: - ENVIRONMENT: azure - TOKEN_RESOURCE: 'abcd%ef:g&hi' -- description: should url-encode a TOKEN_RESOURCE (MONGODB-OIDC) - uri: mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:a$b - valid: true - credential: - username: user - password: null - source: $external - mechanism: MONGODB-OIDC - mechanism_properties: - ENVIRONMENT: azure - TOKEN_RESOURCE: a$b -- description: should accept a username and throw an error for a password with azure provider (MONGODB-OIDC) - uri: mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:foo - valid: false - credential: null -- description: should throw an exception if no token audience is given for azure provider (MONGODB-OIDC) - uri: mongodb://username@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure - valid: false - credential: null -- description: should recognise the mechanism with gcp provider (MONGODB-OIDC) - uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:gcp,TOKEN_RESOURCE:foo - valid: true - credential: - username: null - password: null - source: $external - mechanism: MONGODB-OIDC - mechanism_properties: - ENVIRONMENT: gcp - TOKEN_RESOURCE: foo -- description: should throw an error for a username and password with gcp provider - (MONGODB-OIDC) - uri: mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:gcp,TOKEN_RESOURCE:foo - valid: false - credential: null -- description: should throw an error if not TOKEN_RESOURCE with gcp provider (MONGODB-OIDC) - uri: mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:gcp - valid: false - credential: null -- description: should recognise the mechanism with k8s provider (MONGODB-OIDC) - uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:k8s - valid: true - credential: - username: null - password: null - source: $external - mechanism: MONGODB-OIDC - mechanism_properties: - ENVIRONMENT: k8s -- description: should throw an error for a username and password with k8s provider - (MONGODB-OIDC) - uri: mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:k8s - valid: false - credential: null diff --git a/testdata/bson-binary-vector/float32.json b/testdata/bson-binary-vector/float32.json deleted file mode 100644 index 845f504ff3..0000000000 --- a/testdata/bson-binary-vector/float32.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "description": "Tests of Binary subtype 9, Vectors, with dtype FLOAT32", - "test_key": "vector", - "tests": [ - { - "description": "Simple Vector FLOAT32", - "valid": true, - "vector": [127.0, 7.0], - "dtype_hex": "0x27", - "dtype_alias": "FLOAT32", - "padding": 0, - "canonical_bson": "1C00000005766563746F72000A0000000927000000FE420000E04000" - }, - { - "description": "Vector with decimals and negative value FLOAT32", - "valid": true, - "vector": [127.7, -7.7], - "dtype_hex": "0x27", - "dtype_alias": "FLOAT32", - "padding": 0, - "canonical_bson": "1C00000005766563746F72000A0000000927006666FF426666F6C000" - }, - { - "description": "Empty Vector FLOAT32", - "valid": true, - "vector": [], - "dtype_hex": "0x27", - "dtype_alias": "FLOAT32", - "padding": 0, - "canonical_bson": "1400000005766563746F72000200000009270000" - }, - { - "description": "Infinity Vector FLOAT32", - "valid": true, - "vector": ["-inf", 0.0, "inf"], - "dtype_hex": "0x27", - "dtype_alias": "FLOAT32", - "padding": 0, - "canonical_bson": "2000000005766563746F72000E000000092700000080FF000000000000807F00" - }, - { - "description": "FLOAT32 with padding", - "valid": false, - "vector": [127.0, 7.0], - "dtype_hex": "0x27", - "dtype_alias": "FLOAT32", - "padding": 3, - "canonical_bson": "1C00000005766563746F72000A0000000927030000FE420000E04000" - }, - { - "description": "Insufficient vector data with 3 bytes FLOAT32", - "valid": false, - "dtype_hex": "0x27", - "dtype_alias": "FLOAT32", - "canonical_bson": "1700000005766563746F7200050000000927002A2A2A00" - }, - { - "description": "Insufficient vector data with 5 bytes FLOAT32", - "valid": false, - "dtype_hex": "0x27", - "dtype_alias": "FLOAT32", - "canonical_bson": "1900000005766563746F7200070000000927002A2A2A2A2A00" - } - ] -} diff --git a/testdata/bson-binary-vector/int8.json b/testdata/bson-binary-vector/int8.json deleted file mode 100644 index 29524fb617..0000000000 --- a/testdata/bson-binary-vector/int8.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "description": "Tests of Binary subtype 9, Vectors, with dtype INT8", - "test_key": "vector", - "tests": [ - { - "description": "Simple Vector INT8", - "valid": true, - "vector": [127, 7], - "dtype_hex": "0x03", - "dtype_alias": "INT8", - "padding": 0, - "canonical_bson": "1600000005766563746F7200040000000903007F0700" - }, - { - "description": "Empty Vector INT8", - "valid": true, - "vector": [], - "dtype_hex": "0x03", - "dtype_alias": "INT8", - "padding": 0, - "canonical_bson": "1400000005766563746F72000200000009030000" - }, - { - "description": "Overflow Vector INT8", - "valid": false, - "vector": [128], - "dtype_hex": "0x03", - "dtype_alias": "INT8", - "padding": 0 - }, - { - "description": "Underflow Vector INT8", - "valid": false, - "vector": [-129], - "dtype_hex": "0x03", - "dtype_alias": "INT8", - "padding": 0 - }, - { - "description": "INT8 with padding", - "valid": false, - "vector": [127, 7], - "dtype_hex": "0x03", - "dtype_alias": "INT8", - "padding": 3, - "canonical_bson": "1600000005766563746F7200040000000903037F0700" - }, - { - "description": "INT8 with float inputs", - "valid": false, - "vector": [127.77, 7.77], - "dtype_hex": "0x03", - "dtype_alias": "INT8", - "padding": 0 - } - ] -} diff --git a/testdata/bson-binary-vector/packed_bit.json b/testdata/bson-binary-vector/packed_bit.json deleted file mode 100644 index a220e7e318..0000000000 --- a/testdata/bson-binary-vector/packed_bit.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "description": "Tests of Binary subtype 9, Vectors, with dtype PACKED_BIT", - "test_key": "vector", - "tests": [ - { - "description": "Padding specified with no vector data PACKED_BIT", - "valid": false, - "vector": [], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 1, - "canonical_bson": "1400000005766563746F72000200000009100100" - }, - { - "description": "Simple Vector PACKED_BIT", - "valid": true, - "vector": [127, 7], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 0, - "canonical_bson": "1600000005766563746F7200040000000910007F0700" - }, - { - "description": "Empty Vector PACKED_BIT", - "valid": true, - "vector": [], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 0, - "canonical_bson": "1400000005766563746F72000200000009100000" - }, - { - "description": "PACKED_BIT with padding", - "valid": true, - "vector": [127, 7], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 3, - "canonical_bson": "1600000005766563746F7200040000000910037F0700" - }, - { - "description": "Overflow Vector PACKED_BIT", - "valid": false, - "vector": [256], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 0 - }, - { - "description": "Underflow Vector PACKED_BIT", - "valid": false, - "vector": [-1], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 0 - }, - { - "description": "Vector with float values PACKED_BIT", - "valid": false, - "vector": [127.5], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 0 - }, - { - "description": "Exceeding maximum padding PACKED_BIT", - "valid": false, - "vector": [1], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": 8, - "canonical_bson": "1500000005766563746F7200030000000910080100" - }, - { - "description": "Negative padding PACKED_BIT", - "valid": false, - "vector": [1], - "dtype_hex": "0x10", - "dtype_alias": "PACKED_BIT", - "padding": -1 - } - ] -} diff --git a/testdata/bson-corpus/array.json b/testdata/bson-corpus/array.json deleted file mode 100644 index 9ff953e5ae..0000000000 --- a/testdata/bson-corpus/array.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "description": "Array", - "bson_type": "0x04", - "test_key": "a", - "valid": [ - { - "description": "Empty", - "canonical_bson": "0D000000046100050000000000", - "canonical_extjson": "{\"a\" : []}" - }, - { - "description": "Single Element Array", - "canonical_bson": "140000000461000C0000001030000A0000000000", - "canonical_extjson": "{\"a\" : [{\"$numberInt\": \"10\"}]}" - }, - { - "description": "Single Element Array with index set incorrectly to empty string", - "degenerate_bson": "130000000461000B00000010000A0000000000", - "canonical_bson": "140000000461000C0000001030000A0000000000", - "canonical_extjson": "{\"a\" : [{\"$numberInt\": \"10\"}]}" - }, - { - "description": "Single Element Array with index set incorrectly to ab", - "degenerate_bson": "150000000461000D000000106162000A0000000000", - "canonical_bson": "140000000461000C0000001030000A0000000000", - "canonical_extjson": "{\"a\" : [{\"$numberInt\": \"10\"}]}" - }, - { - "description": "Multi Element Array with duplicate indexes", - "degenerate_bson": "1b000000046100130000001030000a000000103000140000000000", - "canonical_bson": "1b000000046100130000001030000a000000103100140000000000", - "canonical_extjson": "{\"a\" : [{\"$numberInt\": \"10\"}, {\"$numberInt\": \"20\"}]}" - } - ], - "decodeErrors": [ - { - "description": "Array length too long: eats outer terminator", - "bson": "140000000461000D0000001030000A0000000000" - }, - { - "description": "Array length too short: leaks terminator", - "bson": "140000000461000B0000001030000A0000000000" - }, - { - "description": "Invalid Array: bad string length in field", - "bson": "1A00000004666F6F00100000000230000500000062617A000000" - } - ] -} diff --git a/testdata/bson-corpus/binary.json b/testdata/bson-corpus/binary.json deleted file mode 100644 index 0e0056f3a2..0000000000 --- a/testdata/bson-corpus/binary.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "description": "Binary type", - "bson_type": "0x05", - "test_key": "x", - "valid": [ - { - "description": "subtype 0x00 (Zero-length)", - "canonical_bson": "0D000000057800000000000000", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"\", \"subType\" : \"00\"}}}" - }, - { - "description": "subtype 0x00 (Zero-length, keys reversed)", - "canonical_bson": "0D000000057800000000000000", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"\", \"subType\" : \"00\"}}}", - "degenerate_extjson": "{\"x\" : { \"$binary\" : {\"subType\" : \"00\", \"base64\" : \"\"}}}" - }, - { - "description": "subtype 0x00", - "canonical_bson": "0F0000000578000200000000FFFF00", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"//8=\", \"subType\" : \"00\"}}}" - }, - { - "description": "subtype 0x01", - "canonical_bson": "0F0000000578000200000001FFFF00", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"//8=\", \"subType\" : \"01\"}}}" - }, - { - "description": "subtype 0x02", - "canonical_bson": "13000000057800060000000202000000FFFF00", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"//8=\", \"subType\" : \"02\"}}}" - }, - { - "description": "subtype 0x03", - "canonical_bson": "1D000000057800100000000373FFD26444B34C6990E8E7D1DFC035D400", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"03\"}}}" - }, - { - "description": "subtype 0x04", - "canonical_bson": "1D000000057800100000000473FFD26444B34C6990E8E7D1DFC035D400", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"04\"}}}" - }, - { - "description": "subtype 0x04 UUID", - "canonical_bson": "1D000000057800100000000473FFD26444B34C6990E8E7D1DFC035D400", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"04\"}}}", - "degenerate_extjson": "{\"x\" : { \"$uuid\" : \"73ffd264-44b3-4c69-90e8-e7d1dfc035d4\"}}" - }, - { - "description": "subtype 0x05", - "canonical_bson": "1D000000057800100000000573FFD26444B34C6990E8E7D1DFC035D400", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"05\"}}}" - }, - { - "description": "subtype 0x07", - "canonical_bson": "1D000000057800100000000773FFD26444B34C6990E8E7D1DFC035D400", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"07\"}}}" - }, - { - "description": "subtype 0x08", - "canonical_bson": "1D000000057800100000000873FFD26444B34C6990E8E7D1DFC035D400", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"08\"}}}" - }, - { - "description": "subtype 0x80", - "canonical_bson": "0F0000000578000200000080FFFF00", - "canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"//8=\", \"subType\" : \"80\"}}}" - }, - { - "description": "$type query operator (conflicts with legacy $binary form with $type field)", - "canonical_bson": "1F000000037800170000000224747970650007000000737472696E67000000", - "canonical_extjson": "{\"x\" : { \"$type\" : \"string\"}}" - }, - { - "description": "$type query operator (conflicts with legacy $binary form with $type field)", - "canonical_bson": "180000000378001000000010247479706500020000000000", - "canonical_extjson": "{\"x\" : { \"$type\" : {\"$numberInt\": \"2\"}}}" - }, - { - "description": "subtype 0x09 Vector FLOAT32", - "canonical_bson": "170000000578000A0000000927000000FE420000E04000", - "canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"JwAAAP5CAADgQA==\", \"subType\": \"09\"}}}" - }, - { - "description": "subtype 0x09 Vector INT8", - "canonical_bson": "11000000057800040000000903007F0700", - "canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"AwB/Bw==\", \"subType\": \"09\"}}}" - }, - { - "description": "subtype 0x09 Vector PACKED_BIT", - "canonical_bson": "11000000057800040000000910007F0700", - "canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"EAB/Bw==\", \"subType\": \"09\"}}}" - }, - { - "description": "subtype 0x09 Vector (Zero-length) FLOAT32", - "canonical_bson": "0F0000000578000200000009270000", - "canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"JwA=\", \"subType\": \"09\"}}}" - }, - { - "description": "subtype 0x09 Vector (Zero-length) INT8", - "canonical_bson": "0F0000000578000200000009030000", - "canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"AwA=\", \"subType\": \"09\"}}}" - }, - { - "description": "subtype 0x09 Vector (Zero-length) PACKED_BIT", - "canonical_bson": "0F0000000578000200000009100000", - "canonical_extjson": "{\"x\": {\"$binary\": {\"base64\": \"EAA=\", \"subType\": \"09\"}}}" - } - ], - "decodeErrors": [ - { - "description": "Length longer than document", - "bson": "1D000000057800FF0000000573FFD26444B34C6990E8E7D1DFC035D400" - }, - { - "description": "Negative length", - "bson": "0D000000057800FFFFFFFF0000" - }, - { - "description": "subtype 0x02 length too long ", - "bson": "13000000057800060000000203000000FFFF00" - }, - { - "description": "subtype 0x02 length too short", - "bson": "13000000057800060000000201000000FFFF00" - }, - { - "description": "subtype 0x02 length negative one", - "bson": "130000000578000600000002FFFFFFFFFFFF00" - } - ], - "parseErrors": [ - { - "description": "$uuid wrong type", - "string": "{\"x\" : { \"$uuid\" : { \"data\" : \"73ffd264-44b3-4c69-90e8-e7d1dfc035d4\"}}}" - }, - { - "description": "$uuid invalid value--too short", - "string": "{\"x\" : { \"$uuid\" : \"73ffd264-44b3-90e8-e7d1dfc035d4\"}}" - }, - { - "description": "$uuid invalid value--too long", - "string": "{\"x\" : { \"$uuid\" : \"73ffd264-44b3-4c69-90e8-e7d1dfc035d4-789e4\"}}" - }, - { - "description": "$uuid invalid value--misplaced hyphens", - "string": "{\"x\" : { \"$uuid\" : \"73ff-d26444b-34c6-990e8e-7d1dfc035d4\"}}" - }, - { - "description": "$uuid invalid value--too many hyphens", - "string": "{\"x\" : { \"$uuid\" : \"----d264-44b3-4--9-90e8-e7d1dfc0----\"}}" - } - ] -} diff --git a/testdata/bson-corpus/boolean.json b/testdata/bson-corpus/boolean.json deleted file mode 100644 index 84c282299a..0000000000 --- a/testdata/bson-corpus/boolean.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "description": "Boolean", - "bson_type": "0x08", - "test_key": "b", - "valid": [ - { - "description": "True", - "canonical_bson": "090000000862000100", - "canonical_extjson": "{\"b\" : true}" - }, - { - "description": "False", - "canonical_bson": "090000000862000000", - "canonical_extjson": "{\"b\" : false}" - } - ], - "decodeErrors": [ - { - "description": "Invalid boolean value of 2", - "bson": "090000000862000200" - }, - { - "description": "Invalid boolean value of -1", - "bson": "09000000086200FF00" - } - ] -} diff --git a/testdata/bson-corpus/bsonview b/testdata/bson-corpus/bsonview deleted file mode 100755 index b803fc87e6..0000000000 --- a/testdata/bson-corpus/bsonview +++ /dev/null @@ -1,434 +0,0 @@ -#!/usr/bin/env perl -use v5.10; -use strict; -use warnings; -use utf8; -use open qw/:std :utf8/; - -use Getopt::Long; -use Pod::Usage; - -use if $^O eq 'MSWin32', 'Win32::Console::ANSI'; -use Term::ANSIColor; - -use constant { - NULL => "\x00", - BSON_TYPE => "C", - BSON_ENAME => "Z*", - BSON_TYPE_NAME => "CZ*", - BSON_DOUBLE => "d", - BSON_STRING => "l/A", - BSON_BOOLEAN => "C", - BSON_REGEX => "Z*Z*", - BSON_JSCODE => "", - BSON_INT32 => "l", - BSON_INT64 => "q", - BSON_TIMESTAMP => "q", - BSON_CODE_W_SCOPE => "l", - BSON_REMAINING => 'a*', - BSON_SKIP_4_BYTES => 'x4', - BSON_OBJECTID => 'a12', - BSON_BINARY_TYPE => 'C', - BSON_CSTRING => 'Z*', - BSON_BYTES => 'a*' -}; - -my $BOLD = $^O eq 'MSWin32' ? "bold " : ""; - -# minimum field size -my %FIELD_SIZES = ( - 0x01 => 8, - 0x02 => 5, - 0x03 => 5, - 0x04 => 5, - 0x05 => 5, - 0x06 => 0, - 0x07 => 12, - 0x08 => 1, - 0x09 => 8, - 0x0A => 0, - 0x0B => 2, - 0x0C => 17, - 0x0D => 5, - 0x0E => 5, - 0x0F => 14, - 0x10 => 4, - 0x11 => 8, - 0x12 => 8, - 0x7F => 0, - 0xFF => 0, -); - -sub main { - my ( $hex, $file, $help ); - GetOptions( - "file=s" => \$file, - "x" => \$hex, - "help|h" => \$help, - ) or die("Error in command line args"); - pod2usage( { -exitval => 2, -verbose => 2, } ) if $help; - - if ( $file ) { - dump_file($file); - } - else { - dump_stdin($hex); - } -} - -sub dump_stdin { - my $hex = shift; - while ( defined( my $bson = ) ) { - chomp $bson; - if ( !length($bson) ) { - print_error("[ no document ]\n"); - next; - } - # in -x mode, treat leading # as a comment - if ( $hex && index( $bson, "#" ) == 0 ) { - say $bson; - next; - } - $bson =~ s[ ][]g if $hex; - $bson = pack( "H*", $bson ) if $hex; - dump_document( \$bson ); - print "\n"; - } -} - -sub dump_file { - my $file = shift; - open my $fh, "<", $file; - binmode($fh); - my $data = do { local $/; <$fh> }; - while ( length $data ) { - my $len = unpack( BSON_INT32, $data ); - my $bson = substr($data,0,$len,''); - dump_document(\$bson); - print "\n"; - } -} - -sub dump_document { - my ( $ref, $is_array ) = @_; - print $is_array ? " [" : " {" if defined $is_array; - dump_header($ref); - 1 while dump_field($ref); - print_error( " " . unpack( "H*", $$ref ) ) if length($$ref); - print $is_array ? " ]" : " }" if defined $is_array; - return; -} - -sub dump_header { - my ($ref) = @_; - - my $len = get_length( $ref, 4 ); - return unless defined $len; - - if ( $len < 5 || $len < length($$ref) + 4 ) { - print_length( $len, 'red' ); - } - else { - print_length( $len, 'blue' ); - } -} - -sub dump_field { - my ($ref) = @_; - - # detect end of document - if ( length($$ref) < 2 ) { - if ( length($$ref) == 0 ) { - print_error(" [missing terminator]"); - } - else { - my $end = substr( $$ref, 0, 1, '' ); - print_hex( $end, $end eq NULL ? 'blue' : 'red' ); - } - return; - } - - # unpack type - my $type = unpack( BSON_TYPE, substr( $$ref, 0, 1, '' ) ); - - if ( !exists $FIELD_SIZES{$type} ) { - print_type( $type, 'red' ); - return; - } - - print_type($type); - - # check for key termination - my $key_end = index( $$ref, NULL ); - return if $key_end == -1; - - # unpack key - my $key = unpack( BSON_CSTRING, substr( $$ref, 0, $key_end + 1, '' ) ); - print_key($key); - - # Check if there is enough data to complete field for this type - # This is greedy, so it checks length, not length -1 - my $min_size = $FIELD_SIZES{$type}; - return if length($$ref) < $min_size; - - # fields without payload: 0x06, 0x0A, 0x7F, 0xFF - return 1 if $min_size == 0; - - # document or array - if ( $type == 0x03 || $type == 0x04 ) { - my ($len) = unpack( BSON_INT32, $$ref ); - my $doc = substr( $$ref, 0, $len, '' ); - dump_document( \$doc, $type == 0x04 ); - return 1; - } - - # fixed width fields - if ( $type == 0x01 - || $type == 0x07 - || $type == 0x09 - || $type == 0x10 - || $type == 0x11 - || $type == 0x12 ) - { - my $len = ( $type == 0x10 ? 4 : $type == 0x07 ? 12 : 8 ); - print_hex( substr( $$ref, 0, $len, '' ) ); - return 1; - } - - # boolean - if ( $type == 0x08 ) { - my $bool = substr( $$ref, 0, 1, '' ); - print_hex( $bool, ( $bool eq "\x00" || $bool eq "\x01" ) ? 'green' : 'red' ); - return 1; - } - - # binary field - if ( $type == 0x05 ) { - my $len = get_length( $ref, -1 ); - my $subtype = substr( $$ref, 0, 1, '' ); - - if ( !defined($len) ) { - print_hex($subtype); - return; - } - - my $binary = substr( $$ref, 0, $len, '' ); - - print_length($len); - print_hex($subtype); - - if ( $subtype eq "\x02" ) { - my $bin_len = get_length( \$binary ); - if ( !defined($bin_len) ) { - print_hex( $binary, 'red' ); - return; - } - if ( $bin_len != length($binary) ) { - print_length( $bin_len, 'red' ); - print_hex( $binary, 'red' ); - return; - } - } - - print_hex($binary) if length($binary); - return 1; - } - - # string or symbol or code - if ( $type == 0x02 || $type == 0x0e || $type == 0x0d ) { - my ( $len, $string ) = get_string($ref); - return unless defined $len; - - print_length( $len, 'cyan' ); - print_string($string); - return 1; - - } - - # regex 0x0B - if ( $type == 0x0B ) { - my ( $pattern, $flag ) = unpack( BSON_CSTRING . BSON_CSTRING, $$ref ); - substr( $$ref, 0, length($pattern) + length($flag) + 2, '' ); - print_string($pattern); - print_string($flag); - return 1; - } - - # code with scope 0x0F - if ( $type == 0x0F ) { - my $len = get_length( $ref, 4 ); - return unless defined $len; - - # len + string + doc minimum size is 4 + 5 + 5 - if ( $len < 14 ) { - print_length( $len, 'red' ); - return; - } - - print_length($len); - - my $cws = substr( $$ref, 0, $len - 4, '' ); - - my ( $strlen, $string ) = get_string( \$cws ); - - if ( !defined $strlen ) { - print_hex( $cws, 'red' ); - return; - } - - print_length($strlen); - print_string($string); - - dump_document( \$cws, 0 ); - - return 1; - } - - # dbpointer 0x0C - if ( $type == 0x0C ) { - my ( $len, $string ) = get_string($ref); - return unless defined $len; - - print_length($len); - print_string($string); - - # Check if there are 12 bytes (plus terminator) or more - return if length($$ref) < 13; - - my $oid = substr( $$ref, 0, 12, '' ); - print_hex($oid); - - return 1; - } - - die "Shouldn't reach here"; -} - -sub get_length { - my ( $ref, $adj ) = @_; - $adj ||= 0; - my $len = unpack( BSON_INT32, substr( $$ref, 0, 4, '' ) ); - return unless defined $len; - - # check if requested length is too long - if ( $len < 0 || $len > length($$ref) + $adj ) { - print_length( $len, 'red' ); - return; - } - - return $len; -} - -sub get_string { - my ($ref) = @_; - - my $len = get_length($ref); - return unless defined $len; - - # len must be at least 1 for trailing 0x00 - if ( $len == 0 ) { - print_length( $len, 'red' ); - return; - } - - my $string = substr( $$ref, 0, $len, '' ); - - # check if null terminated - if ( substr( $string, -1, 1 ) ne NULL ) { - print_length($len); - print_hex( $string, 'red' ); - return; - } - - # remove trailing null - chop($string); - - # try to decode to UTF-8 - if ( !utf8::decode($string) ) { - print_length($len); - print_hex( $string . "\x00", 'red' ); - return; - } - - return ( $len, $string ); -} - -sub print_error { - my ($text) = @_; - print colored( ["${BOLD}red"], $text ); -} - -sub print_type { - my ( $type, $color ) = @_; - $color ||= 'magenta'; - print colored( ["$BOLD$color"], sprintf( " %02x", $type ) ); -} - -sub print_key { - my ($string) = @_; - print_string( $string, 'yellow' ); -} - -sub print_string { - my ( $string, $color ) = @_; - $color ||= 'green'; - $string =~ s{([^[:graph:]])}{sprintf("\\x%02x",ord($1))}ge; - print colored( ["$BOLD$color"], qq[ "$string"] . " 00" ); -} - -sub print_length { - my ( $len, $color ) = @_; - $color ||= 'cyan'; - print colored( ["$BOLD$color"], " " . unpack( "H*", pack( BSON_INT32, $len ) ) ); -} - -sub print_hex { - my ( $value, $color ) = @_; - $color ||= 'green'; - print colored( ["$BOLD$color"], " " . uc( unpack( "H*", $value ) ) ); -} - -main(); - -__END__ - -=head1 NAME - -bsonview - dump a BSON string with color output showing structure - -=head1 SYNOPSIS - - cat file.bson | bsondump - - echo "0500000000" | bsondump -x - -=head1 OPTIONS - - -x input is in hex format (default is 0) - --help, -h show help - -=head1 USAGE - -Reads from C and dumps colored structures to C. - -=head1 AUTHOR - -=over 4 - -=item * - -David Golden - -=back - -=head1 COPYRIGHT AND LICENSE - -This software is Copyright (c) 2016 by MongoDB, Inc.. - -This is free software, licensed under: - - The Apache License, Version 2.0, January 2004 - -=cut - -=cut diff --git a/testdata/bson-corpus/code.json b/testdata/bson-corpus/code.json deleted file mode 100644 index b8482b2541..0000000000 --- a/testdata/bson-corpus/code.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description": "Javascript Code", - "bson_type": "0x0D", - "test_key": "a", - "valid": [ - { - "description": "Empty string", - "canonical_bson": "0D0000000D6100010000000000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"\"}}" - }, - { - "description": "Single character", - "canonical_bson": "0E0000000D610002000000620000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"b\"}}" - }, - { - "description": "Multi-character", - "canonical_bson": "190000000D61000D0000006162616261626162616261620000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"abababababab\"}}" - }, - { - "description": "two-byte UTF-8 (\u00e9)", - "canonical_bson": "190000000D61000D000000C3A9C3A9C3A9C3A9C3A9C3A90000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"\\u00e9\\u00e9\\u00e9\\u00e9\\u00e9\\u00e9\"}}" - }, - { - "description": "three-byte UTF-8 (\u2606)", - "canonical_bson": "190000000D61000D000000E29886E29886E29886E298860000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"\\u2606\\u2606\\u2606\\u2606\"}}" - }, - { - "description": "Embedded nulls", - "canonical_bson": "190000000D61000D0000006162006261620062616261620000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"ab\\u0000bab\\u0000babab\"}}" - } - ], - "decodeErrors": [ - { - "description": "bad code string length: 0 (but no 0x00 either)", - "bson": "0C0000000D61000000000000" - }, - { - "description": "bad code string length: -1", - "bson": "0C0000000D6100FFFFFFFF00" - }, - { - "description": "bad code string length: eats terminator", - "bson": "100000000D6100050000006200620000" - }, - { - "description": "bad code string length: longer than rest of document", - "bson": "120000000D00FFFFFF00666F6F6261720000" - }, - { - "description": "code string is not null-terminated", - "bson": "100000000D610004000000616263FF00" - }, - { - "description": "empty code string, but extra null", - "bson": "0E0000000D610001000000000000" - }, - { - "description": "invalid UTF-8", - "bson": "0E0000000D610002000000E90000" - } - ] -} diff --git a/testdata/bson-corpus/code_w_scope.json b/testdata/bson-corpus/code_w_scope.json deleted file mode 100644 index f956bcd54f..0000000000 --- a/testdata/bson-corpus/code_w_scope.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "description": "Javascript Code with Scope", - "bson_type": "0x0F", - "test_key": "a", - "valid": [ - { - "description": "Empty code string, empty scope", - "canonical_bson": "160000000F61000E0000000100000000050000000000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"\", \"$scope\" : {}}}" - }, - { - "description": "Non-empty code string, empty scope", - "canonical_bson": "1A0000000F610012000000050000006162636400050000000000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"abcd\", \"$scope\" : {}}}" - }, - { - "description": "Empty code string, non-empty scope", - "canonical_bson": "1D0000000F61001500000001000000000C000000107800010000000000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"\", \"$scope\" : {\"x\" : {\"$numberInt\": \"1\"}}}}" - }, - { - "description": "Non-empty code string and non-empty scope", - "canonical_bson": "210000000F6100190000000500000061626364000C000000107800010000000000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"abcd\", \"$scope\" : {\"x\" : {\"$numberInt\": \"1\"}}}}" - }, - { - "description": "Unicode and embedded null in code string, empty scope", - "canonical_bson": "1A0000000F61001200000005000000C3A9006400050000000000", - "canonical_extjson": "{\"a\" : {\"$code\" : \"\\u00e9\\u0000d\", \"$scope\" : {}}}" - } - ], - "decodeErrors": [ - { - "description": "field length zero", - "bson": "280000000F6100000000000500000061626364001300000010780001000000107900010000000000" - }, - { - "description": "field length negative", - "bson": "280000000F6100FFFFFFFF0500000061626364001300000010780001000000107900010000000000" - }, - { - "description": "field length too short (less than minimum size)", - "bson": "160000000F61000D0000000100000000050000000000" - }, - { - "description": "field length too short (truncates scope)", - "bson": "280000000F61001F0000000500000061626364001300000010780001000000107900010000000000" - }, - { - "description": "field length too long (clips outer doc)", - "bson": "280000000F6100210000000500000061626364001300000010780001000000107900010000000000" - }, - { - "description": "field length too long (longer than outer doc)", - "bson": "280000000F6100FF0000000500000061626364001300000010780001000000107900010000000000" - }, - { - "description": "bad code string: length too short", - "bson": "280000000F6100200000000400000061626364001300000010780001000000107900010000000000" - }, - { - "description": "bad code string: length too long (clips scope)", - "bson": "280000000F6100200000000600000061626364001300000010780001000000107900010000000000" - }, - { - "description": "bad code string: negative length", - "bson": "280000000F610020000000FFFFFFFF61626364001300000010780001000000107900010000000000" - }, - { - "description": "bad code string: length longer than field", - "bson": "280000000F610020000000FF00000061626364001300000010780001000000107900010000000000" - }, - { - "description": "bad scope doc (field has bad string length)", - "bson": "1C0000000F001500000001000000000C000000020000000000000000" - } - ] -} diff --git a/testdata/bson-corpus/datetime.json b/testdata/bson-corpus/datetime.json deleted file mode 100644 index f857afdc36..0000000000 --- a/testdata/bson-corpus/datetime.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "description": "DateTime", - "bson_type": "0x09", - "test_key": "a", - "valid": [ - { - "description": "epoch", - "canonical_bson": "10000000096100000000000000000000", - "relaxed_extjson": "{\"a\" : {\"$date\" : \"1970-01-01T00:00:00Z\"}}", - "canonical_extjson": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"0\"}}}" - }, - { - "description": "positive ms", - "canonical_bson": "10000000096100C5D8D6CC3B01000000", - "relaxed_extjson": "{\"a\" : {\"$date\" : \"2012-12-24T12:15:30.501Z\"}}", - "canonical_extjson": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"1356351330501\"}}}" - }, - { - "description": "negative", - "canonical_bson": "10000000096100C33CE7B9BDFFFFFF00", - "relaxed_extjson": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"-284643869501\"}}}", - "canonical_extjson": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"-284643869501\"}}}" - }, - { - "description" : "Y10K", - "canonical_bson" : "1000000009610000DC1FD277E6000000", - "canonical_extjson" : "{\"a\":{\"$date\":{\"$numberLong\":\"253402300800000\"}}}" - }, - { - "description": "leading zero ms", - "canonical_bson": "10000000096100D1D6D6CC3B01000000", - "relaxed_extjson": "{\"a\" : {\"$date\" : \"2012-12-24T12:15:30.001Z\"}}", - "canonical_extjson": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"1356351330001\"}}}" - } - ], - "decodeErrors": [ - { - "description": "datetime field truncated", - "bson": "0C0000000961001234567800" - } - ] -} diff --git a/testdata/bson-corpus/dbpointer.json b/testdata/bson-corpus/dbpointer.json deleted file mode 100644 index 377e556a0a..0000000000 --- a/testdata/bson-corpus/dbpointer.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "description": "DBPointer type (deprecated)", - "bson_type": "0x0C", - "deprecated": true, - "test_key": "a", - "valid": [ - { - "description": "DBpointer", - "canonical_bson": "1A0000000C610002000000620056E1FC72E0C917E9C471416100", - "canonical_extjson": "{\"a\": {\"$dbPointer\": {\"$ref\": \"b\", \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}}}}", - "converted_bson": "2a00000003610022000000022472656600020000006200072469640056e1fc72e0c917e9c47141610000", - "converted_extjson": "{\"a\": {\"$ref\": \"b\", \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}}}" - }, - { - "description": "DBpointer with opposite key order", - "canonical_bson": "1A0000000C610002000000620056E1FC72E0C917E9C471416100", - "canonical_extjson": "{\"a\": {\"$dbPointer\": {\"$ref\": \"b\", \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}}}}", - "degenerate_extjson": "{\"a\": {\"$dbPointer\": {\"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}, \"$ref\": \"b\"}}}", - "converted_bson": "2a00000003610022000000022472656600020000006200072469640056e1fc72e0c917e9c47141610000", - "converted_extjson": "{\"a\": {\"$ref\": \"b\", \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}}}" - }, - { - "description": "With two-byte UTF-8", - "canonical_bson": "1B0000000C610003000000C3A90056E1FC72E0C917E9C471416100", - "canonical_extjson": "{\"a\": {\"$dbPointer\": {\"$ref\": \"é\", \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}}}}", - "converted_bson": "2B0000000361002300000002247265660003000000C3A900072469640056E1FC72E0C917E9C47141610000", - "converted_extjson": "{\"a\": {\"$ref\": \"é\", \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}}}" - } - ], - "decodeErrors": [ - { - "description": "String with negative length", - "bson": "1A0000000C6100FFFFFFFF620056E1FC72E0C917E9C471416100" - }, - { - "description": "String with zero length", - "bson": "1A0000000C610000000000620056E1FC72E0C917E9C471416100" - }, - { - "description": "String not null terminated", - "bson": "1A0000000C610002000000626256E1FC72E0C917E9C471416100" - }, - { - "description": "short OID (less than minimum length for field)", - "bson": "160000000C61000300000061620056E1FC72E0C91700" - }, - { - "description": "short OID (greater than minimum, but truncated)", - "bson": "1A0000000C61000300000061620056E1FC72E0C917E9C4716100" - }, - { - "description": "String with bad UTF-8", - "bson": "1A0000000C610002000000E90056E1FC72E0C917E9C471416100" - } - ] -} diff --git a/testdata/bson-corpus/dbref.json b/testdata/bson-corpus/dbref.json deleted file mode 100644 index 41c0b09d0e..0000000000 --- a/testdata/bson-corpus/dbref.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "description": "Document type (DBRef sub-documents)", - "bson_type": "0x03", - "valid": [ - { - "description": "DBRef", - "canonical_bson": "37000000036462726566002b0000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e0000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}}}" - }, - { - "description": "DBRef with database", - "canonical_bson": "4300000003646272656600370000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e0224646200030000006462000000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}, \"$db\": \"db\"}}" - }, - { - "description": "DBRef with database and additional fields", - "canonical_bson": "48000000036462726566003c0000000224726566000b000000636f6c6c656374696f6e0010246964002a00000002246462000300000064620002666f6f0004000000626172000000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\", \"$id\": {\"$numberInt\": \"42\"}, \"$db\": \"db\", \"foo\": \"bar\"}}" - }, - { - "description": "DBRef with additional fields", - "canonical_bson": "4400000003646272656600380000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e02666f6f0004000000626172000000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}, \"foo\": \"bar\"}}" - }, - { - "description": "Document with key names similar to those of a DBRef", - "canonical_bson": "3e0000000224726566000c0000006e6f742d612d646272656600072469640058921b3e6e32ab156a22b59e022462616e616e6100050000007065656c0000", - "canonical_extjson": "{\"$ref\": \"not-a-dbref\", \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}, \"$banana\": \"peel\"}" - }, - { - "description": "DBRef with additional dollar-prefixed and dotted fields", - "canonical_bson": "48000000036462726566003c0000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e10612e62000100000010246300010000000000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}, \"a.b\": {\"$numberInt\": \"1\"}, \"$c\": {\"$numberInt\": \"1\"}}}" - }, - { - "description": "Sub-document resembles DBRef but $id is missing", - "canonical_bson": "26000000036462726566001a0000000224726566000b000000636f6c6c656374696f6e000000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\"}}" - }, - { - "description": "Sub-document resembles DBRef but $ref is not a string", - "canonical_bson": "2c000000036462726566002000000010247265660001000000072469640058921b3e6e32ab156a22b59e0000", - "canonical_extjson": "{\"dbref\": {\"$ref\": {\"$numberInt\": \"1\"}, \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}}}" - }, - { - "description": "Sub-document resembles DBRef but $db is not a string", - "canonical_bson": "4000000003646272656600340000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e1024646200010000000000", - "canonical_extjson": "{\"dbref\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"58921b3e6e32ab156a22b59e\"}, \"$db\": {\"$numberInt\": \"1\"}}}" - } - ] -} diff --git a/testdata/bson-corpus/decimal128-1.json b/testdata/bson-corpus/decimal128-1.json deleted file mode 100644 index 7eefec6bf7..0000000000 --- a/testdata/bson-corpus/decimal128-1.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "valid": [ - { - "description": "Special - Canonical NaN", - "canonical_bson": "180000001364000000000000000000000000000000007C00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}" - }, - { - "description": "Special - Negative NaN", - "canonical_bson": "18000000136400000000000000000000000000000000FC00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}", - "lossy": true - }, - { - "description": "Special - Negative NaN", - "canonical_bson": "18000000136400000000000000000000000000000000FC00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-NaN\"}}", - "lossy": true - }, - { - "description": "Special - Canonical SNaN", - "canonical_bson": "180000001364000000000000000000000000000000007E00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}", - "lossy": true - }, - { - "description": "Special - Negative SNaN", - "canonical_bson": "18000000136400000000000000000000000000000000FE00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}", - "lossy": true - }, - { - "description": "Special - NaN with a payload", - "canonical_bson": "180000001364001200000000000000000000000000007E00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}", - "lossy": true - }, - { - "description": "Special - Canonical Positive Infinity", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "Special - Canonical Negative Infinity", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "Special - Invalid representation treated as 0", - "canonical_bson": "180000001364000000000000000000000000000000106C00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}", - "lossy": true - }, - { - "description": "Special - Invalid representation treated as -0", - "canonical_bson": "18000000136400DCBA9876543210DEADBEEF00000010EC00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}", - "lossy": true - }, - { - "description": "Special - Invalid representation treated as 0E3", - "canonical_bson": "18000000136400FFFFFFFFFFFFFFFFFFFFFFFFFFFF116C00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+3\"}}", - "lossy": true - }, - { - "description": "Regular - Adjusted Exponent Limit", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3CF22F00", - "canonical_extjson": "{\"d\": { \"$numberDecimal\": \"0.000001234567890123456789012345678901234\" }}" - }, - { - "description": "Regular - Smallest", - "canonical_bson": "18000000136400D204000000000000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.001234\"}}" - }, - { - "description": "Regular - Smallest with Trailing Zeros", - "canonical_bson": "1800000013640040EF5A07000000000000000000002A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00123400000\"}}" - }, - { - "description": "Regular - 0.1", - "canonical_bson": "1800000013640001000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1\"}}" - }, - { - "description": "Regular - 0.1234567890123456789012345678901234", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3CFC2F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1234567890123456789012345678901234\"}}" - }, - { - "description": "Regular - 0", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "Regular - -0", - "canonical_bson": "18000000136400000000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}" - }, - { - "description": "Regular - -0.0", - "canonical_bson": "1800000013640000000000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0\"}}" - }, - { - "description": "Regular - 2", - "canonical_bson": "180000001364000200000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2\"}}" - }, - { - "description": "Regular - 2.000", - "canonical_bson": "18000000136400D0070000000000000000000000003A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2.000\"}}" - }, - { - "description": "Regular - Largest", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3C403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1234567890123456789012345678901234\"}}" - }, - { - "description": "Scientific - Tiniest", - "canonical_bson": "18000000136400FFFFFFFF638E8D37C087ADBE09ED010000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"9.999999999999999999999999999999999E-6143\"}}" - }, - { - "description": "Scientific - Tiny", - "canonical_bson": "180000001364000100000000000000000000000000000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6176\"}}" - }, - { - "description": "Scientific - Negative Tiny", - "canonical_bson": "180000001364000100000000000000000000000000008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6176\"}}" - }, - { - "description": "Scientific - Adjusted Exponent Limit", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3CF02F00", - "canonical_extjson": "{\"d\": { \"$numberDecimal\": \"1.234567890123456789012345678901234E-7\" }}" - }, - { - "description": "Scientific - Fractional", - "canonical_bson": "1800000013640064000000000000000000000000002CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.00E-8\"}}" - }, - { - "description": "Scientific - 0 with Exponent", - "canonical_bson": "180000001364000000000000000000000000000000205F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6000\"}}" - }, - { - "description": "Scientific - 0 with Negative Exponent", - "canonical_bson": "1800000013640000000000000000000000000000007A2B00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-611\"}}" - }, - { - "description": "Scientific - No Decimal with Signed Exponent", - "canonical_bson": "180000001364000100000000000000000000000000463000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+3\"}}" - }, - { - "description": "Scientific - Trailing Zero", - "canonical_bson": "180000001364001A04000000000000000000000000423000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.050E+4\"}}" - }, - { - "description": "Scientific - With Decimal", - "canonical_bson": "180000001364006900000000000000000000000000423000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.05E+3\"}}" - }, - { - "description": "Scientific - Full", - "canonical_bson": "18000000136400FFFFFFFFFFFFFFFFFFFFFFFFFFFF403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"5192296858534827628530496329220095\"}}" - }, - { - "description": "Scientific - Large", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E+6144\"}}" - }, - { - "description": "Scientific - Largest", - "canonical_bson": "18000000136400FFFFFFFF638E8D37C087ADBE09EDFF5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"9.999999999999999999999999999999999E+6144\"}}" - }, - { - "description": "Non-Canonical Parsing - Exponent Normalization", - "canonical_bson": "1800000013640064000000000000000000000000002CB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-100E-10\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.00E-8\"}}" - }, - { - "description": "Non-Canonical Parsing - Unsigned Positive Exponent", - "canonical_bson": "180000001364000100000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+3\"}}" - }, - { - "description": "Non-Canonical Parsing - Lowercase Exponent Identifier", - "canonical_bson": "180000001364000100000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1e+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+3\"}}" - }, - { - "description": "Non-Canonical Parsing - Long Significand with Exponent", - "canonical_bson": "1800000013640079D9E0F9763ADA429D0200000000583000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12345689012345789012345E+12\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.2345689012345789012345E+34\"}}" - }, - { - "description": "Non-Canonical Parsing - Positive Sign", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3C403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+1234567890123456789012345678901234\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1234567890123456789012345678901234\"}}" - }, - { - "description": "Non-Canonical Parsing - Long Decimal String", - "canonical_bson": "180000001364000100000000000000000000000000722800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \".000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-999\"}}" - }, - { - "description": "Non-Canonical Parsing - nan", - "canonical_bson": "180000001364000000000000000000000000000000007C00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"nan\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}" - }, - { - "description": "Non-Canonical Parsing - nAn", - "canonical_bson": "180000001364000000000000000000000000000000007C00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"nAn\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}" - }, - { - "description": "Non-Canonical Parsing - +infinity", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+infinity\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - infinity", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"infinity\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - infiniTY", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"infiniTY\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - inf", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"inf\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - inF", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"inF\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - -infinity", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-infinity\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - -infiniTy", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-infiniTy\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - -Inf", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - -inf", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-inf\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "Non-Canonical Parsing - -inF", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-inF\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "Rounded Subnormal number", - "canonical_bson": "180000001364000100000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10E-6177\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6176\"}}" - }, - { - "description": "Clamped", - "canonical_bson": "180000001364000a00000000000000000000000000fe5f00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E6112\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+6112\"}}" - }, - { - "description": "Exact rounding", - "canonical_bson": "18000000136400000000000a5bc138938d44c64d31cc3700", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E+999\"}}" - } - ] -} diff --git a/testdata/bson-corpus/decimal128-2.json b/testdata/bson-corpus/decimal128-2.json deleted file mode 100644 index 316d3b0e61..0000000000 --- a/testdata/bson-corpus/decimal128-2.json +++ /dev/null @@ -1,793 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "valid": [ - { - "description": "[decq021] Normality", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3C40B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1234567890123456789012345678901234\"}}" - }, - { - "description": "[decq823] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400010000800000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-2147483649\"}}" - }, - { - "description": "[decq822] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400000000800000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-2147483648\"}}" - }, - { - "description": "[decq821] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400FFFFFF7F0000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-2147483647\"}}" - }, - { - "description": "[decq820] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400FEFFFF7F0000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-2147483646\"}}" - }, - { - "description": "[decq152] fold-downs (more below)", - "canonical_bson": "18000000136400393000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-12345\"}}" - }, - { - "description": "[decq154] fold-downs (more below)", - "canonical_bson": "18000000136400D20400000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1234\"}}" - }, - { - "description": "[decq006] derivative canonical plain strings", - "canonical_bson": "18000000136400EE0200000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-750\"}}" - }, - { - "description": "[decq164] fold-downs (more below)", - "canonical_bson": "1800000013640039300000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-123.45\"}}" - }, - { - "description": "[decq156] fold-downs (more below)", - "canonical_bson": "180000001364007B0000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-123\"}}" - }, - { - "description": "[decq008] derivative canonical plain strings", - "canonical_bson": "18000000136400EE020000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-75.0\"}}" - }, - { - "description": "[decq158] fold-downs (more below)", - "canonical_bson": "180000001364000C0000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-12\"}}" - }, - { - "description": "[decq122] Nmax and similar", - "canonical_bson": "18000000136400FFFFFFFF638E8D37C087ADBE09EDFFDF00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-9.999999999999999999999999999999999E+6144\"}}" - }, - { - "description": "[decq002] (mostly derived from the Strawman 4 document and examples)", - "canonical_bson": "18000000136400EE020000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-7.50\"}}" - }, - { - "description": "[decq004] derivative canonical plain strings", - "canonical_bson": "18000000136400EE0200000000000000000000000042B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-7.50E+3\"}}" - }, - { - "description": "[decq018] derivative canonical plain strings", - "canonical_bson": "18000000136400EE020000000000000000000000002EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-7.50E-7\"}}" - }, - { - "description": "[decq125] Nmax and similar", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3CFEDF00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.234567890123456789012345678901234E+6144\"}}" - }, - { - "description": "[decq131] fold-downs (more below)", - "canonical_bson": "18000000136400000000807F1BCF85B27059C8A43CFEDF00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.230000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq162] fold-downs (more below)", - "canonical_bson": "180000001364007B000000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.23\"}}" - }, - { - "description": "[decq176] Nmin and below", - "canonical_bson": "18000000136400010000000A5BC138938D44C64D31008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.000000000000000000000000000000001E-6143\"}}" - }, - { - "description": "[decq174] Nmin and below", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.000000000000000000000000000000000E-6143\"}}" - }, - { - "description": "[decq133] fold-downs (more below)", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FEDF00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.000000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq160] fold-downs (more below)", - "canonical_bson": "18000000136400010000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1\"}}" - }, - { - "description": "[decq172] Nmin and below", - "canonical_bson": "180000001364000100000000000000000000000000428000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6143\"}}" - }, - { - "description": "[decq010] derivative canonical plain strings", - "canonical_bson": "18000000136400EE020000000000000000000000003AB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.750\"}}" - }, - { - "description": "[decq012] derivative canonical plain strings", - "canonical_bson": "18000000136400EE0200000000000000000000000038B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0750\"}}" - }, - { - "description": "[decq014] derivative canonical plain strings", - "canonical_bson": "18000000136400EE0200000000000000000000000034B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000750\"}}" - }, - { - "description": "[decq016] derivative canonical plain strings", - "canonical_bson": "18000000136400EE0200000000000000000000000030B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00000750\"}}" - }, - { - "description": "[decq404] zeros", - "canonical_bson": "180000001364000000000000000000000000000000000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-6176\"}}" - }, - { - "description": "[decq424] negative zeros", - "canonical_bson": "180000001364000000000000000000000000000000008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-6176\"}}" - }, - { - "description": "[decq407] zeros", - "canonical_bson": "1800000013640000000000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00\"}}" - }, - { - "description": "[decq427] negative zeros", - "canonical_bson": "1800000013640000000000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00\"}}" - }, - { - "description": "[decq409] zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[decq428] negative zeros", - "canonical_bson": "18000000136400000000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}" - }, - { - "description": "[decq700] Selected DPD codes", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[decq406] zeros", - "canonical_bson": "1800000013640000000000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00\"}}" - }, - { - "description": "[decq426] negative zeros", - "canonical_bson": "1800000013640000000000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00\"}}" - }, - { - "description": "[decq410] zeros", - "canonical_bson": "180000001364000000000000000000000000000000463000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+3\"}}" - }, - { - "description": "[decq431] negative zeros", - "canonical_bson": "18000000136400000000000000000000000000000046B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+3\"}}" - }, - { - "description": "[decq419] clamped zeros...", - "canonical_bson": "180000001364000000000000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6111\"}}" - }, - { - "description": "[decq432] negative zeros", - "canonical_bson": "180000001364000000000000000000000000000000FEDF00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6111\"}}" - }, - { - "description": "[decq405] zeros", - "canonical_bson": "180000001364000000000000000000000000000000000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-6176\"}}" - }, - { - "description": "[decq425] negative zeros", - "canonical_bson": "180000001364000000000000000000000000000000008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-6176\"}}" - }, - { - "description": "[decq508] Specials", - "canonical_bson": "180000001364000000000000000000000000000000007800", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"Infinity\"}}" - }, - { - "description": "[decq528] Specials", - "canonical_bson": "18000000136400000000000000000000000000000000F800", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-Infinity\"}}" - }, - { - "description": "[decq541] Specials", - "canonical_bson": "180000001364000000000000000000000000000000007C00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"NaN\"}}" - }, - { - "description": "[decq074] Nmin and below", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E-6143\"}}" - }, - { - "description": "[decq602] fold-down full sequence", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq604] fold-down full sequence", - "canonical_bson": "180000001364000000000081EFAC855B416D2DEE04FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000000000E+6143\"}}" - }, - { - "description": "[decq606] fold-down full sequence", - "canonical_bson": "1800000013640000000080264B91C02220BE377E00FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000000000E+6142\"}}" - }, - { - "description": "[decq608] fold-down full sequence", - "canonical_bson": "1800000013640000000040EAED7446D09C2C9F0C00FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000E+6141\"}}" - }, - { - "description": "[decq610] fold-down full sequence", - "canonical_bson": "18000000136400000000A0CA17726DAE0F1E430100FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000000E+6140\"}}" - }, - { - "description": "[decq612] fold-down full sequence", - "canonical_bson": "18000000136400000000106102253E5ECE4F200000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000000E+6139\"}}" - }, - { - "description": "[decq614] fold-down full sequence", - "canonical_bson": "18000000136400000000E83C80D09F3C2E3B030000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000E+6138\"}}" - }, - { - "description": "[decq616] fold-down full sequence", - "canonical_bson": "18000000136400000000E4D20CC8DCD2B752000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000E+6137\"}}" - }, - { - "description": "[decq618] fold-down full sequence", - "canonical_bson": "180000001364000000004A48011416954508000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000E+6136\"}}" - }, - { - "description": "[decq620] fold-down full sequence", - "canonical_bson": "18000000136400000000A1EDCCCE1BC2D300000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000E+6135\"}}" - }, - { - "description": "[decq622] fold-down full sequence", - "canonical_bson": "18000000136400000080F64AE1C7022D1500000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000E+6134\"}}" - }, - { - "description": "[decq624] fold-down full sequence", - "canonical_bson": "18000000136400000040B2BAC9E0191E0200000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000E+6133\"}}" - }, - { - "description": "[decq626] fold-down full sequence", - "canonical_bson": "180000001364000000A0DEC5ADC935360000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000E+6132\"}}" - }, - { - "description": "[decq628] fold-down full sequence", - "canonical_bson": "18000000136400000010632D5EC76B050000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000E+6131\"}}" - }, - { - "description": "[decq630] fold-down full sequence", - "canonical_bson": "180000001364000000E8890423C78A000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000E+6130\"}}" - }, - { - "description": "[decq632] fold-down full sequence", - "canonical_bson": "18000000136400000064A7B3B6E00D000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000E+6129\"}}" - }, - { - "description": "[decq634] fold-down full sequence", - "canonical_bson": "1800000013640000008A5D78456301000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000E+6128\"}}" - }, - { - "description": "[decq636] fold-down full sequence", - "canonical_bson": "180000001364000000C16FF2862300000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000E+6127\"}}" - }, - { - "description": "[decq638] fold-down full sequence", - "canonical_bson": "180000001364000080C6A47E8D0300000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000E+6126\"}}" - }, - { - "description": "[decq640] fold-down full sequence", - "canonical_bson": "1800000013640000407A10F35A0000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000E+6125\"}}" - }, - { - "description": "[decq642] fold-down full sequence", - "canonical_bson": "1800000013640000A0724E18090000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000E+6124\"}}" - }, - { - "description": "[decq644] fold-down full sequence", - "canonical_bson": "180000001364000010A5D4E8000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000E+6123\"}}" - }, - { - "description": "[decq646] fold-down full sequence", - "canonical_bson": "1800000013640000E8764817000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000E+6122\"}}" - }, - { - "description": "[decq648] fold-down full sequence", - "canonical_bson": "1800000013640000E40B5402000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000E+6121\"}}" - }, - { - "description": "[decq650] fold-down full sequence", - "canonical_bson": "1800000013640000CA9A3B00000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000E+6120\"}}" - }, - { - "description": "[decq652] fold-down full sequence", - "canonical_bson": "1800000013640000E1F50500000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000E+6119\"}}" - }, - { - "description": "[decq654] fold-down full sequence", - "canonical_bson": "180000001364008096980000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000E+6118\"}}" - }, - { - "description": "[decq656] fold-down full sequence", - "canonical_bson": "1800000013640040420F0000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000E+6117\"}}" - }, - { - "description": "[decq658] fold-down full sequence", - "canonical_bson": "18000000136400A086010000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000E+6116\"}}" - }, - { - "description": "[decq660] fold-down full sequence", - "canonical_bson": "180000001364001027000000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000E+6115\"}}" - }, - { - "description": "[decq662] fold-down full sequence", - "canonical_bson": "18000000136400E803000000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000E+6114\"}}" - }, - { - "description": "[decq664] fold-down full sequence", - "canonical_bson": "180000001364006400000000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00E+6113\"}}" - }, - { - "description": "[decq666] fold-down full sequence", - "canonical_bson": "180000001364000A00000000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+6112\"}}" - }, - { - "description": "[decq060] fold-downs (more below)", - "canonical_bson": "180000001364000100000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1\"}}" - }, - { - "description": "[decq670] fold-down full sequence", - "canonical_bson": "180000001364000100000000000000000000000000FC5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6110\"}}" - }, - { - "description": "[decq668] fold-down full sequence", - "canonical_bson": "180000001364000100000000000000000000000000FE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6111\"}}" - }, - { - "description": "[decq072] Nmin and below", - "canonical_bson": "180000001364000100000000000000000000000000420000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6143\"}}" - }, - { - "description": "[decq076] Nmin and below", - "canonical_bson": "18000000136400010000000A5BC138938D44C64D31000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000001E-6143\"}}" - }, - { - "description": "[decq036] fold-downs (more below)", - "canonical_bson": "18000000136400000000807F1BCF85B27059C8A43CFE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.230000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq062] fold-downs (more below)", - "canonical_bson": "180000001364007B000000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.23\"}}" - }, - { - "description": "[decq034] Nmax and similar", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3CFE5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.234567890123456789012345678901234E+6144\"}}" - }, - { - "description": "[decq441] exponent lengths", - "canonical_bson": "180000001364000700000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7\"}}" - }, - { - "description": "[decq449] exponent lengths", - "canonical_bson": "1800000013640007000000000000000000000000001E5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+5999\"}}" - }, - { - "description": "[decq447] exponent lengths", - "canonical_bson": "1800000013640007000000000000000000000000000E3800", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+999\"}}" - }, - { - "description": "[decq445] exponent lengths", - "canonical_bson": "180000001364000700000000000000000000000000063100", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+99\"}}" - }, - { - "description": "[decq443] exponent lengths", - "canonical_bson": "180000001364000700000000000000000000000000523000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+9\"}}" - }, - { - "description": "[decq842] VG testcase", - "canonical_bson": "180000001364000000FED83F4E7C9FE4E269E38A5BCD1700", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7.049000000000010795488000000000000E-3097\"}}" - }, - { - "description": "[decq841] VG testcase", - "canonical_bson": "180000001364000000203B9DB5056F000000000000002400", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"8.000000000000000000E-1550\"}}" - }, - { - "description": "[decq840] VG testcase", - "canonical_bson": "180000001364003C17258419D710C42F0000000000002400", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"8.81125000000001349436E-1548\"}}" - }, - { - "description": "[decq701] Selected DPD codes", - "canonical_bson": "180000001364000900000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"9\"}}" - }, - { - "description": "[decq032] Nmax and similar", - "canonical_bson": "18000000136400FFFFFFFF638E8D37C087ADBE09EDFF5F00", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"9.999999999999999999999999999999999E+6144\"}}" - }, - { - "description": "[decq702] Selected DPD codes", - "canonical_bson": "180000001364000A00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10\"}}" - }, - { - "description": "[decq057] fold-downs (more below)", - "canonical_bson": "180000001364000C00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12\"}}" - }, - { - "description": "[decq703] Selected DPD codes", - "canonical_bson": "180000001364001300000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"19\"}}" - }, - { - "description": "[decq704] Selected DPD codes", - "canonical_bson": "180000001364001400000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"20\"}}" - }, - { - "description": "[decq705] Selected DPD codes", - "canonical_bson": "180000001364001D00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"29\"}}" - }, - { - "description": "[decq706] Selected DPD codes", - "canonical_bson": "180000001364001E00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"30\"}}" - }, - { - "description": "[decq707] Selected DPD codes", - "canonical_bson": "180000001364002700000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"39\"}}" - }, - { - "description": "[decq708] Selected DPD codes", - "canonical_bson": "180000001364002800000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"40\"}}" - }, - { - "description": "[decq709] Selected DPD codes", - "canonical_bson": "180000001364003100000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"49\"}}" - }, - { - "description": "[decq710] Selected DPD codes", - "canonical_bson": "180000001364003200000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"50\"}}" - }, - { - "description": "[decq711] Selected DPD codes", - "canonical_bson": "180000001364003B00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"59\"}}" - }, - { - "description": "[decq712] Selected DPD codes", - "canonical_bson": "180000001364003C00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"60\"}}" - }, - { - "description": "[decq713] Selected DPD codes", - "canonical_bson": "180000001364004500000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"69\"}}" - }, - { - "description": "[decq714] Selected DPD codes", - "canonical_bson": "180000001364004600000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"70\"}}" - }, - { - "description": "[decq715] Selected DPD codes", - "canonical_bson": "180000001364004700000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"71\"}}" - }, - { - "description": "[decq716] Selected DPD codes", - "canonical_bson": "180000001364004800000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"72\"}}" - }, - { - "description": "[decq717] Selected DPD codes", - "canonical_bson": "180000001364004900000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"73\"}}" - }, - { - "description": "[decq718] Selected DPD codes", - "canonical_bson": "180000001364004A00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"74\"}}" - }, - { - "description": "[decq719] Selected DPD codes", - "canonical_bson": "180000001364004B00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"75\"}}" - }, - { - "description": "[decq720] Selected DPD codes", - "canonical_bson": "180000001364004C00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"76\"}}" - }, - { - "description": "[decq721] Selected DPD codes", - "canonical_bson": "180000001364004D00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"77\"}}" - }, - { - "description": "[decq722] Selected DPD codes", - "canonical_bson": "180000001364004E00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"78\"}}" - }, - { - "description": "[decq723] Selected DPD codes", - "canonical_bson": "180000001364004F00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"79\"}}" - }, - { - "description": "[decq056] fold-downs (more below)", - "canonical_bson": "180000001364007B00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"123\"}}" - }, - { - "description": "[decq064] fold-downs (more below)", - "canonical_bson": "1800000013640039300000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"123.45\"}}" - }, - { - "description": "[decq732] Selected DPD codes", - "canonical_bson": "180000001364000802000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"520\"}}" - }, - { - "description": "[decq733] Selected DPD codes", - "canonical_bson": "180000001364000902000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"521\"}}" - }, - { - "description": "[decq740] DPD: one of each of the huffman groups", - "canonical_bson": "180000001364000903000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"777\"}}" - }, - { - "description": "[decq741] DPD: one of each of the huffman groups", - "canonical_bson": "180000001364000A03000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"778\"}}" - }, - { - "description": "[decq742] DPD: one of each of the huffman groups", - "canonical_bson": "180000001364001303000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"787\"}}" - }, - { - "description": "[decq746] DPD: one of each of the huffman groups", - "canonical_bson": "180000001364001F03000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"799\"}}" - }, - { - "description": "[decq743] DPD: one of each of the huffman groups", - "canonical_bson": "180000001364006D03000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"877\"}}" - }, - { - "description": "[decq753] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "180000001364007803000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"888\"}}" - }, - { - "description": "[decq754] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "180000001364007903000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"889\"}}" - }, - { - "description": "[decq760] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "180000001364008203000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"898\"}}" - }, - { - "description": "[decq764] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "180000001364008303000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"899\"}}" - }, - { - "description": "[decq745] DPD: one of each of the huffman groups", - "canonical_bson": "18000000136400D303000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"979\"}}" - }, - { - "description": "[decq770] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "18000000136400DC03000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"988\"}}" - }, - { - "description": "[decq774] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "18000000136400DD03000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"989\"}}" - }, - { - "description": "[decq730] Selected DPD codes", - "canonical_bson": "18000000136400E203000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"994\"}}" - }, - { - "description": "[decq731] Selected DPD codes", - "canonical_bson": "18000000136400E303000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"995\"}}" - }, - { - "description": "[decq744] DPD: one of each of the huffman groups", - "canonical_bson": "18000000136400E503000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"997\"}}" - }, - { - "description": "[decq780] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "18000000136400E603000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"998\"}}" - }, - { - "description": "[decq787] DPD all-highs cases (includes the 24 redundant codes)", - "canonical_bson": "18000000136400E703000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"999\"}}" - }, - { - "description": "[decq053] fold-downs (more below)", - "canonical_bson": "18000000136400D204000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1234\"}}" - }, - { - "description": "[decq052] fold-downs (more below)", - "canonical_bson": "180000001364003930000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12345\"}}" - }, - { - "description": "[decq792] Miscellaneous (testers' queries, etc.)", - "canonical_bson": "180000001364003075000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"30000\"}}" - }, - { - "description": "[decq793] Miscellaneous (testers' queries, etc.)", - "canonical_bson": "1800000013640090940D0000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"890000\"}}" - }, - { - "description": "[decq824] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400FEFFFF7F00000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2147483646\"}}" - }, - { - "description": "[decq825] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400FFFFFF7F00000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2147483647\"}}" - }, - { - "description": "[decq826] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "180000001364000000008000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2147483648\"}}" - }, - { - "description": "[decq827] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "180000001364000100008000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2147483649\"}}" - }, - { - "description": "[decq828] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400FEFFFFFF00000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"4294967294\"}}" - }, - { - "description": "[decq829] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "18000000136400FFFFFFFF00000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"4294967295\"}}" - }, - { - "description": "[decq830] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "180000001364000000000001000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"4294967296\"}}" - }, - { - "description": "[decq831] values around [u]int32 edges (zeros done earlier)", - "canonical_bson": "180000001364000100000001000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"4294967297\"}}" - }, - { - "description": "[decq022] Normality", - "canonical_bson": "18000000136400C7711CC7B548F377DC80A131C836403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1111111111111111111111111111111111\"}}" - }, - { - "description": "[decq020] Normality", - "canonical_bson": "18000000136400F2AF967ED05C82DE3297FF6FDE3C403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1234567890123456789012345678901234\"}}" - }, - { - "description": "[decq550] Specials", - "canonical_bson": "18000000136400FFFFFFFF638E8D37C087ADBE09ED413000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"9999999999999999999999999999999999\"}}" - } - ] -} - diff --git a/testdata/bson-corpus/decimal128-3.json b/testdata/bson-corpus/decimal128-3.json deleted file mode 100644 index 9b015343ce..0000000000 --- a/testdata/bson-corpus/decimal128-3.json +++ /dev/null @@ -1,1771 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "valid": [ - { - "description": "[basx066] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE0000000000000000000038B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-00345678.5432\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-345678.5432\"}}" - }, - { - "description": "[basx065] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE0000000000000000000038B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0345678.5432\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-345678.5432\"}}" - }, - { - "description": "[basx064] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE0000000000000000000038B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-345678.5432\"}}" - }, - { - "description": "[basx041] strings without E cannot generate E in result", - "canonical_bson": "180000001364004C0000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-76\"}}" - }, - { - "description": "[basx027] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000F270000000000000000000000003AB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-9.999\"}}" - }, - { - "description": "[basx026] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364009F230000000000000000000000003AB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-9.119\"}}" - }, - { - "description": "[basx025] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364008F030000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-9.11\"}}" - }, - { - "description": "[basx024] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364005B000000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-9.1\"}}" - }, - { - "description": "[dqbsr531] negatives (Rounded)", - "canonical_bson": "1800000013640099761CC7B548F377DC80A131C836FEAF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.1111111111111111111111111111123450\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.111111111111111111111111111112345\"}}" - }, - { - "description": "[basx022] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000A000000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.0\"}}" - }, - { - "description": "[basx021] conform to rules and exponent will be in permitted range).", - "canonical_bson": "18000000136400010000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1\"}}" - }, - { - "description": "[basx601] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-9\"}}" - }, - { - "description": "[basx622] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002EB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-9\"}}" - }, - { - "description": "[basx602] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-8\"}}" - }, - { - "description": "[basx621] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000030B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-8\"}}" - }, - { - "description": "[basx603] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-7\"}}" - }, - { - "description": "[basx620] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000032B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-7\"}}" - }, - { - "description": "[basx604] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000\"}}" - }, - { - "description": "[basx619] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000034B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000000\"}}" - }, - { - "description": "[basx605] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000363000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000\"}}" - }, - { - "description": "[basx618] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000036B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00000\"}}" - }, - { - "description": "[basx680] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"000000.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx606] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000383000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000\"}}" - }, - { - "description": "[basx617] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000038B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0000\"}}" - }, - { - "description": "[basx681] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"00000.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx686] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+00000.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx687] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000040B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-00000.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}" - }, - { - "description": "[basx019] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640000000000000000000000000000003CB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-00.00\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00\"}}" - }, - { - "description": "[basx607] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000\"}}" - }, - { - "description": "[basx616] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003AB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000\"}}" - }, - { - "description": "[basx682] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0000.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx155] Numbers with E", - "canonical_bson": "1800000013640000000000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000e+0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000\"}}" - }, - { - "description": "[basx130] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000\"}}" - }, - { - "description": "[basx290] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000038B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0000\"}}" - }, - { - "description": "[basx131] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000\"}}" - }, - { - "description": "[basx291] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000036B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00000\"}}" - }, - { - "description": "[basx132] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000\"}}" - }, - { - "description": "[basx292] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000034B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000000\"}}" - }, - { - "description": "[basx133] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-7\"}}" - }, - { - "description": "[basx293] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000032B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-7\"}}" - }, - { - "description": "[basx608] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00\"}}" - }, - { - "description": "[basx615] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003CB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00\"}}" - }, - { - "description": "[basx683] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"000.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx630] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00\"}}" - }, - { - "description": "[basx670] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00\"}}" - }, - { - "description": "[basx631] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0\"}}" - }, - { - "description": "[basx671] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000\"}}" - }, - { - "description": "[basx134] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000\"}}" - }, - { - "description": "[basx294] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000038B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0000\"}}" - }, - { - "description": "[basx632] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx672] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000\"}}" - }, - { - "description": "[basx135] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000\"}}" - }, - { - "description": "[basx295] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000036B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00000\"}}" - }, - { - "description": "[basx633] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+1\"}}" - }, - { - "description": "[basx673] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000\"}}" - }, - { - "description": "[basx136] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000\"}}" - }, - { - "description": "[basx674] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000\"}}" - }, - { - "description": "[basx634] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+2\"}}" - }, - { - "description": "[basx137] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-7\"}}" - }, - { - "description": "[basx635] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+3\"}}" - }, - { - "description": "[basx675] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-7\"}}" - }, - { - "description": "[basx636] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000483000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+4\"}}" - }, - { - "description": "[basx676] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-8\"}}" - }, - { - "description": "[basx637] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+5\"}}" - }, - { - "description": "[basx677] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-9\"}}" - }, - { - "description": "[basx638] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6\"}}" - }, - { - "description": "[basx678] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-10\"}}" - }, - { - "description": "[basx149] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"000E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+9\"}}" - }, - { - "description": "[basx639] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+7\"}}" - }, - { - "description": "[basx679] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00E-9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-11\"}}" - }, - { - "description": "[basx063] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE00000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+00345678.5432\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"345678.5432\"}}" - }, - { - "description": "[basx018] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640000000000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0\"}}" - }, - { - "description": "[basx609] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0\"}}" - }, - { - "description": "[basx614] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0\"}}" - }, - { - "description": "[basx684] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"00.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx640] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0\"}}" - }, - { - "description": "[basx660] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0\"}}" - }, - { - "description": "[basx641] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx661] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00\"}}" - }, - { - "description": "[basx296] some more negative zeros [systematic tests below]", - "canonical_bson": "1800000013640000000000000000000000000000003AB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000\"}}" - }, - { - "description": "[basx642] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+1\"}}" - }, - { - "description": "[basx662] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000\"}}" - }, - { - "description": "[basx297] some more negative zeros [systematic tests below]", - "canonical_bson": "18000000136400000000000000000000000000000038B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0000\"}}" - }, - { - "description": "[basx643] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+2\"}}" - }, - { - "description": "[basx663] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000\"}}" - }, - { - "description": "[basx644] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+3\"}}" - }, - { - "description": "[basx664] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000\"}}" - }, - { - "description": "[basx645] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000483000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+4\"}}" - }, - { - "description": "[basx665] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000\"}}" - }, - { - "description": "[basx646] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+5\"}}" - }, - { - "description": "[basx666] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-7\"}}" - }, - { - "description": "[basx647] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6\"}}" - }, - { - "description": "[basx667] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-8\"}}" - }, - { - "description": "[basx648] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+7\"}}" - }, - { - "description": "[basx668] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-9\"}}" - }, - { - "description": "[basx160] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"00E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+9\"}}" - }, - { - "description": "[basx161] Numbers with E", - "canonical_bson": "1800000013640000000000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"00E-9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-9\"}}" - }, - { - "description": "[basx649] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000503000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+8\"}}" - }, - { - "description": "[basx669] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000002C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0E-9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-10\"}}" - }, - { - "description": "[basx062] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE00000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+0345678.5432\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"345678.5432\"}}" - }, - { - "description": "[basx001] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx017] conform to rules and exponent will be in permitted range).", - "canonical_bson": "18000000136400000000000000000000000000000040B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}" - }, - { - "description": "[basx611] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx613] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000040B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}" - }, - { - "description": "[basx685] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx688] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+0.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx689] Zeros", - "canonical_bson": "18000000136400000000000000000000000000000040B000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0\"}}" - }, - { - "description": "[basx650] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0\"}}" - }, - { - "description": "[basx651] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000423000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+1\"}}" - }, - { - "description": "[basx298] some more negative zeros [systematic tests below]", - "canonical_bson": "1800000013640000000000000000000000000000003CB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00\"}}" - }, - { - "description": "[basx652] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000443000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+2\"}}" - }, - { - "description": "[basx299] some more negative zeros [systematic tests below]", - "canonical_bson": "1800000013640000000000000000000000000000003AB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000\"}}" - }, - { - "description": "[basx653] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000463000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+3\"}}" - }, - { - "description": "[basx654] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000483000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+4\"}}" - }, - { - "description": "[basx655] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+5\"}}" - }, - { - "description": "[basx656] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6\"}}" - }, - { - "description": "[basx657] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000004E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+7\"}}" - }, - { - "description": "[basx658] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000503000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+8\"}}" - }, - { - "description": "[basx138] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+0E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+9\"}}" - }, - { - "description": "[basx139] Numbers with E", - "canonical_bson": "18000000136400000000000000000000000000000052B000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+9\"}}" - }, - { - "description": "[basx144] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000523000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+9\"}}" - }, - { - "description": "[basx154] Numbers with E", - "canonical_bson": "180000001364000000000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+9\"}}" - }, - { - "description": "[basx659] Zeros", - "canonical_bson": "180000001364000000000000000000000000000000523000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+9\"}}" - }, - { - "description": "[basx042] strings without E cannot generate E in result", - "canonical_bson": "18000000136400FC040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+12.76\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.76\"}}" - }, - { - "description": "[basx143] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+1E+009\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx061] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE00000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+345678.5432\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"345678.5432\"}}" - }, - { - "description": "[basx036] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640015CD5B0700000000000000000000203000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000000123456789\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.23456789E-8\"}}" - }, - { - "description": "[basx035] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640015CD5B0700000000000000000000223000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000123456789\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.23456789E-7\"}}" - }, - { - "description": "[basx034] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640015CD5B0700000000000000000000243000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000123456789\"}}" - }, - { - "description": "[basx053] strings without E cannot generate E in result", - "canonical_bson": "180000001364003200000000000000000000000000323000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000050\"}}" - }, - { - "description": "[basx033] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640015CD5B0700000000000000000000263000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000123456789\"}}" - }, - { - "description": "[basx016] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000C000000000000000000000000003A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.012\"}}" - }, - { - "description": "[basx015] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364007B000000000000000000000000003A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.123\"}}" - }, - { - "description": "[basx037] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640078DF0D8648700000000000000000223000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.123456789012344\"}}" - }, - { - "description": "[basx038] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640079DF0D8648700000000000000000223000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.123456789012345\"}}" - }, - { - "description": "[basx250] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000383000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265\"}}" - }, - { - "description": "[basx257] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265\"}}" - }, - { - "description": "[basx256] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.01265\"}}" - }, - { - "description": "[basx258] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265\"}}" - }, - { - "description": "[basx251] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000103000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-21\"}}" - }, - { - "description": "[basx263] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000603000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E+20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+19\"}}" - }, - { - "description": "[basx255] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.001265\"}}" - }, - { - "description": "[basx259] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65\"}}" - }, - { - "description": "[basx254] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0001265\"}}" - }, - { - "description": "[basx260] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5\"}}" - }, - { - "description": "[basx253] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00001265\"}}" - }, - { - "description": "[basx261] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E+4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265\"}}" - }, - { - "description": "[basx252] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000283000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-9\"}}" - }, - { - "description": "[basx262] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000483000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265E+8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+7\"}}" - }, - { - "description": "[basx159] Numbers with E", - "canonical_bson": "1800000013640049000000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.73e-7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7.3E-8\"}}" - }, - { - "description": "[basx004] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640064000000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00\"}}" - }, - { - "description": "[basx003] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000A000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0\"}}" - }, - { - "description": "[basx002] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000100000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1\"}}" - }, - { - "description": "[basx148] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+009\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx153] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E009\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx141] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1e+09\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx146] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+09\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx151] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1e09\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx142] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000F43000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+90\"}}" - }, - { - "description": "[basx147] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000F43000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1e+90\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+90\"}}" - }, - { - "description": "[basx152] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000F43000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E90\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+90\"}}" - }, - { - "description": "[basx140] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx150] Numbers with E", - "canonical_bson": "180000001364000100000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+9\"}}" - }, - { - "description": "[basx014] conform to rules and exponent will be in permitted range).", - "canonical_bson": "18000000136400D2040000000000000000000000003A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.234\"}}" - }, - { - "description": "[basx170] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265\"}}" - }, - { - "description": "[basx177] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265\"}}" - }, - { - "description": "[basx176] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265\"}}" - }, - { - "description": "[basx178] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65\"}}" - }, - { - "description": "[basx171] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000123000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-20\"}}" - }, - { - "description": "[basx183] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000623000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+20\"}}" - }, - { - "description": "[basx175] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.01265\"}}" - }, - { - "description": "[basx179] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5\"}}" - }, - { - "description": "[basx174] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.001265\"}}" - }, - { - "description": "[basx180] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265\"}}" - }, - { - "description": "[basx173] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0001265\"}}" - }, - { - "description": "[basx181] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000423000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+4\"}}" - }, - { - "description": "[basx172] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000002A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-8\"}}" - }, - { - "description": "[basx182] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000004A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+8\"}}" - }, - { - "description": "[basx157] Numbers with E", - "canonical_bson": "180000001364000400000000000000000000000000523000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"4E+9\"}}" - }, - { - "description": "[basx067] examples", - "canonical_bson": "180000001364000500000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"5E-6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000005\"}}" - }, - { - "description": "[basx069] examples", - "canonical_bson": "180000001364000500000000000000000000000000323000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"5E-7\"}}" - }, - { - "description": "[basx385] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7\"}}" - }, - { - "description": "[basx365] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000543000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E10\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+10\"}}" - }, - { - "description": "[basx405] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000002C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-10\"}}" - }, - { - "description": "[basx363] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000563000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E11\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+11\"}}" - }, - { - "description": "[basx407] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000002A3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-11\"}}" - }, - { - "description": "[basx361] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000583000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E12\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+12\"}}" - }, - { - "description": "[basx409] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000283000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-12\"}}" - }, - { - "description": "[basx411] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000263000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-13\"}}" - }, - { - "description": "[basx383] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+1\"}}" - }, - { - "description": "[basx387] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.7\"}}" - }, - { - "description": "[basx381] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+2\"}}" - }, - { - "description": "[basx389] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.07\"}}" - }, - { - "description": "[basx379] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+3\"}}" - }, - { - "description": "[basx391] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.007\"}}" - }, - { - "description": "[basx377] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000483000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+4\"}}" - }, - { - "description": "[basx393] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0007\"}}" - }, - { - "description": "[basx375] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000004A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+5\"}}" - }, - { - "description": "[basx395] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00007\"}}" - }, - { - "description": "[basx373] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000004C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+6\"}}" - }, - { - "description": "[basx397] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000007\"}}" - }, - { - "description": "[basx371] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000004E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+7\"}}" - }, - { - "description": "[basx399] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000323000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-7\"}}" - }, - { - "description": "[basx369] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000503000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+8\"}}" - }, - { - "description": "[basx401] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000303000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-8\"}}" - }, - { - "description": "[basx367] Engineering notation tests", - "canonical_bson": "180000001364000700000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E+9\"}}" - }, - { - "description": "[basx403] Engineering notation tests", - "canonical_bson": "1800000013640007000000000000000000000000002E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"7E-9\"}}" - }, - { - "description": "[basx007] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640064000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10.0\"}}" - }, - { - "description": "[basx005] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364000A00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10\"}}" - }, - { - "description": "[basx165] Numbers with E", - "canonical_bson": "180000001364000A00000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10E+009\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+10\"}}" - }, - { - "description": "[basx163] Numbers with E", - "canonical_bson": "180000001364000A00000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10E+09\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+10\"}}" - }, - { - "description": "[basx325] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10\"}}" - }, - { - "description": "[basx305] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000543000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e10\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+11\"}}" - }, - { - "description": "[basx345] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000002C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-10\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-9\"}}" - }, - { - "description": "[basx303] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000563000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e11\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+12\"}}" - }, - { - "description": "[basx347] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000002A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-11\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-10\"}}" - }, - { - "description": "[basx301] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000583000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e12\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+13\"}}" - }, - { - "description": "[basx349] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000283000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-12\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-11\"}}" - }, - { - "description": "[basx351] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000263000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-13\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-12\"}}" - }, - { - "description": "[basx323] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+2\"}}" - }, - { - "description": "[basx327] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0\"}}" - }, - { - "description": "[basx321] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+3\"}}" - }, - { - "description": "[basx329] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.10\"}}" - }, - { - "description": "[basx319] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+4\"}}" - }, - { - "description": "[basx331] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.010\"}}" - }, - { - "description": "[basx317] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000483000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+5\"}}" - }, - { - "description": "[basx333] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0010\"}}" - }, - { - "description": "[basx315] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000004A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+6\"}}" - }, - { - "description": "[basx335] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00010\"}}" - }, - { - "description": "[basx313] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000004C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+7\"}}" - }, - { - "description": "[basx337] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-6\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000010\"}}" - }, - { - "description": "[basx311] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000004E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+8\"}}" - }, - { - "description": "[basx339] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000010\"}}" - }, - { - "description": "[basx309] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000503000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+9\"}}" - }, - { - "description": "[basx341] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-7\"}}" - }, - { - "description": "[basx164] Numbers with E", - "canonical_bson": "180000001364000A00000000000000000000000000F43000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e+90\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+91\"}}" - }, - { - "description": "[basx162] Numbers with E", - "canonical_bson": "180000001364000A00000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+10\"}}" - }, - { - "description": "[basx307] Engineering notation tests", - "canonical_bson": "180000001364000A00000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+10\"}}" - }, - { - "description": "[basx343] Engineering notation tests", - "canonical_bson": "180000001364000A000000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"10e-9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-8\"}}" - }, - { - "description": "[basx008] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640065000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10.1\"}}" - }, - { - "description": "[basx009] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640068000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10.4\"}}" - }, - { - "description": "[basx010] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640069000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10.5\"}}" - }, - { - "description": "[basx011] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364006A000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10.6\"}}" - }, - { - "description": "[basx012] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364006D000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"10.9\"}}" - }, - { - "description": "[basx013] conform to rules and exponent will be in permitted range).", - "canonical_bson": "180000001364006E000000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"11.0\"}}" - }, - { - "description": "[basx040] strings without E cannot generate E in result", - "canonical_bson": "180000001364000C00000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12\"}}" - }, - { - "description": "[basx190] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65\"}}" - }, - { - "description": "[basx197] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65\"}}" - }, - { - "description": "[basx196] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265\"}}" - }, - { - "description": "[basx198] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5\"}}" - }, - { - "description": "[basx191] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000143000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-19\"}}" - }, - { - "description": "[basx203] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000643000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E+20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+21\"}}" - }, - { - "description": "[basx195] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265\"}}" - }, - { - "description": "[basx199] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265\"}}" - }, - { - "description": "[basx194] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.01265\"}}" - }, - { - "description": "[basx200] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+4\"}}" - }, - { - "description": "[basx193] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000343000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.001265\"}}" - }, - { - "description": "[basx201] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E+4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+5\"}}" - }, - { - "description": "[basx192] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000002C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-7\"}}" - }, - { - "description": "[basx202] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000004C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65E+8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+9\"}}" - }, - { - "description": "[basx044] strings without E cannot generate E in result", - "canonical_bson": "18000000136400FC040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"012.76\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.76\"}}" - }, - { - "description": "[basx042] strings without E cannot generate E in result", - "canonical_bson": "18000000136400FC040000000000000000000000003C3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.76\"}}" - }, - { - "description": "[basx046] strings without E cannot generate E in result", - "canonical_bson": "180000001364001100000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"17.\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"17\"}}" - }, - { - "description": "[basx049] strings without E cannot generate E in result", - "canonical_bson": "180000001364002C00000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0044\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"44\"}}" - }, - { - "description": "[basx048] strings without E cannot generate E in result", - "canonical_bson": "180000001364002C00000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"044\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"44\"}}" - }, - { - "description": "[basx158] Numbers with E", - "canonical_bson": "180000001364002C00000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"44E+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"4.4E+10\"}}" - }, - { - "description": "[basx068] examples", - "canonical_bson": "180000001364003200000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"50E-7\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000050\"}}" - }, - { - "description": "[basx169] Numbers with E", - "canonical_bson": "180000001364006400000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"100e+009\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00E+11\"}}" - }, - { - "description": "[basx167] Numbers with E", - "canonical_bson": "180000001364006400000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"100e+09\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00E+11\"}}" - }, - { - "description": "[basx168] Numbers with E", - "canonical_bson": "180000001364006400000000000000000000000000F43000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"100E+90\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00E+92\"}}" - }, - { - "description": "[basx166] Numbers with E", - "canonical_bson": "180000001364006400000000000000000000000000523000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"100e+9\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00E+11\"}}" - }, - { - "description": "[basx210] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003E3000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5\"}}" - }, - { - "description": "[basx217] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5\"}}" - }, - { - "description": "[basx216] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65\"}}" - }, - { - "description": "[basx218] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265\"}}" - }, - { - "description": "[basx211] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000163000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-18\"}}" - }, - { - "description": "[basx223] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000663000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E+20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+22\"}}" - }, - { - "description": "[basx215] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265\"}}" - }, - { - "description": "[basx219] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+4\"}}" - }, - { - "description": "[basx214] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265\"}}" - }, - { - "description": "[basx220] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+5\"}}" - }, - { - "description": "[basx213] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.01265\"}}" - }, - { - "description": "[basx221] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E+4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+6\"}}" - }, - { - "description": "[basx212] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000002E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000001265\"}}" - }, - { - "description": "[basx222] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000004E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5E+8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+10\"}}" - }, - { - "description": "[basx006] conform to rules and exponent will be in permitted range).", - "canonical_bson": "18000000136400E803000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1000\"}}" - }, - { - "description": "[basx230] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265\"}}" - }, - { - "description": "[basx237] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000403000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265\"}}" - }, - { - "description": "[basx236] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"126.5\"}}" - }, - { - "description": "[basx238] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000423000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E+1\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+4\"}}" - }, - { - "description": "[basx231] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000183000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E-17\"}}" - }, - { - "description": "[basx243] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000683000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E+20\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+23\"}}" - }, - { - "description": "[basx235] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.65\"}}" - }, - { - "description": "[basx239] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000443000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E+2\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+5\"}}" - }, - { - "description": "[basx234] Numbers with E", - "canonical_bson": "18000000136400F1040000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265\"}}" - }, - { - "description": "[basx240] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000463000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E+3\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+6\"}}" - }, - { - "description": "[basx233] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000383000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1265\"}}" - }, - { - "description": "[basx241] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000483000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E+4\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+7\"}}" - }, - { - "description": "[basx232] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E-8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00001265\"}}" - }, - { - "description": "[basx242] Numbers with E", - "canonical_bson": "18000000136400F104000000000000000000000000503000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1265E+8\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.265E+11\"}}" - }, - { - "description": "[basx060] strings without E cannot generate E in result", - "canonical_bson": "18000000136400185C0ACE00000000000000000000383000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"345678.5432\"}}" - }, - { - "description": "[basx059] strings without E cannot generate E in result", - "canonical_bson": "18000000136400F198670C08000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0345678.54321\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"345678.54321\"}}" - }, - { - "description": "[basx058] strings without E cannot generate E in result", - "canonical_bson": "180000001364006AF90B7C50000000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"345678.543210\"}}" - }, - { - "description": "[basx057] strings without E cannot generate E in result", - "canonical_bson": "180000001364006A19562522020000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"2345678.543210\"}}" - }, - { - "description": "[basx056] strings without E cannot generate E in result", - "canonical_bson": "180000001364006AB9C8733A0B0000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12345678.543210\"}}" - }, - { - "description": "[basx031] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640040AF0D8648700000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"123456789.000000\"}}" - }, - { - "description": "[basx030] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640080910F8648700000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"123456789.123456\"}}" - }, - { - "description": "[basx032] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640080910F8648700000000000000000403000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"123456789123456\"}}" - } - ] -} diff --git a/testdata/bson-corpus/decimal128-4.json b/testdata/bson-corpus/decimal128-4.json deleted file mode 100644 index 0957019351..0000000000 --- a/testdata/bson-corpus/decimal128-4.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "valid": [ - { - "description": "[basx023] conform to rules and exponent will be in permitted range).", - "canonical_bson": "1800000013640001000000000000000000000000003EB000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.1\"}}" - }, - - { - "description": "[basx045] strings without E cannot generate E in result", - "canonical_bson": "1800000013640003000000000000000000000000003A3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+0.003\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.003\"}}" - }, - { - "description": "[basx610] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \".0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0\"}}" - }, - { - "description": "[basx612] Zeros", - "canonical_bson": "1800000013640000000000000000000000000000003EB000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-.0\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.0\"}}" - }, - { - "description": "[basx043] strings without E cannot generate E in result", - "canonical_bson": "18000000136400FC040000000000000000000000003C3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"+12.76\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"12.76\"}}" - }, - { - "description": "[basx055] strings without E cannot generate E in result", - "canonical_bson": "180000001364000500000000000000000000000000303000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000005\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"5E-8\"}}" - }, - { - "description": "[basx054] strings without E cannot generate E in result", - "canonical_bson": "180000001364000500000000000000000000000000323000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0000005\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"5E-7\"}}" - }, - { - "description": "[basx052] strings without E cannot generate E in result", - "canonical_bson": "180000001364000500000000000000000000000000343000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000005\"}}" - }, - { - "description": "[basx051] strings without E cannot generate E in result", - "canonical_bson": "180000001364000500000000000000000000000000363000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"00.00005\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00005\"}}" - }, - { - "description": "[basx050] strings without E cannot generate E in result", - "canonical_bson": "180000001364000500000000000000000000000000383000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.0005\"}}" - }, - { - "description": "[basx047] strings without E cannot generate E in result", - "canonical_bson": "1800000013640005000000000000000000000000003E3000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \".5\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.5\"}}" - }, - { - "description": "[dqbsr431] check rounding modes heeded (Rounded)", - "canonical_bson": "1800000013640099761CC7B548F377DC80A131C836FE2F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.1111111111111111111111111111123450\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.111111111111111111111111111112345\"}}" - }, - { - "description": "OK2", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FC2F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \".100000000000000000000000000000000000000000000000000000000000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.1000000000000000000000000000000000\"}}" - } - ], - "parseErrors": [ - { - "description": "[basx564] Near-specials (Conversion_syntax)", - "string": "Infi" - }, - { - "description": "[basx565] Near-specials (Conversion_syntax)", - "string": "Infin" - }, - { - "description": "[basx566] Near-specials (Conversion_syntax)", - "string": "Infini" - }, - { - "description": "[basx567] Near-specials (Conversion_syntax)", - "string": "Infinit" - }, - { - "description": "[basx568] Near-specials (Conversion_syntax)", - "string": "-Infinit" - }, - { - "description": "[basx590] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": ".Infinity" - }, - { - "description": "[basx562] Near-specials (Conversion_syntax)", - "string": "NaNq" - }, - { - "description": "[basx563] Near-specials (Conversion_syntax)", - "string": "NaNs" - }, - { - "description": "[dqbas939] overflow results at different rounding modes (Overflow & Inexact & Rounded)", - "string": "-7e10000" - }, - { - "description": "[dqbsr534] negatives (Rounded & Inexact)", - "string": "-1.11111111111111111111111111111234650" - }, - { - "description": "[dqbsr535] negatives (Rounded & Inexact)", - "string": "-1.11111111111111111111111111111234551" - }, - { - "description": "[dqbsr533] negatives (Rounded & Inexact)", - "string": "-1.11111111111111111111111111111234550" - }, - { - "description": "[dqbsr532] negatives (Rounded & Inexact)", - "string": "-1.11111111111111111111111111111234549" - }, - { - "description": "[dqbsr432] check rounding modes heeded (Rounded & Inexact)", - "string": "1.11111111111111111111111111111234549" - }, - { - "description": "[dqbsr433] check rounding modes heeded (Rounded & Inexact)", - "string": "1.11111111111111111111111111111234550" - }, - { - "description": "[dqbsr435] check rounding modes heeded (Rounded & Inexact)", - "string": "1.11111111111111111111111111111234551" - }, - { - "description": "[dqbsr434] check rounding modes heeded (Rounded & Inexact)", - "string": "1.11111111111111111111111111111234650" - }, - { - "description": "[dqbas938] overflow results at different rounding modes (Overflow & Inexact & Rounded)", - "string": "7e10000" - }, - { - "description": "Inexact rounding#1", - "string": "100000000000000000000000000000000000000000000000000000000001" - }, - { - "description": "Inexact rounding#2", - "string": "1E-6177" - } - ] -} diff --git a/testdata/bson-corpus/decimal128-5.json b/testdata/bson-corpus/decimal128-5.json deleted file mode 100644 index e976eae407..0000000000 --- a/testdata/bson-corpus/decimal128-5.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "valid": [ - { - "description": "[decq035] fold-downs (more below) (Clamped)", - "canonical_bson": "18000000136400000000807F1BCF85B27059C8A43CFE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.23E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.230000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq037] fold-downs (more below) (Clamped)", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq077] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000000000081EFAC855B416D2DEE04000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.100000000000000000000000000000000E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000000000E-6144\"}}" - }, - { - "description": "[decq078] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000000000081EFAC855B416D2DEE04000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000000000E-6144\"}}" - }, - { - "description": "[decq079] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000A00000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000000000000000000000000000010E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-6175\"}}" - }, - { - "description": "[decq080] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000A00000000000000000000000000000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E-6175\"}}" - }, - { - "description": "[decq081] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000020000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.00000000000000000000000000000001E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6175\"}}" - }, - { - "description": "[decq082] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000020000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6175\"}}" - }, - { - "description": "[decq083] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0.000000000000000000000000000000001E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6176\"}}" - }, - { - "description": "[decq084] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000000000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6176\"}}" - }, - { - "description": "[decq090] underflows cannot be tested for simple copies, check edge cases (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1e-6176\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E-6176\"}}" - }, - { - "description": "[decq100] underflows cannot be tested for simple copies, check edge cases (Subnormal)", - "canonical_bson": "18000000136400FFFFFFFF095BC138938D44C64D31000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"999999999999999999999999999999999e-6176\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"9.99999999999999999999999999999999E-6144\"}}" - }, - { - "description": "[decq130] fold-downs (more below) (Clamped)", - "canonical_bson": "18000000136400000000807F1BCF85B27059C8A43CFEDF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.23E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.230000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq132] fold-downs (more below) (Clamped)", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FEDF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.000000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq177] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000000000081EFAC855B416D2DEE04008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.100000000000000000000000000000000E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.00000000000000000000000000000000E-6144\"}}" - }, - { - "description": "[decq178] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000000000081EFAC855B416D2DEE04008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.00000000000000000000000000000000E-6144\"}}" - }, - { - "description": "[decq179] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000A00000000000000000000000000008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000000000000000000000000000000010E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.0E-6175\"}}" - }, - { - "description": "[decq180] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000A00000000000000000000000000008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1.0E-6175\"}}" - }, - { - "description": "[decq181] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000028000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.00000000000000000000000000000001E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6175\"}}" - }, - { - "description": "[decq182] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000028000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6175\"}}" - }, - { - "description": "[decq183] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0.000000000000000000000000000000001E-6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6176\"}}" - }, - { - "description": "[decq184] Nmin and below (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000008000", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6176\"}}" - }, - { - "description": "[decq190] underflow edge cases (Subnormal)", - "canonical_bson": "180000001364000100000000000000000000000000008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1e-6176\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-1E-6176\"}}" - }, - { - "description": "[decq200] underflow edge cases (Subnormal)", - "canonical_bson": "18000000136400FFFFFFFF095BC138938D44C64D31008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-999999999999999999999999999999999e-6176\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-9.99999999999999999999999999999999E-6144\"}}" - }, - { - "description": "[decq400] zeros (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-8000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-6176\"}}" - }, - { - "description": "[decq401] zeros (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000000000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-6177\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E-6176\"}}" - }, - { - "description": "[decq414] clamped zeros... (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6112\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6111\"}}" - }, - { - "description": "[decq416] clamped zeros... (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6111\"}}" - }, - { - "description": "[decq418] clamped zeros... (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+8000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"0E+6111\"}}" - }, - { - "description": "[decq420] negative zeros (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-8000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-6176\"}}" - }, - { - "description": "[decq421] negative zeros (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000008000", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-6177\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E-6176\"}}" - }, - { - "description": "[decq434] clamped zeros... (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000FEDF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6112\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6111\"}}" - }, - { - "description": "[decq436] clamped zeros... (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000FEDF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6111\"}}" - }, - { - "description": "[decq438] clamped zeros... (Clamped)", - "canonical_bson": "180000001364000000000000000000000000000000FEDF00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+8000\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"-0E+6111\"}}" - }, - { - "description": "[decq601] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000000000A5BC138938D44C64D31FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6144\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000000E+6144\"}}" - }, - { - "description": "[decq603] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000000000081EFAC855B416D2DEE04FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6143\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000000000E+6143\"}}" - }, - { - "description": "[decq605] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000000080264B91C02220BE377E00FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6142\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000000000E+6142\"}}" - }, - { - "description": "[decq607] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000000040EAED7446D09C2C9F0C00FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6141\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000000E+6141\"}}" - }, - { - "description": "[decq609] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000000A0CA17726DAE0F1E430100FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6140\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000000E+6140\"}}" - }, - { - "description": "[decq611] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000000106102253E5ECE4F200000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6139\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000000E+6139\"}}" - }, - { - "description": "[decq613] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000000E83C80D09F3C2E3B030000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6138\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000000E+6138\"}}" - }, - { - "description": "[decq615] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000000E4D20CC8DCD2B752000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6137\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000000E+6137\"}}" - }, - { - "description": "[decq617] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000000004A48011416954508000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6136\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000E+6136\"}}" - }, - { - "description": "[decq619] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000000A1EDCCCE1BC2D300000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6135\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000000E+6135\"}}" - }, - { - "description": "[decq621] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000080F64AE1C7022D1500000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6134\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000000E+6134\"}}" - }, - { - "description": "[decq623] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000040B2BAC9E0191E0200000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6133\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000E+6133\"}}" - }, - { - "description": "[decq625] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000000A0DEC5ADC935360000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6132\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000000E+6132\"}}" - }, - { - "description": "[decq627] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000010632D5EC76B050000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6131\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000000E+6131\"}}" - }, - { - "description": "[decq629] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000000E8890423C78A000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6130\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000E+6130\"}}" - }, - { - "description": "[decq631] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400000064A7B3B6E00D000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6129\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000000E+6129\"}}" - }, - { - "description": "[decq633] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000008A5D78456301000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6128\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000000E+6128\"}}" - }, - { - "description": "[decq635] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000000C16FF2862300000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6127\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000E+6127\"}}" - }, - { - "description": "[decq637] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000080C6A47E8D0300000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6126\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000000E+6126\"}}" - }, - { - "description": "[decq639] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000407A10F35A0000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6125\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000000E+6125\"}}" - }, - { - "description": "[decq641] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000A0724E18090000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6124\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000E+6124\"}}" - }, - { - "description": "[decq643] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000010A5D4E8000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6123\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000000E+6123\"}}" - }, - { - "description": "[decq645] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000E8764817000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6122\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000000E+6122\"}}" - }, - { - "description": "[decq647] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000E40B5402000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6121\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000E+6121\"}}" - }, - { - "description": "[decq649] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000CA9A3B00000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6120\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000000E+6120\"}}" - }, - { - "description": "[decq651] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640000E1F50500000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6119\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000000E+6119\"}}" - }, - { - "description": "[decq653] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364008096980000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6118\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000E+6118\"}}" - }, - { - "description": "[decq655] fold-down full sequence (Clamped)", - "canonical_bson": "1800000013640040420F0000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6117\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000000E+6117\"}}" - }, - { - "description": "[decq657] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400A086010000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6116\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00000E+6116\"}}" - }, - { - "description": "[decq659] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364001027000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6115\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000E+6115\"}}" - }, - { - "description": "[decq661] fold-down full sequence (Clamped)", - "canonical_bson": "18000000136400E803000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6114\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.000E+6114\"}}" - }, - { - "description": "[decq663] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364006400000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6113\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.00E+6113\"}}" - }, - { - "description": "[decq665] fold-down full sequence (Clamped)", - "canonical_bson": "180000001364000A00000000000000000000000000FE5F00", - "degenerate_extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6112\"}}", - "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+6112\"}}" - } - ] -} - diff --git a/testdata/bson-corpus/decimal128-6.json b/testdata/bson-corpus/decimal128-6.json deleted file mode 100644 index eba6764e85..0000000000 --- a/testdata/bson-corpus/decimal128-6.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "parseErrors": [ - { - "description": "Incomplete Exponent", - "string": "1e" - }, - { - "description": "Exponent at the beginning", - "string": "E01" - }, - { - "description": "Just a decimal place", - "string": "." - }, - { - "description": "2 decimal places", - "string": "..3" - }, - { - "description": "2 decimal places", - "string": ".13.3" - }, - { - "description": "2 decimal places", - "string": "1..3" - }, - { - "description": "2 decimal places", - "string": "1.3.4" - }, - { - "description": "2 decimal places", - "string": "1.34." - }, - { - "description": "Decimal with no digits", - "string": ".e" - }, - { - "description": "2 signs", - "string": "+-32.4" - }, - { - "description": "2 signs", - "string": "-+32.4" - }, - { - "description": "2 negative signs", - "string": "--32.4" - }, - { - "description": "2 negative signs", - "string": "-32.-4" - }, - { - "description": "End in negative sign", - "string": "32.0-" - }, - { - "description": "2 negative signs", - "string": "32.4E--21" - }, - { - "description": "2 negative signs", - "string": "32.4E-2-1" - }, - { - "description": "2 signs", - "string": "32.4E+-21" - }, - { - "description": "Empty string", - "string": "" - }, - { - "description": "leading white space positive number", - "string": " 1" - }, - { - "description": "leading white space negative number", - "string": " -1" - }, - { - "description": "trailing white space", - "string": "1 " - }, - { - "description": "Invalid", - "string": "E" - }, - { - "description": "Invalid", - "string": "invalid" - }, - { - "description": "Invalid", - "string": "i" - }, - { - "description": "Invalid", - "string": "in" - }, - { - "description": "Invalid", - "string": "-in" - }, - { - "description": "Invalid", - "string": "Na" - }, - { - "description": "Invalid", - "string": "-Na" - }, - { - "description": "Invalid", - "string": "1.23abc" - }, - { - "description": "Invalid", - "string": "1.23abcE+02" - }, - { - "description": "Invalid", - "string": "1.23E+0aabs2" - } - ] -} diff --git a/testdata/bson-corpus/decimal128-7.json b/testdata/bson-corpus/decimal128-7.json deleted file mode 100644 index 0b78f1237b..0000000000 --- a/testdata/bson-corpus/decimal128-7.json +++ /dev/null @@ -1,327 +0,0 @@ -{ - "description": "Decimal128", - "bson_type": "0x13", - "test_key": "d", - "parseErrors": [ - { - "description": "[basx572] Near-specials (Conversion_syntax)", - "string": "-9Inf" - }, - { - "description": "[basx516] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "-1-" - }, - { - "description": "[basx533] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "0000.." - }, - { - "description": "[basx534] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": ".0000." - }, - { - "description": "[basx535] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "00..00" - }, - { - "description": "[basx569] Near-specials (Conversion_syntax)", - "string": "0Inf" - }, - { - "description": "[basx571] Near-specials (Conversion_syntax)", - "string": "-0Inf" - }, - { - "description": "[basx575] Near-specials (Conversion_syntax)", - "string": "0sNaN" - }, - { - "description": "[basx503] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "++1" - }, - { - "description": "[basx504] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "--1" - }, - { - "description": "[basx505] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "-+1" - }, - { - "description": "[basx506] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "+-1" - }, - { - "description": "[basx510] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": " +1" - }, - { - "description": "[basx513] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": " + 1" - }, - { - "description": "[basx514] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": " - 1" - }, - { - "description": "[basx501] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "." - }, - { - "description": "[basx502] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": ".." - }, - { - "description": "[basx519] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "" - }, - { - "description": "[basx525] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "e100" - }, - { - "description": "[basx549] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "e+1" - }, - { - "description": "[basx577] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": ".e+1" - }, - { - "description": "[basx578] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "+.e+1" - }, - { - "description": "[basx581] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "E+1" - }, - { - "description": "[basx582] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": ".E+1" - }, - { - "description": "[basx583] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "+.E+1" - }, - { - "description": "[basx579] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "-.e+" - }, - { - "description": "[basx580] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "-.e" - }, - { - "description": "[basx584] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "-.E+" - }, - { - "description": "[basx585] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "-.E" - }, - { - "description": "[basx589] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "+.Inf" - }, - { - "description": "[basx586] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": ".NaN" - }, - { - "description": "[basx587] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "-.NaN" - }, - { - "description": "[basx545] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "ONE" - }, - { - "description": "[basx561] Near-specials (Conversion_syntax)", - "string": "qNaN" - }, - { - "description": "[basx573] Near-specials (Conversion_syntax)", - "string": "-sNa" - }, - { - "description": "[basx588] some baddies with dots and Es and dots and specials (Conversion_syntax)", - "string": "+.sNaN" - }, - { - "description": "[basx544] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "ten" - }, - { - "description": "[basx527] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "u0b65" - }, - { - "description": "[basx526] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "u0e5a" - }, - { - "description": "[basx515] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "x" - }, - { - "description": "[basx574] Near-specials (Conversion_syntax)", - "string": "xNaN" - }, - { - "description": "[basx530] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": ".123.5" - }, - { - "description": "[basx500] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1..2" - }, - { - "description": "[basx542] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1e1.0" - }, - { - "description": "[basx553] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E+1.2.3" - }, - { - "description": "[basx543] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1e123e" - }, - { - "description": "[basx552] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E+1.2" - }, - { - "description": "[basx546] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1e.1" - }, - { - "description": "[basx547] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1e1." - }, - { - "description": "[basx554] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E++1" - }, - { - "description": "[basx555] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E--1" - }, - { - "description": "[basx556] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E+-1" - }, - { - "description": "[basx557] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E-+1" - }, - { - "description": "[basx558] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E'1" - }, - { - "description": "[basx559] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E\"1" - }, - { - "description": "[basx520] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1e-" - }, - { - "description": "[basx560] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1E" - }, - { - "description": "[basx548] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1ee" - }, - { - "description": "[basx551] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1.2.1" - }, - { - "description": "[basx550] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1.23.4" - }, - { - "description": "[basx529] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "1.34.5" - }, - { - "description": "[basx531] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "01.35." - }, - { - "description": "[basx532] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "01.35-" - }, - { - "description": "[basx518] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "3+" - }, - { - "description": "[basx521] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "7e99999a" - }, - { - "description": "[basx570] Near-specials (Conversion_syntax)", - "string": "9Inf" - }, - { - "description": "[basx512] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "12 " - }, - { - "description": "[basx517] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "12-" - }, - { - "description": "[basx507] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "12e" - }, - { - "description": "[basx508] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "12e++" - }, - { - "description": "[basx509] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "12f4" - }, - { - "description": "[basx536] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "111e*123" - }, - { - "description": "[basx537] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "111e123-" - }, - { - "description": "[basx540] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "111e1*23" - }, - { - "description": "[basx538] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "111e+12+" - }, - { - "description": "[basx539] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "111e1-3-" - }, - { - "description": "[basx541] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "111E1e+3" - }, - { - "description": "[basx528] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "123,65" - }, - { - "description": "[basx523] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "7e12356789012x" - }, - { - "description": "[basx522] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)", - "string": "7e123567890x" - } - ] -} diff --git a/testdata/bson-corpus/document.json b/testdata/bson-corpus/document.json deleted file mode 100644 index 698e7ae90a..0000000000 --- a/testdata/bson-corpus/document.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "description": "Document type (sub-documents)", - "bson_type": "0x03", - "test_key": "x", - "valid": [ - { - "description": "Empty subdoc", - "canonical_bson": "0D000000037800050000000000", - "canonical_extjson": "{\"x\" : {}}" - }, - { - "description": "Empty-string key subdoc", - "canonical_bson": "150000000378000D00000002000200000062000000", - "canonical_extjson": "{\"x\" : {\"\" : \"b\"}}" - }, - { - "description": "Single-character key subdoc", - "canonical_bson": "160000000378000E0000000261000200000062000000", - "canonical_extjson": "{\"x\" : {\"a\" : \"b\"}}" - }, - { - "description": "Dollar-prefixed key in sub-document", - "canonical_bson": "170000000378000F000000022461000200000062000000", - "canonical_extjson": "{\"x\" : {\"$a\" : \"b\"}}" - }, - { - "description": "Dollar as key in sub-document", - "canonical_bson": "160000000378000E0000000224000200000061000000", - "canonical_extjson": "{\"x\" : {\"$\" : \"a\"}}" - }, - { - "description": "Dotted key in sub-document", - "canonical_bson": "180000000378001000000002612E62000200000063000000", - "canonical_extjson": "{\"x\" : {\"a.b\" : \"c\"}}" - }, - { - "description": "Dot as key in sub-document", - "canonical_bson": "160000000378000E000000022E000200000061000000", - "canonical_extjson": "{\"x\" : {\".\" : \"a\"}}" - } - ], - "decodeErrors": [ - { - "description": "Subdocument length too long: eats outer terminator", - "bson": "1800000003666F6F000F0000001062617200FFFFFF7F0000" - }, - { - "description": "Subdocument length too short: leaks terminator", - "bson": "1500000003666F6F000A0000000862617200010000" - }, - { - "description": "Invalid subdocument: bad string length in field", - "bson": "1C00000003666F6F001200000002626172000500000062617A000000" - }, - { - "description": "Null byte in sub-document key", - "bson": "150000000378000D00000010610000010000000000" - } - ] -} diff --git a/testdata/bson-corpus/double.json b/testdata/bson-corpus/double.json deleted file mode 100644 index d5b8fb3d7e..0000000000 --- a/testdata/bson-corpus/double.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "description": "Double type", - "bson_type": "0x01", - "test_key": "d", - "valid": [ - { - "description": "+1.0", - "canonical_bson": "10000000016400000000000000F03F00", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"1.0\"}}", - "relaxed_extjson": "{\"d\" : 1.0}" - }, - { - "description": "-1.0", - "canonical_bson": "10000000016400000000000000F0BF00", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"-1.0\"}}", - "relaxed_extjson": "{\"d\" : -1.0}" - }, - { - "description": "+1.0001220703125", - "canonical_bson": "10000000016400000000008000F03F00", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"1.0001220703125\"}}", - "relaxed_extjson": "{\"d\" : 1.0001220703125}" - }, - { - "description": "-1.0001220703125", - "canonical_bson": "10000000016400000000008000F0BF00", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"-1.0001220703125\"}}", - "relaxed_extjson": "{\"d\" : -1.0001220703125}" - }, - { - "description": "1.2345678921232E+18", - "canonical_bson": "100000000164002a1bf5f41022b14300", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"1.2345678921232E+18\"}}", - "relaxed_extjson": "{\"d\" : 1.2345678921232E+18}" - }, - { - "description": "-1.2345678921232E+18", - "canonical_bson": "100000000164002a1bf5f41022b1c300", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"-1.2345678921232E+18\"}}", - "relaxed_extjson": "{\"d\" : -1.2345678921232E+18}" - }, - { - "description": "0.0", - "canonical_bson": "10000000016400000000000000000000", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"0.0\"}}", - "relaxed_extjson": "{\"d\" : 0.0}" - }, - { - "description": "-0.0", - "canonical_bson": "10000000016400000000000000008000", - "canonical_extjson": "{\"d\" : {\"$numberDouble\": \"-0.0\"}}", - "relaxed_extjson": "{\"d\" : -0.0}" - }, - { - "description": "NaN", - "canonical_bson": "10000000016400000000000000F87F00", - "canonical_extjson": "{\"d\": {\"$numberDouble\": \"NaN\"}}", - "relaxed_extjson": "{\"d\": {\"$numberDouble\": \"NaN\"}}", - "lossy": true - }, - { - "description": "NaN with payload", - "canonical_bson": "10000000016400120000000000F87F00", - "canonical_extjson": "{\"d\": {\"$numberDouble\": \"NaN\"}}", - "relaxed_extjson": "{\"d\": {\"$numberDouble\": \"NaN\"}}", - "lossy": true - }, - { - "description": "Inf", - "canonical_bson": "10000000016400000000000000F07F00", - "canonical_extjson": "{\"d\": {\"$numberDouble\": \"Infinity\"}}", - "relaxed_extjson": "{\"d\": {\"$numberDouble\": \"Infinity\"}}" - }, - { - "description": "-Inf", - "canonical_bson": "10000000016400000000000000F0FF00", - "canonical_extjson": "{\"d\": {\"$numberDouble\": \"-Infinity\"}}", - "relaxed_extjson": "{\"d\": {\"$numberDouble\": \"-Infinity\"}}" - } - ], - "decodeErrors": [ - { - "description": "double truncated", - "bson": "0B0000000164000000F03F00" - } - ] -} diff --git a/testdata/bson-corpus/int32.json b/testdata/bson-corpus/int32.json deleted file mode 100644 index 1353fc3df8..0000000000 --- a/testdata/bson-corpus/int32.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "description": "Int32 type", - "bson_type": "0x10", - "test_key": "i", - "valid": [ - { - "description": "MinValue", - "canonical_bson": "0C0000001069000000008000", - "canonical_extjson": "{\"i\" : {\"$numberInt\": \"-2147483648\"}}", - "relaxed_extjson": "{\"i\" : -2147483648}" - }, - { - "description": "MaxValue", - "canonical_bson": "0C000000106900FFFFFF7F00", - "canonical_extjson": "{\"i\" : {\"$numberInt\": \"2147483647\"}}", - "relaxed_extjson": "{\"i\" : 2147483647}" - }, - { - "description": "-1", - "canonical_bson": "0C000000106900FFFFFFFF00", - "canonical_extjson": "{\"i\" : {\"$numberInt\": \"-1\"}}", - "relaxed_extjson": "{\"i\" : -1}" - }, - { - "description": "0", - "canonical_bson": "0C0000001069000000000000", - "canonical_extjson": "{\"i\" : {\"$numberInt\": \"0\"}}", - "relaxed_extjson": "{\"i\" : 0}" - }, - { - "description": "1", - "canonical_bson": "0C0000001069000100000000", - "canonical_extjson": "{\"i\" : {\"$numberInt\": \"1\"}}", - "relaxed_extjson": "{\"i\" : 1}" - } - ], - "decodeErrors": [ - { - "description": "Bad int32 field length", - "bson": "090000001061000500" - } - ] -} diff --git a/testdata/bson-corpus/int64.json b/testdata/bson-corpus/int64.json deleted file mode 100644 index 91f4abff95..0000000000 --- a/testdata/bson-corpus/int64.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "description": "Int64 type", - "bson_type": "0x12", - "test_key": "a", - "valid": [ - { - "description": "MinValue", - "canonical_bson": "10000000126100000000000000008000", - "canonical_extjson": "{\"a\" : {\"$numberLong\" : \"-9223372036854775808\"}}", - "relaxed_extjson": "{\"a\" : -9223372036854775808}" - }, - { - "description": "MaxValue", - "canonical_bson": "10000000126100FFFFFFFFFFFFFF7F00", - "canonical_extjson": "{\"a\" : {\"$numberLong\" : \"9223372036854775807\"}}", - "relaxed_extjson": "{\"a\" : 9223372036854775807}" - }, - { - "description": "-1", - "canonical_bson": "10000000126100FFFFFFFFFFFFFFFF00", - "canonical_extjson": "{\"a\" : {\"$numberLong\" : \"-1\"}}", - "relaxed_extjson": "{\"a\" : -1}" - }, - { - "description": "0", - "canonical_bson": "10000000126100000000000000000000", - "canonical_extjson": "{\"a\" : {\"$numberLong\" : \"0\"}}", - "relaxed_extjson": "{\"a\" : 0}" - }, - { - "description": "1", - "canonical_bson": "10000000126100010000000000000000", - "canonical_extjson": "{\"a\" : {\"$numberLong\" : \"1\"}}", - "relaxed_extjson": "{\"a\" : 1}" - } - ], - "decodeErrors": [ - { - "description": "int64 field truncated", - "bson": "0C0000001261001234567800" - } - ] -} diff --git a/testdata/bson-corpus/maxkey.json b/testdata/bson-corpus/maxkey.json deleted file mode 100644 index 67cad6db57..0000000000 --- a/testdata/bson-corpus/maxkey.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "description": "Maxkey type", - "bson_type": "0x7F", - "test_key": "a", - "valid": [ - { - "description": "Maxkey", - "canonical_bson": "080000007F610000", - "canonical_extjson": "{\"a\" : {\"$maxKey\" : 1}}" - } - ] -} diff --git a/testdata/bson-corpus/minkey.json b/testdata/bson-corpus/minkey.json deleted file mode 100644 index 8adee4509a..0000000000 --- a/testdata/bson-corpus/minkey.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "description": "Minkey type", - "bson_type": "0xFF", - "test_key": "a", - "valid": [ - { - "description": "Minkey", - "canonical_bson": "08000000FF610000", - "canonical_extjson": "{\"a\" : {\"$minKey\" : 1}}" - } - ] -} diff --git a/testdata/bson-corpus/multi-type-deprecated.json b/testdata/bson-corpus/multi-type-deprecated.json deleted file mode 100644 index 665f388cd4..0000000000 --- a/testdata/bson-corpus/multi-type-deprecated.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "description": "Multiple types within the same document", - "bson_type": "0x00", - "deprecated": true, - "valid": [ - { - "description": "All BSON types", - "canonical_bson": "38020000075F69640057E193D7A9CC81B4027498B50E53796D626F6C000700000073796D626F6C0002537472696E670007000000737472696E670010496E743332002A00000012496E743634002A0000000000000001446F75626C6500000000000000F0BF0542696E617279001000000003A34C38F7C3ABEDC8A37814A992AB8DB60542696E61727955736572446566696E656400050000008001020304050D436F6465000E00000066756E6374696F6E2829207B7D000F436F64655769746853636F7065001B0000000E00000066756E6374696F6E2829207B7D00050000000003537562646F63756D656E74001200000002666F6F0004000000626172000004417272617900280000001030000100000010310002000000103200030000001033000400000010340005000000001154696D657374616D7000010000002A0000000B5265676578007061747465726E0000094461746574696D6545706F6368000000000000000000094461746574696D65506F73697469766500FFFFFF7F00000000094461746574696D654E656761746976650000000080FFFFFFFF085472756500010846616C736500000C4442506F696E746572000B000000636F6C6C656374696F6E0057E193D7A9CC81B4027498B1034442526566003D0000000224726566000B000000636F6C6C656374696F6E00072469640057FD71E96E32AB4225B723FB02246462000900000064617461626173650000FF4D696E6B6579007F4D61786B6579000A4E756C6C0006556E646566696E65640000", - "converted_bson": "48020000075f69640057e193d7a9cc81b4027498b50253796d626f6c000700000073796d626f6c0002537472696e670007000000737472696e670010496e743332002a00000012496e743634002a0000000000000001446f75626c6500000000000000f0bf0542696e617279001000000003a34c38f7c3abedc8a37814a992ab8db60542696e61727955736572446566696e656400050000008001020304050d436f6465000e00000066756e6374696f6e2829207b7d000f436f64655769746853636f7065001b0000000e00000066756e6374696f6e2829207b7d00050000000003537562646f63756d656e74001200000002666f6f0004000000626172000004417272617900280000001030000100000010310002000000103200030000001033000400000010340005000000001154696d657374616d7000010000002a0000000b5265676578007061747465726e0000094461746574696d6545706f6368000000000000000000094461746574696d65506f73697469766500ffffff7f00000000094461746574696d654e656761746976650000000080ffffffff085472756500010846616c73650000034442506f696e746572002b0000000224726566000b000000636f6c6c656374696f6e00072469640057e193d7a9cc81b4027498b100034442526566003d0000000224726566000b000000636f6c6c656374696f6e00072469640057fd71e96e32ab4225b723fb02246462000900000064617461626173650000ff4d696e6b6579007f4d61786b6579000a4e756c6c000a556e646566696e65640000", - "canonical_extjson": "{\"_id\": {\"$oid\": \"57e193d7a9cc81b4027498b5\"}, \"Symbol\": {\"$symbol\": \"symbol\"}, \"String\": \"string\", \"Int32\": {\"$numberInt\": \"42\"}, \"Int64\": {\"$numberLong\": \"42\"}, \"Double\": {\"$numberDouble\": \"-1.0\"}, \"Binary\": { \"$binary\" : {\"base64\": \"o0w498Or7cijeBSpkquNtg==\", \"subType\": \"03\"}}, \"BinaryUserDefined\": { \"$binary\" : {\"base64\": \"AQIDBAU=\", \"subType\": \"80\"}}, \"Code\": {\"$code\": \"function() {}\"}, \"CodeWithScope\": {\"$code\": \"function() {}\", \"$scope\": {}}, \"Subdocument\": {\"foo\": \"bar\"}, \"Array\": [{\"$numberInt\": \"1\"}, {\"$numberInt\": \"2\"}, {\"$numberInt\": \"3\"}, {\"$numberInt\": \"4\"}, {\"$numberInt\": \"5\"}], \"Timestamp\": {\"$timestamp\": {\"t\": 42, \"i\": 1}}, \"Regex\": {\"$regularExpression\": {\"pattern\": \"pattern\", \"options\": \"\"}}, \"DatetimeEpoch\": {\"$date\": {\"$numberLong\": \"0\"}}, \"DatetimePositive\": {\"$date\": {\"$numberLong\": \"2147483647\"}}, \"DatetimeNegative\": {\"$date\": {\"$numberLong\": \"-2147483648\"}}, \"True\": true, \"False\": false, \"DBPointer\": {\"$dbPointer\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"57e193d7a9cc81b4027498b1\"}}}, \"DBRef\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"57fd71e96e32ab4225b723fb\"}, \"$db\": \"database\"}, \"Minkey\": {\"$minKey\": 1}, \"Maxkey\": {\"$maxKey\": 1}, \"Null\": null, \"Undefined\": {\"$undefined\": true}}", - "converted_extjson": "{\"_id\": {\"$oid\": \"57e193d7a9cc81b4027498b5\"}, \"Symbol\": \"symbol\", \"String\": \"string\", \"Int32\": {\"$numberInt\": \"42\"}, \"Int64\": {\"$numberLong\": \"42\"}, \"Double\": {\"$numberDouble\": \"-1.0\"}, \"Binary\": { \"$binary\" : {\"base64\": \"o0w498Or7cijeBSpkquNtg==\", \"subType\": \"03\"}}, \"BinaryUserDefined\": { \"$binary\" : {\"base64\": \"AQIDBAU=\", \"subType\": \"80\"}}, \"Code\": {\"$code\": \"function() {}\"}, \"CodeWithScope\": {\"$code\": \"function() {}\", \"$scope\": {}}, \"Subdocument\": {\"foo\": \"bar\"}, \"Array\": [{\"$numberInt\": \"1\"}, {\"$numberInt\": \"2\"}, {\"$numberInt\": \"3\"}, {\"$numberInt\": \"4\"}, {\"$numberInt\": \"5\"}], \"Timestamp\": {\"$timestamp\": {\"t\": 42, \"i\": 1}}, \"Regex\": {\"$regularExpression\": {\"pattern\": \"pattern\", \"options\": \"\"}}, \"DatetimeEpoch\": {\"$date\": {\"$numberLong\": \"0\"}}, \"DatetimePositive\": {\"$date\": {\"$numberLong\": \"2147483647\"}}, \"DatetimeNegative\": {\"$date\": {\"$numberLong\": \"-2147483648\"}}, \"True\": true, \"False\": false, \"DBPointer\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"57e193d7a9cc81b4027498b1\"}}, \"DBRef\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"57fd71e96e32ab4225b723fb\"}, \"$db\": \"database\"}, \"Minkey\": {\"$minKey\": 1}, \"Maxkey\": {\"$maxKey\": 1}, \"Null\": null, \"Undefined\": null}" - } - ] -} - diff --git a/testdata/bson-corpus/multi-type.json b/testdata/bson-corpus/multi-type.json deleted file mode 100644 index 1e1d557c9b..0000000000 --- a/testdata/bson-corpus/multi-type.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "description": "Multiple types within the same document", - "bson_type": "0x00", - "valid": [ - { - "description": "All BSON types", - "canonical_bson": "F4010000075F69640057E193D7A9CC81B4027498B502537472696E670007000000737472696E670010496E743332002A00000012496E743634002A0000000000000001446F75626C6500000000000000F0BF0542696E617279001000000003A34C38F7C3ABEDC8A37814A992AB8DB60542696E61727955736572446566696E656400050000008001020304050D436F6465000E00000066756E6374696F6E2829207B7D000F436F64655769746853636F7065001B0000000E00000066756E6374696F6E2829207B7D00050000000003537562646F63756D656E74001200000002666F6F0004000000626172000004417272617900280000001030000100000010310002000000103200030000001033000400000010340005000000001154696D657374616D7000010000002A0000000B5265676578007061747465726E0000094461746574696D6545706F6368000000000000000000094461746574696D65506F73697469766500FFFFFF7F00000000094461746574696D654E656761746976650000000080FFFFFFFF085472756500010846616C73650000034442526566003D0000000224726566000B000000636F6C6C656374696F6E00072469640057FD71E96E32AB4225B723FB02246462000900000064617461626173650000FF4D696E6B6579007F4D61786B6579000A4E756C6C0000", - "canonical_extjson": "{\"_id\": {\"$oid\": \"57e193d7a9cc81b4027498b5\"}, \"String\": \"string\", \"Int32\": {\"$numberInt\": \"42\"}, \"Int64\": {\"$numberLong\": \"42\"}, \"Double\": {\"$numberDouble\": \"-1.0\"}, \"Binary\": { \"$binary\" : {\"base64\": \"o0w498Or7cijeBSpkquNtg==\", \"subType\": \"03\"}}, \"BinaryUserDefined\": { \"$binary\" : {\"base64\": \"AQIDBAU=\", \"subType\": \"80\"}}, \"Code\": {\"$code\": \"function() {}\"}, \"CodeWithScope\": {\"$code\": \"function() {}\", \"$scope\": {}}, \"Subdocument\": {\"foo\": \"bar\"}, \"Array\": [{\"$numberInt\": \"1\"}, {\"$numberInt\": \"2\"}, {\"$numberInt\": \"3\"}, {\"$numberInt\": \"4\"}, {\"$numberInt\": \"5\"}], \"Timestamp\": {\"$timestamp\": {\"t\": 42, \"i\": 1}}, \"Regex\": {\"$regularExpression\": {\"pattern\": \"pattern\", \"options\": \"\"}}, \"DatetimeEpoch\": {\"$date\": {\"$numberLong\": \"0\"}}, \"DatetimePositive\": {\"$date\": {\"$numberLong\": \"2147483647\"}}, \"DatetimeNegative\": {\"$date\": {\"$numberLong\": \"-2147483648\"}}, \"True\": true, \"False\": false, \"DBRef\": {\"$ref\": \"collection\", \"$id\": {\"$oid\": \"57fd71e96e32ab4225b723fb\"}, \"$db\": \"database\"}, \"Minkey\": {\"$minKey\": 1}, \"Maxkey\": {\"$maxKey\": 1}, \"Null\": null}" - } - ] -} diff --git a/testdata/bson-corpus/null.json b/testdata/bson-corpus/null.json deleted file mode 100644 index f9b269473e..0000000000 --- a/testdata/bson-corpus/null.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "description": "Null type", - "bson_type": "0x0A", - "test_key": "a", - "valid": [ - { - "description": "Null", - "canonical_bson": "080000000A610000", - "canonical_extjson": "{\"a\" : null}" - } - ] -} diff --git a/testdata/bson-corpus/oid.json b/testdata/bson-corpus/oid.json deleted file mode 100644 index 14e9caf4b4..0000000000 --- a/testdata/bson-corpus/oid.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "description": "ObjectId", - "bson_type": "0x07", - "test_key": "a", - "valid": [ - { - "description": "All zeroes", - "canonical_bson": "1400000007610000000000000000000000000000", - "canonical_extjson": "{\"a\" : {\"$oid\" : \"000000000000000000000000\"}}" - }, - { - "description": "All ones", - "canonical_bson": "14000000076100FFFFFFFFFFFFFFFFFFFFFFFF00", - "canonical_extjson": "{\"a\" : {\"$oid\" : \"ffffffffffffffffffffffff\"}}" - }, - { - "description": "Random", - "canonical_bson": "1400000007610056E1FC72E0C917E9C471416100", - "canonical_extjson": "{\"a\" : {\"$oid\" : \"56e1fc72e0c917e9c4714161\"}}" - } - ], - "decodeErrors": [ - { - "description": "OID truncated", - "bson": "1200000007610056E1FC72E0C917E9C471" - } - ] -} diff --git a/testdata/bson-corpus/regex.json b/testdata/bson-corpus/regex.json deleted file mode 100644 index 223802169d..0000000000 --- a/testdata/bson-corpus/regex.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "description": "Regular Expression type", - "bson_type": "0x0B", - "test_key": "a", - "valid": [ - { - "description": "empty regex with no options", - "canonical_bson": "0A0000000B6100000000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"\", \"options\" : \"\"}}}" - }, - { - "description": "regex without options", - "canonical_bson": "0D0000000B6100616263000000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"\"}}}" - }, - { - "description": "regex with options", - "canonical_bson": "0F0000000B610061626300696D0000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"im\"}}}" - }, - { - "description": "regex with options (keys reversed)", - "canonical_bson": "0F0000000B610061626300696D0000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"im\"}}}", - "degenerate_extjson": "{\"a\" : {\"$regularExpression\" : {\"options\" : \"im\", \"pattern\": \"abc\"}}}" - }, - { - "description": "regex with slash", - "canonical_bson": "110000000B610061622F636400696D0000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"ab/cd\", \"options\" : \"im\"}}}" - }, - { - "description": "flags not alphabetized", - "degenerate_bson": "100000000B6100616263006D69780000", - "canonical_bson": "100000000B610061626300696D780000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"imx\"}}}", - "degenerate_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"mix\"}}}" - }, - { - "description" : "Required escapes", - "canonical_bson" : "100000000B610061625C226162000000", - "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"ab\\\\\\\"ab\", \"options\" : \"\"}}}" - }, - { - "description" : "Regular expression as value of $regex query operator", - "canonical_bson" : "180000000B247265676578007061747465726E0069780000", - "canonical_extjson": "{\"$regex\" : {\"$regularExpression\" : { \"pattern\": \"pattern\", \"options\" : \"ix\"}}}" - }, - { - "description" : "Regular expression as value of $regex query operator with $options", - "canonical_bson" : "270000000B247265676578007061747465726E000002246F7074696F6E73000300000069780000", - "canonical_extjson": "{\"$regex\" : {\"$regularExpression\" : { \"pattern\": \"pattern\", \"options\" : \"\"}}, \"$options\" : \"ix\"}" - } - ], - "decodeErrors": [ - { - "description": "Null byte in pattern string", - "bson": "0F0000000B610061006300696D0000" - }, - { - "description": "Null byte in flags string", - "bson": "100000000B61006162630069006D0000" - } - ] -} diff --git a/testdata/bson-corpus/string.json b/testdata/bson-corpus/string.json deleted file mode 100644 index 148334d091..0000000000 --- a/testdata/bson-corpus/string.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "description": "String", - "bson_type": "0x02", - "test_key": "a", - "valid": [ - { - "description": "Empty string", - "canonical_bson": "0D000000026100010000000000", - "canonical_extjson": "{\"a\" : \"\"}" - }, - { - "description": "Single character", - "canonical_bson": "0E00000002610002000000620000", - "canonical_extjson": "{\"a\" : \"b\"}" - }, - { - "description": "Multi-character", - "canonical_bson": "190000000261000D0000006162616261626162616261620000", - "canonical_extjson": "{\"a\" : \"abababababab\"}" - }, - { - "description": "two-byte UTF-8 (\u00e9)", - "canonical_bson": "190000000261000D000000C3A9C3A9C3A9C3A9C3A9C3A90000", - "canonical_extjson": "{\"a\" : \"\\u00e9\\u00e9\\u00e9\\u00e9\\u00e9\\u00e9\"}" - }, - { - "description": "three-byte UTF-8 (\u2606)", - "canonical_bson": "190000000261000D000000E29886E29886E29886E298860000", - "canonical_extjson": "{\"a\" : \"\\u2606\\u2606\\u2606\\u2606\"}" - }, - { - "description": "Embedded nulls", - "canonical_bson": "190000000261000D0000006162006261620062616261620000", - "canonical_extjson": "{\"a\" : \"ab\\u0000bab\\u0000babab\"}" - }, - { - "description": "Required escapes", - "canonical_bson" : "320000000261002600000061625C220102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F61620000", - "canonical_extjson" : "{\"a\":\"ab\\\\\\\"\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001fab\"}" - } - ], - "decodeErrors": [ - { - "description": "bad string length: 0 (but no 0x00 either)", - "bson": "0C0000000261000000000000" - }, - { - "description": "bad string length: -1", - "bson": "0C000000026100FFFFFFFF00" - }, - { - "description": "bad string length: eats terminator", - "bson": "10000000026100050000006200620000" - }, - { - "description": "bad string length: longer than rest of document", - "bson": "120000000200FFFFFF00666F6F6261720000" - }, - { - "description": "string is not null-terminated", - "bson": "1000000002610004000000616263FF00" - }, - { - "description": "empty string, but extra null", - "bson": "0E00000002610001000000000000" - }, - { - "description": "invalid UTF-8", - "bson": "0E00000002610002000000E90000" - } - ] -} diff --git a/testdata/bson-corpus/symbol.json b/testdata/bson-corpus/symbol.json deleted file mode 100644 index 3dd3577ebd..0000000000 --- a/testdata/bson-corpus/symbol.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "description": "Symbol", - "bson_type": "0x0E", - "deprecated": true, - "test_key": "a", - "valid": [ - { - "description": "Empty string", - "canonical_bson": "0D0000000E6100010000000000", - "canonical_extjson": "{\"a\": {\"$symbol\": \"\"}}", - "converted_bson": "0D000000026100010000000000", - "converted_extjson": "{\"a\": \"\"}" - }, - { - "description": "Single character", - "canonical_bson": "0E0000000E610002000000620000", - "canonical_extjson": "{\"a\": {\"$symbol\": \"b\"}}", - "converted_bson": "0E00000002610002000000620000", - "converted_extjson": "{\"a\": \"b\"}" - }, - { - "description": "Multi-character", - "canonical_bson": "190000000E61000D0000006162616261626162616261620000", - "canonical_extjson": "{\"a\": {\"$symbol\": \"abababababab\"}}", - "converted_bson": "190000000261000D0000006162616261626162616261620000", - "converted_extjson": "{\"a\": \"abababababab\"}" - }, - { - "description": "two-byte UTF-8 (\u00e9)", - "canonical_bson": "190000000E61000D000000C3A9C3A9C3A9C3A9C3A9C3A90000", - "canonical_extjson": "{\"a\": {\"$symbol\": \"éééééé\"}}", - "converted_bson": "190000000261000D000000C3A9C3A9C3A9C3A9C3A9C3A90000", - "converted_extjson": "{\"a\": \"éééééé\"}" - }, - { - "description": "three-byte UTF-8 (\u2606)", - "canonical_bson": "190000000E61000D000000E29886E29886E29886E298860000", - "canonical_extjson": "{\"a\": {\"$symbol\": \"☆☆☆☆\"}}", - "converted_bson": "190000000261000D000000E29886E29886E29886E298860000", - "converted_extjson": "{\"a\": \"☆☆☆☆\"}" - }, - { - "description": "Embedded nulls", - "canonical_bson": "190000000E61000D0000006162006261620062616261620000", - "canonical_extjson": "{\"a\": {\"$symbol\": \"ab\\u0000bab\\u0000babab\"}}", - "converted_bson": "190000000261000D0000006162006261620062616261620000", - "converted_extjson": "{\"a\": \"ab\\u0000bab\\u0000babab\"}" - } - ], - "decodeErrors": [ - { - "description": "bad symbol length: 0 (but no 0x00 either)", - "bson": "0C0000000E61000000000000" - }, - { - "description": "bad symbol length: -1", - "bson": "0C0000000E6100FFFFFFFF00" - }, - { - "description": "bad symbol length: eats terminator", - "bson": "100000000E6100050000006200620000" - }, - { - "description": "bad symbol length: longer than rest of document", - "bson": "120000000E00FFFFFF00666F6F6261720000" - }, - { - "description": "symbol is not null-terminated", - "bson": "100000000E610004000000616263FF00" - }, - { - "description": "empty symbol, but extra null", - "bson": "0E0000000E610001000000000000" - }, - { - "description": "invalid UTF-8", - "bson": "0E0000000E610002000000E90000" - } - ] -} diff --git a/testdata/bson-corpus/timestamp.json b/testdata/bson-corpus/timestamp.json deleted file mode 100644 index 6f46564a32..0000000000 --- a/testdata/bson-corpus/timestamp.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "description": "Timestamp type", - "bson_type": "0x11", - "test_key": "a", - "valid": [ - { - "description": "Timestamp: (123456789, 42)", - "canonical_bson": "100000001161002A00000015CD5B0700", - "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 123456789, \"i\" : 42} } }" - }, - { - "description": "Timestamp: (123456789, 42) (keys reversed)", - "canonical_bson": "100000001161002A00000015CD5B0700", - "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 123456789, \"i\" : 42} } }", - "degenerate_extjson": "{\"a\" : {\"$timestamp\" : {\"i\" : 42, \"t\" : 123456789} } }" - }, - { - "description": "Timestamp with high-order bit set on both seconds and increment", - "canonical_bson": "10000000116100FFFFFFFFFFFFFFFF00", - "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 4294967295, \"i\" : 4294967295} } }" - }, - { - "description": "Timestamp with high-order bit set on both seconds and increment (not UINT32_MAX)", - "canonical_bson": "1000000011610000286BEE00286BEE00", - "canonical_extjson": "{\"a\" : {\"$timestamp\" : {\"t\" : 4000000000, \"i\" : 4000000000} } }" - } - ], - "decodeErrors": [ - { - "description": "Truncated timestamp field", - "bson": "0f0000001161002A00000015CD5B00" - } - ] -} diff --git a/testdata/bson-corpus/top.json b/testdata/bson-corpus/top.json deleted file mode 100644 index 9c649b5e3f..0000000000 --- a/testdata/bson-corpus/top.json +++ /dev/null @@ -1,266 +0,0 @@ -{ - "description": "Top-level document validity", - "bson_type": "0x00", - "valid": [ - { - "description": "Dollar-prefixed key in top-level document", - "canonical_bson": "0F00000010246B6579002A00000000", - "canonical_extjson": "{\"$key\": {\"$numberInt\": \"42\"}}" - }, - { - "description": "Dollar as key in top-level document", - "canonical_bson": "0E00000002240002000000610000", - "canonical_extjson": "{\"$\": \"a\"}" - }, - { - "description": "Dotted key in top-level document", - "canonical_bson": "1000000002612E620002000000630000", - "canonical_extjson": "{\"a.b\": \"c\"}" - }, - { - "description": "Dot as key in top-level document", - "canonical_bson": "0E000000022E0002000000610000", - "canonical_extjson": "{\".\": \"a\"}" - } - ], - "decodeErrors": [ - { - "description": "An object size that's too small to even include the object size, but is a well-formed, empty object", - "bson": "0100000000" - }, - { - "description": "An object size that's only enough for the object size, but is a well-formed, empty object", - "bson": "0400000000" - }, - { - "description": "One object, with length shorter than size (missing EOO)", - "bson": "05000000" - }, - { - "description": "One object, sized correctly, with a spot for an EOO, but the EOO is 0x01", - "bson": "0500000001" - }, - { - "description": "One object, sized correctly, with a spot for an EOO, but the EOO is 0xff", - "bson": "05000000FF" - }, - { - "description": "One object, sized correctly, with a spot for an EOO, but the EOO is 0x70", - "bson": "0500000070" - }, - { - "description": "Byte count is zero (with non-zero input length)", - "bson": "00000000000000000000" - }, - { - "description": "Stated length exceeds byte count, with truncated document", - "bson": "1200000002666F6F0004000000626172" - }, - { - "description": "Stated length less than byte count, with garbage after envelope", - "bson": "1200000002666F6F00040000006261720000DEADBEEF" - }, - { - "description": "Stated length exceeds byte count, with valid envelope", - "bson": "1300000002666F6F00040000006261720000" - }, - { - "description": "Stated length less than byte count, with valid envelope", - "bson": "1100000002666F6F00040000006261720000" - }, - { - "description": "Invalid BSON type low range", - "bson": "07000000000000" - }, - { - "description": "Invalid BSON type high range", - "bson": "07000000800000" - }, - { - "description": "Document truncated mid-key", - "bson": "1200000002666F" - }, - { - "description": "Null byte in document key", - "bson": "0D000000107800000100000000" - } - ], - "parseErrors": [ - { - "description" : "Bad $regularExpression (extra field)", - "string" : "{\"a\" : {\"$regularExpression\": {\"pattern\": \"abc\", \"options\": \"\", \"unrelated\": true}}}" - }, - { - "description" : "Bad $regularExpression (missing options field)", - "string" : "{\"a\" : {\"$regularExpression\": {\"pattern\": \"abc\"}}}" - }, - { - "description": "Bad $regularExpression (pattern is number, not string)", - "string": "{\"x\" : {\"$regularExpression\" : { \"pattern\": 42, \"options\" : \"\"}}}" - }, - { - "description": "Bad $regularExpression (options are number, not string)", - "string": "{\"x\" : {\"$regularExpression\" : { \"pattern\": \"a\", \"options\" : 0}}}" - }, - { - "description" : "Bad $regularExpression (missing pattern field)", - "string" : "{\"a\" : {\"$regularExpression\": {\"options\":\"ix\"}}}" - }, - { - "description": "Bad $oid (number, not string)", - "string": "{\"a\" : {\"$oid\" : 42}}" - }, - { - "description": "Bad $oid (extra field)", - "string": "{\"a\" : {\"$oid\" : \"56e1fc72e0c917e9c4714161\", \"unrelated\": true}}" - }, - { - "description": "Bad $numberInt (number, not string)", - "string": "{\"a\" : {\"$numberInt\" : 42}}" - }, - { - "description": "Bad $numberInt (extra field)", - "string": "{\"a\" : {\"$numberInt\" : \"42\", \"unrelated\": true}}" - }, - { - "description": "Bad $numberLong (number, not string)", - "string": "{\"a\" : {\"$numberLong\" : 42}}" - }, - { - "description": "Bad $numberLong (extra field)", - "string": "{\"a\" : {\"$numberLong\" : \"42\", \"unrelated\": true}}" - }, - { - "description": "Bad $numberDouble (number, not string)", - "string": "{\"a\" : {\"$numberDouble\" : 42}}" - }, - { - "description": "Bad $numberDouble (extra field)", - "string": "{\"a\" : {\"$numberDouble\" : \".1\", \"unrelated\": true}}" - }, - { - "description": "Bad $numberDecimal (number, not string)", - "string": "{\"a\" : {\"$numberDecimal\" : 42}}" - }, - { - "description": "Bad $numberDecimal (extra field)", - "string": "{\"a\" : {\"$numberDecimal\" : \".1\", \"unrelated\": true}}" - }, - { - "description": "Bad $binary (binary is number, not string)", - "string": "{\"x\" : {\"$binary\" : {\"base64\" : 0, \"subType\" : \"00\"}}}" - }, - { - "description": "Bad $binary (type is number, not string)", - "string": "{\"x\" : {\"$binary\" : {\"base64\" : \"\", \"subType\" : 0}}}" - }, - { - "description": "Bad $binary (missing $type)", - "string": "{\"x\" : {\"$binary\" : {\"base64\" : \"//8=\"}}}" - }, - { - "description": "Bad $binary (missing $binary)", - "string": "{\"x\" : {\"$binary\" : {\"subType\" : \"00\"}}}" - }, - { - "description": "Bad $binary (extra field)", - "string": "{\"x\" : {\"$binary\" : {\"base64\" : \"//8=\", \"subType\" : 0, \"unrelated\": true}}}" - }, - { - "description": "Bad $code (type is number, not string)", - "string": "{\"a\" : {\"$code\" : 42}}" - }, - { - "description": "Bad $code (type is number, not string) when $scope is also present", - "string": "{\"a\" : {\"$code\" : 42, \"$scope\" : {}}}" - }, - { - "description": "Bad $code (extra field)", - "string": "{\"a\" : {\"$code\" : \"\", \"unrelated\": true}}" - }, - { - "description": "Bad $code with $scope (scope is number, not doc)", - "string": "{\"x\" : {\"$code\" : \"\", \"$scope\" : 42}}" - }, - { - "description": "Bad $timestamp (type is number, not doc)", - "string": "{\"a\" : {\"$timestamp\" : 42} }" - }, - { - "description": "Bad $timestamp ('t' type is string, not number)", - "string": "{\"a\" : {\"$timestamp\" : {\"t\" : \"123456789\", \"i\" : 42} } }" - }, - { - "description": "Bad $timestamp ('i' type is string, not number)", - "string": "{\"a\" : {\"$timestamp\" : {\"t\" : 123456789, \"i\" : \"42\"} } }" - }, - { - "description": "Bad $timestamp (extra field at same level as $timestamp)", - "string": "{\"a\" : {\"$timestamp\" : {\"t\" : \"123456789\", \"i\" : \"42\"}, \"unrelated\": true } }" - }, - { - "description": "Bad $timestamp (extra field at same level as t and i)", - "string": "{\"a\" : {\"$timestamp\" : {\"t\" : \"123456789\", \"i\" : \"42\", \"unrelated\": true} } }" - }, - { - "description": "Bad $timestamp (missing t)", - "string": "{\"a\" : {\"$timestamp\" : {\"i\" : \"42\"} } }" - }, - { - "description": "Bad $timestamp (missing i)", - "string": "{\"a\" : {\"$timestamp\" : {\"t\" : \"123456789\"} } }" - }, - { - "description": "Bad $date (number, not string or hash)", - "string": "{\"a\" : {\"$date\" : 42}}" - }, - { - "description": "Bad $date (extra field)", - "string": "{\"a\" : {\"$date\" : {\"$numberLong\" : \"1356351330501\"}, \"unrelated\": true}}" - }, - { - "description": "Bad $minKey (boolean, not integer)", - "string": "{\"a\" : {\"$minKey\" : true}}" - }, - { - "description": "Bad $minKey (wrong integer)", - "string": "{\"a\" : {\"$minKey\" : 0}}" - }, - { - "description": "Bad $minKey (extra field)", - "string": "{\"a\" : {\"$minKey\" : 1, \"unrelated\": true}}" - }, - { - "description": "Bad $maxKey (boolean, not integer)", - "string": "{\"a\" : {\"$maxKey\" : true}}" - }, - { - "description": "Bad $maxKey (wrong integer)", - "string": "{\"a\" : {\"$maxKey\" : 0}}" - }, - { - "description": "Bad $maxKey (extra field)", - "string": "{\"a\" : {\"$maxKey\" : 1, \"unrelated\": true}}" - }, - { - "description": "Bad DBpointer (extra field)", - "string": "{\"a\": {\"$dbPointer\": {\"a\": {\"$numberInt\": \"1\"}, \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}, \"c\": {\"$numberInt\": \"2\"}, \"$ref\": \"b\"}}}" - }, - { - "description" : "Null byte in document key", - "string" : "{\"a\\u0000\": 1 }" - }, - { - "description" : "Null byte in sub-document key", - "string" : "{\"a\" : {\"b\\u0000\": 1 }}" - }, - { - "description": "Null byte in $regularExpression pattern", - "string": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"b\\u0000\", \"options\" : \"i\"}}}" - }, - { - "description": "Null byte in $regularExpression options", - "string": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"b\", \"options\" : \"i\\u0000\"}}}" - } - ] -} diff --git a/testdata/bson-corpus/undefined.json b/testdata/bson-corpus/undefined.json deleted file mode 100644 index 285f068258..0000000000 --- a/testdata/bson-corpus/undefined.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "description": "Undefined type (deprecated)", - "bson_type": "0x06", - "deprecated": true, - "test_key": "a", - "valid": [ - { - "description": "Undefined", - "canonical_bson": "0800000006610000", - "canonical_extjson": "{\"a\" : {\"$undefined\" : true}}", - "converted_bson": "080000000A610000", - "converted_extjson": "{\"a\" : null}" - } - ] -} diff --git a/testdata/change-streams/change-streams-clusterTime.json b/testdata/change-streams/change-streams-clusterTime.json deleted file mode 100644 index 2b09e548f1..0000000000 --- a/testdata/change-streams/change-streams-clusterTime.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "description": "change-streams-clusterTime", - "schemaVersion": "1.4", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - } - ], - "runOnRequirements": [ - { - "minServerVersion": "4.0.0", - "topologies": [ - "replicaset", - "load-balanced", - "sharded" - ], - "serverless": "forbid" - } - ], - "initialData": [ - { - "collectionName": "collection0", - "databaseName": "database0", - "documents": [] - } - ], - "tests": [ - { - "description": "clusterTime is present", - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "ns": { - "db": "database0", - "coll": "collection0" - }, - "clusterTime": { - "$$exists": true - } - } - } - ] - } - ] -} diff --git a/testdata/change-streams/change-streams-clusterTime.yml b/testdata/change-streams/change-streams-clusterTime.yml deleted file mode 100644 index b1d9f20e01..0000000000 --- a/testdata/change-streams/change-streams-clusterTime.yml +++ /dev/null @@ -1,41 +0,0 @@ -description: "change-streams-clusterTime" -schemaVersion: "1.4" -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - -runOnRequirements: - - minServerVersion: "4.0.0" - topologies: [ replicaset, load-balanced, sharded ] - serverless: forbid - -initialData: - - collectionName: *collection0 - databaseName: *database0 - documents: [] - -tests: - - description: "clusterTime is present" - operations: - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *collection0 - arguments: - document: { _id: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - ns: { db: *database0, coll: *collection0 } - clusterTime: { $$exists: true } diff --git a/testdata/change-streams/change-streams-disambiguatedPaths.json b/testdata/change-streams/change-streams-disambiguatedPaths.json deleted file mode 100644 index e6cc5ef66e..0000000000 --- a/testdata/change-streams/change-streams-disambiguatedPaths.json +++ /dev/null @@ -1,251 +0,0 @@ -{ - "description": "disambiguatedPaths", - "schemaVersion": "1.4", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - } - ], - "runOnRequirements": [ - { - "minServerVersion": "6.1.0", - "topologies": [ - "replicaset", - "load-balanced", - "sharded" - ], - "serverless": "forbid" - } - ], - "initialData": [ - { - "collectionName": "collection0", - "databaseName": "database0", - "documents": [] - } - ], - "tests": [ - { - "description": "disambiguatedPaths is not present when showExpandedEvents is false/unset", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": { - "1": 1 - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "a.1": 2 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "updateDescription": { - "updatedFields": { - "$$exists": true - }, - "removedFields": { - "$$exists": true - }, - "truncatedArrays": { - "$$exists": true - }, - "disambiguatedPaths": { - "$$exists": false - } - } - } - } - ] - }, - { - "description": "disambiguatedPaths is present on updateDescription when an ambiguous path is present", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": { - "1": 1 - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "showExpandedEvents": true - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "a.1": 2 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "updateDescription": { - "updatedFields": { - "$$exists": true - }, - "removedFields": { - "$$exists": true - }, - "truncatedArrays": { - "$$exists": true - }, - "disambiguatedPaths": { - "a.1": [ - "a", - "1" - ] - } - } - } - } - ] - }, - { - "description": "disambiguatedPaths returns array indices as integers", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": [ - { - "1": 1 - } - ] - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "showExpandedEvents": true - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "a.0.1": 2 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "updateDescription": { - "updatedFields": { - "$$exists": true - }, - "removedFields": { - "$$exists": true - }, - "truncatedArrays": { - "$$exists": true - }, - "disambiguatedPaths": { - "a.0.1": [ - "a", - { - "$$type": "int" - }, - "1" - ] - } - } - } - } - ] - } - ] -} diff --git a/testdata/change-streams/change-streams-disambiguatedPaths.yml b/testdata/change-streams/change-streams-disambiguatedPaths.yml deleted file mode 100644 index 9ca9abf2e3..0000000000 --- a/testdata/change-streams/change-streams-disambiguatedPaths.yml +++ /dev/null @@ -1,103 +0,0 @@ -description: "disambiguatedPaths" -schemaVersion: "1.4" -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - -runOnRequirements: - - minServerVersion: "6.1.0" - topologies: [ replicaset, load-balanced, sharded ] - serverless: forbid - -initialData: - - collectionName: *collection0 - databaseName: *database0 - documents: [] - -tests: - - description: "disambiguatedPaths is not present when showExpandedEvents is false/unset" - operations: - - name: insertOne - object: *collection0 - arguments: - document: { _id: 1, 'a': { '1': 1 } } - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { 'a.1': 2 } } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "update" - ns: { db: *database0, coll: *collection0 } - updateDescription: - updatedFields: { $$exists: true } - removedFields: { $$exists: true } - truncatedArrays: { $$exists: true } - disambiguatedPaths: { $$exists: false } - - - description: "disambiguatedPaths is present on updateDescription when an ambiguous path is present" - operations: - - name: insertOne - object: *collection0 - arguments: - document: { _id: 1, 'a': { '1': 1 } } - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [], showExpandedEvents: true } - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { 'a.1': 2 } } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "update" - ns: { db: *database0, coll: *collection0 } - updateDescription: - updatedFields: { $$exists: true } - removedFields: { $$exists: true } - truncatedArrays: { $$exists: true } - disambiguatedPaths: { 'a.1': ['a', '1'] } - - - description: "disambiguatedPaths returns array indices as integers" - operations: - - name: insertOne - object: *collection0 - arguments: - document: { _id: 1, 'a': [{'1': 1 }] } - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [], showExpandedEvents: true } - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { 'a.0.1': 2 } } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "update" - ns: { db: *database0, coll: *collection0 } - updateDescription: - updatedFields: { $$exists: true } - removedFields: { $$exists: true } - truncatedArrays: { $$exists: true } - disambiguatedPaths: { 'a.0.1': ['a', { $$type: 'int' }, '1'] } diff --git a/testdata/change-streams/change-streams-errors.json b/testdata/change-streams/change-streams-errors.json deleted file mode 100644 index 65e99e541e..0000000000 --- a/testdata/change-streams/change-streams-errors.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "description": "change-streams-errors", - "schemaVersion": "1.7", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ], - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "globalClient", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - }, - { - "database": { - "id": "globalDatabase0", - "client": "globalClient", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "globalCollection0", - "database": "globalDatabase0", - "collectionName": "collection0" - } - } - ], - "initialData": [ - { - "collectionName": "collection0", - "databaseName": "database0", - "documents": [] - } - ], - "tests": [ - { - "description": "The watch helper must not throw a custom exception when executed against a single server topology, but instead depend on a server error", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "topologies": [ - "single" - ] - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "expectError": { - "errorCode": 40573 - } - } - ] - }, - { - "description": "Change Stream should error when an invalid aggregation stage is passed in", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "topologies": [ - "replicaset" - ] - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$unsupported": "foo" - } - ] - }, - "expectError": { - "errorCode": 40324 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - }, - { - "$unsupported": "foo" - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "Change Stream should error when _id is projected out", - "runOnRequirements": [ - { - "minServerVersion": "4.1.11", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 0 - } - } - ] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "z": 3 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectError": { - "errorCode": 280 - } - } - ] - }, - { - "description": "change stream errors on ElectionInProgress", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 216, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "z": 3 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectError": { - "errorCode": 216 - } - } - ] - } - ] -} diff --git a/testdata/change-streams/change-streams-errors.yml b/testdata/change-streams/change-streams-errors.yml deleted file mode 100644 index 85133dae0a..0000000000 --- a/testdata/change-streams/change-streams-errors.yml +++ /dev/null @@ -1,120 +0,0 @@ -description: "change-streams-errors" - -schemaVersion: "1.7" - -runOnRequirements: - - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - ignoreCommandMonitoringEvents: [ killCursors ] - useMultipleMongoses: false - - client: - id: &globalClient globalClient - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - - database: - id: &globalDatabase0 globalDatabase0 - client: *globalClient - databaseName: *database0 - - collection: - id: &globalCollection0 globalCollection0 - database: *globalDatabase0 - collectionName: *collection0 - -initialData: - - collectionName: *collection0 - databaseName: *database0 - documents: [] - -tests: - - description: "The watch helper must not throw a custom exception when executed against a single server topology, but instead depend on a server error" - runOnRequirements: - - minServerVersion: "3.6.0" - topologies: [ single ] - operations: - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - expectError: { errorCode: 40573 } - - - description: Change Stream should error when an invalid aggregation stage is passed in - runOnRequirements: - - minServerVersion: "3.6.0" - topologies: [ replicaset ] - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [ { $unsupported: foo } ] - expectError: { errorCode: 40324 } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: {} - - $unsupported: foo - commandName: aggregate - databaseName: *database0 - - - description: Change Stream should error when _id is projected out - runOnRequirements: - - minServerVersion: "4.1.11" - topologies: [ replicaset, sharded, load-balanced ] - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: - - $project: { _id: 0 } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { z: 3 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectError: { errorCode: 280 } - - - description: change stream errors on ElectionInProgress - runOnRequirements: - - minServerVersion: "4.2" - topologies: [ replicaset, sharded, load-balanced ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 216 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { z: 3 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectError: { errorCode: 216 } diff --git a/testdata/change-streams/change-streams-pre_and_post_images.json b/testdata/change-streams/change-streams-pre_and_post_images.json deleted file mode 100644 index e62fc03459..0000000000 --- a/testdata/change-streams/change-streams-pre_and_post_images.json +++ /dev/null @@ -1,827 +0,0 @@ -{ - "description": "change-streams-pre_and_post_images", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "6.0.0", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "collMod", - "insert", - "update", - "getMore", - "killCursors" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "change-stream-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "change-stream-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ], - "tests": [ - { - "description": "fullDocument:whenAvailable with changeStreamPreAndPostImages enabled", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "collMod", - "command": { - "collMod": "test", - "changeStreamPreAndPostImages": { - "enabled": true - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "fullDocument": "whenAvailable" - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "change-stream-tests", - "coll": "test" - }, - "updateDescription": { - "$$type": "object" - }, - "fullDocument": { - "_id": 1, - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$changeStream": { - "fullDocument": "whenAvailable" - } - } - ] - } - } - } - ] - } - ] - }, - { - "description": "fullDocument:whenAvailable with changeStreamPreAndPostImages disabled", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "collMod", - "command": { - "collMod": "test", - "changeStreamPreAndPostImages": { - "enabled": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "fullDocument": "whenAvailable" - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "change-stream-tests", - "coll": "test" - }, - "updateDescription": { - "$$type": "object" - }, - "fullDocument": null - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$changeStream": { - "fullDocument": "whenAvailable" - } - } - ] - } - } - } - ] - } - ] - }, - { - "description": "fullDocument:required with changeStreamPreAndPostImages enabled", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "collMod", - "command": { - "collMod": "test", - "changeStreamPreAndPostImages": { - "enabled": true - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "fullDocument": "required" - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "change-stream-tests", - "coll": "test" - }, - "updateDescription": { - "$$type": "object" - }, - "fullDocument": { - "_id": 1, - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$changeStream": { - "fullDocument": "required" - } - } - ] - } - } - } - ] - } - ] - }, - { - "description": "fullDocument:required with changeStreamPreAndPostImages disabled", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "collMod", - "command": { - "collMod": "test", - "changeStreamPreAndPostImages": { - "enabled": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "fullDocument": "required" - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$changeStream": { - "fullDocument": "required" - } - } - ] - } - } - } - ] - } - ] - }, - { - "description": "fullDocumentBeforeChange:whenAvailable with changeStreamPreAndPostImages enabled", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "collMod", - "command": { - "collMod": "test", - "changeStreamPreAndPostImages": { - "enabled": true - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "fullDocumentBeforeChange": "whenAvailable" - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "change-stream-tests", - "coll": "test" - }, - "updateDescription": { - "$$type": "object" - }, - "fullDocumentBeforeChange": { - "_id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$changeStream": { - "fullDocumentBeforeChange": "whenAvailable" - } - } - ] - } - } - } - ] - } - ] - }, - { - "description": "fullDocumentBeforeChange:whenAvailable with changeStreamPreAndPostImages disabled", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "collMod", - "command": { - "collMod": "test", - "changeStreamPreAndPostImages": { - "enabled": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "fullDocumentBeforeChange": "whenAvailable" - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "change-stream-tests", - "coll": "test" - }, - "updateDescription": { - "$$type": "object" - }, - "fullDocumentBeforeChange": null - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$changeStream": { - "fullDocumentBeforeChange": "whenAvailable" - } - } - ] - } - } - } - ] - } - ] - }, - { - "description": "fullDocumentBeforeChange:required with changeStreamPreAndPostImages enabled", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "collMod", - "command": { - "collMod": "test", - "changeStreamPreAndPostImages": { - "enabled": true - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "fullDocumentBeforeChange": "required" - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "change-stream-tests", - "coll": "test" - }, - "updateDescription": { - "$$type": "object" - }, - "fullDocumentBeforeChange": { - "_id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$changeStream": { - "fullDocumentBeforeChange": "required" - } - } - ] - } - } - } - ] - } - ] - }, - { - "description": "fullDocumentBeforeChange:required with changeStreamPreAndPostImages disabled", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "collMod", - "command": { - "collMod": "test", - "changeStreamPreAndPostImages": { - "enabled": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "fullDocumentBeforeChange": "required" - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$changeStream": { - "fullDocumentBeforeChange": "required" - } - } - ] - } - } - } - ] - } - ] - }, - { - "description": "fullDocumentBeforeChange:off with changeStreamPreAndPostImages enabled", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "collMod", - "command": { - "collMod": "test", - "changeStreamPreAndPostImages": { - "enabled": true - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "fullDocumentBeforeChange": "off" - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "change-stream-tests", - "coll": "test" - }, - "updateDescription": { - "$$type": "object" - }, - "fullDocumentBeforeChange": { - "$$exists": false - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$changeStream": { - "fullDocumentBeforeChange": "off" - } - } - ] - } - } - } - ] - } - ] - }, - { - "description": "fullDocumentBeforeChange:off with changeStreamPreAndPostImages disabled", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "collMod", - "command": { - "collMod": "test", - "changeStreamPreAndPostImages": { - "enabled": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "fullDocumentBeforeChange": "off" - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "change-stream-tests", - "coll": "test" - }, - "updateDescription": { - "$$type": "object" - }, - "fullDocumentBeforeChange": { - "$$exists": false - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$changeStream": { - "fullDocumentBeforeChange": "off" - } - } - ] - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/change-streams/change-streams-pre_and_post_images.yml b/testdata/change-streams/change-streams-pre_and_post_images.yml deleted file mode 100644 index 6bc58eaf2d..0000000000 --- a/testdata/change-streams/change-streams-pre_and_post_images.yml +++ /dev/null @@ -1,351 +0,0 @@ -description: "change-streams-pre_and_post_images" - -schemaVersion: "1.4" - -runOnRequirements: - - minServerVersion: "6.0.0" - topologies: [ replicaset, sharded, load-balanced ] - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - ignoreCommandMonitoringEvents: [ collMod, insert, update, getMore, killCursors ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name change-stream-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - -tests: - - description: "fullDocument:whenAvailable with changeStreamPreAndPostImages enabled" - operations: - - name: runCommand - object: *database0 - arguments: &enablePreAndPostImages - commandName: collMod - command: - collMod: *collection0Name - changeStreamPreAndPostImages: { enabled: true } - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - fullDocument: "whenAvailable" - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { x: 1 }} - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "update" - ns: { db: *database0Name, coll: *collection0Name } - updateDescription: { $$type: "object" } - fullDocument: { _id: 1, x: 1 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: - - $changeStream: { fullDocument: "whenAvailable" } - - - description: "fullDocument:whenAvailable with changeStreamPreAndPostImages disabled" - operations: - - name: runCommand - object: *database0 - arguments: &disablePreAndPostImages - commandName: collMod - command: - collMod: *collection0Name - changeStreamPreAndPostImages: { enabled: false } - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - fullDocument: "whenAvailable" - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { x: 1 }} - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "update" - ns: { db: *database0Name, coll: *collection0Name } - updateDescription: { $$type: "object" } - fullDocument: null - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: - - $changeStream: { fullDocument: "whenAvailable" } - - - description: "fullDocument:required with changeStreamPreAndPostImages enabled" - operations: - - name: runCommand - object: *database0 - arguments: *enablePreAndPostImages - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - fullDocument: "required" - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { x: 1 }} - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "update" - ns: { db: *database0Name, coll: *collection0Name } - updateDescription: { $$type: "object" } - fullDocument: { _id: 1, x: 1 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: - - $changeStream: { fullDocument: "required" } - - - description: "fullDocument:required with changeStreamPreAndPostImages disabled" - operations: - - name: runCommand - object: *database0 - arguments: *disablePreAndPostImages - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - fullDocument: "required" - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { x: 1 }} - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: - - $changeStream: { fullDocument: "required" } - - - description: "fullDocumentBeforeChange:whenAvailable with changeStreamPreAndPostImages enabled" - operations: - - name: runCommand - object: *database0 - arguments: *enablePreAndPostImages - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - fullDocumentBeforeChange: "whenAvailable" - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { x: 1 }} - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "update" - ns: { db: *database0Name, coll: *collection0Name } - updateDescription: { $$type: "object" } - fullDocumentBeforeChange: { _id: 1 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: - - $changeStream: { fullDocumentBeforeChange: "whenAvailable" } - - - description: "fullDocumentBeforeChange:whenAvailable with changeStreamPreAndPostImages disabled" - operations: - - name: runCommand - object: *database0 - arguments: *disablePreAndPostImages - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - fullDocumentBeforeChange: "whenAvailable" - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { x: 1 }} - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "update" - ns: { db: *database0Name, coll: *collection0Name } - updateDescription: { $$type: "object" } - fullDocumentBeforeChange: null - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: - - $changeStream: { fullDocumentBeforeChange: "whenAvailable" } - - - description: "fullDocumentBeforeChange:required with changeStreamPreAndPostImages enabled" - operations: - - name: runCommand - object: *database0 - arguments: *enablePreAndPostImages - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - fullDocumentBeforeChange: "required" - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { x: 1 }} - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "update" - ns: { db: *database0Name, coll: *collection0Name } - updateDescription: { $$type: "object" } - fullDocumentBeforeChange: { _id: 1 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: - - $changeStream: { fullDocumentBeforeChange: "required" } - - - description: "fullDocumentBeforeChange:required with changeStreamPreAndPostImages disabled" - operations: - - name: runCommand - object: *database0 - arguments: *disablePreAndPostImages - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - fullDocumentBeforeChange: "required" - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { x: 1 }} - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: - - $changeStream: { fullDocumentBeforeChange: "required" } - - - description: "fullDocumentBeforeChange:off with changeStreamPreAndPostImages enabled" - operations: - - name: runCommand - object: *database0 - arguments: *enablePreAndPostImages - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - fullDocumentBeforeChange: "off" - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { x: 1 }} - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "update" - ns: { db: *database0Name, coll: *collection0Name } - updateDescription: { $$type: "object" } - fullDocumentBeforeChange: { $$exists: false } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: - - $changeStream: { fullDocumentBeforeChange: "off" } - - - description: "fullDocumentBeforeChange:off with changeStreamPreAndPostImages disabled" - operations: - - name: runCommand - object: *database0 - arguments: *disablePreAndPostImages - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - fullDocumentBeforeChange: "off" - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { x: 1 }} - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "update" - ns: { db: *database0Name, coll: *collection0Name } - updateDescription: { $$type: "object" } - fullDocumentBeforeChange: { $$exists: false } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: - - $changeStream: { fullDocumentBeforeChange: "off" } diff --git a/testdata/change-streams/change-streams-resume-allowlist.json b/testdata/change-streams/change-streams-resume-allowlist.json deleted file mode 100644 index 1ec72b432b..0000000000 --- a/testdata/change-streams/change-streams-resume-allowlist.json +++ /dev/null @@ -1,2348 +0,0 @@ -{ - "description": "change-streams-resume-allowlist", - "schemaVersion": "1.7", - "runOnRequirements": [ - { - "minServerVersion": "3.6", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ], - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "globalClient", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - }, - { - "database": { - "id": "globalDatabase0", - "client": "globalClient", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "globalCollection0", - "database": "globalDatabase0", - "collectionName": "collection0" - } - } - ], - "tests": [ - { - "description": "change stream resumes after a network error", - "runOnRequirements": [ - { - "minServerVersion": "4.2" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "closeConnection": true - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after HostUnreachable", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 6, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after HostNotFound", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 7, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after NetworkTimeout", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 89, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after ShutdownInProgress", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 91, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after PrimarySteppedDown", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 189, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after ExceededTimeLimit", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 262, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after SocketException", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 9001, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after NotWritablePrimary", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 10107, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after InterruptedAtShutdown", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 11600, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after InterruptedDueToReplStateChange", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 11602, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after NotPrimaryNoSecondaryOk", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 13435, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after NotPrimaryOrSecondary", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 13436, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after StaleShardVersion", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 63, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after StaleEpoch", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 150, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after RetryChangeStream", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 234, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after FailedToSatisfyReadPreference", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 133, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after CursorNotFound", - "runOnRequirements": [ - { - "minServerVersion": "4.2" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 43, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/change-streams/change-streams-resume-allowlist.yml b/testdata/change-streams/change-streams-resume-allowlist.yml deleted file mode 100644 index c5b7a874d3..0000000000 --- a/testdata/change-streams/change-streams-resume-allowlist.yml +++ /dev/null @@ -1,1169 +0,0 @@ -# Tests for resume behavior on server versions that do not support the ResumableChangeStreamError label -description: "change-streams-resume-allowlist" - -schemaVersion: "1.7" - -runOnRequirements: - - minServerVersion: "3.6" - topologies: [ replicaset, sharded, load-balanced ] - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - ignoreCommandMonitoringEvents: [ killCursors ] - useMultipleMongoses: false - - client: - id: &globalClient globalClient - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - - database: - id: &globalDatabase0 globalDatabase0 - client: *globalClient - databaseName: *database0 - - collection: - id: &globalCollection0 globalCollection0 - database: *globalDatabase0 - collectionName: *collection0 - -tests: - - description: change stream resumes after a network error - runOnRequirements: - - minServerVersion: "4.2" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - closeConnection: true - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after HostUnreachable - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 6 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after HostNotFound - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 7 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after NetworkTimeout - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 89 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after ShutdownInProgress - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 91 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after PrimarySteppedDown - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 189 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after ExceededTimeLimit - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 262 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after SocketException - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 9001 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after NotWritablePrimary - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 10107 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after InterruptedAtShutdown - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 11600 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after InterruptedDueToReplStateChange - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 11602 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after NotPrimaryNoSecondaryOk - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 13435 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after NotPrimaryOrSecondary - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 13436 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after StaleShardVersion - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 63 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after StaleEpoch - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 150 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after RetryChangeStream - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 234 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after FailedToSatisfyReadPreference - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 133 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - # CursorNotFound is special-cased to be resumable regardless of server versions or error labels, so this test has - # no maxWireVersion. - - description: change stream resumes after CursorNotFound - runOnRequirements: - - minServerVersion: "4.2" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 43 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 diff --git a/testdata/change-streams/change-streams-resume-errorLabels.json b/testdata/change-streams/change-streams-resume-errorLabels.json deleted file mode 100644 index 7fd70108f0..0000000000 --- a/testdata/change-streams/change-streams-resume-errorLabels.json +++ /dev/null @@ -1,2130 +0,0 @@ -{ - "description": "change-streams-resume-errorlabels", - "schemaVersion": "1.7", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ], - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "globalClient", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - }, - { - "database": { - "id": "globalDatabase0", - "client": "globalClient", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "globalCollection0", - "database": "globalDatabase0", - "collectionName": "collection0" - } - } - ], - "tests": [ - { - "description": "change stream resumes after HostUnreachable", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 6, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after HostNotFound", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 7, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after NetworkTimeout", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 89, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after ShutdownInProgress", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 91, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after PrimarySteppedDown", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 189, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after ExceededTimeLimit", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 262, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after SocketException", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 9001, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after NotWritablePrimary", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 10107, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after InterruptedAtShutdown", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 11600, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after InterruptedDueToReplStateChange", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 11602, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after NotPrimaryNoSecondaryOk", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 13435, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after NotPrimaryOrSecondary", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 13436, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after StaleShardVersion", - "runOnRequirements": [ - { - "maxServerVersion": "6.0.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 63, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after StaleEpoch", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 150, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after RetryChangeStream", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 234, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes after FailedToSatisfyReadPreference", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failGetMoreAfterCursorCheckout", - "mode": { - "times": 1 - }, - "data": { - "errorCode": 133, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream resumes if error contains ResumableChangeStreamError", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 50, - "closeConnection": false, - "errorLabels": [ - "ResumableChangeStreamError" - ] - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$exists": true - }, - "collection": "collection0" - }, - "commandName": "getMore", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "resumeAfter": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "change stream does not resume if error does not contain ResumableChangeStreamError", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 6, - "closeConnection": false - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectError": { - "errorCode": 6 - } - } - ] - } - ] -} diff --git a/testdata/change-streams/change-streams-resume-errorLabels.yml b/testdata/change-streams/change-streams-resume-errorLabels.yml deleted file mode 100644 index 5cc6d423a4..0000000000 --- a/testdata/change-streams/change-streams-resume-errorLabels.yml +++ /dev/null @@ -1,1069 +0,0 @@ -# Tests for resume behavior on server versions that support the ResumableChangeStreamError label -description: "change-streams-resume-errorlabels" - -schemaVersion: "1.7" - -runOnRequirements: - - minServerVersion: "4.3.1" - topologies: [ replicaset, sharded, load-balanced ] - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - ignoreCommandMonitoringEvents: [ killCursors ] - useMultipleMongoses: false - - client: - id: &globalClient globalClient - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - - database: - id: &globalDatabase0 globalDatabase0 - client: *globalClient - databaseName: *database0 - - collection: - id: &globalCollection0 globalCollection0 - database: *globalDatabase0 - collectionName: *collection0 - -tests: - - description: change stream resumes after HostUnreachable - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout # SERVER-46091 explains why a new failpoint was needed - mode: { times: 1 } - data: - errorCode: 6 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after HostNotFound - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 7 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after NetworkTimeout - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 89 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - - - description: change stream resumes after ShutdownInProgress - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 91 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after PrimarySteppedDown - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 189 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after ExceededTimeLimit - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 262 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after SocketException - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 9001 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after NotWritablePrimary - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 10107 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after InterruptedAtShutdown - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 11600 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after InterruptedDueToReplStateChange - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 11602 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after NotPrimaryNoSecondaryOk - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 13435 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after NotPrimaryOrSecondary - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 13436 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after StaleShardVersion - runOnRequirements: - # StaleShardVersion is obsolete as of 6.1 and is no longer marked as resumable. - - maxServerVersion: "6.0.99" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 63 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after StaleEpoch - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 150 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after RetryChangeStream - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 234 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream resumes after FailedToSatisfyReadPreference - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failGetMoreAfterCursorCheckout - mode: { times: 1 } - data: - errorCode: 133 - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - # The next two tests ensure that the driver only uses the error label, not the allow list. - - description: change stream resumes if error contains ResumableChangeStreamError - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 50 # Use an error code that does not have the allow list label by default - closeConnection: false - errorLabels: [ ResumableChangeStreamError ] - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - commandStartedEvent: - command: - getMore: { $$exists: true } - collection: *collection0 - commandName: getMore - databaseName: *database0 - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - resumeAfter: { $$unsetOrMatches: { $$exists: true } } - commandName: aggregate - databaseName: *database0 - - - description: change stream does not resume if error does not contain ResumableChangeStreamError - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand # failCommand will not add the allow list error label - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: 6 # Use an error code that is on the allow list - closeConnection: false - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectError: { errorCode: 6 } diff --git a/testdata/change-streams/change-streams-showExpandedEvents.json b/testdata/change-streams/change-streams-showExpandedEvents.json deleted file mode 100644 index b9594e0c1e..0000000000 --- a/testdata/change-streams/change-streams-showExpandedEvents.json +++ /dev/null @@ -1,516 +0,0 @@ -{ - "description": "change-streams-showExpandedEvents", - "schemaVersion": "1.7", - "runOnRequirements": [ - { - "minServerVersion": "6.0.0", - "topologies": [ - "replicaset", - "sharded" - ], - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ], - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - }, - { - "database": { - "id": "database1", - "client": "client0", - "databaseName": "database1" - } - }, - { - "collection": { - "id": "collection1", - "database": "database1", - "collectionName": "collection1" - } - }, - { - "database": { - "id": "shardedDb", - "client": "client0", - "databaseName": "shardedDb" - } - }, - { - "database": { - "id": "adminDb", - "client": "client0", - "databaseName": "admin" - } - }, - { - "collection": { - "id": "shardedCollection", - "database": "shardedDb", - "collectionName": "shardedCollection" - } - } - ], - "initialData": [ - { - "collectionName": "collection0", - "databaseName": "database0", - "documents": [] - } - ], - "tests": [ - { - "description": "when provided, showExpandedEvents is sent as a part of the aggregate command", - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "showExpandedEvents": true - }, - "saveResultAsEntity": "changeStream0" - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "showExpandedEvents": true - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "when omitted, showExpandedEvents is not sent as a part of the aggregate command", - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "showExpandedEvents": { - "$$exists": false - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "when showExpandedEvents is true, new fields on change stream events are handled appropriately", - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "foo" - } - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "collection": "foo" - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "showExpandedEvents": true - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "a": 1 - } - } - }, - { - "name": "createIndex", - "object": "collection0", - "arguments": { - "keys": { - "x": 1 - }, - "name": "x_1" - } - }, - { - "name": "rename", - "object": "collection0", - "arguments": { - "to": "foo", - "dropTarget": true - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "collectionUUID": { - "$$exists": true - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "createIndexes", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "operationDescription": { - "$$exists": true - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "rename", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "to": { - "db": "database0", - "coll": "foo" - }, - "operationDescription": { - "dropTarget": { - "$$exists": true - }, - "to": { - "db": "database0", - "coll": "foo" - } - } - } - } - ] - }, - { - "description": "when showExpandedEvents is true, createIndex events are reported", - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "operationType": { - "$ne": "create" - } - } - } - ], - "showExpandedEvents": true - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "createIndex", - "object": "collection0", - "arguments": { - "keys": { - "x": 1 - }, - "name": "x_1" - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "createIndexes" - } - } - ] - }, - { - "description": "when showExpandedEvents is true, dropIndexes events are reported", - "operations": [ - { - "name": "createIndex", - "object": "collection0", - "arguments": { - "keys": { - "x": 1 - }, - "name": "x_1" - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "showExpandedEvents": true - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "dropIndex", - "object": "collection0", - "arguments": { - "name": "x_1" - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "dropIndexes" - } - } - ] - }, - { - "description": "when showExpandedEvents is true, create events are reported", - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "foo" - } - }, - { - "name": "createChangeStream", - "object": "database0", - "arguments": { - "pipeline": [], - "showExpandedEvents": true - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "collection": "foo" - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "create" - } - } - ] - }, - { - "description": "when showExpandedEvents is true, create events on views are reported", - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "foo" - } - }, - { - "name": "createChangeStream", - "object": "database0", - "arguments": { - "pipeline": [], - "showExpandedEvents": true - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "collection": "foo", - "viewOn": "testName" - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "create" - } - } - ] - }, - { - "description": "when showExpandedEvents is true, modify events are reported", - "operations": [ - { - "name": "createIndex", - "object": "collection0", - "arguments": { - "keys": { - "x": 1 - }, - "name": "x_2" - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "showExpandedEvents": true - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "runCommand", - "object": "database0", - "arguments": { - "command": { - "collMod": "collection0" - }, - "commandName": "collMod" - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "modify" - } - } - ] - }, - { - "description": "when showExpandedEvents is true, shardCollection events are reported", - "runOnRequirements": [ - { - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "dropCollection", - "object": "shardedDb", - "arguments": { - "collection": "shardedCollection" - } - }, - { - "name": "createCollection", - "object": "shardedDb", - "arguments": { - "collection": "shardedCollection" - } - }, - { - "name": "createChangeStream", - "object": "shardedCollection", - "arguments": { - "pipeline": [], - "showExpandedEvents": true - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "runCommand", - "object": "adminDb", - "arguments": { - "command": { - "shardCollection": "shardedDb.shardedCollection", - "key": { - "_id": 1 - } - }, - "commandName": "shardCollection" - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "shardCollection" - } - } - ] - } - ] -} diff --git a/testdata/change-streams/change-streams-showExpandedEvents.yml b/testdata/change-streams/change-streams-showExpandedEvents.yml deleted file mode 100644 index e6289047bf..0000000000 --- a/testdata/change-streams/change-streams-showExpandedEvents.yml +++ /dev/null @@ -1,307 +0,0 @@ -description: "change-streams-showExpandedEvents" -schemaVersion: "1.7" -runOnRequirements: - - minServerVersion: "6.0.0" - topologies: [ replicaset, sharded ] - serverless: forbid -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - ignoreCommandMonitoringEvents: [ killCursors ] - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - - database: - id: &database1 database1 - client: *client0 - databaseName: *database1 - - collection: - id: &collection1 collection1 - database: *database1 - collectionName: *collection1 - - database: - id: &shardedDb shardedDb - client: *client0 - databaseName: *shardedDb - - database: - id: &adminDb adminDb - client: *client0 - databaseName: admin - - collection: - id: &shardedCollection shardedCollection - database: *shardedDb - collectionName: *shardedCollection - -initialData: - - collectionName: *collection0 - databaseName: *database0 - documents: [] - -tests: - - description: "when provided, showExpandedEvents is sent as a part of the aggregate command" - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - showExpandedEvents: true - saveResultAsEntity: &changeStream0 changeStream0 - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - showExpandedEvents: true - commandName: aggregate - databaseName: *database0 - - - description: "when omitted, showExpandedEvents is not sent as a part of the aggregate command" - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - saveResultAsEntity: &changeStream0 changeStream0 - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: - showExpandedEvents: - $$exists: false - commandName: aggregate - databaseName: *database0 - - - description: "when showExpandedEvents is true, new fields on change stream events are handled appropriately" - operations: - - name: dropCollection - object: *database0 - arguments: - collection: &existing-collection foo - - name: createCollection - object: *database0 - arguments: - collection: *existing-collection - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - showExpandedEvents: true - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *collection0 - arguments: - document: - a: 1 - - name: createIndex - object: *collection0 - arguments: - keys: - x: 1 - name: x_1 - - name: rename - object: *collection0 - arguments: - to: *existing-collection - dropTarget: true - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database0 - coll: *collection0 - collectionUUID: - $$exists: true - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: createIndexes - ns: - db: *database0 - coll: *collection0 - operationDescription: - $$exists: true - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: rename - ns: - db: *database0 - coll: *collection0 - to: - db: *database0 - coll: *existing-collection - operationDescription: - dropTarget: - $$exists: true - to: - db: *database0 - coll: *existing-collection - - - description: "when showExpandedEvents is true, createIndex events are reported" - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: - # On sharded clusters, the create command run when loading initial - # data sometimes is still reported in the change stream. To avoid - # this, we exclude the create command when creating the change - # stream, but specifically don't exclude other events to still catch - # driver errors. - - $match: - operationType: - $ne: create - showExpandedEvents: true - saveResultAsEntity: &changeStream0 changeStream0 - - name: createIndex - object: *collection0 - arguments: - keys: - x: 1 - name: x_1 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: createIndexes - - - description: "when showExpandedEvents is true, dropIndexes events are reported" - operations: - - name: createIndex - object: *collection0 - arguments: - keys: - x: 1 - name: &index1 x_1 - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - showExpandedEvents: true - saveResultAsEntity: &changeStream0 changeStream0 - - name: dropIndex - object: *collection0 - arguments: - name: *index1 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: dropIndexes - - - description: "when showExpandedEvents is true, create events are reported" - operations: - - name: dropCollection - object: *database0 - arguments: - collection: &collection1 foo - - name: createChangeStream - object: *database0 - arguments: - pipeline: [] - showExpandedEvents: true - saveResultAsEntity: &changeStream0 changeStream0 - - name: createCollection - object: *database0 - arguments: - collection: *collection1 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: create - - - description: "when showExpandedEvents is true, create events on views are reported" - operations: - - name: dropCollection - object: *database0 - arguments: - collection: &collection1 foo - - name: createChangeStream - object: *database0 - arguments: - pipeline: [] - showExpandedEvents: true - saveResultAsEntity: &changeStream0 changeStream0 - - name: createCollection - object: *database0 - arguments: - collection: *collection1 - viewOn: testName - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: create - - - description: "when showExpandedEvents is true, modify events are reported" - operations: - - name: createIndex - object: *collection0 - arguments: - keys: - x: 1 - name: &index2 x_2 - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - showExpandedEvents: true - saveResultAsEntity: &changeStream0 changeStream0 - - name: runCommand - object: *database0 - arguments: - command: - collMod: *collection0 - commandName: collMod - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: modify - - - description: "when showExpandedEvents is true, shardCollection events are reported" - runOnRequirements: - # Note: minServerVersion is specified in top-level runOnRequirements - - topologies: [ sharded ] - operations: - - name: dropCollection - object: *shardedDb - arguments: - collection: *shardedCollection - - name: createCollection - object: *shardedDb - arguments: - collection: *shardedCollection - - name: createChangeStream - object: *shardedCollection - arguments: - pipeline: [] - showExpandedEvents: true - saveResultAsEntity: &changeStream0 changeStream0 - - name: runCommand - object: *adminDb - arguments: - command: - shardCollection: shardedDb.shardedCollection - key: - _id: 1 - commandName: shardCollection - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: shardCollection diff --git a/testdata/change-streams/change-streams.json b/testdata/change-streams/change-streams.json deleted file mode 100644 index c8b60ed4e2..0000000000 --- a/testdata/change-streams/change-streams.json +++ /dev/null @@ -1,1795 +0,0 @@ -{ - "description": "change-streams", - "schemaVersion": "1.7", - "runOnRequirements": [ - { - "minServerVersion": "3.6", - "topologies": [ - "replicaset" - ], - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ], - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "globalClient", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - }, - { - "database": { - "id": "database1", - "client": "client0", - "databaseName": "database1" - } - }, - { - "collection": { - "id": "collection1", - "database": "database1", - "collectionName": "collection1" - } - }, - { - "database": { - "id": "globalDatabase0", - "client": "globalClient", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "globalCollection0", - "database": "globalDatabase0", - "collectionName": "collection0" - } - }, - { - "database": { - "id": "globalDatabase1", - "client": "globalClient", - "databaseName": "database1" - } - }, - { - "collection": { - "id": "globalCollection1", - "database": "globalDatabase1", - "collectionName": "collection1" - } - }, - { - "collection": { - "id": "globalDb1Collection0", - "database": "globalDatabase1", - "collectionName": "collection0" - } - }, - { - "collection": { - "id": "globalDb0Collection1", - "database": "globalDatabase0", - "collectionName": "collection1" - } - } - ], - "initialData": [ - { - "collectionName": "collection0", - "databaseName": "database0", - "documents": [] - } - ], - "tests": [ - { - "description": "Test array truncation", - "runOnRequirements": [ - { - "minServerVersion": "4.7" - } - ], - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": 1, - "array": [ - "foo", - { - "a": "bar" - }, - 1, - 2, - 3 - ] - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "array": [ - "foo", - { - "a": "bar" - } - ] - } - } - ] - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "updateDescription": { - "updatedFields": {}, - "removedFields": [], - "truncatedArrays": [ - { - "field": "array", - "newSize": 2 - } - ] - } - } - } - ] - }, - { - "description": "Test with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "comment": { - "name": "test1" - } - }, - "saveResultAsEntity": "changeStream0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "pipeline": [ - { - "$changeStream": {} - } - ], - "comment": { - "name": "test1" - } - } - } - } - ] - } - ] - }, - { - "description": "Test with document comment - pre 4.4", - "runOnRequirements": [ - { - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "comment": { - "name": "test1" - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "pipeline": [ - { - "$changeStream": {} - } - ], - "comment": { - "name": "test1" - } - } - } - } - ] - } - ] - }, - { - "description": "Test with string comment", - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "comment": "comment" - }, - "saveResultAsEntity": "changeStream0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "pipeline": [ - { - "$changeStream": {} - } - ], - "comment": "comment" - } - } - } - ] - } - ] - }, - { - "description": "Test that comment is set on getMore", - "runOnRequirements": [ - { - "minServerVersion": "4.4.0" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "comment": { - "key": "value" - } - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "pipeline": [ - { - "$changeStream": {} - } - ], - "comment": { - "key": "value" - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "collection0", - "documents": [ - { - "_id": 1, - "a": 1 - } - ] - } - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection0", - "comment": { - "key": "value" - } - }, - "commandName": "getMore", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "Test that comment is not set on getMore - pre 4.4", - "runOnRequirements": [ - { - "maxServerVersion": "4.3.99" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "comment": "comment" - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "pipeline": [ - { - "$changeStream": {} - } - ], - "comment": "comment" - } - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "collection0", - "documents": [ - { - "_id": 1, - "a": 1 - } - ] - } - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection0", - "comment": { - "$$exists": false - } - }, - "commandName": "getMore", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "to field is set in a rename change event", - "runOnRequirements": [ - { - "minServerVersion": "4.0.1" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "collection1" - } - }, - { - "name": "rename", - "object": "collection0", - "arguments": { - "to": "collection1" - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "rename", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "to": { - "db": "database0", - "coll": "collection1" - } - } - } - ] - }, - { - "description": "Test unknown operationType MUST NOT err", - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$project": { - "operationType": "addedInFutureMongoDBVersion", - "ns": 1 - } - } - ] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "addedInFutureMongoDBVersion", - "ns": { - "db": "database0", - "coll": "collection0" - } - } - } - ] - }, - { - "description": "Test newField added in response MUST NOT err", - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$project": { - "operationType": 1, - "ns": 1, - "newField": "newFieldValue" - } - } - ] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "newField": "newFieldValue" - } - } - ] - }, - { - "description": "Test new structure in ns document MUST NOT err", - "runOnRequirements": [ - { - "minServerVersion": "3.6", - "maxServerVersion": "5.2.99" - }, - { - "minServerVersion": "6.0" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$project": { - "operationType": "insert", - "ns.viewOn": "db.coll" - } - } - ] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "viewOn": "db.coll" - } - } - } - ] - }, - { - "description": "Test modified structure in ns document MUST NOT err", - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$project": { - "operationType": "insert", - "ns": { - "db": "$ns.db", - "coll": "$ns.coll", - "viewOn": "db.coll" - } - } - } - ] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0", - "viewOn": "db.coll" - } - } - } - ] - }, - { - "description": "Test server error on projecting out _id", - "runOnRequirements": [ - { - "minServerVersion": "4.2" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 0 - } - } - ] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectError": { - "errorCode": 280, - "errorCodeName": "ChangeStreamFatalError", - "errorLabelsContain": [ - "NonResumableChangeStreamError" - ] - } - } - ] - }, - { - "description": "Test projection in change stream returns expected fields", - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$project": { - "optype": "$operationType", - "ns": 1, - "newField": "value" - } - } - ] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "optype": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "newField": "value" - } - } - ] - }, - { - "description": "$changeStream must be the first stage in a change stream pipeline sent to the server", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "The server returns change stream responses in the specified server response format", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "_id": { - "$$exists": true - }, - "documentKey": { - "$$exists": true - }, - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - } - ] - }, - { - "description": "Executing a watch helper on a Collection results in notifications for changes to the specified collection", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalDb0Collection1", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "insertOne", - "object": "globalDb1Collection0", - "arguments": { - "document": { - "y": 2 - } - } - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "z": 3 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "z": 3, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "Change Stream should allow valid aggregate pipeline stages", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "fullDocument.z": 3 - } - } - ] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "y": 2 - } - } - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "z": 3 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "z": 3, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - }, - { - "$match": { - "fullDocument.z": 3 - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "Executing a watch helper on a Database results in notifications for changes to all collections in the specified database.", - "runOnRequirements": [ - { - "minServerVersion": "3.8.0" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "database0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalDb0Collection1", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "insertOne", - "object": "globalDb1Collection0", - "arguments": { - "document": { - "y": 2 - } - } - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "z": 3 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection1" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "z": 3, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "Executing a watch helper on a MongoClient results in notifications for changes to all collections in all databases in the cluster.", - "runOnRequirements": [ - { - "minServerVersion": "3.8.0" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "client0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalDb0Collection1", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "insertOne", - "object": "globalDb1Collection0", - "arguments": { - "document": { - "y": 2 - } - } - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "z": 3 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection1" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database1", - "coll": "collection0" - }, - "fullDocument": { - "y": 2, - "_id": { - "$$exists": true - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "z": 3, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "admin" - } - } - ] - } - ] - }, - { - "description": "Test insert, update, replace, and delete event types", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "updateOne", - "object": "globalCollection0", - "arguments": { - "filter": { - "x": 1 - }, - "update": { - "$set": { - "x": 2 - } - } - } - }, - { - "name": "replaceOne", - "object": "globalCollection0", - "arguments": { - "filter": { - "x": 2 - }, - "replacement": { - "x": 3 - } - } - }, - { - "name": "deleteOne", - "object": "globalCollection0", - "arguments": { - "filter": { - "x": 3 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "updateDescription": { - "updatedFields": { - "x": 2 - }, - "removedFields": [], - "truncatedArrays": { - "$$unsetOrMatches": { - "$$exists": true - } - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "replace", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 3, - "_id": { - "$$exists": true - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "delete", - "ns": { - "db": "database0", - "coll": "collection0" - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "Test rename and invalidate event types", - "runOnRequirements": [ - { - "minServerVersion": "4.0.1" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "collection1" - } - }, - { - "name": "rename", - "object": "globalCollection0", - "arguments": { - "to": "collection1" - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "rename", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "to": { - "db": "database0", - "coll": "collection1" - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "invalidate" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "Test drop and invalidate event types", - "runOnRequirements": [ - { - "minServerVersion": "4.0.1" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "collection0" - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "drop", - "ns": { - "db": "database0", - "coll": "collection0" - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "invalidate" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "Test consecutive resume", - "runOnRequirements": [ - { - "minServerVersion": "4.1.7" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "globalClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "getMore" - ], - "closeConnection": true - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "batchSize": 1 - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 2 - } - } - }, - { - "name": "insertOne", - "object": "globalCollection0", - "arguments": { - "document": { - "x": 3 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 1, - "_id": { - "$$exists": true - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 2, - "_id": { - "$$exists": true - } - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "fullDocument": { - "x": 3, - "_id": { - "$$exists": true - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": { - "batchSize": 1 - }, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "commandName": "aggregate", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "Test wallTime field is set in a change event", - "runOnRequirements": [ - { - "minServerVersion": "6.0.0" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "database0", - "coll": "collection0" - }, - "wallTime": { - "$$exists": true - } - } - } - ] - } - ] -} diff --git a/testdata/change-streams/change-streams.yml b/testdata/change-streams/change-streams.yml deleted file mode 100644 index 3235533b5d..0000000000 --- a/testdata/change-streams/change-streams.yml +++ /dev/null @@ -1,927 +0,0 @@ -description: "change-streams" - -schemaVersion: "1.7" - -runOnRequirements: - - minServerVersion: "3.6" - # TODO(DRIVERS-2323): Run all possible tests against sharded clusters once we know the - # cause of unexpected command monitoring events. - topologies: [ replicaset ] - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - ignoreCommandMonitoringEvents: [ killCursors ] - useMultipleMongoses: false - - client: - id: &globalClient globalClient - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - - database: - id: &database1 database1 - client: *client0 - databaseName: *database1 - - collection: - id: &collection1 collection1 - database: *database1 - collectionName: *collection1 - - database: - id: &globalDatabase0 globalDatabase0 - client: *globalClient - databaseName: *database0 - - collection: - id: &globalCollection0 globalCollection0 - database: *globalDatabase0 - collectionName: *collection0 - - database: - id: &globalDatabase1 globalDatabase1 - client: *globalClient - databaseName: *database1 - - collection: - id: &globalCollection1 globalCollection1 - database: *globalDatabase1 - collectionName: *collection1 - # Some tests run operations against db1.coll0 or db0.coll1 - - collection: - id: &globalDb1Collection0 globalDb1Collection0 - database: *globalDatabase1 - collectionName: *collection0 - - collection: - id: &globalDb0Collection1 globalDb0Collection1 - database: *globalDatabase0 - collectionName: *collection1 - -initialData: - - collectionName: *collection0 - databaseName: *database0 - documents: [] - -tests: - - description: "Test array truncation" - runOnRequirements: - - minServerVersion: "4.7" - operations: - - name: insertOne - object: *collection0 - arguments: - document: { - "_id": 1, - "a": 1, - "array": ["foo", {"a": "bar"}, 1, 2, 3] - } - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: updateOne - object: *collection0 - arguments: - filter: { - "_id": 1 - } - update: [ - { - "$set": { - "array": ["foo", {"a": "bar"}] - } - } - ] - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: { - "operationType": "update", - "ns": { - "db": "database0", - "coll": "collection0" - }, - # It is up to the MongoDB server to decide how to report a change. - # This expectation is based on the current MongoDB server behavior. - # Alternatively, we could have used a set of possible expectations of which only one - # must be satisfied, but the unified test format does not support this. - "updateDescription": { - "updatedFields": {}, - "removedFields": [], - "truncatedArrays": [ - { - "field": "array", - "newSize": 2 - } - ] - } - } - - - description: "Test with document comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - comment: &comment0 { name: "test1" } - saveResultAsEntity: &changeStream0 changeStream0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0 - pipeline: - - $changeStream: {} - comment: *comment0 - - - description: "Test with document comment - pre 4.4" - runOnRequirements: - - maxServerVersion: "4.2.99" - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - comment: &comment0 { name: "test1" } - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0 - pipeline: - - $changeStream: {} - comment: *comment0 - - - description: "Test with string comment" - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - comment: "comment" - saveResultAsEntity: &changeStream0 changeStream0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0 - pipeline: - - $changeStream: {} - comment: "comment" - - - description: "Test that comment is set on getMore" - runOnRequirements: - - minServerVersion: "4.4.0" - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - comment: &commentDoc - key: "value" - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *collection0 - arguments: - document: &new_document - _id: 1 - a: 1 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0 - pipeline: - - $changeStream: {} - comment: *commentDoc - - commandStartedEvent: - command: - insert: *collection0 - documents: - - *new_document - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0 - comment: *commentDoc - commandName: getMore - databaseName: *database0 - - - description: "Test that comment is not set on getMore - pre 4.4" - runOnRequirements: - - maxServerVersion: "4.3.99" - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - comment: "comment" - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *collection0 - arguments: - document: &new_document - _id: 1 - a: 1 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0 - pipeline: - - $changeStream: {} - comment: "comment" - - commandStartedEvent: - command: - insert: *collection0 - documents: - - *new_document - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0 - comment: { $$exists: false } - commandName: getMore - databaseName: *database0 - - - description: "to field is set in a rename change event" - runOnRequirements: - - minServerVersion: "4.0.1" - operations: - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: dropCollection - object: *database0 - arguments: - collection: &collection1 collection1 - - name: rename - object: *collection0 - arguments: - to: *collection1 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: rename - ns: - db: *database0 - coll: *collection0 - to: - db: *database0 - coll: *collection1 - - - description: "Test unknown operationType MUST NOT err" - operations: - - name: createChangeStream - object: *collection0 - arguments: - # using $project to simulate future changes to ChangeStreamDocument structure - pipeline: [ { $project: { operationType: "addedInFutureMongoDBVersion", ns: 1 } } ] - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *collection0 - arguments: - document: { "_id": 1, "a": 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "addedInFutureMongoDBVersion" - ns: - db: *database0 - coll: *collection0 - - - description: "Test newField added in response MUST NOT err" - operations: - - name: createChangeStream - object: *collection0 - arguments: - # using $project to simulate future changes to ChangeStreamDocument structure - pipeline: [ { $project: { operationType: 1, ns: 1, newField: "newFieldValue" } } ] - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *collection0 - arguments: - document: { "_id": 1, "a": 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "insert" - ns: - db: *database0 - coll: *collection0 - newField: "newFieldValue" - - - description: "Test new structure in ns document MUST NOT err" - runOnRequirements: - - minServerVersion: "3.6" - maxServerVersion: "5.2.99" - - minServerVersion: "6.0" - operations: - - name: createChangeStream - object: *collection0 - arguments: - # using $project to simulate future changes to ChangeStreamDocument structure - pipeline: [ { $project: { operationType: "insert", "ns.viewOn": "db.coll" } } ] - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *collection0 - arguments: - document: { "_id": 1, "a": 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "insert" - ns: - viewOn: "db.coll" - - - description: "Test modified structure in ns document MUST NOT err" - operations: - - name: createChangeStream - object: *collection0 - arguments: - # using $project to simulate future changes to ChangeStreamDocument structure - pipeline: [ { $project: { operationType: "insert", ns: { db: "$ns.db", coll: "$ns.coll", viewOn: "db.coll" } } } ] - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *collection0 - arguments: - document: { "_id": 1, "a": 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "insert" - ns: - db: *database0 - coll: *collection0 - viewOn: "db.coll" - - - description: "Test server error on projecting out _id" - runOnRequirements: - - minServerVersion: "4.2" - # Server returns an error if _id is modified on versions 4.2 and higher - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [ { $project: { _id: 0 } } ] - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *collection0 - arguments: - document: { "_id": 1, "a": 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectError: - errorCode: 280 - errorCodeName: "ChangeStreamFatalError" - errorLabelsContain: [ "NonResumableChangeStreamError" ] - - - description: "Test projection in change stream returns expected fields" - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [ { $project: { optype: "$operationType", ns: 1, newField: "value" } } ] - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *collection0 - arguments: - document: { "_id": 1, "a": 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - optype: "insert" - ns: - db: *database0 - coll: *collection0 - newField: "value" - - - description: $changeStream must be the first stage in a change stream pipeline sent to the server - runOnRequirements: - - minServerVersion: "3.6.0" - operations: - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - - description: The server returns change stream responses in the specified server response format - runOnRequirements: - - minServerVersion: "3.6.0" - operations: - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - _id: { $$exists: true } - documentKey: { $$exists: true } - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - - - description: Executing a watch helper on a Collection results in notifications for changes to the specified collection - runOnRequirements: - - minServerVersion: "3.6.0" - operations: - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalDb0Collection1 - arguments: - document: { x: 1 } - - name: insertOne - object: *globalDb1Collection0 - arguments: - document: { y: 2 } - - name: insertOne - object: *globalCollection0 - arguments: - document: { z: 3 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - z: 3 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - - description: Change Stream should allow valid aggregate pipeline stages - runOnRequirements: - - minServerVersion: "3.6.0" - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: - - $match: - fullDocument.z: 3 - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { y: 2 } - - name: insertOne - object: *globalCollection0 - arguments: - document: { z: 3 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - z: 3 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: - - $changeStream: {} - - $match: - fullDocument.z: 3 - commandName: aggregate - databaseName: *database0 - - - description: Executing a watch helper on a Database results in notifications for changes to all collections in the specified database. - runOnRequirements: - - minServerVersion: "3.8.0" - operations: - - name: createChangeStream - object: *database0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalDb0Collection1 - arguments: - document: { x: 1 } - - name: insertOne - object: *globalDb1Collection0 - arguments: - document: { y: 2 } - - name: insertOne - object: *globalCollection0 - arguments: - document: { z: 3 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database0 - coll: *collection1 - fullDocument: - x: 1 - _id: { $$exists: true } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - z: 3 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: 1 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - - description: Executing a watch helper on a MongoClient results in notifications for changes to all collections in all databases in the cluster. - runOnRequirements: - - minServerVersion: "3.8.0" - operations: - - name: createChangeStream - object: *client0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalDb0Collection1 - arguments: - document: { x: 1 } - - name: insertOne - object: *globalDb1Collection0 - arguments: - document: { y: 2 } - - name: insertOne - object: *globalCollection0 - arguments: - document: { z: 3 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database0 - coll: *collection1 - fullDocument: - x: 1 - _id: { $$exists: true } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database1 - coll: *collection0 - fullDocument: - y: 2 - _id: { $$exists: true } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - z: 3 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: 1 - cursor: {} - pipeline: - - $changeStream: { allChangesForCluster: true } - commandName: aggregate - databaseName: admin - - - description: "Test insert, update, replace, and delete event types" - runOnRequirements: - - minServerVersion: "3.6.0" - operations: - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: updateOne - object: *globalCollection0 - arguments: - filter: { x: 1 } - update: - $set: { x: 2 } - - name: replaceOne - object: *globalCollection0 - arguments: - filter: { x: 2 } - replacement: { x: 3 } - - name: deleteOne - object: *globalCollection0 - arguments: - filter: { x: 3 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: update - ns: - db: *database0 - coll: *collection0 - updateDescription: - updatedFields: { x: 2 } - removedFields: [] - truncatedArrays: { $$unsetOrMatches: { $$exists: true } } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: replace - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 3 - _id: { $$exists: true } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: delete - ns: - db: *database0 - coll: *collection0 - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - - description: Test rename and invalidate event types - runOnRequirements: - - minServerVersion: "4.0.1" - operations: - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: dropCollection - object: *database0 - arguments: - collection: *collection1 - - name: rename - object: *globalCollection0 - arguments: - to: *collection1 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: rename - ns: - db: *database0 - coll: *collection0 - to: - db: *database0 - coll: *collection1 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: invalidate - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - - description: Test drop and invalidate event types - runOnRequirements: - - minServerVersion: "4.0.1" - operations: - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: dropCollection - object: *database0 - arguments: - collection: *collection0 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: drop - ns: - db: *database0 - coll: *collection0 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: invalidate - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: {} - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - # Test that resume logic works correctly even after consecutive retryable failures of a getMore command, - # with no intervening events. This is ensured by setting the batch size of the change stream to 1, - - description: Test consecutive resume - runOnRequirements: - - minServerVersion: "4.1.7" - operations: - - name: failPoint - object: testRunner - arguments: - client: *globalClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: [ getMore ] - closeConnection: true - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - batchSize: 1 - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 1 } - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 2 } - - name: insertOne - object: *globalCollection0 - arguments: - document: { x: 3 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 1 - _id: { $$exists: true } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 2 - _id: { $$exists: true } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database0 - coll: *collection0 - fullDocument: - x: 3 - _id: { $$exists: true } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: - batchSize: 1 - pipeline: [ { $changeStream: {} } ] - commandName: aggregate - databaseName: *database0 - - - description: "Test wallTime field is set in a change event" - runOnRequirements: - - minServerVersion: "6.0.0" - operations: - - name: createChangeStream - object: *collection0 - arguments: { pipeline: [] } - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *collection0 - arguments: - document: { "_id": 1, "a": 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: "insert" - ns: - db: *database0 - coll: *collection0 - wallTime: { $$exists: true } diff --git a/testdata/client-side-encryption/legacy/aggregate.json b/testdata/client-side-encryption/legacy/aggregate.json deleted file mode 100644 index 7de725b71d..0000000000 --- a/testdata/client-side-encryption/legacy/aggregate.json +++ /dev/null @@ -1,390 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Aggregate with deterministic encryption", - "skipReason": "SERVER-39395", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encrypted_string": "457-55-5642" - } - } - ] - }, - "result": [ - { - "_id": 1, - "encrypted_string": "string0" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "default", - "pipeline": [ - { - "$match": { - "encrypted_string": "457-55-5642" - } - } - ] - }, - "command_name": "aggregate" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "Aggregate with empty pipeline", - "skipReason": "SERVER-40829 hides agg support behind enableTestCommands flag.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "aggregate", - "arguments": { - "pipeline": [] - }, - "result": [ - { - "_id": 1, - "encrypted_string": "string0" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "default", - "pipeline": [], - "cursor": {} - }, - "command_name": "aggregate" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "Aggregate should fail with random encryption", - "skipReason": "SERVER-39395", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "random": "abc" - } - } - ] - }, - "result": { - "errorContains": "Cannot query on fields encrypted with the randomized encryption" - } - } - ] - }, - { - "description": "Database aggregate should fail", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "aggregate", - "object": "database", - "arguments": { - "pipeline": [ - { - "$currentOp": { - "allUsers": false, - "idleConnections": false, - "localOps": true - } - }, - { - "$match": { - "command.aggregate": { - "$eq": 1 - } - } - }, - { - "$project": { - "command": 1 - } - }, - { - "$project": { - "command.lsid": 0 - } - } - ] - }, - "result": { - "errorContains": "non-collection command not supported for auto encryption: aggregate" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/aggregate.yml b/testdata/client-side-encryption/legacy/aggregate.yml deleted file mode 100644 index 64ad5efa60..0000000000 --- a/testdata/client-side-encryption/legacy/aggregate.yml +++ /dev/null @@ -1,120 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Aggregate with deterministic encryption" - skipReason: "SERVER-39395" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: aggregate - arguments: - pipeline: - - { $match: { encrypted_string: "457-55-5642" } } - result: - - &doc0 { _id: 1, encrypted_string: "string0" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - { $match: { encrypted_string: "457-55-5642" } } - command_name: aggregate - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - description: "Aggregate with empty pipeline" - skipReason: "SERVER-40829 hides agg support behind enableTestCommands flag." - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: aggregate - arguments: - pipeline: [] - result: - - { _id: 1, encrypted_string: "string0" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - aggregate: *collection_name - pipeline: [] - cursor: {} - command_name: aggregate - # Needs to fetch key when decrypting results - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - description: "Aggregate should fail with random encryption" - skipReason: "SERVER-39395" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: aggregate - arguments: - pipeline: - - { $match: { random: "abc" } } - result: - errorContains: "Cannot query on fields encrypted with the randomized encryption" - - description: "Database aggregate should fail" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: aggregate - object: database - arguments: - pipeline: - - $currentOp: { allUsers: false, idleConnections: false, localOps: true } - - $match: { command.aggregate: { $eq: 1 } } - - $project: { command: 1 } - - $project: { command.lsid: 0 } - result: - errorContains: "non-collection command not supported for auto encryption: aggregate" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/awsTemporary.json b/testdata/client-side-encryption/legacy/awsTemporary.json deleted file mode 100644 index 10eb85feee..0000000000 --- a/testdata/client-side-encryption/legacy/awsTemporary.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Insert a document with auto encryption using the AWS provider with temporary credentials", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "awsTemporary": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault" - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "Insert with invalid temporary credentials", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "awsTemporaryNoSessionToken": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0" - } - }, - "result": { - "errorContains": "security token" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/awsTemporary.yml b/testdata/client-side-encryption/legacy/awsTemporary.yml deleted file mode 100644 index cc787530a0..0000000000 --- a/testdata/client-side-encryption/legacy/awsTemporary.yml +++ /dev/null @@ -1,57 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Insert a document with auto encryption using the AWS provider with temporary credentials" - clientOptions: - autoEncryptOpts: - kmsProviders: - awsTemporary: {} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_string: "string0" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: { $or: [ { _id: { $in: [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] } }, { keyAltNames: { $in: [] } } ] } - $db: keyvault - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - ordered: true - command_name: insert - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - description: "Insert with invalid temporary credentials" - clientOptions: - autoEncryptOpts: - kmsProviders: - awsTemporaryNoSessionToken: {} - operations: - - name: insertOne - arguments: - document: *doc0 - result: - errorContains: "security token" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/azureKMS.json b/testdata/client-side-encryption/legacy/azureKMS.json deleted file mode 100644 index afecf40b0a..0000000000 --- a/testdata/client-side-encryption/legacy/azureKMS.json +++ /dev/null @@ -1,224 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": { - "properties": { - "encrypted_string_aws": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "encrypted_string_azure": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AZURE+AAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "encrypted_string_gcp": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "GCP+AAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "encrypted_string_local": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "encrypted_string_kmip": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "dBHpr8aITfeBQ15grpbLpQ==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "AZURE+AAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "n+HWZ0ZSVOYA3cvQgP7inN4JSXfOH85IngmeQxRpQHjCCcqT3IFqEWNlrsVHiz3AELimHhX4HKqOLWMUeSIT6emUDDoQX9BAv8DR1+E1w4nGs/NyEneac78EYFkK3JysrFDOgl2ypCCTKAypkn9CkAx1if4cfgQE93LW4kczcyHdGiH36CIxrCDGv1UzAvERN5Qa47DVwsM6a+hWsF2AAAJVnF0wYLLJU07TuRHdMrrphPWXZsFgyV+lRqJ7DDpReKNO8nMPLV/mHqHBHGPGQiRdb9NoJo8CvokGz4+KE8oLwzKf6V24dtwZmRkrsDV4iOhvROAzz+Euo1ypSkL3mw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1601573901680" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1601573901680" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "azure", - "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", - "keyName": "key-name-csfle" - }, - "keyAltNames": [ - "altname", - "azure_altname" - ] - } - ], - "tests": [ - { - "description": "Insert a document with auto encryption using Azure KMS provider", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "azure": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string_azure": "string0" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AZURE+AAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault" - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_string_azure": { - "$binary": { - "base64": "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string_azure": { - "$binary": { - "base64": "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/azureKMS.yml b/testdata/client-side-encryption/legacy/azureKMS.yml deleted file mode 100644 index b3c1f69472..0000000000 --- a/testdata/client-side-encryption/legacy/azureKMS.yml +++ /dev/null @@ -1,46 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {'properties': {'encrypted_string_aws': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'encrypted_string_azure': {'encrypt': {'keyId': [{'$binary': {'base64': 'AZURE+AAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'encrypted_string_gcp': {'encrypt': {'keyId': [{'$binary': {'base64': 'GCP+AAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'encrypted_string_local': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'encrypted_string_kmip': {'encrypt': {'keyId': [{'$binary': {'base64': 'dBHpr8aITfeBQ15grpbLpQ==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'_id': {'$binary': {'base64': 'AZURE+AAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'n+HWZ0ZSVOYA3cvQgP7inN4JSXfOH85IngmeQxRpQHjCCcqT3IFqEWNlrsVHiz3AELimHhX4HKqOLWMUeSIT6emUDDoQX9BAv8DR1+E1w4nGs/NyEneac78EYFkK3JysrFDOgl2ypCCTKAypkn9CkAx1if4cfgQE93LW4kczcyHdGiH36CIxrCDGv1UzAvERN5Qa47DVwsM6a+hWsF2AAAJVnF0wYLLJU07TuRHdMrrphPWXZsFgyV+lRqJ7DDpReKNO8nMPLV/mHqHBHGPGQiRdb9NoJo8CvokGz4+KE8oLwzKf6V24dtwZmRkrsDV4iOhvROAzz+Euo1ypSkL3mw==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1601573901680'}}, 'updateDate': {'$date': {'$numberLong': '1601573901680'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'azure', 'keyVaultEndpoint': 'key-vault-csfle.vault.azure.net', 'keyName': 'key-name-csfle'}, 'keyAltNames': ['altname', 'azure_altname']}] - -tests: - - description: "Insert a document with auto encryption using Azure KMS provider" - clientOptions: - autoEncryptOpts: - kmsProviders: - azure: {} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_string_azure: "string0" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: { $or: [ { _id: { $in: [ {'$binary': {'base64': 'AZURE+AAAAAAAAAAAAAAAA==', 'subType': '04'}} ] } }, { keyAltNames: { $in: [] } } ] } - $db: keyvault - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { _id: 1, encrypted_string_azure: {'$binary': {'base64': 'AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==', 'subType': '06'}} } - ordered: true - command_name: insert - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/badQueries.json b/testdata/client-side-encryption/legacy/badQueries.json deleted file mode 100644 index 4968307ba3..0000000000 --- a/testdata/client-side-encryption/legacy/badQueries.json +++ /dev/null @@ -1,1446 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "$text unconditionally fails", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "$text": { - "$search": "search text" - } - } - }, - "result": { - "errorContains": "Unsupported match expression operator for encryption" - } - } - ] - }, - { - "description": "$where unconditionally fails", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "$where": { - "$code": "function() { return true }" - } - } - }, - "result": { - "errorContains": "Unsupported match expression operator for encryption" - } - } - ] - }, - { - "description": "$bit operators succeed on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$bitsAllClear": 35 - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$bitsAllClear": 35 - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$bitsAllSet": 35 - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$bitsAllSet": 35 - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$bitsAnyClear": 35 - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$bitsAnyClear": 35 - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$bitsAnySet": 35 - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$bitsAnySet": 35 - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - } - ] - }, - { - "description": "geo operators succeed on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$near": [ - 0, - 0 - ] - } - } - }, - "result": { - "errorContains": "unable to find index" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$near": [ - 0, - 0 - ] - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$nearSphere": [ - 0, - 0 - ] - } - } - }, - "result": { - "errorContains": "unable to find index" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$nearSphere": [ - 0, - 0 - ] - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$geoIntersects": { - "$geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - 0, - 0 - ], - [ - 1, - 0 - ], - [ - 1, - 1 - ], - [ - 0, - 0 - ] - ] - ] - } - } - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$geoIntersects": { - "$geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - 0, - 0 - ], - [ - 1, - 0 - ], - [ - 1, - 1 - ], - [ - 0, - 0 - ] - ] - ] - } - } - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$geoWithin": { - "$geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - 0, - 0 - ], - [ - 1, - 0 - ], - [ - 1, - 1 - ], - [ - 0, - 0 - ] - ] - ] - } - } - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$geoWithin": { - "$geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - 0, - 0 - ], - [ - 1, - 0 - ], - [ - 1, - 1 - ], - [ - 0, - 0 - ] - ] - ] - } - } - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - } - ] - }, - { - "description": "inequality operators succeed on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$gt": 1 - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$gt": 1 - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$lt": 1 - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$lt": 1 - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$gte": 1 - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$gte": 1 - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$lte": 1 - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$lte": 1 - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - } - ] - }, - { - "description": "other misc operators succeed on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$mod": [ - 3, - 1 - ] - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$mod": [ - 3, - 1 - ] - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$regex": "pattern", - "$options": "" - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$regex": "pattern", - "$options": "" - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$size": 2 - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$size": 2 - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$type": 2 - } - } - }, - "result": [] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$type": 2 - } - } - }, - "result": { - "errorContains": "Invalid match expression operator on encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$eq": null - } - } - }, - "result": [ - { - "_id": 1, - "encrypted_string": "string0" - }, - { - "_id": 2, - "encrypted_string": "string1" - } - ] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$eq": null - } - } - }, - "result": { - "errorContains": "Illegal equality to null predicate for encrypted field" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "unencrypted": { - "$in": [ - null - ] - } - } - }, - "result": [ - { - "_id": 1, - "encrypted_string": "string0" - }, - { - "_id": 2, - "encrypted_string": "string1" - } - ] - }, - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$in": [ - null - ] - } - } - }, - "result": { - "errorContains": "Illegal equality to null inside $in against an encrypted field" - } - } - ] - }, - { - "description": "$addToSet succeeds on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$addToSet": { - "unencrypted": [ - "a" - ] - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$addToSet": { - "encrypted_string": [ - "a" - ] - } - } - }, - "result": { - "errorContains": "$addToSet not allowed on encrypted values" - } - } - ] - }, - { - "description": "$inc succeeds on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$inc": { - "unencrypted": 1 - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$inc": { - "encrypted_string": 1 - } - } - }, - "result": { - "errorContains": "$inc and $mul not allowed on encrypted values" - } - } - ] - }, - { - "description": "$mul succeeds on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$mul": { - "unencrypted": 1 - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$mul": { - "encrypted_string": 1 - } - } - }, - "result": { - "errorContains": "$inc and $mul not allowed on encrypted values" - } - } - ] - }, - { - "description": "$max succeeds on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$max": { - "unencrypted": 1 - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$max": { - "encrypted_string": 1 - } - } - }, - "result": { - "errorContains": "$max and $min not allowed on encrypted values" - } - } - ] - }, - { - "description": "$min succeeds on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$min": { - "unencrypted": 1 - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$min": { - "encrypted_string": 1 - } - } - }, - "result": { - "errorContains": "$max and $min not allowed on encrypted values" - } - } - ] - }, - { - "description": "$currentDate succeeds on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$currentDate": { - "unencrypted": true - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$currentDate": { - "encrypted_string": true - } - } - }, - "result": { - "errorContains": "$currentDate not allowed on encrypted values" - } - } - ] - }, - { - "description": "$pop succeeds on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$pop": { - "unencrypted": 1 - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 0, - "upsertedCount": 0 - } - }, - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$pop": { - "encrypted_string": 1 - } - } - }, - "result": { - "errorContains": "$pop not allowed on encrypted values" - } - } - ] - }, - { - "description": "$pull succeeds on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$pull": { - "unencrypted": 1 - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 0, - "upsertedCount": 0 - } - }, - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$pull": { - "encrypted_string": 1 - } - } - }, - "result": { - "errorContains": "$pull not allowed on encrypted values" - } - } - ] - }, - { - "description": "$pullAll succeeds on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$pullAll": { - "unencrypted": [ - 1 - ] - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 0, - "upsertedCount": 0 - } - }, - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$pullAll": { - "encrypted_string": [ - 1 - ] - } - } - }, - "result": { - "errorContains": "$pullAll not allowed on encrypted values" - } - } - ] - }, - { - "description": "$push succeeds on unencrypted, error on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$push": { - "unencrypted": 1 - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$push": { - "encrypted_string": 1 - } - } - }, - "result": { - "errorContains": "$push not allowed on encrypted values" - } - } - ] - }, - { - "description": "array filters on encrypted fields does not error in mongocryptd, but errors in mongod", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$set": { - "encrypted_string.$[i].x": 1 - } - }, - "arrayFilters": [ - { - "i.x": 1 - } - ] - }, - "result": { - "errorContains": "Array update operations not allowed on encrypted values" - } - } - ] - }, - { - "description": "positional operator succeeds on unencrypted, errors on encrypted", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": { - "unencrypted": 1 - }, - "update": { - "$set": { - "unencrypted.$": 1 - } - } - }, - "result": { - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0 - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "encrypted_string": "abc" - }, - "update": { - "$set": { - "encrypted_string.$": "abc" - } - } - }, - "result": { - "errorContains": "Cannot encrypt fields below '$' positional update operator" - } - } - ] - }, - { - "description": "an update that would produce an array on an encrypted field errors", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$set": { - "encrypted_string": [ - 1, - 2 - ] - } - } - }, - "result": { - "errorContains": "Cannot encrypt element of type" - } - } - ] - }, - { - "description": "an insert with encrypted field on _id errors", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "schemaMap": { - "default.default": { - "properties": { - "_id": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1 - } - }, - "result": { - "errorContains": "Invalid schema containing the 'encrypt' keyword." - } - } - ] - }, - { - "description": "an insert with an array value for an encrypted field fails", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "encrypted_string": [ - "123", - "456" - ] - } - }, - "result": { - "errorContains": "Cannot encrypt element of type" - } - } - ] - }, - { - "description": "an insert with a Timestamp(0,0) value in the top-level fails", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "random": { - "$timestamp": { - "t": 0, - "i": 0 - } - } - } - }, - "result": { - "errorContains": "A command that inserts cannot supply Timestamp(0, 0) for an encrypted" - } - } - ] - }, - { - "description": "distinct with the key referring to a field where the keyID is a JSON Pointer errors", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "distinct", - "arguments": { - "filter": {}, - "fieldName": "encrypted_w_altname" - }, - "result": { - "errorContains": "The distinct key is not allowed to be marked for encryption with a non-UUID keyId" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/badQueries.yml b/testdata/client-side-encryption/legacy/badQueries.yml deleted file mode 100644 index 893622c4ce..0000000000 --- a/testdata/client-side-encryption/legacy/badQueries.yml +++ /dev/null @@ -1,536 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - &doc1_encrypted { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -# TODO: I could see an argument against having these tests of mongocryptd as part -# of driver tests. When mongocryptd introduces support for these operators, these -# tests will fail. But it's also easy enough to remove these tests when that happens. - -tests: - - description: "$text unconditionally fails" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: find - arguments: - filter: - { $text: { $search: "search text" } } - result: - errorContains: "Unsupported match expression operator for encryption" - - description: "$where unconditionally fails" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: find - arguments: - filter: - { $where: { $code: "function() { return true }" } } - result: - errorContains: "Unsupported match expression operator for encryption" - - description: "$bit operators succeed on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: find - arguments: - filter: { unencrypted: { $bitsAllClear: 35 }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $bitsAllClear: 35 }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $bitsAllSet: 35 }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $bitsAllSet: 35 }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $bitsAnyClear: 35 }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $bitsAnyClear: 35 }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $bitsAnySet: 35 }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $bitsAnySet: 35 }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - description: "geo operators succeed on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: find - arguments: - filter: { unencrypted: { $near: [0,0] }} - result: - # Still an error because no geo index, but from mongod - not mongocryptd. - errorContains: "unable to find index" - - name: find - arguments: - filter: { encrypted_string: { $near: [0,0] }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $nearSphere: [0,0] }} - result: - # Still an error because no geo index, but from mongod - not mongocryptd. - errorContains: "unable to find index" - - name: find - arguments: - filter: { encrypted_string: { $nearSphere: [0,0] }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $geoIntersects: { $geometry: { type: "Polygon", coordinates: [[ [0,0], [1,0], [1,1], [0,0] ]] }} }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $geoIntersects: { $geometry: { type: "Polygon", coordinates: [[ [0,0], [1,0], [1,1], [0,0] ]] }} }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $geoWithin: { $geometry: { type: "Polygon", coordinates: [[ [0,0], [1,0], [1,1], [0,0] ]] }} }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $geoWithin: { $geometry: { type: "Polygon", coordinates: [[ [0,0], [1,0], [1,1], [0,0] ]] }} }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - description: "inequality operators succeed on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: find - arguments: - filter: { unencrypted: { $gt: 1 }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $gt: 1 }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $lt: 1 }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $lt: 1 }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $gte: 1 }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $gte: 1 }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $lte: 1 }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $lte: 1 }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - description: "other misc operators succeed on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: find - arguments: - filter: { unencrypted: { $mod: [3, 1] }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $mod: [3, 1] }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $regex: "pattern", $options: "" }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $regex: "pattern", $options: "" }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $size: 2 }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $size: 2 }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $type: 2 }} - result: [] - - name: find - arguments: - filter: { encrypted_string: { $type: 2 }} - result: - errorContains: "Invalid match expression operator on encrypted field" - - name: find - arguments: - filter: { unencrypted: { $eq: null }} - result: - - &doc0 { _id: 1, encrypted_string: "string0" } - - &doc1 { _id: 2, encrypted_string: "string1" } - - name: find - arguments: - filter: { encrypted_string: { $eq: null }} - result: - errorContains: "Illegal equality to null predicate for encrypted field" - - name: find - arguments: - filter: { unencrypted: { $in: [null] }} - result: - - *doc0 - - *doc1 - - name: find - arguments: - filter: { encrypted_string: { $in: [null] }} - result: - errorContains: "Illegal equality to null inside $in against an encrypted field" - - description: "$addToSet succeeds on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $addToSet: { "unencrypted": ["a"]}} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - name: updateOne - arguments: - filter: { } - update: { $addToSet: { "encrypted_string": ["a"]}} - result: - errorContains: "$addToSet not allowed on encrypted values" - - description: "$inc succeeds on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $inc: { "unencrypted": 1}} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - name: updateOne - arguments: - filter: { } - update: { $inc: { "encrypted_string": 1}} - result: - errorContains: "$inc and $mul not allowed on encrypted values" - - description: "$mul succeeds on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $mul: { "unencrypted": 1}} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - name: updateOne - arguments: - filter: { } - update: { $mul: { "encrypted_string": 1}} - result: - errorContains: "$inc and $mul not allowed on encrypted values" - - description: "$max succeeds on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $max: { "unencrypted": 1}} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - name: updateOne - arguments: - filter: { } - update: { $max: { "encrypted_string": 1}} - result: - errorContains: "$max and $min not allowed on encrypted values" - - description: "$min succeeds on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $min: { "unencrypted": 1}} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - name: updateOne - arguments: - filter: { } - update: { $min: { "encrypted_string": 1}} - result: - errorContains: "$max and $min not allowed on encrypted values" - - description: "$currentDate succeeds on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $currentDate: { "unencrypted": true}} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - name: updateOne - arguments: - filter: { } - update: { $currentDate: { "encrypted_string": true }} - result: - errorContains: "$currentDate not allowed on encrypted values" - - description: "$pop succeeds on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $pop: { "unencrypted": 1}} - result: - matchedCount: 1 - modifiedCount: 0 - upsertedCount: 0 - - name: updateOne - arguments: - filter: { } - update: { $pop: { "encrypted_string": 1 }} - result: - errorContains: "$pop not allowed on encrypted values" - - description: "$pull succeeds on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $pull: { "unencrypted": 1}} - result: - matchedCount: 1 - modifiedCount: 0 - upsertedCount: 0 - - name: updateOne - arguments: - filter: { } - update: { $pull: { "encrypted_string": 1 }} - result: - errorContains: "$pull not allowed on encrypted values" - - description: "$pullAll succeeds on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $pullAll: { "unencrypted": [1] }} - result: - matchedCount: 1 - modifiedCount: 0 - upsertedCount: 0 - - name: updateOne - arguments: - filter: { } - update: { $pullAll: { "encrypted_string": [1] }} - result: - errorContains: "$pullAll not allowed on encrypted values" - - description: "$push succeeds on unencrypted, error on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $push: { "unencrypted": 1}} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - name: updateOne - arguments: - filter: { } - update: { $push: { "encrypted_string": 1 }} - result: - errorContains: "$push not allowed on encrypted values" - - description: "array filters on encrypted fields does not error in mongocryptd, but errors in mongod" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $set : { "encrypted_string.$[i].x": 1 }} - arrayFilters: [{ i.x: 1 }] - result: - errorContains: "Array update operations not allowed on encrypted values" - - description: "positional operator succeeds on unencrypted, errors on encrypted" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { "unencrypted": 1 } - update: { $set : { "unencrypted.$": 1 }} - result: - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - - name: updateOne - arguments: - filter: { "encrypted_string": "abc" } - update: { $set : { "encrypted_string.$": "abc" }} - result: - errorContains: "Cannot encrypt fields below '$' positional update operator" - - description: "an update that would produce an array on an encrypted field errors" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $set : { "encrypted_string": [1,2] }} - result: - # DRIVERS-2272: The expected error message changed in mongocryptd 6.0. Before it was: - # "Cannot encrypt element of type array because schema requires that type is one of: [ string ]" - # After it is: - # "Cannot encrypt element of type: array" - # Only check for the common prefix. - errorContains: "Cannot encrypt element of type" - - description: "an insert with encrypted field on _id errors" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - schemaMap: - "default.default": {'properties': {'_id': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}} - operations: - - name: insertOne - arguments: - document: { _id: 1 } - result: - errorContains: "Invalid schema containing the 'encrypt' keyword." - - description: "an insert with an array value for an encrypted field fails" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: { encrypted_string: [ "123", "456"] } - result: - # DRIVERS-2272: The expected error message changed in mongocryptd 6.0. Before it was: - # "Cannot encrypt element of type array because schema requires that type is one of: [ string ]" - # After it is: - # "Cannot encrypt element of type: array" - # Only check for the common prefix. - errorContains: "Cannot encrypt element of type" - - description: "an insert with a Timestamp(0,0) value in the top-level fails" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: { random: {"$timestamp": {"t": 0, "i": 0 }} } - result: - errorContains: "A command that inserts cannot supply Timestamp(0, 0) for an encrypted" - - description: "distinct with the key referring to a field where the keyID is a JSON Pointer errors" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: distinct - arguments: - filter: {} - fieldName: "encrypted_w_altname" - result: - errorContains: "The distinct key is not allowed to be marked for encryption with a non-UUID keyId" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/badSchema.json b/testdata/client-side-encryption/legacy/badSchema.json deleted file mode 100644 index 1fd0f8ed3f..0000000000 --- a/testdata/client-side-encryption/legacy/badSchema.json +++ /dev/null @@ -1,254 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Schema with an encrypted field in an array", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - } - }, - "bsonType": "array" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0" - } - }, - "result": { - "errorContains": "Invalid schema" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "Schema without specifying parent object types", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "foo": { - "properties": { - "bar": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - } - } - } - } - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0" - } - }, - "result": { - "errorContains": "Invalid schema" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "Schema with siblings of encrypt document", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - }, - "bsonType": "object" - } - } - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0" - } - }, - "result": { - "errorContains": "'encrypt' cannot be used in conjunction with 'bsonType'" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "Schema with logical keywords", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "anyOf": [ - { - "properties": { - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - } - } - } - ] - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0" - } - }, - "result": { - "errorContains": "Invalid schema" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/badSchema.yml b/testdata/client-side-encryption/legacy/badSchema.yml deleted file mode 100644 index 035774de59..0000000000 --- a/testdata/client-side-encryption/legacy/badSchema.yml +++ /dev/null @@ -1,73 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Schema with an encrypted field in an array" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}}, 'bsonType': 'array'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_string: "string0" } - result: - errorContains: "Invalid schema" - outcome: - collection: - data: [] - - description: "Schema without specifying parent object types" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'foo': {'properties': {'bar': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}}}}} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: *doc0 - result: - errorContains: "Invalid schema" - outcome: - collection: - data: [] - - description: "Schema with siblings of encrypt document" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}, 'bsonType': 'object'}}} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: *doc0 - result: - errorContains: "'encrypt' cannot be used in conjunction with 'bsonType'" - outcome: - collection: - data: [] - - description: "Schema with logical keywords" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'anyOf': [{'properties': {'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}}}]} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: *doc0 - result: - errorContains: "Invalid schema" - outcome: - collection: - data: [] \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/basic.json b/testdata/client-side-encryption/legacy/basic.json deleted file mode 100644 index 3ed066f530..0000000000 --- a/testdata/client-side-encryption/legacy/basic.json +++ /dev/null @@ -1,350 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Insert with deterministic encryption, then find it", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0" - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1, - "encrypted_string": "string0" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "Insert with randomized encryption, then find it", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "random": "123" - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1, - "random": "123" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "random": { - "$$type": "binData" - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "random": { - "$$type": "binData" - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/basic.yml b/testdata/client-side-encryption/legacy/basic.yml deleted file mode 100644 index dfbf5270cf..0000000000 --- a/testdata/client-side-encryption/legacy/basic.yml +++ /dev/null @@ -1,102 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Insert with deterministic encryption, then find it" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_string: "string0" } - - name: find - arguments: - filter: { _id: 1 } - result: [*doc0] - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: { _id: 1 } - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - description: "Insert with randomized encryption, then find it" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc1 { _id: 1, random: "123" } - - name: find - arguments: - filter: { _id: 1 } - result: [*doc1] - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1, random: { $$type: "binData" } } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: { _id: 1 } - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { _id: 1, random: { $$type: "binData" } } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/bulk.json b/testdata/client-side-encryption/legacy/bulk.json deleted file mode 100644 index 1b62e5e8ab..0000000000 --- a/testdata/client-side-encryption/legacy/bulk.json +++ /dev/null @@ -1,333 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Bulk write with encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0", - "random": "abc" - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "encrypted_string": "string1" - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "encrypted_string": "string0" - }, - "update": { - "$set": { - "encrypted_string": "string1" - } - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "$and": [ - { - "encrypted_string": "string1" - }, - { - "_id": 2 - } - ] - } - } - } - ], - "options": { - "ordered": true - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "update": "default", - "updates": [ - { - "q": { - "encrypted_string": { - "$eq": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - } - } - ], - "ordered": true - }, - "command_name": "update" - } - }, - { - "command_started_event": { - "command": { - "delete": "default", - "deletes": [ - { - "q": { - "$and": [ - { - "encrypted_string": { - "$eq": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - }, - { - "_id": { - "$eq": 2 - } - } - ] - }, - "limit": 1 - } - ], - "ordered": true - }, - "command_name": "delete" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/bulk.yml b/testdata/client-side-encryption/legacy/bulk.yml deleted file mode 100644 index 824ccdaa10..0000000000 --- a/testdata/client-side-encryption/legacy/bulk.yml +++ /dev/null @@ -1,78 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Bulk write with encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: bulkWrite - arguments: - requests: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_string: "string0", random: "abc" } - - name: insertOne - arguments: - document: &doc1 { _id: 2, encrypted_string: "string1" } - - name: updateOne - arguments: - filter: { encrypted_string: "string0" } - update: { $set: { encrypted_string: "string1" } } - - name: deleteOne - arguments: - filter: { $and: [{ encrypted_string: "string1" }, { _id: 2 }]} - options: { ordered: true } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}}, random: { $$type: "binData" } } - - &doc1_encrypted { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } - ordered: true - command_name: insert - - command_started_event: - command: - update: *collection_name - updates: - - q: { encrypted_string: { $eq: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} }} - u: {$set: { encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} }} - ordered: true - command_name: update - - command_started_event: - command: - delete: *collection_name - deletes: - - q: { "$and": [ { "encrypted_string": { "$eq": {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} }}, { "_id": { "$eq": 2 }} ] } - limit: 1 - ordered: true - command_name: delete - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}}, random: { $$type: "binData" } } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/bypassAutoEncryption.json b/testdata/client-side-encryption/legacy/bypassAutoEncryption.json deleted file mode 100644 index 9d09cb3fa9..0000000000 --- a/testdata/client-side-encryption/legacy/bypassAutoEncryption.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Insert with bypassAutoEncryption", - "clientOptions": { - "autoEncryptOpts": { - "bypassAutoEncryption": true, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "encrypted_string": "string0" - }, - "bypassDocumentValidation": true - } - }, - { - "name": "find", - "arguments": { - "filter": {} - }, - "result": [ - { - "_id": 1, - "encrypted_string": "string0" - }, - { - "_id": 2, - "encrypted_string": "string0" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 2, - "encrypted_string": "string0" - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": {} - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": "string0" - } - ] - } - } - }, - { - "description": "Insert with bypassAutoEncryption for local schema", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "bypassAutoEncryption": true, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "encrypted_string": "string0" - }, - "bypassDocumentValidation": true - } - }, - { - "name": "find", - "arguments": { - "filter": {} - }, - "result": [ - { - "_id": 1, - "encrypted_string": "string0" - }, - { - "_id": 2, - "encrypted_string": "string0" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 2, - "encrypted_string": "string0" - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": {} - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": "string0" - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/bypassAutoEncryption.yml b/testdata/client-side-encryption/legacy/bypassAutoEncryption.yml deleted file mode 100644 index 7a7bf74e1d..0000000000 --- a/testdata/client-side-encryption/legacy/bypassAutoEncryption.yml +++ /dev/null @@ -1,100 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [{_id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} }] -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Insert with bypassAutoEncryption" - clientOptions: - autoEncryptOpts: - bypassAutoEncryption: true - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: { _id: 2, encrypted_string: "string0" } - bypassDocumentValidation: true - - name: find - arguments: - filter: { } - result: - - { _id: 1, encrypted_string: "string0" } - - { _id: 2, encrypted_string: "string0" } - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - # No encryption. - - { _id: 2, encrypted_string: "string0" } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: { } - command_name: find - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - { _id: 2, encrypted_string: "string0" } - - description: "Insert with bypassAutoEncryption for local schema" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - bypassAutoEncryption: true - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: { _id: 2, encrypted_string: "string0" } - bypassDocumentValidation: true - - name: find - arguments: - filter: { } - result: - - { _id: 1, encrypted_string: "string0" } - - { _id: 2, encrypted_string: "string0" } - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - # No encryption. - - { _id: 2, encrypted_string: "string0" } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: { } - command_name: find - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - { _id: 2, encrypted_string: "string0" } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/bypassedCommand.json b/testdata/client-side-encryption/legacy/bypassedCommand.json deleted file mode 100644 index 18054a70cb..0000000000 --- a/testdata/client-side-encryption/legacy/bypassedCommand.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": {}, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "ping is bypassed", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "runCommand", - "object": "database", - "command_name": "ping", - "arguments": { - "command": { - "ping": 1 - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "ping": 1 - }, - "command_name": "ping" - } - } - ] - }, - { - "description": "kill op is not bypassed", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "runCommand", - "object": "database", - "command_name": "killOp", - "arguments": { - "command": { - "killOp": 1, - "op": 1234 - } - }, - "result": { - "errorContains": "command not supported for auto encryption: killOp" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/bypassedCommand.yml b/testdata/client-side-encryption/legacy/bypassedCommand.yml deleted file mode 100644 index d3c1fc91fe..0000000000 --- a/testdata/client-side-encryption/legacy/bypassedCommand.yml +++ /dev/null @@ -1,43 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "ping is bypassed" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: runCommand - object: database - command_name: ping - arguments: - command: - ping: 1 - expectations: - # No listCollections, no mongocryptd command, just the ping. - - command_started_event: - command: - ping: 1 - command_name: ping - - description: "kill op is not bypassed" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: runCommand - object: database - command_name: killOp - arguments: - command: - killOp: 1 - op: 1234 - result: - errorContains: "command not supported for auto encryption: killOp" diff --git a/testdata/client-side-encryption/legacy/count.json b/testdata/client-side-encryption/legacy/count.json deleted file mode 100644 index 9df8cd639e..0000000000 --- a/testdata/client-side-encryption/legacy/count.json +++ /dev/null @@ -1,229 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Count with deterministic encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "count", - "arguments": { - "filter": { - "encrypted_string": "string0" - } - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "count": "default", - "query": { - "encrypted_string": { - "$eq": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - } - }, - "command_name": "count" - } - } - ] - }, - { - "description": "Count fails when filtering on a random encrypted field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "count", - "arguments": { - "filter": { - "random": "abc" - } - }, - "result": { - "errorContains": "Cannot query on fields encrypted with the randomized encryption" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/count.yml b/testdata/client-side-encryption/legacy/count.yml deleted file mode 100644 index b8c436a4c0..0000000000 --- a/testdata/client-side-encryption/legacy/count.yml +++ /dev/null @@ -1,54 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - &doc1_encrypted { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Count with deterministic encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: count - arguments: - filter: { encrypted_string: "string0" } - result: 2 - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - count: *collection_name - query: { encrypted_string: { $eq: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } } - command_name: count - - description: "Count fails when filtering on a random encrypted field" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment - operations: - - name: count - arguments: - filter: { random: "abc" } - result: - errorContains: "Cannot query on fields encrypted with the randomized encryption" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/countDocuments.json b/testdata/client-side-encryption/legacy/countDocuments.json deleted file mode 100644 index 07ff97f264..0000000000 --- a/testdata/client-side-encryption/legacy/countDocuments.json +++ /dev/null @@ -1,241 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "countDocuments with deterministic encryption", - "skipReason": "waiting on SERVER-39395", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "countDocuments", - "arguments": { - "filter": { - "encrypted_string": "string0" - } - }, - "result": 1 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "default", - "pipeline": [ - { - "$match": { - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "command_name": "aggregate" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/countDocuments.yml b/testdata/client-side-encryption/legacy/countDocuments.yml deleted file mode 100644 index e28b478c05..0000000000 --- a/testdata/client-side-encryption/legacy/countDocuments.yml +++ /dev/null @@ -1,52 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - &doc1_encrypted { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "countDocuments with deterministic encryption" - skipReason: "waiting on SERVER-39395" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: countDocuments - arguments: - filter: { encrypted_string: "string0" } - result: 1 - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - { $match: { encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} }} - - { $group: { _id: 1, n: { $sum: 1 }}} - command_name: aggregate - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - *doc1_encrypted \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/create-and-createIndexes.json b/testdata/client-side-encryption/legacy/create-and-createIndexes.json deleted file mode 100644 index 48638a97c8..0000000000 --- a/testdata/client-side-encryption/legacy/create-and-createIndexes.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "tests": [ - { - "description": "create is OK", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "unencryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "unencryptedCollection", - "validator": { - "unencrypted_string": "foo" - } - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "unencryptedCollection" - } - } - ] - }, - { - "description": "createIndexes is OK", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "unencryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "unencryptedCollection" - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "createIndexes": "unencryptedCollection", - "indexes": [ - { - "name": "name", - "key": { - "name": 1 - } - } - ] - } - } - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "unencryptedCollection", - "index": "name" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/create-and-createIndexes.yml b/testdata/client-side-encryption/legacy/create-and-createIndexes.yml deleted file mode 100644 index 2d9f5ef711..0000000000 --- a/testdata/client-side-encryption/legacy/create-and-createIndexes.yml +++ /dev/null @@ -1,58 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -tests: - - description: "create is OK" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "unencryptedCollection" - - name: createCollection - object: database - arguments: - collection: "unencryptedCollection" - validator: - unencrypted_string: "foo" - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: "unencryptedCollection" - - description: "createIndexes is OK" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "unencryptedCollection" - - name: createCollection - object: database - arguments: - collection: "unencryptedCollection" - - name: runCommand - object: database - arguments: - command: - createIndexes: "unencryptedCollection" - indexes: - - name: "name" - key: { name: 1 } - - name: assertIndexExists - object: testRunner - arguments: - database: *database_name - collection: "unencryptedCollection" - index: name \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/delete.json b/testdata/client-side-encryption/legacy/delete.json deleted file mode 100644 index a6f4ffde91..0000000000 --- a/testdata/client-side-encryption/legacy/delete.json +++ /dev/null @@ -1,340 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "deleteOne with deterministic encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "deleteOne", - "arguments": { - "filter": { - "encrypted_string": "string0" - } - }, - "result": { - "deletedCount": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "delete": "default", - "deletes": [ - { - "q": { - "encrypted_string": { - "$eq": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ], - "ordered": true - }, - "command_name": "delete" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "deleteMany with deterministic encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "deleteMany", - "arguments": { - "filter": { - "encrypted_string": { - "$in": [ - "string0", - "string1" - ] - } - } - }, - "result": { - "deletedCount": 2 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "delete": "default", - "deletes": [ - { - "q": { - "encrypted_string": { - "$in": [ - { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - }, - { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - ] - } - }, - "limit": 0 - } - ], - "ordered": true - }, - "command_name": "delete" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/delete.yml b/testdata/client-side-encryption/legacy/delete.yml deleted file mode 100644 index 60810d063d..0000000000 --- a/testdata/client-side-encryption/legacy/delete.yml +++ /dev/null @@ -1,91 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - &doc1_encrypted { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "deleteOne with deterministic encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: deleteOne - arguments: - filter: { encrypted_string: "string0" } - result: - deletedCount: 1 - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - delete: *collection_name - deletes: - - q: { encrypted_string: { $eq: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } } - limit: 1 - ordered: true - command_name: delete - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc1_encrypted - - description: "deleteMany with deterministic encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: deleteMany - arguments: - filter: { encrypted_string: { $in: [ "string0", "string1" ] } } - result: - deletedCount: 2 - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - delete: *collection_name - deletes: - - q: { encrypted_string: { $in : [ {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}}, {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} ] } } - limit: 0 - ordered: true - command_name: delete - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: [] \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/distinct.json b/testdata/client-side-encryption/legacy/distinct.json deleted file mode 100644 index 9786b07814..0000000000 --- a/testdata/client-side-encryption/legacy/distinct.json +++ /dev/null @@ -1,276 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 3, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "distinct with deterministic encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "distinct", - "arguments": { - "filter": { - "encrypted_string": "string0" - }, - "fieldName": "encrypted_string" - }, - "result": [ - "string0" - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "distinct": "default", - "key": "encrypted_string", - "query": { - "encrypted_string": { - "$eq": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - } - }, - "command_name": "distinct" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 3, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "Distinct fails when filtering on a random encrypted field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "distinct", - "arguments": { - "filter": { - "random": "abc" - }, - "fieldName": "encrypted_string" - }, - "result": { - "errorContains": "Cannot query on fields encrypted with the randomized encryption" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/distinct.yml b/testdata/client-side-encryption/legacy/distinct.yml deleted file mode 100644 index ca1d8fbf6b..0000000000 --- a/testdata/client-side-encryption/legacy/distinct.yml +++ /dev/null @@ -1,66 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - &doc1_encrypted { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - &doc2_encrypted { _id: 3, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "distinct with deterministic encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: distinct - arguments: - filter: { encrypted_string: "string0" } - fieldName: "encrypted_string" - result: - - "string0" - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - distinct: *collection_name - key: encrypted_string - query: { encrypted_string: {$eq: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } } - command_name: distinct - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - *doc1_encrypted - - *doc2_encrypted - - description: "Distinct fails when filtering on a random encrypted field" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment - operations: - - name: distinct - arguments: - filter: { random: "abc" } - fieldName: "encrypted_string" - result: - errorContains: "Cannot query on fields encrypted with the randomized encryption" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/explain.json b/testdata/client-side-encryption/legacy/explain.json deleted file mode 100644 index 8ca3b48d37..0000000000 --- a/testdata/client-side-encryption/legacy/explain.json +++ /dev/null @@ -1,239 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Explain a find with deterministic encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "runCommand", - "object": "database", - "command_name": "explain", - "arguments": { - "command": { - "explain": { - "find": "default", - "filter": { - "encrypted_string": "string1" - } - } - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "explain": { - "find": "default", - "filter": { - "encrypted_string": { - "$eq": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - } - }, - "verbosity": "allPlansExecution" - }, - "command_name": "explain" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/explain.yml b/testdata/client-side-encryption/legacy/explain.yml deleted file mode 100644 index 325928a72e..0000000000 --- a/testdata/client-side-encryption/legacy/explain.yml +++ /dev/null @@ -1,57 +0,0 @@ -runOn: - - minServerVersion: "7.0.0" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - &doc1_encrypted { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Explain a find with deterministic encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: runCommand - object: database - command_name: explain - arguments: - command: - explain: - find: *collection_name - filter: { encrypted_string : "string1" } - - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - explain: - find: *collection_name - filter: - { encrypted_string: { $eq: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } } - verbosity: "allPlansExecution" - command_name: explain - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - *doc1_encrypted \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/find.json b/testdata/client-side-encryption/legacy/find.json deleted file mode 100644 index 1feddab0e3..0000000000 --- a/testdata/client-side-encryption/legacy/find.json +++ /dev/null @@ -1,408 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - }, - "random": { - "$binary": { - "base64": "AgAAAAAAAAAAAAAAAAAAAAACyfp+lXvKOi7f5vh6ZsCijLEaXFKq1X06RmyS98ZvmMQGixTw8HM1f/bGxZjGwvYwjXOkIEb7Exgb8p2KCDI5TQ==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Find with deterministic encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": "string0" - } - }, - "result": [ - { - "_id": 1, - "encrypted_string": "string0" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "encrypted_string": { - "$eq": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - }, - "random": { - "$binary": { - "base64": "AgAAAAAAAAAAAAAAAAAAAAACyfp+lXvKOi7f5vh6ZsCijLEaXFKq1X06RmyS98ZvmMQGixTw8HM1f/bGxZjGwvYwjXOkIEb7Exgb8p2KCDI5TQ==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "Find with $in with deterministic encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "encrypted_string": { - "$in": [ - "string0", - "string1" - ] - } - } - }, - "result": [ - { - "_id": 1, - "encrypted_string": "string0" - }, - { - "_id": 2, - "encrypted_string": "string1", - "random": "abc" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "encrypted_string": { - "$in": [ - { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - }, - { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - ] - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - }, - "random": { - "$binary": { - "base64": "AgAAAAAAAAAAAAAAAAAAAAACyfp+lXvKOi7f5vh6ZsCijLEaXFKq1X06RmyS98ZvmMQGixTw8HM1f/bGxZjGwvYwjXOkIEb7Exgb8p2KCDI5TQ==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "Find fails when filtering on a random encrypted field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "random": "abc" - } - }, - "result": { - "errorContains": "Cannot query on fields encrypted with the randomized encryption" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/find.yml b/testdata/client-side-encryption/legacy/find.yml deleted file mode 100644 index 20179a314c..0000000000 --- a/testdata/client-side-encryption/legacy/find.yml +++ /dev/null @@ -1,105 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - &doc1_encrypted { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} , random: {'$binary': {'base64': 'AgAAAAAAAAAAAAAAAAAAAAACyfp+lXvKOi7f5vh6ZsCijLEaXFKq1X06RmyS98ZvmMQGixTw8HM1f/bGxZjGwvYwjXOkIEb7Exgb8p2KCDI5TQ==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Find with deterministic encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: find - arguments: - filter: - { encrypted_string: "string0" } - result: - - &doc0 { _id: 1, encrypted_string: "string0" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - find: *collection_name - filter: - { encrypted_string: { $eq: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } } - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - *doc1_encrypted - - description: "Find with $in with deterministic encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: find - arguments: - filter: - { encrypted_string: { $in: [ "string0", "string1" ] } } - result: - - { _id: 1, encrypted_string: "string0" } - - &doc1 { _id: 2, encrypted_string: "string1", random: "abc" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - find: *collection_name - filter: - # Note, the values are re-ordered, but this is logically equivalent. - { encrypted_string: { $in: [ {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}}, {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} ] } } - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - *doc1_encrypted - - description: "Find fails when filtering on a random encrypted field" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment - operations: - - name: find - arguments: - filter: { random: "abc" } - result: - errorContains: "Cannot query on fields encrypted with the randomized encryption" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/findOneAndDelete.json b/testdata/client-side-encryption/legacy/findOneAndDelete.json deleted file mode 100644 index e418a4581b..0000000000 --- a/testdata/client-side-encryption/legacy/findOneAndDelete.json +++ /dev/null @@ -1,221 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "findOneAndDelete with deterministic encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "encrypted_string": "string0" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default", - "query": { - "encrypted_string": { - "$eq": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - }, - "remove": true - }, - "command_name": "findAndModify" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/findOneAndDelete.yml b/testdata/client-side-encryption/legacy/findOneAndDelete.yml deleted file mode 100644 index 6650f2132d..0000000000 --- a/testdata/client-side-encryption/legacy/findOneAndDelete.yml +++ /dev/null @@ -1,50 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - &doc1_encrypted { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "findOneAndDelete with deterministic encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: findOneAndDelete - arguments: - filter: - { encrypted_string: "string0" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - findAndModify: *collection_name - query: - { encrypted_string: { $eq: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } } - remove: true - command_name: findAndModify - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc1_encrypted \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/findOneAndReplace.json b/testdata/client-side-encryption/legacy/findOneAndReplace.json deleted file mode 100644 index 78baca8432..0000000000 --- a/testdata/client-side-encryption/legacy/findOneAndReplace.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "findOneAndReplace with deterministic encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "encrypted_string": "string0" - }, - "replacement": { - "encrypted_string": "string1" - }, - "returnDocument": "Before" - }, - "result": { - "_id": 1, - "encrypted_string": "string0" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default", - "query": { - "encrypted_string": { - "$eq": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - }, - "update": { - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - }, - "command_name": "findAndModify" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/findOneAndReplace.yml b/testdata/client-side-encryption/legacy/findOneAndReplace.yml deleted file mode 100644 index f39f3c0fb4..0000000000 --- a/testdata/client-side-encryption/legacy/findOneAndReplace.yml +++ /dev/null @@ -1,50 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "findOneAndReplace with deterministic encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: findOneAndReplace - arguments: - filter: { encrypted_string: "string0" } - replacement: { encrypted_string: "string1" } - returnDocument: Before - result: { _id: 1, encrypted_string: "string0" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - findAndModify: *collection_name - query: { encrypted_string: { $eq: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } } - update: { encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } - command_name: findAndModify - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/findOneAndUpdate.json b/testdata/client-side-encryption/legacy/findOneAndUpdate.json deleted file mode 100644 index 1d85851151..0000000000 --- a/testdata/client-side-encryption/legacy/findOneAndUpdate.json +++ /dev/null @@ -1,231 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "findOneAndUpdate with deterministic encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "encrypted_string": "string0" - }, - "update": { - "$set": { - "encrypted_string": "string1" - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 1, - "encrypted_string": "string0" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default", - "query": { - "encrypted_string": { - "$eq": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - }, - "update": { - "$set": { - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - } - }, - "command_name": "findAndModify" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/findOneAndUpdate.yml b/testdata/client-side-encryption/legacy/findOneAndUpdate.yml deleted file mode 100644 index 459902fd44..0000000000 --- a/testdata/client-side-encryption/legacy/findOneAndUpdate.yml +++ /dev/null @@ -1,50 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "findOneAndUpdate with deterministic encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: findOneAndUpdate - arguments: - filter: { encrypted_string: "string0" } - update: { $set: { encrypted_string: "string1" } } - returnDocument: Before - result: { _id: 1, encrypted_string: "string0" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - findAndModify: *collection_name - query: { encrypted_string: { $eq: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } } - update: { $set: { encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } } - command_name: findAndModify - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-BypassQueryAnalysis.json b/testdata/client-side-encryption/legacy/fle2v2-BypassQueryAnalysis.json deleted file mode 100644 index 9b28df2f9a..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-BypassQueryAnalysis.json +++ /dev/null @@ -1,261 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "BypassQueryAnalysis decrypts", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "bypassQueryAnalysis": true - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedIndexed": { - "$binary": { - "base64": "C18BAAAFZAAgAAAAANnt+eLTkv4GdDPl8IAfJOvTzArOgFJQ2S/DcLza4W0DBXMAIAAAAAD2u+omZme3P2gBPehMQyQHQ153tPN1+z7bksYA9jKTpAVwADAAAAAAUnCOQqIvmR65YKyYnsiVfVrg9hwUVO3RhhKExo3RWOzgaS0QdsBL5xKFS0JhZSoWBXUAEAAAAAQSNFZ4EjSYdhI0EjRWeJASEHQAAgAAAAV2AFAAAAAAEjRWeBI0mHYSNBI0VniQEpQbp/ZJpWBKeDtKLiXb0P2E9wvc0g3f373jnYQYlJquOrlPOoEy3ngsHPJuSUijvWDsrQzqYa349K7G/66qaXEFZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsBWwAIAAAAACkm0o9bj6j0HuADKc0svbqO2UHj6GrlNdF6yKNxh63xRJrAAAAAAAAAAAAAA==", - "subType": "06" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1, - "encryptedIndexed": "123" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedIndexed": { - "$binary": { - "base64": "C18BAAAFZAAgAAAAANnt+eLTkv4GdDPl8IAfJOvTzArOgFJQ2S/DcLza4W0DBXMAIAAAAAD2u+omZme3P2gBPehMQyQHQ153tPN1+z7bksYA9jKTpAVwADAAAAAAUnCOQqIvmR65YKyYnsiVfVrg9hwUVO3RhhKExo3RWOzgaS0QdsBL5xKFS0JhZSoWBXUAEAAAAAQSNFZ4EjSYdhI0EjRWeJASEHQAAgAAAAV2AFAAAAAAEjRWeBI0mHYSNBI0VniQEpQbp/ZJpWBKeDtKLiXb0P2E9wvc0g3f373jnYQYlJquOrlPOoEy3ngsHPJuSUijvWDsrQzqYa349K7G/66qaXEFZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsBWwAIAAAAACkm0o9bj6j0HuADKc0svbqO2UHj6GrlNdF6yKNxh63xRJrAAAAAAAAAAAAAA==", - "subType": "06" - } - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "31eCYlbQoVboc5zwC8IoyJVSkag9PxREka8dkmbXJeY=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-BypassQueryAnalysis.yml b/testdata/client-side-encryption/legacy/fle2v2-BypassQueryAnalysis.yml deleted file mode 100644 index 51e7a56758..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-BypassQueryAnalysis.yml +++ /dev/null @@ -1,89 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} -key_vault_data: [{'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] - -tests: - - description: "BypassQueryAnalysis decrypts" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - bypassQueryAnalysis: true - operations: - - name: insertOne - arguments: - document: &doc0_encrypted { - "_id": 1, - "encryptedIndexed": { - "$binary": { - # Payload has an IndexKey of key1 and UserKey of key1. - "base64": "C18BAAAFZAAgAAAAANnt+eLTkv4GdDPl8IAfJOvTzArOgFJQ2S/DcLza4W0DBXMAIAAAAAD2u+omZme3P2gBPehMQyQHQ153tPN1+z7bksYA9jKTpAVwADAAAAAAUnCOQqIvmR65YKyYnsiVfVrg9hwUVO3RhhKExo3RWOzgaS0QdsBL5xKFS0JhZSoWBXUAEAAAAAQSNFZ4EjSYdhI0EjRWeJASEHQAAgAAAAV2AFAAAAAAEjRWeBI0mHYSNBI0VniQEpQbp/ZJpWBKeDtKLiXb0P2E9wvc0g3f373jnYQYlJquOrlPOoEy3ngsHPJuSUijvWDsrQzqYa349K7G/66qaXEFZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsBWwAIAAAAACkm0o9bj6j0HuADKc0svbqO2UHj6GrlNdF6yKNxh63xRJrAAAAAAAAAAAAAA==", - "subType": "06" - } - } - } - - name: find - arguments: - filter: { "_id": 1 } - result: [{"_id": 1, "encryptedIndexed": "123" }] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - insert: *collection_name - documents: - - *doc0_encrypted - ordered: true - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: { "_id": 1 } - command_name: find - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - outcome: - collection: - data: - - {"_id": 1, "encryptedIndexed": { "$$type": "binData" }, "__safeContent__": [{ "$binary" : { "base64" : "31eCYlbQoVboc5zwC8IoyJVSkag9PxREka8dkmbXJeY=", "subType" : "00" } }] } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Compact.json b/testdata/client-side-encryption/legacy/fle2v2-Compact.json deleted file mode 100644 index 868095e1e6..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Compact.json +++ /dev/null @@ -1,233 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - }, - { - "_id": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "HBk9BWihXExNDvTp1lUxOuxuZK2Pe2ZdVdlsxPEBkiO1bS4mG5NNDsQ7zVxJAH8BtdOYp72Ku4Y3nwc0BUpIKsvAKX4eYXtlhv5zUQxWdeNFhg9qK7qb8nqhnnLeT0f25jFSqzWJoT379hfwDeu0bebJHr35QrJ8myZdPMTEDYF08QYQ48ShRBli0S+QzBHHAQiM2iJNr4svg2WR8JSeWQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Compact works", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "runCommand", - "object": "database", - "command_name": "compactStructuredEncryptionData", - "arguments": { - "command": { - "compactStructuredEncryptionData": "default" - } - }, - "result": { - "ok": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "compactStructuredEncryptionData": "default", - "compactionTokens": { - "encryptedIndexed": { - "$binary": { - "base64": "noN+05JsuO1oDg59yypIGj45i+eFH6HOTXOPpeZ//Mk=", - "subType": "00" - } - }, - "encryptedUnindexed": { - "$binary": { - "base64": "SWO8WEoZ2r2Kx/muQKb7+COizy85nIIUFiHh4K9kcvA=", - "subType": "00" - } - } - } - }, - "command_name": "compactStructuredEncryptionData" - } - } - ] - }, - { - "description": "Compact errors on an unencrypted client", - "operations": [ - { - "name": "runCommand", - "object": "database", - "command_name": "compactStructuredEncryptionData", - "arguments": { - "command": { - "compactStructuredEncryptionData": "default" - } - }, - "result": { - "errorContains": "'compactStructuredEncryptionData.compactionTokens' is missing" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Compact.yml b/testdata/client-side-encryption/legacy/fle2v2-Compact.yml deleted file mode 100644 index 6c1965a5a2..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Compact.yml +++ /dev/null @@ -1,84 +0,0 @@ -# Requires libmongocrypt 1.8.0. libmongocrypt 1.10.0 has a bug (MONGOCRYPT-699) that may cause this test to fail on server version 7. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}}, {'_id': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'HBk9BWihXExNDvTp1lUxOuxuZK2Pe2ZdVdlsxPEBkiO1bS4mG5NNDsQ7zVxJAH8BtdOYp72Ku4Y3nwc0BUpIKsvAKX4eYXtlhv5zUQxWdeNFhg9qK7qb8nqhnnLeT0f25jFSqzWJoT379hfwDeu0bebJHr35QrJ8myZdPMTEDYF08QYQ48ShRBli0S+QzBHHAQiM2iJNr4svg2WR8JSeWQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Compact works" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: runCommand - object: database - command_name: compactStructuredEncryptionData - arguments: - command: - compactStructuredEncryptionData: *collection_name - result: - ok: 1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, - {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - compactStructuredEncryptionData: *collection_name - compactionTokens: { - "encryptedIndexed": { - "$binary": { - "base64": "noN+05JsuO1oDg59yypIGj45i+eFH6HOTXOPpeZ//Mk=", - "subType": "00" - } - }, - "encryptedUnindexed": { - "$binary": { - "base64": "SWO8WEoZ2r2Kx/muQKb7+COizy85nIIUFiHh4K9kcvA=", - "subType": "00" - } - } - } - command_name: compactStructuredEncryptionData - - description: "Compact errors on an unencrypted client" - operations: - - name: runCommand - object: database - command_name: compactStructuredEncryptionData - arguments: - command: - compactStructuredEncryptionData: *collection_name - result: - errorContains: "'compactStructuredEncryptionData.compactionTokens' is missing" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-CreateCollection-OldServer.json b/testdata/client-side-encryption/legacy/fle2v2-CreateCollection-OldServer.json deleted file mode 100644 index c266aa6b83..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-CreateCollection-OldServer.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "6.0.0", - "maxServerVersion": "6.3.99", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "tests": [ - { - "description": "driver returns an error if creating a QEv2 collection on unsupported server", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - }, - "result": { - "errorContains": "Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption." - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.esc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecoc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-CreateCollection-OldServer.yml b/testdata/client-side-encryption/legacy/fle2v2-CreateCollection-OldServer.yml deleted file mode 100644 index 5cc6ead0f6..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-CreateCollection-OldServer.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "6.0.0" - maxServerVersion: "6.3.99" - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] - -database_name: &database_name "default" -collection_name: &collection_name "default" - -tests: - - description: "driver returns an error if creating a QEv2 collection on unsupported server" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - encryptedFieldsMap: - default.encryptedCollection: { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { "$binary": { "base64": "AAAAAAAAAAAAAAAAAAAAAA==", "subType": "04" }} - } - ] - } - - operations: - # Do an initial drop to remove collections that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - result: - errorContains: "Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption." - # Assert no collections were created. - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: &esc_collection_name "enxcol_.encryptedCollection.esc" - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: &ecc_collection_name "enxcol_.encryptedCollection.ecc" - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: &ecoc_collection_name "enxcol_.encryptedCollection.ecoc" - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: encryptedCollection diff --git a/testdata/client-side-encryption/legacy/fle2v2-CreateCollection.json b/testdata/client-side-encryption/legacy/fle2v2-CreateCollection.json deleted file mode 100644 index c324be8abc..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-CreateCollection.json +++ /dev/null @@ -1,1758 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "tests": [ - { - "description": "state collections and index are created", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.esc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecoc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection", - "index": "__safeContent___1" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.esc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.ecoc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "encryptedCollection" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.esc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.ecoc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "createIndexes": "encryptedCollection", - "indexes": [ - { - "name": "__safeContent___1", - "key": { - "__safeContent__": 1 - } - } - ] - }, - "command_name": "createIndexes", - "database_name": "default" - } - } - ] - }, - { - "description": "default state collection names are applied", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.esc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecoc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection", - "index": "__safeContent___1" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.esc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.ecoc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "encryptedCollection" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.esc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.ecoc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "createIndexes": "encryptedCollection", - "indexes": [ - { - "name": "__safeContent___1", - "key": { - "__safeContent__": 1 - } - } - ] - }, - "command_name": "createIndexes", - "database_name": "default" - } - } - ] - }, - { - "description": "drop removes all state collections", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.esc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecoc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection", - "index": "__safeContent___1" - } - }, - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecoc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - }, - { - "name": "assertIndexNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection", - "index": "__safeContent___1" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.esc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.ecoc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "encryptedCollection" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.esc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.ecoc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "createIndexes": "encryptedCollection", - "indexes": [ - { - "name": "__safeContent___1", - "key": { - "__safeContent__": 1 - } - } - ] - }, - "command_name": "createIndexes", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.esc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.ecoc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "encryptedCollection" - }, - "command_name": "drop", - "database_name": "default" - } - } - ] - }, - { - "description": "CreateCollection without encryptedFields.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "plaintextCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "plaintextCollection" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "plaintextCollection" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "plaintextCollection" - } - }, - "command_name": "listCollections", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "plaintextCollection" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "plaintextCollection" - }, - "command_name": "create", - "database_name": "default" - } - } - ] - }, - { - "description": "CreateCollection from encryptedFieldsMap.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.esc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecoc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection", - "index": "__safeContent___1" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.esc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.ecoc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "encryptedCollection" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.esc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.ecoc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "createIndexes": "encryptedCollection", - "indexes": [ - { - "name": "__safeContent___1", - "key": { - "__safeContent__": 1 - } - } - ] - }, - "command_name": "createIndexes", - "database_name": "default" - } - } - ] - }, - { - "description": "CreateCollection from encryptedFields.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.esc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecoc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection", - "index": "__safeContent___1" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.esc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.ecoc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "encryptedCollection" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.esc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.ecoc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "encryptedCollection" - } - }, - "command_name": "listCollections", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "createIndexes": "encryptedCollection", - "indexes": [ - { - "name": "__safeContent___1", - "key": { - "__safeContent__": 1 - } - } - ] - }, - "command_name": "createIndexes", - "database_name": "default" - } - } - ] - }, - { - "description": "DropCollection from encryptedFieldsMap", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.esc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.ecoc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "encryptedCollection" - }, - "command_name": "drop", - "database_name": "default" - } - } - ] - }, - { - "description": "DropCollection from encryptedFields", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "encryptedFieldsMap": {} - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.esc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecoc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection", - "index": "__safeContent___1" - } - }, - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.esc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecoc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.esc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.ecoc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "encryptedCollection" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.esc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.ecoc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "encryptedCollection" - } - }, - "command_name": "listCollections", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "createIndexes": "encryptedCollection", - "indexes": [ - { - "name": "__safeContent___1", - "key": { - "__safeContent__": 1 - } - } - ] - }, - "command_name": "createIndexes", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.esc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.ecoc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "encryptedCollection" - }, - "command_name": "drop", - "database_name": "default" - } - } - ] - }, - { - "description": "DropCollection from remote encryptedFields", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "encryptedFieldsMap": {} - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.esc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecoc" - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection", - "index": "__safeContent___1" - } - }, - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.esc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "enxcol_.encryptedCollection.ecoc" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.esc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.ecoc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "encryptedCollection" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.esc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "enxcol_.encryptedCollection.ecoc", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "create": "encryptedCollection", - "encryptedFields": { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - }, - "command_name": "create", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "encryptedCollection" - } - }, - "command_name": "listCollections", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "createIndexes": "encryptedCollection", - "indexes": [ - { - "name": "__safeContent___1", - "key": { - "__safeContent__": 1 - } - } - ] - }, - "command_name": "createIndexes", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "encryptedCollection" - } - }, - "command_name": "listCollections", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.esc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "enxcol_.encryptedCollection.ecoc" - }, - "command_name": "drop", - "database_name": "default" - } - }, - { - "command_started_event": { - "command": { - "drop": "encryptedCollection" - }, - "command_name": "drop", - "database_name": "default" - } - } - ] - }, - { - "description": "encryptedFields are consulted for metadata collection names", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "escCollection": "invalid_esc_name", - "ecocCollection": "invalid_ecoc_name", - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { - "$binary": { - "subType": "04", - "base64": "AAAAAAAAAAAAAAAAAAAAAA==" - } - } - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - }, - "result": { - "errorContains": "Encrypted State Collection name should follow" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-CreateCollection.yml b/testdata/client-side-encryption/legacy/fle2v2-CreateCollection.yml deleted file mode 100644 index 43dbccfc37..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-CreateCollection.yml +++ /dev/null @@ -1,937 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] - -database_name: &database_name "default" -collection_name: &collection_name "default" - -tests: - - description: "state collections and index are created" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - encryptedFieldsMap: - default.encryptedCollection: &encrypted_fields { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { "$binary": { "subType": "04", "base64": "AAAAAAAAAAAAAAAAAAAAAA==" }} - } - ] - } - - operations: - # Do an initial drop to remove collections that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: &encrypted_collection_name "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: *encrypted_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: &esc_collection_name "enxcol_.encryptedCollection.esc" - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: &ecc_collection_name "enxcol_.encryptedCollection.ecc" - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: &ecoc_collection_name "enxcol_.encryptedCollection.ecoc" - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - - name: assertIndexExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - index: __safeContent___1 - - expectations: - # events from dropCollection ... begin - - command_started_event: - command: - drop: *esc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *ecoc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *encrypted_collection_name - command_name: drop - database_name: *database_name - # events from dropCollection ... end - # events from createCollection ... begin - # State collections are created first. - - command_started_event: - command: - create: *esc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - - command_started_event: - command: - create: *ecoc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - # Data collection is created after. - - command_started_event: - command: - create: *encrypted_collection_name - encryptedFields: &encrypted_fields_expectation { - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { "$binary": { "subType": "04", "base64": "AAAAAAAAAAAAAAAAAAAAAA==" }} - } - ] - } - command_name: create - database_name: *database_name - # Index on __safeContents__ is then created. - - command_started_event: - command: - createIndexes: *encrypted_collection_name - indexes: - - name: __safeContent___1 - key: { __safeContent__: 1 } - command_name: createIndexes - database_name: *database_name - # events from createCollection ... end - - description: "default state collection names are applied" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - encryptedFieldsMap: - default.encryptedCollection: *encrypted_fields - - operations: - # Do an initial drop to remove collections that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: *encrypted_collection_name - - name: createCollection - object: database - arguments: - collection: *encrypted_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *esc_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *ecc_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *ecoc_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - - name: assertIndexExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - index: __safeContent___1 - - expectations: - # events from dropCollection ... begin - - command_started_event: - command: - drop: *esc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *ecoc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *encrypted_collection_name - command_name: drop - database_name: *database_name - # events from dropCollection ... end - # events from createCollection ... begin - # State collections are created first. - - command_started_event: - command: - create: *esc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - - command_started_event: - command: - create: *ecoc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - # Data collection is created after. - - command_started_event: - command: - create: *encrypted_collection_name - encryptedFields: *encrypted_fields_expectation - command_name: create - database_name: *database_name - # Index on __safeContents__ is then created. - - command_started_event: - command: - createIndexes: *encrypted_collection_name - indexes: - - name: __safeContent___1 - key: { __safeContent__: 1 } - command_name: createIndexes - database_name: *database_name - # events from createCollection ... end - - description: "drop removes all state collections" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - encryptedFieldsMap: - default.encryptedCollection: *encrypted_fields - - operations: - # Do an initial drop to remove collections that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: *encrypted_collection_name - - name: createCollection - object: database - arguments: - collection: *encrypted_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *esc_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *ecc_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *ecoc_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - - name: assertIndexExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - index: __safeContent___1 - - name: dropCollection - object: database - arguments: - collection: *encrypted_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *ecoc_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - - name: assertIndexNotExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - index: __safeContent___1 - - expectations: - # events from dropCollection ... begin - - command_started_event: - command: - drop: *esc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *ecoc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *encrypted_collection_name - command_name: drop - database_name: *database_name - # events from dropCollection ... end - # events from createCollection ... begin - # State collections are created first. - - command_started_event: - command: - create: *esc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - - command_started_event: - command: - create: *ecoc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - # Data collection is created after. - - command_started_event: - command: - create: *encrypted_collection_name - encryptedFields: *encrypted_fields - command_name: create - database_name: *database_name - # Index on __safeContents__ is then created. - - command_started_event: - command: - createIndexes: *encrypted_collection_name - indexes: - - name: __safeContent___1 - key: { __safeContent__: 1 } - command_name: createIndexes - database_name: *database_name - # events from createCollection ... end - # events from dropCollection ... begin - - command_started_event: - command: - drop: *esc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *ecoc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *encrypted_collection_name - command_name: drop - database_name: *database_name - # events from dropCollection ... end - - description: "CreateCollection without encryptedFields." - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - encryptedFieldsMap: - default.encryptedCollection: *encrypted_fields - operations: - # Do an initial drop to remove collections that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "plaintextCollection" - - name: createCollection - object: database - arguments: - collection: "plaintextCollection" - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: "plaintextCollection" - - expectations: - # events from dropCollection ... begin - # expect listCollections to be sent on drop to check for remote encryptedFields. - - command_started_event: - command: - listCollections: 1 - filter: { name: "plaintextCollection" } - command_name: listCollections - database_name: *database_name - - command_started_event: - command: - drop: "plaintextCollection" - command_name: drop - database_name: *database_name - # events from dropCollection ... end - - command_started_event: - command: - create: "plaintextCollection" - command_name: create - database_name: *database_name - - description: "CreateCollection from encryptedFieldsMap." - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - encryptedFieldsMap: - default.encryptedCollection: *encrypted_fields - operations: - # Do an initial drop to remove collections that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: *encrypted_collection_name - - name: createCollection - object: database - arguments: - collection: *encrypted_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *esc_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *ecc_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *ecoc_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - - name: assertIndexExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - index: __safeContent___1 - - expectations: - # events from dropCollection ... begin - - command_started_event: - command: - drop: *esc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *ecoc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *encrypted_collection_name - command_name: drop - database_name: *database_name - # events from dropCollection ... end - # events from createCollection ... begin - # State collections are created first. - - command_started_event: - command: - create: *esc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - - command_started_event: - command: - create: *ecoc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - # Data collection is created after. - - command_started_event: - command: - create: *encrypted_collection_name - encryptedFields: *encrypted_fields_expectation - command_name: create - database_name: *database_name - # Index on __safeContents__ is then created. - - command_started_event: - command: - createIndexes: *encrypted_collection_name - indexes: - - name: __safeContent___1 - key: { __safeContent__: 1 } - command_name: createIndexes - database_name: *database_name - # events from createCollection ... end - - description: "CreateCollection from encryptedFields." - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - # Do initial drops to remove collections that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: *encrypted_collection_name - encryptedFields: *encrypted_fields - - name: createCollection - object: database - arguments: - collection: *encrypted_collection_name - encryptedFields: *encrypted_fields - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *esc_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *ecc_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *ecoc_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - - name: assertIndexExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - index: __safeContent___1 - - expectations: - # events from dropCollection ... begin - - command_started_event: - command: - drop: *esc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *ecoc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *encrypted_collection_name - command_name: drop - database_name: *database_name - # events from dropCollection ... end - # events from createCollection ... begin - # State collections are created first. - - command_started_event: - command: - create: *esc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - - command_started_event: - command: - create: *ecoc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - # Data collection is created after. - - command_started_event: - command: - create: *encrypted_collection_name - encryptedFields: *encrypted_fields_expectation - command_name: create - database_name: *database_name - # libmongocrypt requests listCollections to get a schema for the "createIndexes" command. - - command_started_event: - command: - listCollections: 1 - filter: { name: *encrypted_collection_name } - command_name: listCollections - database_name: *database_name - # Index on __safeContents__ is then created. - - command_started_event: - command: - createIndexes: *encrypted_collection_name - indexes: - - name: __safeContent___1 - key: { __safeContent__: 1 } - command_name: createIndexes - database_name: *database_name - # events from createCollection ... end - - - description: "DropCollection from encryptedFieldsMap" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - encryptedFieldsMap: - default.encryptedCollection: *encrypted_fields - operations: - - name: dropCollection - object: database - arguments: - collection: *encrypted_collection_name - expectations: - # events from dropCollection ... begin - - command_started_event: - command: - drop: *esc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *ecoc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *encrypted_collection_name - command_name: drop - database_name: *database_name - # events from dropCollection ... end - - description: "DropCollection from encryptedFields" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - encryptedFieldsMap: {} - operations: - # Do initial drops to remove collections that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: *encrypted_collection_name - encryptedFields: *encrypted_fields - - name: createCollection - object: database - arguments: - collection: *encrypted_collection_name - encryptedFields: *encrypted_fields - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *esc_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *ecc_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *ecoc_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - - name: assertIndexExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - index: __safeContent___1 - - name: dropCollection - object: database - arguments: - collection: *encrypted_collection_name - encryptedFields: *encrypted_fields - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *esc_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *ecoc_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - expectations: - # events from dropCollection ... begin - - command_started_event: - command: - drop: *esc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *ecoc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *encrypted_collection_name - command_name: drop - database_name: *database_name - # events from dropCollection ... end - # events from createCollection ... begin - - command_started_event: - command: - create: *esc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - - command_started_event: - command: - create: *ecoc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - - command_started_event: - command: - create: *encrypted_collection_name - encryptedFields: *encrypted_fields_expectation - command_name: create - database_name: *database_name - # libmongocrypt requests listCollections to get a schema for the "createIndexes" command. - - command_started_event: - command: - listCollections: 1 - filter: { name: *encrypted_collection_name } - command_name: listCollections - database_name: *database_name - # Index on __safeContents__ is then created. - - command_started_event: - command: - createIndexes: *encrypted_collection_name - indexes: - - name: __safeContent___1 - key: { __safeContent__: 1 } - command_name: createIndexes - database_name: *database_name - # events from createCollection ... end - # events from dropCollection ... begin - - command_started_event: - command: - drop: *esc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *ecoc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *encrypted_collection_name - command_name: drop - database_name: *database_name - # events from dropCollection ... end - - - description: "DropCollection from remote encryptedFields" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - encryptedFieldsMap: {} - - operations: - # Do initial drops to remove collections that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: *encrypted_collection_name - encryptedFields: *encrypted_fields - - name: createCollection - object: database - arguments: - collection: *encrypted_collection_name - encryptedFields: *encrypted_fields - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *esc_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *ecc_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *ecoc_collection_name - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - - name: assertIndexExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - index: __safeContent___1 - - name: dropCollection - object: database - arguments: - collection: *encrypted_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *esc_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *ecoc_collection_name - # ecc collection is no longer created for QEv2 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *encrypted_collection_name - - expectations: - # events from dropCollection ... begin - - command_started_event: - command: - drop: *esc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *ecoc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *encrypted_collection_name - command_name: drop - database_name: *database_name - # events from dropCollection ... end - # events from createCollection ... begin - - command_started_event: - command: - create: *esc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - - command_started_event: - command: - create: *ecoc_collection_name - clusteredIndex: {key: {_id: 1}, unique: true} - command_name: create - database_name: *database_name - - command_started_event: - command: - create: *encrypted_collection_name - encryptedFields: *encrypted_fields_expectation - command_name: create - database_name: *database_name - # libmongocrypt requests listCollections to get a schema for the "createIndexes" command. - - command_started_event: - command: - listCollections: 1 - filter: { name: *encrypted_collection_name } - command_name: listCollections - database_name: *database_name - # Index on __safeContents__ is then created. - - command_started_event: - command: - createIndexes: *encrypted_collection_name - indexes: - - name: __safeContent___1 - key: { __safeContent__: 1 } - command_name: createIndexes - database_name: *database_name - # events from createCollection ... end - # events from dropCollection ... begin - - command_started_event: - command: - listCollections: 1 - filter: { name: *encrypted_collection_name } - command_name: listCollections - database_name: *database_name - - command_started_event: - command: - drop: *esc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *ecoc_collection_name - command_name: drop - database_name: *database_name - - command_started_event: - command: - drop: *encrypted_collection_name - command_name: drop - database_name: *database_name - # events from dropCollection ... end - - description: "encryptedFields are consulted for metadata collection names" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - encryptedFieldsMap: - default.encryptedCollection: { - "escCollection": "invalid_esc_name", - "ecocCollection": "invalid_ecoc_name", - "fields": [ - { - "path": "firstName", - "bsonType": "string", - "keyId": { "$binary": { "subType": "04", "base64": "AAAAAAAAAAAAAAAAAAAAAA==" }} - } - ] - } - - operations: - # Do an initial drop to remove collections that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: *encrypted_collection_name - - name: createCollection - object: database - arguments: - collection: *encrypted_collection_name - result: - # Expect error due to server constraints added in SERVER-74069 - errorContains: "Encrypted State Collection name should follow" diff --git a/testdata/client-side-encryption/legacy/fle2v2-DecryptExistingData.json b/testdata/client-side-encryption/legacy/fle2v2-DecryptExistingData.json deleted file mode 100644 index 1fb4c1d1bc..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-DecryptExistingData.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encryptedUnindexed": { - "$binary": { - "base64": "BqvN76sSNJh2EjQSNFZ4kBICTQaVZPWgXp41I7mPV1rLFTtw1tXzjcdSEyxpKKqujlko5TeizkB9hHQ009dVY1+fgIiDcefh+eQrm3CkhQ==", - "subType": "06" - } - } - } - ], - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "HBk9BWihXExNDvTp1lUxOuxuZK2Pe2ZdVdlsxPEBkiO1bS4mG5NNDsQ7zVxJAH8BtdOYp72Ku4Y3nwc0BUpIKsvAKX4eYXtlhv5zUQxWdeNFhg9qK7qb8nqhnnLeT0f25jFSqzWJoT379hfwDeu0bebJHr35QrJ8myZdPMTEDYF08QYQ48ShRBli0S+QzBHHAQiM2iJNr4svg2WR8JSeWQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 decrypt of existing data succeeds", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1, - "encryptedUnindexed": "value123" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-DecryptExistingData.yml b/testdata/client-side-encryption/legacy/fle2v2-DecryptExistingData.yml deleted file mode 100644 index 952551ba3a..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-DecryptExistingData.yml +++ /dev/null @@ -1,66 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [ - &doc0 { - "_id": 1, - "encryptedUnindexed": { - "$binary": { - "base64": "BqvN76sSNJh2EjQSNFZ4kBICTQaVZPWgXp41I7mPV1rLFTtw1tXzjcdSEyxpKKqujlko5TeizkB9hHQ009dVY1+fgIiDcefh+eQrm3CkhQ==", - "subType": "06" - } - } - } -] -key_vault_data: [ {'_id': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'HBk9BWihXExNDvTp1lUxOuxuZK2Pe2ZdVdlsxPEBkiO1bS4mG5NNDsQ7zVxJAH8BtdOYp72Ku4Y3nwc0BUpIKsvAKX4eYXtlhv5zUQxWdeNFhg9qK7qb8nqhnnLeT0f25jFSqzWJoT379hfwDeu0bebJHr35QrJ8myZdPMTEDYF08QYQ48ShRBli0S+QzBHHAQiM2iJNr4svg2WR8JSeWQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}}] -tests: - - description: "FLE2 decrypt of existing data succeeds" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: find - arguments: - filter: { _id: 1 } - result: - [{ "_id": 1, "encryptedUnindexed": "value123" }] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: *collection_name - filter: { "_id": 1 } - command_name: find - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Delete.json b/testdata/client-side-encryption/legacy/fle2v2-Delete.json deleted file mode 100644 index ddfe57b00c..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Delete.json +++ /dev/null @@ -1,284 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Delete can query an FLE2 indexed field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedIndexed": "value123" - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "encryptedIndexed": "value123" - } - }, - "result": { - "deletedCount": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "delete": "default", - "deletes": [ - { - "q": { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPtVteJQAlgb2YMa/+7YWH00sbQPyt7L6Rb8OwBdMmL2BXMAIAAAAAAd44hgVKnEnTFlwNVC14oyc9OZOTspeymusqkRQj57nAVsACAAAAAAaZ9s3G+4znfxStxeOZwcZy1OhzjMGc5hjmdMN+b/w6kSY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "delete" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Delete.yml b/testdata/client-side-encryption/legacy/fle2v2-Delete.yml deleted file mode 100644 index 4e1a59c93f..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Delete.yml +++ /dev/null @@ -1,100 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Delete can query an FLE2 indexed field" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 {"_id": 1, "encryptedIndexed": "value123" } - - name: deleteOne - arguments: - filter: { "encryptedIndexed": "value123" } - result: - deletedCount: 1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - { "_id": 1, "encryptedIndexed": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - delete: *collection_name - deletes: - - { - "q": { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPtVteJQAlgb2YMa/+7YWH00sbQPyt7L6Rb8OwBdMmL2BXMAIAAAAAAd44hgVKnEnTFlwNVC14oyc9OZOTspeymusqkRQj57nAVsACAAAAAAaZ9s3G+4znfxStxeOZwcZy1OhzjMGc5hjmdMN+b/w6kSY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ordered: true - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: delete - outcome: - collection: - data: [] \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.json b/testdata/client-side-encryption/legacy/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.json deleted file mode 100644 index bdc5c99bc2..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "HBk9BWihXExNDvTp1lUxOuxuZK2Pe2ZdVdlsxPEBkiO1bS4mG5NNDsQ7zVxJAH8BtdOYp72Ku4Y3nwc0BUpIKsvAKX4eYXtlhv5zUQxWdeNFhg9qK7qb8nqhnnLeT0f25jFSqzWJoT379hfwDeu0bebJHr35QrJ8myZdPMTEDYF08QYQ48ShRBli0S+QzBHHAQiM2iJNr4svg2WR8JSeWQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "encryptedFieldsMap is preferred over remote encryptedFields", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "encryptedFieldsMap": { - "default.default": { - "fields": [] - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedUnindexed": { - "$binary": { - "base64": "BqvN76sSNJh2EjQSNFZ4kBICTQaVZPWgXp41I7mPV1rLFTtw1tXzjcdSEyxpKKqujlko5TeizkB9hHQ009dVY1+fgIiDcefh+eQrm3CkhQ==", - "subType": "06" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1, - "encryptedUnindexed": "value123" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedUnindexed": { - "$binary": { - "base64": "BqvN76sSNJh2EjQSNFZ4kBICTQaVZPWgXp41I7mPV1rLFTtw1tXzjcdSEyxpKKqujlko5TeizkB9hHQ009dVY1+fgIiDcefh+eQrm3CkhQ==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encryptedUnindexed": { - "$binary": { - "base64": "BqvN76sSNJh2EjQSNFZ4kBICTQaVZPWgXp41I7mPV1rLFTtw1tXzjcdSEyxpKKqujlko5TeizkB9hHQ009dVY1+fgIiDcefh+eQrm3CkhQ==", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.yml b/testdata/client-side-encryption/legacy/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.yml deleted file mode 100644 index 8767132e62..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.yml +++ /dev/null @@ -1,79 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'HBk9BWihXExNDvTp1lUxOuxuZK2Pe2ZdVdlsxPEBkiO1bS4mG5NNDsQ7zVxJAH8BtdOYp72Ku4Y3nwc0BUpIKsvAKX4eYXtlhv5zUQxWdeNFhg9qK7qb8nqhnnLeT0f25jFSqzWJoT379hfwDeu0bebJHr35QrJ8myZdPMTEDYF08QYQ48ShRBli0S+QzBHHAQiM2iJNr4svg2WR8JSeWQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}}] -tests: - - description: "encryptedFieldsMap is preferred over remote encryptedFields" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - encryptedFieldsMap: { - "default.default": { - "fields": [] - } - } - operations: - # EncryptedFieldsMap overrides remote encryptedFields. - # Automatic encryption does not occur on encryptedUnindexed. The value is validated on the server. - - name: insertOne - arguments: - document: &doc0 { - _id: 1, - encryptedUnindexed: { - "$binary": { - "base64": "BqvN76sSNJh2EjQSNFZ4kBICTQaVZPWgXp41I7mPV1rLFTtw1tXzjcdSEyxpKKqujlko5TeizkB9hHQ009dVY1+fgIiDcefh+eQrm3CkhQ==", - "subType": "06" - } - } - } - - name: find - arguments: - filter: { "_id": 1 } - result: [{"_id": 1, "encryptedUnindexed": "value123" }] - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - *doc0 - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: { "_id": 1} - command_name: find - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - outcome: - collection: - data: - - *doc0 \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-EncryptedFields-vs-jsonSchema.json b/testdata/client-side-encryption/legacy/fle2v2-EncryptedFields-vs-jsonSchema.json deleted file mode 100644 index 8e0c6dafa3..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-EncryptedFields-vs-jsonSchema.json +++ /dev/null @@ -1,300 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": { - "properties": {}, - "bsonType": "object" - }, - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "encryptedFields is preferred over jsonSchema", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedIndexed": "123" - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedIndexed": "123" - } - }, - "result": [ - { - "_id": 1, - "encryptedIndexed": "123" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPGmZcUzdE/FPILvRSyAScGvZparGI2y9rJ/vSBxgCujBXMAIAAAAACi1RjmndKqgnXy7xb22RzUbnZl1sOZRXPOC0KcJkAxmQVsACAAAAAApJtKPW4+o9B7gAynNLL26jtlB4+hq5TXResijcYet8USY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "31eCYlbQoVboc5zwC8IoyJVSkag9PxREka8dkmbXJeY=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-EncryptedFields-vs-jsonSchema.yml b/testdata/client-side-encryption/legacy/fle2v2-EncryptedFields-vs-jsonSchema.yml deleted file mode 100644 index 119da443fe..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-EncryptedFields-vs-jsonSchema.yml +++ /dev/null @@ -1,102 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -json_schema: { - "properties": {}, - "bsonType": "object" -} -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "encryptedFields is preferred over jsonSchema" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encryptedIndexed: "123" } - - name: find - arguments: - filter: { encryptedIndexed: "123" } - result: [*doc0] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 1, "encryptedIndexed": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPGmZcUzdE/FPILvRSyAScGvZparGI2y9rJ/vSBxgCujBXMAIAAAAACi1RjmndKqgnXy7xb22RzUbnZl1sOZRXPOC0KcJkAxmQVsACAAAAAApJtKPW4+o9B7gAynNLL26jtlB4+hq5TXResijcYet8USY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - } - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { "_id": 1, "encryptedIndexed": { $$type: "binData" }, "__safeContent__": [{ "$binary" : { "base64" : "31eCYlbQoVboc5zwC8IoyJVSkag9PxREka8dkmbXJeY=", "subType" : "00" } }] } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-EncryptedFieldsMap-defaults.json b/testdata/client-side-encryption/legacy/fle2v2-EncryptedFieldsMap-defaults.json deleted file mode 100644 index 1c0a057cad..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-EncryptedFieldsMap-defaults.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "key_vault_data": [], - "tests": [ - { - "description": "default state collections are applied to encryptionInformation", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "encryptedFieldsMap": { - "default.default": { - "fields": [] - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "foo": { - "$binary": { - "base64": "BYkAAAAFZAAgAAAAAE8KGPgq7h3n9nH5lfHcia8wtOTLwGkZNLBesb6PULqbBXMAIAAAAACq0558QyD3c3jkR5k0Zc9UpQK8ByhXhtn2d1xVQnuJ3AVjACAAAAAA1003zUWGwD4zVZ0KeihnZOthS3V6CEHUfnJZcIYHefISY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "foo": { - "$binary": { - "base64": "BYkAAAAFZAAgAAAAAE8KGPgq7h3n9nH5lfHcia8wtOTLwGkZNLBesb6PULqbBXMAIAAAAACq0558QyD3c3jkR5k0Zc9UpQK8ByhXhtn2d1xVQnuJ3AVjACAAAAAA1003zUWGwD4zVZ0KeihnZOthS3V6CEHUfnJZcIYHefISY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - ], - "encryptionInformation": { - "type": { - "$numberInt": "1" - }, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [] - } - } - }, - "ordered": true - }, - "command_name": "insert" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "foo": { - "$binary": { - "base64": "BYkAAAAFZAAgAAAAAE8KGPgq7h3n9nH5lfHcia8wtOTLwGkZNLBesb6PULqbBXMAIAAAAACq0558QyD3c3jkR5k0Zc9UpQK8ByhXhtn2d1xVQnuJ3AVjACAAAAAA1003zUWGwD4zVZ0KeihnZOthS3V6CEHUfnJZcIYHefISY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-EncryptedFieldsMap-defaults.yml b/testdata/client-side-encryption/legacy/fle2v2-EncryptedFieldsMap-defaults.yml deleted file mode 100644 index ec91ebf1ca..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-EncryptedFieldsMap-defaults.yml +++ /dev/null @@ -1,58 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -key_vault_data: [] -tests: - - description: "default state collections are applied to encryptionInformation" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - encryptedFieldsMap: &efm { - "default.default": { - "fields": [] - } - } - operations: - - name: insertOne - arguments: - document: &doc0 { - _id: 1, - # Include a FLE2FindEncryptedPayload for 'encryptionInformation' to be appended. - foo: { - "$binary": { - "base64": "BYkAAAAFZAAgAAAAAE8KGPgq7h3n9nH5lfHcia8wtOTLwGkZNLBesb6PULqbBXMAIAAAAACq0558QyD3c3jkR5k0Zc9UpQK8ByhXhtn2d1xVQnuJ3AVjACAAAAAA1003zUWGwD4zVZ0KeihnZOthS3V6CEHUfnJZcIYHefISY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - *doc0 - encryptionInformation: { - "type": { - "$numberInt": "1" - }, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [] - } - } - } - ordered: true - command_name: insert - outcome: - collection: - data: - - *doc0 \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-FindOneAndUpdate.json b/testdata/client-side-encryption/legacy/fle2v2-FindOneAndUpdate.json deleted file mode 100644 index c5e689a3de..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-FindOneAndUpdate.json +++ /dev/null @@ -1,560 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "findOneAndUpdate can query an FLE2 indexed field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedIndexed": "value123" - } - } - }, - { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "encryptedIndexed": "value123" - }, - "update": { - "$set": { - "foo": "bar" - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 1, - "encryptedIndexed": "value123" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default", - "query": { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPtVteJQAlgb2YMa/+7YWH00sbQPyt7L6Rb8OwBdMmL2BXMAIAAAAAAd44hgVKnEnTFlwNVC14oyc9OZOTspeymusqkRQj57nAVsACAAAAAAaZ9s3G+4znfxStxeOZwcZy1OhzjMGc5hjmdMN+b/w6kSY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "update": { - "$set": { - "foo": "bar" - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "findAndModify" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - }, - "foo": "bar", - "__safeContent__": [ - { - "$binary": { - "base64": "ThpoKfQ8AkOzkFfNC1+9PF0pY2nIzfXvRdxQgjkNbBw=", - "subType": "00" - } - } - ] - } - ] - } - } - }, - { - "description": "findOneAndUpdate can modify an FLE2 indexed field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedIndexed": "value123" - } - } - }, - { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "encryptedIndexed": "value123" - }, - "update": { - "$set": { - "encryptedIndexed": "value456" - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 1, - "encryptedIndexed": "value123" - } - }, - { - "name": "find", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "encryptedIndexed": "value456" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default", - "query": { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPtVteJQAlgb2YMa/+7YWH00sbQPyt7L6Rb8OwBdMmL2BXMAIAAAAAAd44hgVKnEnTFlwNVC14oyc9OZOTspeymusqkRQj57nAVsACAAAAAAaZ9s3G+4znfxStxeOZwcZy1OhzjMGc5hjmdMN+b/w6kSY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "update": { - "$set": { - "encryptedIndexed": { - "$$type": "binData" - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "findAndModify" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": { - "$eq": 1 - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "rhe7/w8Ob8Unl44rGr/moScx6m5VODQnscDhF4Nkn6g=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-FindOneAndUpdate.yml b/testdata/client-side-encryption/legacy/fle2v2-FindOneAndUpdate.yml deleted file mode 100644 index 7849b6032a..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-FindOneAndUpdate.yml +++ /dev/null @@ -1,200 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "findOneAndUpdate can query an FLE2 indexed field" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: {"_id": 1, "encryptedIndexed": "value123" } - - name: findOneAndUpdate - arguments: - filter: { "encryptedIndexed": "value123" } - update: { "$set": { "foo": "bar"}} - returnDocument: Before - result: { "_id": 1, "encryptedIndexed": "value123" } - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - { "_id": 1, "encryptedIndexed": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - - command_name: insert - - command_started_event: - command: - findAndModify: *collection_name - query: { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPtVteJQAlgb2YMa/+7YWH00sbQPyt7L6Rb8OwBdMmL2BXMAIAAAAAAd44hgVKnEnTFlwNVC14oyc9OZOTspeymusqkRQj57nAVsACAAAAAAaZ9s3G+4znfxStxeOZwcZy1OhzjMGc5hjmdMN+b/w6kSY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - } - update: { "$set": { "foo": "bar"} } - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - - command_name: findAndModify - outcome: - collection: - data: - - { "_id": 1, "encryptedIndexed": { "$$type": "binData" }, "foo": "bar", "__safeContent__": [{ "$binary" : { "base64" : "ThpoKfQ8AkOzkFfNC1+9PF0pY2nIzfXvRdxQgjkNbBw=", "subType" : "00" } }] } - - - description: "findOneAndUpdate can modify an FLE2 indexed field" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: {"_id": 1, "encryptedIndexed": "value123" } - - name: findOneAndUpdate - arguments: - filter: { "encryptedIndexed": "value123" } - update: { "$set": { "encryptedIndexed": "value456"}} - returnDocument: Before - result: { "_id": 1, "encryptedIndexed": "value123" } - - name: find - arguments: - filter: { "_id": 1} - result: - [ "encryptedIndexed": "value456" ] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - { "_id": 1, "encryptedIndexed": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - - command_name: insert - - - command_started_event: - command: - findAndModify: *collection_name - query: { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPtVteJQAlgb2YMa/+7YWH00sbQPyt7L6Rb8OwBdMmL2BXMAIAAAAAAd44hgVKnEnTFlwNVC14oyc9OZOTspeymusqkRQj57nAVsACAAAAAAaZ9s3G+4znfxStxeOZwcZy1OhzjMGc5hjmdMN+b/w6kSY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - } - update: { "$set": { "encryptedIndexed": { "$$type": "binData" }} } - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - - command_name: findAndModify - - command_started_event: - command: - find: *collection_name - filter: { "_id": { "$eq": 1 }} - command_name: find - outcome: - collection: - data: - - { "_id": 1, "encryptedIndexed": { "$$type": "binData" }, "__safeContent__": [{ "$binary" : { "base64" : "rhe7/w8Ob8Unl44rGr/moScx6m5VODQnscDhF4Nkn6g=", "subType" : "00" } }] } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-InsertFind-Indexed.json b/testdata/client-side-encryption/legacy/fle2v2-InsertFind-Indexed.json deleted file mode 100644 index 6e156ffc60..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-InsertFind-Indexed.json +++ /dev/null @@ -1,296 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Insert and find FLE2 indexed field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedIndexed": "123" - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedIndexed": "123" - } - }, - "result": [ - { - "_id": 1, - "encryptedIndexed": "123" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPGmZcUzdE/FPILvRSyAScGvZparGI2y9rJ/vSBxgCujBXMAIAAAAACi1RjmndKqgnXy7xb22RzUbnZl1sOZRXPOC0KcJkAxmQVsACAAAAAApJtKPW4+o9B7gAynNLL26jtlB4+hq5TXResijcYet8USY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "31eCYlbQoVboc5zwC8IoyJVSkag9PxREka8dkmbXJeY=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-InsertFind-Indexed.yml b/testdata/client-side-encryption/legacy/fle2v2-InsertFind-Indexed.yml deleted file mode 100644 index 2acd97585b..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-InsertFind-Indexed.yml +++ /dev/null @@ -1,96 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Insert and find FLE2 indexed field" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encryptedIndexed: "123" } - - name: find - arguments: - filter: { encryptedIndexed: "123" } - result: [*doc0] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 1, "encryptedIndexed": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPGmZcUzdE/FPILvRSyAScGvZparGI2y9rJ/vSBxgCujBXMAIAAAAACi1RjmndKqgnXy7xb22RzUbnZl1sOZRXPOC0KcJkAxmQVsACAAAAAApJtKPW4+o9B7gAynNLL26jtlB4+hq5TXResijcYet8USY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { "_id": 1, "encryptedIndexed": { $$type: "binData" }, "__safeContent__": [{ "$binary" : { "base64" : "31eCYlbQoVboc5zwC8IoyJVSkag9PxREka8dkmbXJeY=", "subType" : "00" } }] } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-InsertFind-Unindexed.json b/testdata/client-side-encryption/legacy/fle2v2-InsertFind-Unindexed.json deleted file mode 100644 index 48280f5bd4..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-InsertFind-Unindexed.json +++ /dev/null @@ -1,248 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "HBk9BWihXExNDvTp1lUxOuxuZK2Pe2ZdVdlsxPEBkiO1bS4mG5NNDsQ7zVxJAH8BtdOYp72Ku4Y3nwc0BUpIKsvAKX4eYXtlhv5zUQxWdeNFhg9qK7qb8nqhnnLeT0f25jFSqzWJoT379hfwDeu0bebJHr35QrJ8myZdPMTEDYF08QYQ48ShRBli0S+QzBHHAQiM2iJNr4svg2WR8JSeWQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Insert and find FLE2 unindexed field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedUnindexed": "value123" - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1, - "encryptedUnindexed": "value123" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedUnindexed": { - "$$type": "binData" - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": { - "$eq": 1 - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encryptedUnindexed": { - "$$type": "binData" - } - } - ] - } - } - }, - { - "description": "Query with an unindexed field fails", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedUnindexed": "value123" - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedUnindexed": "value123" - } - }, - "result": { - "errorContains": "encrypt" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-InsertFind-Unindexed.yml b/testdata/client-side-encryption/legacy/fle2v2-InsertFind-Unindexed.yml deleted file mode 100644 index ddba6c7439..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-InsertFind-Unindexed.yml +++ /dev/null @@ -1,89 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'HBk9BWihXExNDvTp1lUxOuxuZK2Pe2ZdVdlsxPEBkiO1bS4mG5NNDsQ7zVxJAH8BtdOYp72Ku4Y3nwc0BUpIKsvAKX4eYXtlhv5zUQxWdeNFhg9qK7qb8nqhnnLeT0f25jFSqzWJoT379hfwDeu0bebJHr35QrJ8myZdPMTEDYF08QYQ48ShRBli0S+QzBHHAQiM2iJNr4svg2WR8JSeWQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Insert and find FLE2 unindexed field" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encryptedUnindexed: "value123" } - - name: find - arguments: - filter: { _id: 1 } - result: [*doc0] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 1, "encryptedUnindexed": { $$type: "binData" } } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: { "_id": { "$eq": 1 }} - command_name: find - outcome: - collection: - data: - - { "_id": 1, "encryptedUnindexed": { $$type: "binData" } } - - - description: "Query with an unindexed field fails" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: { _id: 1, encryptedUnindexed: "value123" } - - name: find - arguments: - filter: { encryptedUnindexed: "value123" } - result: - # Expected error message changed in https://github.com/10gen/mongo-enterprise-modules/commit/212b584d4f7a44bed41c826a180a4aff00923d7a#diff-5f12b55e8d5c52c2f62853ec595dc2c1e2e5cb4fdbf7a32739a8e3acb3c6f818 - # Before the message was "cannot query non-indexed fields with the randomized encryption algorithm" - # After: "can only execute encrypted equality queries with an encrypted equality index" - # Use a small common substring. - errorContains: "encrypt" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-MissingKey.json b/testdata/client-side-encryption/legacy/fle2v2-MissingKey.json deleted file mode 100644 index 1e655f0a9c..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-MissingKey.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "encryptedUnindexed": { - "$binary": { - "base64": "BqvN76sSNJh2EjQSNFZ4kBICTQaVZPWgXp41I7mPV1rLFTtw1tXzjcdSEyxpKKqujlko5TeizkB9hHQ009dVY1+fgIiDcefh+eQrm3CkhQ==", - "subType": "06" - } - } - } - ], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - }, - "key_vault_data": [], - "tests": [ - { - "description": "FLE2 encrypt fails with missing key", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedIndexed": "123" - } - }, - "result": { - "errorContains": "not all keys requested were satisfied" - } - } - ] - }, - { - "description": "FLE2 decrypt fails with missing key", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": {} - }, - "result": { - "errorContains": "not all keys requested were satisfied" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-MissingKey.yml b/testdata/client-side-encryption/legacy/fle2v2-MissingKey.yml deleted file mode 100644 index f4fbbeb5ca..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-MissingKey.yml +++ /dev/null @@ -1,43 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [ - &doc0 { - "encryptedUnindexed": { - "$binary": { - "base64": "BqvN76sSNJh2EjQSNFZ4kBICTQaVZPWgXp41I7mPV1rLFTtw1tXzjcdSEyxpKKqujlko5TeizkB9hHQ009dVY1+fgIiDcefh+eQrm3CkhQ==", - "subType": "06" - } - } - } -] -encrypted_fields: {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} -key_vault_data: [] -tests: - - description: "FLE2 encrypt fails with missing key" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: { _id: 1, encryptedIndexed: "123" } - result: - errorContains: "not all keys requested were satisfied" - - description: "FLE2 decrypt fails with missing key" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: find - arguments: - filter: { } - result: - errorContains: "not all keys requested were satisfied" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-NoEncryption.json b/testdata/client-side-encryption/legacy/fle2v2-NoEncryption.json deleted file mode 100644 index a6843c4737..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-NoEncryption.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "key_vault_data": [], - "encrypted_fields": { - "fields": [] - }, - "tests": [ - { - "description": "insert with no encryption succeeds", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "foo": "bar" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "foo": "bar" - } - ], - "ordered": true - }, - "command_name": "insert" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "foo": "bar" - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-NoEncryption.yml b/testdata/client-side-encryption/legacy/fle2v2-NoEncryption.yml deleted file mode 100644 index afb79d526b..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-NoEncryption.yml +++ /dev/null @@ -1,44 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -key_vault_data: [] -encrypted_fields: { - "fields": [] -} -tests: - - description: "insert with no encryption succeeds" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { - _id: 1, - foo: "bar" - } - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - insert: *collection_name - documents: - - *doc0 - ordered: true - command_name: insert - outcome: - collection: - data: - - *doc0 \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Compact.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Compact.json deleted file mode 100644 index bba9f25535..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Compact.json +++ /dev/null @@ -1,290 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Compact works with 'range' fields", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "command_name": "compactStructuredEncryptionData", - "arguments": { - "command": { - "compactStructuredEncryptionData": "default" - } - }, - "result": { - "ok": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "compactStructuredEncryptionData": "default", - "compactionTokens": { - "encryptedInt": { - "ecoc": { - "$binary": { - "base64": "noN+05JsuO1oDg59yypIGj45i+eFH6HOTXOPpeZ//Mk=", - "subType": "00" - } - }, - "anchorPaddingToken": { - "$binary": { - "base64": "QxKJD2If48p0l8NAXf2Kr0aleMd/dATSjBK6hTpNMyc=", - "subType": "00" - } - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "compactStructuredEncryptionData" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Compact.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Compact.yml deleted file mode 100644 index d49c084ef2..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Compact.yml +++ /dev/null @@ -1,94 +0,0 @@ -# Requires libmongocrypt 1.10.1. -runOn: - - minServerVersion: "8.0.0" # Require range v2 support on server. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] - serverless: forbid # Skip on serverless until CLOUDP-267864 is resolved. -database_name: "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedInt', 'bsonType': 'int', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberInt': '0'}, 'max': {'$numberInt': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Compact works with 'range' fields" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - # Insert before running compact to ensure the server errors if `encryptionInformation` is incorrectly omitted. - - name: insertOne - arguments: - document: { _id: 0, encryptedInt: { $numberInt: "0" } } - - name: runCommand - object: database - command_name: compactStructuredEncryptionData - arguments: - command: - compactStructuredEncryptionData: *collection_name - result: - ok: 1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - { "_id": 0, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: &encryptionInformation - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - compactStructuredEncryptionData: *collection_name - compactionTokens: - "encryptedInt": { - "ecoc": { - "$binary": { - "base64": "noN+05JsuO1oDg59yypIGj45i+eFH6HOTXOPpeZ//Mk=", - "subType": "00" - } - }, - "anchorPaddingToken": { - "$binary": { - "base64": "QxKJD2If48p0l8NAXf2Kr0aleMd/dATSjBK6hTpNMyc=", - "subType": "00" - } - } - } - encryptionInformation: *encryptionInformation - command_name: compactStructuredEncryptionData \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Aggregate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Aggregate.json deleted file mode 100644 index df2161cc36..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Aggregate.json +++ /dev/null @@ -1,508 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Date. Aggregate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$gt": { - "$date": { - "$numberLong": "0" - } - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDate": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDate": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "default", - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEA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wAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAJbW4AAAAAAAAAAAAJbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - } - } - ], - "cursor": {}, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "aggregate" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDate": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDate": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Aggregate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Aggregate.yml deleted file mode 100644 index cc5fd4d267..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Aggregate.yml +++ /dev/null @@ -1,229 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDate', 'bsonType': 'date', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$date': {'$numberLong': '0'}}, 'max': {'$date': {'$numberLong': '200'}}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Date. Aggregate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDate: {$date: { $numberLong: "0" }} } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDate: {$date: { $numberLong: "1" }} } - - name: aggregate - arguments: - pipeline: [{ $match: { "encryptedDate": { $gt: {$date: {$numberLong: "0" }}} } }] - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDate": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDate": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - aggregate: *collection_name - pipeline: [ - { - "$match": { - "encryptedDate": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAYO/qaw0+92HAryxOUG7iK6hnIy3OaUA9jIqtHdvcq8YFbAAgAAAAAHrUYj8A0hVgc6VklpDiljOnykrUSfEsjm56XO/bsfKdAAMzAH0AAAAFZAAgAAAAAOK8brUuc2onBNDRtfYMR736dHj4dQqXod8JG7tAMTsDBXMAIAAAAAAW6SrGAL6Bx0s7ZlsYULFfOAiYIGhEWu6md3r+Rk40awVsACAAAAAAIHYXP8RLcCboUmHN3+OlnEw1DxaLSnbTB9PdF228fFAAAzQAfQAAAAVkACAAAAAAV22FGF7ZDwK/EYiGNMlm/QuT3saQdyJM/Fn+ZyQug1oFcwAgAAAAACo7GwCvbcs5UHQMgds9/1QMklEVdjZigpuOFGrDmmxtBWwAIAAAAADQbYYPxlCMMGe2MulbiurApFLoeJSMvTeDU3pyEA2jNwADNQB9AAAABWQAIAAAAADFspsMG7yHjKppyllon1KqAsTrHaZ6JzNqnSz8o6iTvwVzACAAAAAAeiA5pqVIQQ9s6UY/P8v5Jjkl3I7iFNeLDYehikrINrsFbAAgAAAAAFjBTzTpNxDEkA0vSRj0jCED9KDRlboMVyilKyDz5YR4AAM2AH0AAAAFZAAgAAAAAPcLmtq+V1e+MRlZ7NHq1+mrRVBQje5zj685ZvdsfKvSBXMAIAAAAABdHz/3w2k5km97QN9m7oLFYJaVJneNlMboIlz5yUASQAVsACAAAAAAWbp8JVJnx8fEVAJFa7WMfMa7wXeP5M3C8MX20J/i9n0AAzcAfQAAAAVkACAAAAAAYfLwnoxK6XAGQrJFy8+TIJoq38ldBaO75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAJbW4AAAAAAAAAAAAJbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - } - } - ] - cursor: {} - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: aggregate - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDate": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDate": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Correctness.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Correctness.json deleted file mode 100644 index fae25a1c02..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Correctness.json +++ /dev/null @@ -1,1842 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Find with $gt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$gt": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ] - }, - { - "description": "Find with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$gte": { - "$date": { - "$numberLong": "0" - } - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - }, - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ] - }, - { - "description": "Find with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$gt": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - "result": [] - } - ] - }, - { - "description": "Find with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$lt": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - ] - } - ] - }, - { - "description": "Find with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$lte": { - "$date": { - "$numberLong": "1" - } - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - }, - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ] - }, - { - "description": "Find with $lt below min", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$lt": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - "result": { - "errorContains": "must be greater than the range minimum" - } - } - ] - }, - { - "description": "Find with $gt above max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$gt": { - "$date": { - "$numberLong": "200" - } - } - } - } - }, - "result": { - "errorContains": "must be less than the range maximum" - } - } - ] - }, - { - "description": "Find with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$gt": { - "$date": { - "$numberLong": "0" - } - }, - "$lt": { - "$date": { - "$numberLong": "2" - } - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ] - }, - { - "description": "Find with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - ] - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ] - }, - { - "description": "Find with full range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$gte": { - "$date": { - "$numberLong": "0" - } - }, - "$lte": { - "$date": { - "$numberLong": "200" - } - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - }, - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ] - }, - { - "description": "Find with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$in": [ - { - "$date": { - "$numberLong": "0" - } - } - ] - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - ] - } - ] - }, - { - "description": "Insert out of range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "-1" - } - } - } - }, - "result": { - "errorContains": "value must be greater than or equal to the minimum value" - } - } - ] - }, - { - "description": "Insert min and max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 200, - "encryptedDate": { - "$date": { - "$numberLong": "200" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - }, - { - "_id": 200, - "encryptedDate": { - "$date": { - "$numberLong": "200" - } - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$gte": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - }, - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$gt": { - "$date": { - "$numberLong": "1" - } - } - } - } - } - ] - }, - "result": [] - } - ] - }, - { - "description": "Aggregate with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$lt": { - "$date": { - "$numberLong": "1" - } - } - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - ] - } - ] - }, - { - "description": "Aggregate with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$lte": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - }, - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ] - }, - { - "description": "Aggregate with $lt below min", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$lt": { - "$date": { - "$numberLong": "0" - } - } - } - } - } - ] - }, - "result": { - "errorContains": "must be greater than the range minimum" - } - } - ] - }, - { - "description": "Aggregate with $gt above max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$gt": { - "$date": { - "$numberLong": "200" - } - } - } - } - } - ] - }, - "result": { - "errorContains": "must be less than the range maximum" - } - } - ] - }, - { - "description": "Aggregate with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$gt": { - "$date": { - "$numberLong": "0" - } - }, - "$lt": { - "$date": { - "$numberLong": "2" - } - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ] - }, - { - "description": "Aggregate with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - ] - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ] - }, - { - "description": "Aggregate with full range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$gte": { - "$date": { - "$numberLong": "0" - } - }, - "$lte": { - "$date": { - "$numberLong": "200" - } - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - }, - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ] - }, - { - "description": "Aggregate with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDate": { - "$in": [ - { - "$date": { - "$numberLong": "0" - } - } - ] - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - ] - } - ] - }, - { - "description": "Wrong type: Insert Double", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$numberDouble": "0" - } - } - }, - "result": { - "errorContains": "cannot encrypt element" - } - } - ] - }, - { - "description": "Wrong type: Find Double", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$gte": { - "$numberDouble": "0" - } - } - } - }, - "result": { - "errorContains": "value type is a date" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Correctness.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Correctness.yml deleted file mode 100644 index f7ed9fb93f..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Correctness.yml +++ /dev/null @@ -1,422 +0,0 @@ -# Test correctness results. -# Does not include command monitoring expectations or outcome assertions to make tests more readable. - -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "8.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDate', 'bsonType': 'date', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$date': {'$numberLong': '0'}}, 'max': {'$date': {'$numberLong': '200'}}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Find with $gt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDate: { $date: { $numberLong: "0" } } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDate: { $date: { $numberLong: "1" } } } - - name: find - arguments: - filter: { encryptedDate: { $gt: { $date: { $numberLong: "0" } } }} - result: [*doc1] - - - description: "Find with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDate: { $gte: { $date: { $numberLong: "0" } } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDate: { $gt: { $date: { $numberLong: "1" } } }} - result: [] - - - description: "Find with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDate: { $lt: { $date: { $numberLong: "1" } } }} - result: [*doc0] - - - description: "Find with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDate: { $lte: { $date: { $numberLong: "1" } } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $lt below min" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDate: { $lt: { $date: { $numberLong: "0" } } }} - result: - errorContains: must be greater than the range minimum - - - description: "Find with $gt above max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDate: { $gt: { $date: { $numberLong: "200" } } }} - result: - errorContains: must be less than the range maximum - - - description: "Find with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDate: { $gt: { $date: { $numberLong: "0" } }, $lt: { $date: {$numberLong: "2"}} }} - result: [*doc1] - - - description: "Find with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDate: { $date: { $numberLong: "0" } } } - result: [*doc0] - - name: find - arguments: - filter: { encryptedDate: { $date: { $numberLong: "1" } } } - result: [*doc1] - - - description: "Find with full range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDate: { $gte: { $date: {$numberLong: "0"}}, $lte: { $date: {$numberLong: "200"} } } } - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDate: { $in: [ {$date: {$numberLong: "0"}} ] } } - result: [*doc0] - - - description: "Insert out of range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: { _id: 0, encryptedDate: {$date: { $numberLong: "-1" }}} - result: - errorContains: value must be greater than or equal to the minimum value - - - description: "Insert min and max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: *doc0 - - name: insertOne - arguments: - document: &doc200 { _id: 200, encryptedDate: { $date: { $numberLong: "200" } }} - - name: find - arguments: - filter: {} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc200] - - - description: "Aggregate with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDate: { $gte: { $date: { $numberLong: "0" } } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDate: { $gt: { $date: { $numberLong: "1" } } }} } - result: [] - - - description: "Aggregate with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDate: { $lt: { $date: { $numberLong: "1" } } }} } - result: [*doc0] - - - description: "Aggregate with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDate: { $lte: { $date: { $numberLong: "1" } } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $lt below min" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDate: { $lt: { $date: { $numberLong: "0" } } }} } - result: - errorContains: must be greater than the range minimum - - - description: "Aggregate with $gt above max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDate: { $gt: { $date: { $numberLong: "200" } } }} } - result: - errorContains: must be less than the range maximum - - - description: "Aggregate with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDate: { $gt: { $date: { $numberLong: "0" } }, $lt: { $date: {$numberLong: "2"}} }} } - result: [*doc1] - - - description: "Aggregate with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDate: { $date: { $numberLong: "0" } } } } - result: [*doc0] - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDate: { $date: { $numberLong: "1" } } } } - result: [*doc1] - - - description: "Aggregate with full range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDate: { $gte: {$date: {$numberLong: "0"}}, $lte: {$date: {$numberLong: "200"}} } } } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDate: { $in: [ {$date: {$numberLong: "0"}} ] } } } - result: [*doc0] - - - description: "Wrong type: Insert Double" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: { _id: 0, encryptedDate: { $numberDouble: "0" }} } - result: - # Expect an error from mongocryptd. - errorContains: "cannot encrypt element" - - - description: "Wrong type: Find Double" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: find - arguments: - filter: { encryptedDate: { $gte: { $numberDouble: "0" } }} - result: - # expect an error mongocryptd. - errorContains: "value type is a date" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Delete.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Delete.json deleted file mode 100644 index b4f15d9b1f..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Delete.json +++ /dev/null @@ -1,442 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Date. Delete.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "encryptedDate": { - "$gt": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - "result": { - "deletedCount": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDate": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDate": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "delete": "default", - "deletes": [ - { - "q": { - "encryptedDate": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6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O75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAJbW4AAAAAAAAAAAAJbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "delete" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDate": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Delete.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Delete.yml deleted file mode 100644 index 188b75940b..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Delete.yml +++ /dev/null @@ -1,176 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDate', 'bsonType': 'date', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$date': {'$numberLong': '0'}}, 'max': {'$date': {'$numberLong': '200'}}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Date. Delete." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDate: {$date: { $numberLong: "0" }} } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDate: {$date: { $numberLong: "1" }} } - - name: deleteOne - arguments: - filter: { "encryptedDate": { $gt: {$date: {$numberLong: "0" }}} } - result: - deletedCount: 1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDate": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDate": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - delete: *collection_name - deletes: [ - { - "q": { - "encryptedDate": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAYO/qaw0+92HAryxOUG7iK6hnIy3OaUA9jIqtHdvcq8YFbAAgAAAAAHrUYj8A0hVgc6VklpDiljOnykrUSfEsjm56XO/bsfKdAAMzAH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pyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAJbW4AAAAAAAAAAAAJbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ] - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: delete - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDate": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-FindOneAndUpdate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-FindOneAndUpdate.json deleted file mode 100644 index 97ab4aaeb9..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-FindOneAndUpdate.json +++ /dev/null @@ -1,514 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Date. FindOneAndUpdate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "encryptedDate": { - "$gt": { - "$date": { - "$numberLong": "0" - } - } - } - }, - "update": { - "$set": { - "encryptedDate": { - "$date": { - "$numberLong": "2" - } - } - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDate": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDate": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default", - "query": { - "encryptedDate": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAYO/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xoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAJbW4AAAAAAAAAAAAJbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "update": { - "$set": { - "encryptedDate": { - "$$type": "binData" - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "findAndModify" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDate": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDate": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "hyDcE6QQjPrYJaIS/n7evEZFYcm31Tj89CpEYGF45cI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ty4cnzJdAlbQKnh7px3GEYjBnvO+jIOaKjoTRDtmh3M=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-FindOneAndUpdate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-FindOneAndUpdate.yml deleted file mode 100644 index 2c53412e9a..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-FindOneAndUpdate.yml +++ /dev/null @@ -1,227 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDate', 'bsonType': 'date', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$date': {'$numberLong': '0'}}, 'max': {'$date': {'$numberLong': '200'}}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Date. FindOneAndUpdate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDate: {$date: { $numberLong: "0" }} } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDate: {$date: { $numberLong: "1" }} } - - name: findOneAndUpdate - arguments: - filter: { encryptedDate: { $gt: {$date: {$numberLong: "0"}}} } - update: { "$set": { "encryptedDate": {$date: {$numberLong: "2"}}}} - returnDocument: Before - result: *doc1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDate": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDate": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - findAndModify: *collection_name - query: { - "encryptedDate": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcC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JneNlMboIlz5yUASQAVsACAAAAAAWbp8JVJnx8fEVAJFa7WMfMa7wXeP5M3C8MX20J/i9n0AAzcAfQAAAAVkACAAAAAAYfLwnoxK6XAGQrJFy8+TIJoq38ldBaO75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAJbW4AAAAAAAAAAAAJbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - } - update: { "$set": {"encryptedDate": { $$type: "binData" }} } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: findAndModify - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDate": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDate": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "hyDcE6QQjPrYJaIS/n7evEZFYcm31Tj89CpEYGF45cI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ty4cnzJdAlbQKnh7px3GEYjBnvO+jIOaKjoTRDtmh3M=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-InsertFind.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-InsertFind.json deleted file mode 100644 index a011c388e4..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-InsertFind.json +++ /dev/null @@ -1,499 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Date. Insert and Find.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDate": { - "$gt": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDate": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDate": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "encryptedDate": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAYO/qaw0+92HAryxOUG7iK6hnIy3OaUA9jIqtHdvcq8YF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DAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAJbW4AAAAAAAAAAAAJbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDate": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDate": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-InsertFind.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-InsertFind.yml deleted file mode 100644 index 8188fc6e39..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-InsertFind.yml +++ /dev/null @@ -1,223 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDate', 'bsonType': 'date', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$date': {'$numberLong': '0'}}, 'max': {'$date': {'$numberLong': '200'}}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Date. Insert and Find." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDate: { $date: { $numberLong: "0" }} } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDate: { $date: { $numberLong: "1" }} } - - name: find - arguments: - filter: { encryptedDate: { $gt: { $date: { $numberLong: "0" }} } } - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDate": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDate": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: - "encryptedDate": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZ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DBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAJbW4AAAAAAAAAAAAJbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDate": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDate": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Update.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Update.json deleted file mode 100644 index 6bab6499f5..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Update.json +++ /dev/null @@ -1,516 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Date. Update.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDate": { - "$date": { - "$numberLong": "0" - } - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDate": { - "$date": { - "$numberLong": "1" - } - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "encryptedDate": { - "$gt": { - "$date": { - "$numberLong": "0" - } - } - } - }, - "update": { - "$set": { - "encryptedDate": { - "$date": { - "$numberLong": "2" - } - } - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDate": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDate": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command_name": "update", - "command": { - "update": "default", - "ordered": true, - "updates": [ - { - "q": { - "encryptedDate": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAYO/qaw0+92HAryxOUG7iK6hnIy3OaUA9jIqtHdvcq8YFbAAgAAAAAHrUYj8A0hVgc6VklpDiljOnykrUSfEsjm56XO/bsfKdAAMzAH0AAAAFZAAgAAAAAOK8brUuc2onBNDRtfYMR736dHj4dQqXod8JG7tAMTsDBXMAIAAAAAAW6SrGAL6Bx0s7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/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAJbW4AAAAAAAAAAAAJbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedDate": { - "$$type": "binData" - } - } - } - } - ], - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDate", - "bsonType": "date", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$date": { - "$numberLong": "0" - } - }, - "max": { - "$date": { - "$numberLong": "200" - } - } - } - } - ] - } - } - }, - "$db": "default" - } - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDate": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDate": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "hyDcE6QQjPrYJaIS/n7evEZFYcm31Tj89CpEYGF45cI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ty4cnzJdAlbQKnh7px3GEYjBnvO+jIOaKjoTRDtmh3M=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Update.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Update.yml deleted file mode 100644 index 3018726b6f..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Update.yml +++ /dev/null @@ -1,240 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDate', 'bsonType': 'date', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$date': {'$numberLong': '0'}}, 'max': {'$date': {'$numberLong': '200'}}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Date. Update." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDate: { $date: { $numberLong: "0" } }} - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDate: { $date: { $numberLong: "1" } }} - - name: updateOne - arguments: - filter: { encryptedDate: { $gt: { $date: { $numberLong: "0" } } }} - update: { "$set": { "encryptedDate": { $date: { $numberLong: "2" } }}} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDate": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDate": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command_name: update - command: - "update": "default" - "ordered": true - "updates": [ - { - "q": { - "encryptedDate": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNkl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u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAJbW4AAAAAAAAAAAAJbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedDate": { $$type: "binData" } - } - } - } - ] - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - "$db": "default" - - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDate": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDate": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "hyDcE6QQjPrYJaIS/n7evEZFYcm31Tj89CpEYGF45cI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ty4cnzJdAlbQKnh7px3GEYjBnvO+jIOaKjoTRDtmh3M=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Aggregate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Aggregate.json deleted file mode 100644 index d1a82c2164..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Aggregate.json +++ /dev/null @@ -1,1902 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Decimal. Aggregate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$numberDecimal": "0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "default", - "pipeline": [ - { - "$match": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$binary": { - "base64": "DR1jAAADcGF5bG9hZACxYgAABGcAnWIAAAMwAH0AAAAFZAAgAAAAAJu2KgiI8vM+kz9qD3ZQzFQY5qbgYqCqHG5R4jAlnlwXBXMAIAAAAAAAUXxFXsz764T79sGCdhxvNd5b6E/9p61FonsHyEIhogVsACAAAAAAt19RL3Oo5ni5L8kcvgOJYLgVYyXJExwP8pkuzLG7f/kAAzEAfQAAAAVkACAAAAAAPQPvL0ARjujSv2Rkm8r7spVsgeC1K3FWcskGGZ3OdDIFcwAgAAAAACgNn660GmefR8jLqzgR1u5O+Uocx9GyEHiBqVGko5FZBWwAIAAAAADflr+fsnZngm6KRWYgHa9JzK+bXogWl9evBU9sQUHPHQADMgB9AAAABWQAIAAAAAD2Zi6kcxmaD2mY3VWrP+wYJMPg6cSBIYPapxaFQxYFdQVzACAAAAAAM/cV36BLBY3xFBXsXJY8M9EHHOc/qrmdc2CJmj3M89gFbAAgAAAAAOpydOrKxx6m2gquSDV2Vv3w10GocmNCFeOo/fRhRH9JAAMzAH0AAAAFZAAgAAAAAOaNqI9srQ/mI9gwbk+VkizGBBH/PPWOVusgnfPk3tY1BXMAIAAAAAAc96O/pwKCmHCagT6T/QV/wz4vqO+R22GsZ1dse2Vg6QVsACAAAAAAgzIak+Q3UFLTHXPmJ+MuEklFtR3eLtvM+jdKkmGCV/YAAzQAfQAAAAVkACAAAAAA0Xl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FRG/br7USELR98sIdgE9OQCRBGV5JZCO+uPMgBWwAIAAAAABt7qSmn3gxJu7aswsbUiwvO+G6lXj/Xhx+J/zQyZxzLAADMTkyAH0AAAAFZAAgAAAAAGInUYv0lP/rK7McM8taEHXRefk8Q2AunrvWqdfSV7UaBXMAIAAAAACE+WPxJ3gan7iRTbIxXXx+bKVcaf8kP4JD8DcwU0aL7wVsACAAAAAAUC4eTprX4DUZn2X+UXYU6QjtiXk+u57yoOPBbPQUmDkAAzE5MwB9AAAABWQAIAAAAACmHlg2ud3cplXlTsNTpvNnY6Qm1Fce0m899COamoDjaQVzACAAAAAArtJQeJIlepBWRU2aYar7+YGYVQ7dfDc1oxgTmA8r9q0FbAAgAAAAAOk45vg5VqZHAFCO3i0Z52SZi5RADf8NXwf68T5yad/DAAMxOTQAfQAAAAVkACAAAAAApzcWSAbZWV/Rq+ylRNqqlJqNVR4fhXrz4633/MQOQgcFcwAgAAAAAN/jz/bsEleiuCl+li83EWlG6UMHA8CyaOMRKCkXkSCPBWwAIAAAAAC3Sd+Qg+uFDKpGZHbrQgokXHQ1az1aFl4YK343OB6hcQAAEmNtAAAAAAAAAAAAABBwYXlsb2FkSWQAAAAAABBmaXJzdE9wZXJhdG9yAAEAAAASc3AAAQAAAAAAAAAQdGYAAQAAABNtbgD/////Y46NN8CHrb4J7f/fE214AP////9jjo03wIetvgnt/18A", - "subType": "06" - } - } - } - } - } - ], - "cursor": {}, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "aggregate" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "rbf3AeBEv4wWFAKknqDxRW5cLNkFvbIs6iJjc6LShQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0l86Ag5OszXpa78SlOUV3K9nff5iC1p0mRXtLg9M1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hn6yuxFHodeyu7ISlhYrbSf9pTiH4TDEvbYLWjTwFO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zdf4y2etKBuIpkEU1zMwoCkCsdisfXZCh8QPamm+drY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rOQ9oMdiK5xxGH+jPzOvwVqdGGnF3+HkJXxn81s6hp4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "61aKKsE3+BJHHWYvs3xSIBvlRmKswmaOo5rygQJguUg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KuDb/GIzqDM8wv7m7m8AECiWJbae5EKKtJRugZx7kR0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Q+t8t2TmNUiCIorVr9F3AlVnX+Mpt2ZYvN+s8UGict8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJRZIpKxUgHyL83kW8cvfjkxN3z6WoNnUg+SQw+LK+k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnUsYjip8SvW0+m9mR5WWTkpK+p6uwJ6yBUAlBnFKMk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PArHlz+yPRYDycAP/PgnI/AkP8Wgmfg++Vf4UG1Bf0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wnIh53Q3jeK8jEBe1n8kJLa89/H0BxO26ZU8SRIAs9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4F8U59gzBLGhq58PEWQk2nch+R0Va7eTUoxMneReUIA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ihKagIW3uT1dm22ROr/g5QaCpxZVj2+Fs/YSdM2Noco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EJtUOOwjkrPUi9mavYAi+Gom9Y2DuFll7aDwo4mq0M0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dIkr8dbaVRQFskAVT6B286BbcBBt1pZPEOcTZqk4ZcI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aYVAcZYkH/Tieoa1XOjE/zCy5AJcVTHjS0NG2QB7muA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sBidL6y8TenseetpioIAAtn0lK/7C8MoW4JXpVYi3z8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Dd2klU/t4R86c2WJcJDAd57k/N7OjvYSO5Vf8KH8sw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I3jZ92WEVmZmgaIkLbuWhBxl7EM6bEjiEttgBJunArA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aGHoQMlgJoGvArjfIbc3nnkoc8SWBxcrN7hSmjMRzos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bpiWPnF/KVBQr5F6MEwc5ZZayzIRvQOLDAm4ntwOi8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI7QVKbE6avWgDD9h4QKyFlnTxFCwd2iLySKakxNR/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XGsge0CnoaXgE3rcpKm8AEeku5QVfokS3kcI+JKV1lk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JQxlryW2Q5WOwfrjAnaZxDvC83Dg6sjRVP5zegf2WiM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YFuHKJOfoqp1iGVxoFjx7bLYgVdsN4GuUFxEgO9HJ5s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z6vUdiCR18ylKomf08uxcQHeRtmyav7/Ecvzz4av3k4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SPGo1Ib5AiP/tSllL7Z5PAypvnKdwJLzt8imfIMSEJQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m94Nh6PFFQFLIib9Cu5LAKavhXnagSHG6F5EF8lD96I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pfEkQI98mB+gm1+JbmVurPAODMFPJ4E8DnqfVyUWbSo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DNj3OVRLbr43s0vd+rgWghOL3FqeO/60npdojC8Ry/M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kAYIQrjHVu49W8FTxyxJeiLVRWWjC9fPcBn+Hx1F+Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aCSO7UVOpoQvu/iridarxkxV1SVxU1i9HVSYXUAeXk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Gh6hTP/yj1IKlXQ+Q69KTfMlGZjEcXoRLGbQHNFo/1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/gDgIFQ4tAlJk3GN48IS5Qa5IPmErwGk8CHxAbp6gs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PICyimwPjxpusyKxNssOOwUotAUbygpyEtORsVGXT8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4lu+cBHyAUvuxC6JUNyHLzHsCogGSWFFnUCkDwfQdgI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pSndkmoNUJwXjgkbkgOrT5f9nSvuoMEZOkwAN9ElRaE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tyW+D4i26QihNM5MuBM+wnt5AdWGSJaJ4X5ydc9iWTU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9Syjr8RoxUgPKr+O5rsCu07AvcebA4P8IVKyS1NVLWc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "67tPfDYnK2tmrioI51fOBG0ygajcV0pLo5+Zm/rEW7U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y0EiPRxYTuS1eVTIaPQUQBBxwkyxNckbePvKgChwd0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NWd+2veAaeXQgR3vCvzlI4R1WW67D5YsVLdoXfdb8qg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PY5RQqKQsL2GqBBSPNOEVpojNFRX/NijCghIpxD6CZk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lcvwTyEjFlssCJtdjRpdN6oY+C7bxZY+WA+QAqzj9zg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWE7XRNylvTwO/9Fv56dNqUaQWMmESNS/GNIwgBaEI0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ijwlrUeS8nRYqK1F8kiCYF0mNDolEZS+/lJO1Lg93C8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8KzV+qYGYuIjoNj8eEpnTuHrMYuhzphl80rS6wrODuU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wDyTLjSEFF895hSQsHvmoEQVS6KIkZOtq1c9dVogm9I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SGrtPuMYCjUrfKF0Pq/thdaQzmGBMUvlwN3ORIu9tHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KySHON3hIoUk4xWcwTqk6IL0kgjzjxgMBObVIkCGvk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hBIdS9j0XJPeT4ot73ngELkpUoSixvRBvdOL9z48jY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Tx6um0q9HjS5ZvlFhvukpI6ORnyrXMWVW1OoxvgqII0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zFKlyfX5H81+d4A4J3FKn4T5JfG+OWtR06ddyX4Mxas=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cGgCDuPV7MeMMYEDpgOupqyNP4BQ4H7rBnd2QygumgM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IPaUoy98v11EoglTpJ4kBlEawoZ8y7BPwzjLYBpkvHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Pfo4Am6tOWAyZNn8G9W5HWWGC3ZWmX0igI/RRB870Ro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fnTSjd7bC1Udoq6iM7UDnHAC/lsIXSHp/Gy332qw+/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fApBgVRrTDyEumkeWs5p3ag9KB48SbU4Si0dl7Ns9rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QxudfBItgoCnUj5NXVnSmWH3HK76YtKkMmzn4lyyUYY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sSOvwhKa29Wq94bZ5jGIiJQGbG1uBrKSBfOYBz/oZeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FdaMgwwJ0NKsqmPZLC5oE+/0D74Dfpvig3LaI5yW5Fs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sRWBy12IERN43BSZIrnBfC9+zFBUdvjTlkqIH81NGt4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/4tIRpxKhoOwnXAiFn1Z7Xmric4USOIfKvTYQXk3QTc=", - "subType": "00" - } - } - ] - }, - { - "_id": { - "$numberInt": "1" - }, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RGTjNVEsNJb+DG7DpPOam8rQWD5HZAMpRyiTQaw7tk8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I93Md7QNPGmEEGYU1+VVCqBPBEvXdqHPtTJtMOn06Yk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "GecBFQ1PemlECWZWCl7f74vmsL6eB6mzQ9n6tK6FYfs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QpjhZl+O1ORifgtCZuWAdcP6OKL7IZ2cA46v8FJcV28=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RlQWwhU+uVv0a+9IB5cUkEfvHBvOw3B1Sx6WfPWMqes=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubb81XTC7U+4tcNzf1oYvOY6gR5hC2Izqx54f4GuJ0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6M4Q5NMQ9TqNnjzGOxIkiUIY8TEL0I3XD1QnhefQUqU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BtInzk9t2FFMCEY6AQ7zN8jwrrZEs2irSv6q0Q4NaIw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vxXfETu9cuBIpRBo3jUUU04mJIH/aAhLX8K6VI5Xv0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wXPCdS+q23zi1bkPnaVG2j0PsVtxdeSLJ//h6J1x8RU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KY3KkfBAsN2l80wbpj41G0gwBR5KmmFnZcagg7D3ENk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI8NFAxXCX4VOnY5X73K6KI/Yspd3aR94KV39MhJlAw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nFxH0UC3mATKA6Vboz+QX/hAjj19kF/SH6H5Cne7qC0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q8hYqIYaIi7nOdG/7qQZYnz8Bsacfi66M1nVku4SH08=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4saA92R4arp4anvD9xFtze+sNcQqTEhPHyl1h70A8NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DbIziOBRRyeQS6RtBR09E37LV+CTKrEjGoRMLSpG6eE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Fv80Plp/7w2gnVqrwawLd6qhJ10G4NCDm3re67cNq4Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "T/T2oiQCBBES4YN7EodzPRdabZSFlYIClHBym+bQUZE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZQgHD3l46Ujqtbnj1VbbeM29C9wJzOhz+yZ/7XdSrxk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ltlFKzWvyZvHxDFOYDd/XXJ6kUiJj0ln2HTCEz2o4Z4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "flW8A7bltC1u8bzx0WJtxosGJdOVsJFfbx33jxnpFGg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SXO+92QbMKwUSG2t27ciunV1c3VvFkUuDmSczpRe008=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+KioGs1GM+xRBzFE67ePTWj04KMSE5/Y6qUF7nJ5kvU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L3xNVbh6YH+RzqABN+5Jgb7T234Efpn766DmUvxIxgg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hPF+60mBYPjh21dEmPlBhKgyc9S2qLtTkypYvnqP2Fc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EletRsETy2HcjaPIm2c8CkT7ch/P3pJJDC8hasepcSU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "r5bMXUaNKqLPxZ+TG9HYTG4aSDgcpim27rN8rQFkM0w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Q7Erdr8+/S0wUEDDIqlS5XjBVWvhZY65K0uUDb6+Ns=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xEcnhXy35hbXNVBPOOt3TUHbxvKfQ48KjA9b6/rbMqQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "T8bEpiQNgsEudXvyKE9SZlSvbpV/LUaslsdqgSFltyo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hIoiaF2YjnxDbODfhFEB+JGZ5nf8suD3Shck5bwQ3N0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qnA6qzejeRJ0rsZaZ0zOvKAaXyxt5lpscKQNYFZNl4k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "anAKCL2DN/le2VaP0n2ucYSEH/DaaEH/8Sa4OqTZsRA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JCZlBJaFm618oWYSnT9Jr1MtwFVw4BZjOzO+5yWgR90=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yxyk4n9762WzcDVGnTn4jCqUnSMIVCrLDIjCX1QVj34=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fDI6fdKvDJwim5/CQwWZEzcrXE3LHgy7FTtffcC7tXE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Vex+gcz5T+WkzsVZQrkqUR2ryyZbnaOGuWpYvjN0zCw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8TLEXz+Gbbp6llHpZXVjLsdlYY9f6hrKpHVpyfDe0RY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7fTyt5BrunypS65TfOzFW2E2qdIuT4SLeDeGlbQoJCs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8fKGrkqN0/KuSjyXgDBmRauDKrSa//JBKRWHEB9xBf4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s4codmG7uN4ss6P357jL21lazEe90M9GOK5WrOknSV0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RkSpua8XF+NUdxVDU90EbLUTTyZFX3tt3atBTroFaRk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "LnTCuCDyAHK5B9KXzjtwGmWB+qergQk2OCjnIx9MI2A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cBFh0virAX4pVXf/udIGI2951i0+0aZAdJcBVGtYnT4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "G54X6myQXWZ5fw/G31en3QbdgfXzL9+hFTtJpnWMqDI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EdsiiuezcsFJFnYIyGjCOhnqMj1BOwTB5EFxN+ERUkg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dVH9MXLtk0WTwGQ3xmrhOqfropMUkDW3o6paNPGl3NU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sB3HqXKWY3pKbuEH8BTbfNIGfbY+7/ZbOc3XC+JRNNI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WHyDk62Xhqbo4/iie2aLIM4x2uuAjv6102dJSHI58oM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pNUFuHpeNRDUZ/NrtII2c6sNc9eGR1lIUlIyXKERA+0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UPa+pdCqnN0bfAptdzldQOSd01gidrDKy8KhWrpSKAI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "l+7dOAlo+HUffMqFYXL6pgUFeTbwOM9CjKQLxEoLtc4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SRnDXV/rN6C8xwMutv9E1luv3DOUio3VkgPr8Cpm7Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QcH6gl+gX7xZ7OWhUNQMbndJy0Piz49pDo6RsnLkVSA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "t+uL4DnfsI/Zll/KXWW1cOKX3Hu8WIkm3pt9efCVSAQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "myutHDctku/+Uug/nD8gRbYvmx/IovtoAAC2/fz2oHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6C+cjD0e0nSCP6cPqQYbNG7SlOd6Mfvi8hyfm7Ng+D8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zg01JSoOj9oBKT0S1ldJucXzY5AKgreS+h2xJreWTOs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7qQ80/FjodHl1m1py/Oii0/9C/xWbLdhaRXQ+kkCP10=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YwWMNH07vL6c5Nhg+MRnVByhzUunu8y0VLM9z/XvR5U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Dle8bU98+fudAbc14SToZFkwvV3tcYVsjDug0NWljpc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "J+eKL1vPJmlzltvhI6Li5Fz/TJmi3Ng+ehRTcs46API=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB3XzfFygLwC3WHkj0up+VbEd25KKoce1vOpG/5bwK4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vnVnmOnL+z2pqwE+A6cVKS0Iwy4F4/2IiElJca9bUQM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+lG5r/Fpqry3BtFuvY67+RntmHAMDoLVOSGc6ZoXPb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L5MXQertqc6uj7ADe8aWKbd1sYHPCE7P1VYVg9Zc3VI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "imKONuZgopt0bhM3GMX2WVPwQYMTobuUUEdhcLfHs4c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "eOkU1J1uVbiVFWBerbXsSIVcF2nqiicTkFy4x7kFHB8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gI0uDhXeoH/UatDQKEf4qo8FHzWZDhb/wuWTqbq/ID4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cOkd5Aa3btYhtojE/smsF/PJnULqQ4NNqTkU6KXTFmo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "AWNJMs1MTe294oFipp8Y6P0CjpkZ4qCZoClQF3XcHq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6gJtlzXOFhGYrVbTuRMmvMlDTwXdNtR9aGBlHZPwIMw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "LEmwVGA/xsEG7UrcOoYLFu6KCXgijzFznenknuDacm8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "mIRFPTXRrGaPtp/Ydij2jgkRe4uoUvAKxW2d8b9zYL0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "B+Uv2u48WALOO0L311z+eryjYQzKJVMfdHMZPhOAFmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "INXXp0wDyVCq+NtfIrrC2ciETmyW/dWB/48/u4yLEZ4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "se7DGo8XrlrQDLEcco1tZrQt9kDe+0RTyl2bw/quG4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vr0m2+Zk9lbN6UgWCyn8xJWJOokU3IDYab5U5q1+CgQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XI+eJ8Gy2JktG1gICgoj1qpsfy1tKmH0kglWbaQH6DA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A+UCuNnuAUqnQzspA6TVqUPRmtZmpSex5HFw7THRxs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xaH2Ehfljd19uo0Fvb3iwkdaiWEVQd2YPoitgEPkhSM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "S/iZBJGcc8+qZxyMtab65MMBoSglybwk3x58Nb86gnY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "w14ZE5qqY5YgkS4Zcs9YNbrQbY1XfGOOHNn9bOYnFVQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0MhGd/jEF1vjkKGp+ZMn9SjLK54jkp9W4Hg+Sp/oxaI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "92QZ73e/NRTYgCm4aifaKth6aAsKnLLccBc0zx/qUTY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WOjzemCgFJOiGIp81RSVh/tFlzSTj9eFWcBnsiv2Ycs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DrsP9CmfKPjw5yLL8bnSeAxfNzAwlb+Z8OqCiKgBY7o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lMogqg8veBv6mri3/drMe9afJiKMvevkmGcw9BedfLo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "TxqwNcY8Tg2MPpNdkPBwvfpuTttSYRHU26DGECKYQ9o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "l0u1b4b4vYACWIwfnB7PZac4oDEgjQZCzHruNPTgAIY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "iVSGQ+cCfhbWIrY/v/WBORK92elu9gfRKyGhr6r/k00=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yK1forG50diEXte8ECzjfpHeYsPyuQ/dgxbxn/nzY5k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gIfTLCD3VwnOwkC0zPXWTqaITxX6ZplA69PO2a6zolc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "O/Zxlgh3WqpzJ7+Sd8XWMVID4/GXJUUWaSqfgDUi3b0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZQ6yv368zwahUqSUYH/StL0Qgz/TwS1CzlMjVDvCciI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m2rPEYkjwyiKdonMrKlcF7hya4lFOAUwEePJ3SgrNx8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Mq0yl5iVKlq71bT/dT/fXOWf2n90bTnXFnOdGDN0JOc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6qDGMXipPLC2O6EAAMjO2F9xx4rdqZso4IkPpH2304U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jvQHRQQa2RIszE2LX2Hv2LbRhYawJ6qmtRt8HZzFQXg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ovJXQrkZlpeHRciKyE/WWNm5O389gRgzx1W+Dw596X4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "a4kgRNvYctGYqyQv9qScL/WkljTYVylJ9pE9KDULlxU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qV4Q48vPiCJMTjljotzYKI/zfExWpkKOSHGcAjGyDig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jtI7zbBF+QW/aYYTkn90zzyHLXLgmy7l1bzgMb2oqic=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q0KmJl9txPdn962UNvnfe6UFhdk9YaFZuTm33F+csso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ULNdEqeZJgtmNOhN/Y9INzsE9AnxWYwOMn+pIbRXIFs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "R4oz9+wkdjpKe5tE1jpG7IURAnfvS5fLP4LrD5cZfTE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qG5Z7VhwSu/HT/YFTgDzyAAzJKq51xPw2HeEV5btYC4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OM/1DmIIZ5Qyhtq8TGkHTBEMVKjAnKRZMRXYtTG8ctc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2R5vZbljLXnDFA99YfGuRB7pAdPJVKsT25zLNMC0fUk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OMbavF2EmdAz1fHkLV3ctFEUDfriKhoT2gidwHZ9z1o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MWT4Zrw3/vVvTYMa1Is5Pjr3wEwnBfnEAPPUAHKQhNU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tBkRPfG9yxfKocQx5pAJX0oEHKPL0Tgtr+0UYe09InE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lqxpnDR/H0YgH7RcfKoNoaaRhe1SIazIeMbQ1fu9y3Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "utT1UdR22PWOTrOkZauztX613lAplV4eh/ejTRb7ZSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "S+Y2yFyKi/a6FXhih4yGo29X8I8OT6/zwEoX6NMKT4o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QSjVppg29x6oS5yBg8OFjrFt0tuTpWCuKxfIy0k8YnE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y3r6/Xsfvsl3HksXlVYkJgHUqpQGfICxg3x9f8Zw1qM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BSltHzEwDjFN4du9rDHAPvl22atlcTioEtt+gC5L1tk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0arGXjSN0006UnXbrWsGqhvBair569DeFDUME3Df3rA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s/DumaMad08S+PBUUcrS+v42K0z8HgcdiQtrFAEu2Qs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EzJ8Y8N0OQBTlnvrK82PdevDNZZO4E6CNgYVu8Cj6Ks=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VA4vr8jBPI5QdiPrULzzZjBMIUbG3V7Slg5zm0bFcKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YAOvEB2ZLtq9LQiFViBHWaxxWVVonC2rNYj9tN9s3L0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hgaHMo9aAGS+nBwvqnTjZO+YkiQPY1c1XcIYeaYKHyI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YvaoLt3ZpH0atB0tNzwMjpoxRYJXl0DqSjisMJiGVBE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EMmW6CptFsiLoPOi5/uAJQ2FmeLg6mCpuVLLrRWk7Mc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1jQsNMarSnarlYmXEuoFokeBMg/090qUD9wqo1Zn8Gs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hupXNKhRpJxpyDAAP1TgJ5JMZh9lhbMk6s7D7dMS3C8=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Aggregate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Aggregate.yml deleted file mode 100644 index 97a95b2d94..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Aggregate.yml +++ /dev/null @@ -1,1675 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - # Tests for Decimal (without precision) must only run against a replica set. Decimal (without precision) queries are expected to take a long time and may exceed the default mongos timeout. - topology: [ "replicaset" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDecimalNoPrecision', 'bsonType': 'decimal', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Decimal. Aggregate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDecimalNoPrecision: { $numberDecimal: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDecimalNoPrecision: { $numberDecimal: "1" } } - - name: aggregate - arguments: - pipeline: [{ $match: { "encryptedDecimalNoPrecision": { $gt: {$numberDecimal: "0" }} } }] - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDecimalNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDecimalNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - aggregate: *collection_name - pipeline: [ - { - "$match": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$binary": { - "base64": "DR1jAAADcGF5bG9hZACxYgAABGcAnWIAAAMwAH0AAAA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FbAAgAAAAAOk45vg5VqZHAFCO3i0Z52SZi5RADf8NXwf68T5yad/DAAMxOTQAfQAAAAVkACAAAAAApzcWSAbZWV/Rq+ylRNqqlJqNVR4fhXrz4633/MQOQgcFcwAgAAAAAN/jz/bsEleiuCl+li83EWlG6UMHA8CyaOMRKCkXkSCPBWwAIAAAAAC3Sd+Qg+uFDKpGZHbrQgokXHQ1az1aFl4YK343OB6hcQAAEmNtAAAAAAAAAAAAABBwYXlsb2FkSWQAAAAAABBmaXJzdE9wZXJhdG9yAAEAAAASc3AAAQAAAAAAAAAQdGYAAQAAABNtbgD/////Y46NN8CHrb4J7f/fE214AP////9jjo03wIetvgnt/18A", - "subType": "06" - } - } - } - } - } - ] - cursor: {} - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: aggregate - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "rbf3AeBEv4wWFAKknqDxRW5cLNkFvbIs6iJjc6LShQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0l86Ag5OszXpa78SlOUV3K9nff5iC1p0mRXtLg9M1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hn6yuxFHodeyu7ISlhYrbSf9pTiH4TDEvbYLWjTwFO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zdf4y2etKBuIpkEU1zMwoCkCsdisfXZCh8QPamm+drY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rOQ9oMdiK5xxGH+jPzOvwVqdGGnF3+HkJXxn81s6hp4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "61aKKsE3+BJHHWYvs3xSIBvlRmKswmaOo5rygQJguUg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KuDb/GIzqDM8wv7m7m8AECiWJbae5EKKtJRugZx7kR0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Q+t8t2TmNUiCIorVr9F3AlVnX+Mpt2ZYvN+s8UGict8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJRZIpKxUgHyL83kW8cvfjkxN3z6WoNnUg+SQw+LK+k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnUsYjip8SvW0+m9mR5WWTkpK+p6uwJ6yBUAlBnFKMk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PArHlz+yPRYDycAP/PgnI/AkP8Wgmfg++Vf4UG1Bf0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wnIh53Q3jeK8jEBe1n8kJLa89/H0BxO26ZU8SRIAs9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4F8U59gzBLGhq58PEWQk2nch+R0Va7eTUoxMneReUIA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ihKagIW3uT1dm22ROr/g5QaCpxZVj2+Fs/YSdM2Noco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EJtUOOwjkrPUi9mavYAi+Gom9Y2DuFll7aDwo4mq0M0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dIkr8dbaVRQFskAVT6B286BbcBBt1pZPEOcTZqk4ZcI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aYVAcZYkH/Tieoa1XOjE/zCy5AJcVTHjS0NG2QB7muA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sBidL6y8TenseetpioIAAtn0lK/7C8MoW4JXpVYi3z8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Dd2klU/t4R86c2WJcJDAd57k/N7OjvYSO5Vf8KH8sw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I3jZ92WEVmZmgaIkLbuWhBxl7EM6bEjiEttgBJunArA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aGHoQMlgJoGvArjfIbc3nnkoc8SWBxcrN7hSmjMRzos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bpiWPnF/KVBQr5F6MEwc5ZZayzIRvQOLDAm4ntwOi8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI7QVKbE6avWgDD9h4QKyFlnTxFCwd2iLySKakxNR/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XGsge0CnoaXgE3rcpKm8AEeku5QVfokS3kcI+JKV1lk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JQxlryW2Q5WOwfrjAnaZxDvC83Dg6sjRVP5zegf2WiM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YFuHKJOfoqp1iGVxoFjx7bLYgVdsN4GuUFxEgO9HJ5s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z6vUdiCR18ylKomf08uxcQHeRtmyav7/Ecvzz4av3k4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SPGo1Ib5AiP/tSllL7Z5PAypvnKdwJLzt8imfIMSEJQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m94Nh6PFFQFLIib9Cu5LAKavhXnagSHG6F5EF8lD96I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pfEkQI98mB+gm1+JbmVurPAODMFPJ4E8DnqfVyUWbSo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DNj3OVRLbr43s0vd+rgWghOL3FqeO/60npdojC8Ry/M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kAYIQrjHVu49W8FTxyxJeiLVRWWjC9fPcBn+Hx1F+Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aCSO7UVOpoQvu/iridarxkxV1SVxU1i9HVSYXUAeXk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Gh6hTP/yj1IKlXQ+Q69KTfMlGZjEcXoRLGbQHNFo/1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/gDgIFQ4tAlJk3GN48IS5Qa5IPmErwGk8CHxAbp6gs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PICyimwPjxpusyKxNssOOwUotAUbygpyEtORsVGXT8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4lu+cBHyAUvuxC6JUNyHLzHsCogGSWFFnUCkDwfQdgI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pSndkmoNUJwXjgkbkgOrT5f9nSvuoMEZOkwAN9ElRaE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tyW+D4i26QihNM5MuBM+wnt5AdWGSJaJ4X5ydc9iWTU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9Syjr8RoxUgPKr+O5rsCu07AvcebA4P8IVKyS1NVLWc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "67tPfDYnK2tmrioI51fOBG0ygajcV0pLo5+Zm/rEW7U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y0EiPRxYTuS1eVTIaPQUQBBxwkyxNckbePvKgChwd0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NWd+2veAaeXQgR3vCvzlI4R1WW67D5YsVLdoXfdb8qg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PY5RQqKQsL2GqBBSPNOEVpojNFRX/NijCghIpxD6CZk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lcvwTyEjFlssCJtdjRpdN6oY+C7bxZY+WA+QAqzj9zg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWE7XRNylvTwO/9Fv56dNqUaQWMmESNS/GNIwgBaEI0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ijwlrUeS8nRYqK1F8kiCYF0mNDolEZS+/lJO1Lg93C8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8KzV+qYGYuIjoNj8eEpnTuHrMYuhzphl80rS6wrODuU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wDyTLjSEFF895hSQsHvmoEQVS6KIkZOtq1c9dVogm9I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SGrtPuMYCjUrfKF0Pq/thdaQzmGBMUvlwN3ORIu9tHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KySHON3hIoUk4xWcwTqk6IL0kgjzjxgMBObVIkCGvk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hBIdS9j0XJPeT4ot73ngELkpUoSixvRBvdOL9z48jY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Tx6um0q9HjS5ZvlFhvukpI6ORnyrXMWVW1OoxvgqII0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zFKlyfX5H81+d4A4J3FKn4T5JfG+OWtR06ddyX4Mxas=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cGgCDuPV7MeMMYEDpgOupqyNP4BQ4H7rBnd2QygumgM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IPaUoy98v11EoglTpJ4kBlEawoZ8y7BPwzjLYBpkvHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Pfo4Am6tOWAyZNn8G9W5HWWGC3ZWmX0igI/RRB870Ro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fnTSjd7bC1Udoq6iM7UDnHAC/lsIXSHp/Gy332qw+/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fApBgVRrTDyEumkeWs5p3ag9KB48SbU4Si0dl7Ns9rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QxudfBItgoCnUj5NXVnSmWH3HK76YtKkMmzn4lyyUYY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sSOvwhKa29Wq94bZ5jGIiJQGbG1uBrKSBfOYBz/oZeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FdaMgwwJ0NKsqmPZLC5oE+/0D74Dfpvig3LaI5yW5Fs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sRWBy12IERN43BSZIrnBfC9+zFBUdvjTlkqIH81NGt4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/4tIRpxKhoOwnXAiFn1Z7Xmric4USOIfKvTYQXk3QTc=", - "subType": "00" - } - } - ] - } - - - { - "_id": { - "$numberInt": "1" - }, - "encryptedDecimalNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RGTjNVEsNJb+DG7DpPOam8rQWD5HZAMpRyiTQaw7tk8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I93Md7QNPGmEEGYU1+VVCqBPBEvXdqHPtTJtMOn06Yk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "GecBFQ1PemlECWZWCl7f74vmsL6eB6mzQ9n6tK6FYfs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QpjhZl+O1ORifgtCZuWAdcP6OKL7IZ2cA46v8FJcV28=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RlQWwhU+uVv0a+9IB5cUkEfvHBvOw3B1Sx6WfPWMqes=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubb81XTC7U+4tcNzf1oYvOY6gR5hC2Izqx54f4GuJ0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6M4Q5NMQ9TqNnjzGOxIkiUIY8TEL0I3XD1QnhefQUqU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BtInzk9t2FFMCEY6AQ7zN8jwrrZEs2irSv6q0Q4NaIw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vxXfETu9cuBIpRBo3jUUU04mJIH/aAhLX8K6VI5Xv0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wXPCdS+q23zi1bkPnaVG2j0PsVtxdeSLJ//h6J1x8RU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KY3KkfBAsN2l80wbpj41G0gwBR5KmmFnZcagg7D3ENk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI8NFAxXCX4VOnY5X73K6KI/Yspd3aR94KV39MhJlAw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nFxH0UC3mATKA6Vboz+QX/hAjj19kF/SH6H5Cne7qC0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q8hYqIYaIi7nOdG/7qQZYnz8Bsacfi66M1nVku4SH08=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4saA92R4arp4anvD9xFtze+sNcQqTEhPHyl1h70A8NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DbIziOBRRyeQS6RtBR09E37LV+CTKrEjGoRMLSpG6eE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Fv80Plp/7w2gnVqrwawLd6qhJ10G4NCDm3re67cNq4Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "T/T2oiQCBBES4YN7EodzPRdabZSFlYIClHBym+bQUZE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZQgHD3l46Ujqtbnj1VbbeM29C9wJzOhz+yZ/7XdSrxk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ltlFKzWvyZvHxDFOYDd/XXJ6kUiJj0ln2HTCEz2o4Z4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "flW8A7bltC1u8bzx0WJtxosGJdOVsJFfbx33jxnpFGg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SXO+92QbMKwUSG2t27ciunV1c3VvFkUuDmSczpRe008=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+KioGs1GM+xRBzFE67ePTWj04KMSE5/Y6qUF7nJ5kvU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L3xNVbh6YH+RzqABN+5Jgb7T234Efpn766DmUvxIxgg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hPF+60mBYPjh21dEmPlBhKgyc9S2qLtTkypYvnqP2Fc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EletRsETy2HcjaPIm2c8CkT7ch/P3pJJDC8hasepcSU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "r5bMXUaNKqLPxZ+TG9HYTG4aSDgcpim27rN8rQFkM0w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Q7Erdr8+/S0wUEDDIqlS5XjBVWvhZY65K0uUDb6+Ns=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xEcnhXy35hbXNVBPOOt3TUHbxvKfQ48KjA9b6/rbMqQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "T8bEpiQNgsEudXvyKE9SZlSvbpV/LUaslsdqgSFltyo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hIoiaF2YjnxDbODfhFEB+JGZ5nf8suD3Shck5bwQ3N0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qnA6qzejeRJ0rsZaZ0zOvKAaXyxt5lpscKQNYFZNl4k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "anAKCL2DN/le2VaP0n2ucYSEH/DaaEH/8Sa4OqTZsRA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JCZlBJaFm618oWYSnT9Jr1MtwFVw4BZjOzO+5yWgR90=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yxyk4n9762WzcDVGnTn4jCqUnSMIVCrLDIjCX1QVj34=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fDI6fdKvDJwim5/CQwWZEzcrXE3LHgy7FTtffcC7tXE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Vex+gcz5T+WkzsVZQrkqUR2ryyZbnaOGuWpYvjN0zCw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8TLEXz+Gbbp6llHpZXVjLsdlYY9f6hrKpHVpyfDe0RY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7fTyt5BrunypS65TfOzFW2E2qdIuT4SLeDeGlbQoJCs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8fKGrkqN0/KuSjyXgDBmRauDKrSa//JBKRWHEB9xBf4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s4codmG7uN4ss6P357jL21lazEe90M9GOK5WrOknSV0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RkSpua8XF+NUdxVDU90EbLUTTyZFX3tt3atBTroFaRk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "LnTCuCDyAHK5B9KXzjtwGmWB+qergQk2OCjnIx9MI2A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cBFh0virAX4pVXf/udIGI2951i0+0aZAdJcBVGtYnT4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "G54X6myQXWZ5fw/G31en3QbdgfXzL9+hFTtJpnWMqDI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EdsiiuezcsFJFnYIyGjCOhnqMj1BOwTB5EFxN+ERUkg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dVH9MXLtk0WTwGQ3xmrhOqfropMUkDW3o6paNPGl3NU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sB3HqXKWY3pKbuEH8BTbfNIGfbY+7/ZbOc3XC+JRNNI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WHyDk62Xhqbo4/iie2aLIM4x2uuAjv6102dJSHI58oM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pNUFuHpeNRDUZ/NrtII2c6sNc9eGR1lIUlIyXKERA+0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UPa+pdCqnN0bfAptdzldQOSd01gidrDKy8KhWrpSKAI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "l+7dOAlo+HUffMqFYXL6pgUFeTbwOM9CjKQLxEoLtc4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SRnDXV/rN6C8xwMutv9E1luv3DOUio3VkgPr8Cpm7Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QcH6gl+gX7xZ7OWhUNQMbndJy0Piz49pDo6RsnLkVSA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "t+uL4DnfsI/Zll/KXWW1cOKX3Hu8WIkm3pt9efCVSAQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "myutHDctku/+Uug/nD8gRbYvmx/IovtoAAC2/fz2oHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6C+cjD0e0nSCP6cPqQYbNG7SlOd6Mfvi8hyfm7Ng+D8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zg01JSoOj9oBKT0S1ldJucXzY5AKgreS+h2xJreWTOs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7qQ80/FjodHl1m1py/Oii0/9C/xWbLdhaRXQ+kkCP10=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YwWMNH07vL6c5Nhg+MRnVByhzUunu8y0VLM9z/XvR5U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Dle8bU98+fudAbc14SToZFkwvV3tcYVsjDug0NWljpc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "J+eKL1vPJmlzltvhI6Li5Fz/TJmi3Ng+ehRTcs46API=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB3XzfFygLwC3WHkj0up+VbEd25KKoce1vOpG/5bwK4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vnVnmOnL+z2pqwE+A6cVKS0Iwy4F4/2IiElJca9bUQM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+lG5r/Fpqry3BtFuvY67+RntmHAMDoLVOSGc6ZoXPb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L5MXQertqc6uj7ADe8aWKbd1sYHPCE7P1VYVg9Zc3VI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "imKONuZgopt0bhM3GMX2WVPwQYMTobuUUEdhcLfHs4c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "eOkU1J1uVbiVFWBerbXsSIVcF2nqiicTkFy4x7kFHB8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gI0uDhXeoH/UatDQKEf4qo8FHzWZDhb/wuWTqbq/ID4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cOkd5Aa3btYhtojE/smsF/PJnULqQ4NNqTkU6KXTFmo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "AWNJMs1MTe294oFipp8Y6P0CjpkZ4qCZoClQF3XcHq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6gJtlzXOFhGYrVbTuRMmvMlDTwXdNtR9aGBlHZPwIMw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "LEmwVGA/xsEG7UrcOoYLFu6KCXgijzFznenknuDacm8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "mIRFPTXRrGaPtp/Ydij2jgkRe4uoUvAKxW2d8b9zYL0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "B+Uv2u48WALOO0L311z+eryjYQzKJVMfdHMZPhOAFmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "INXXp0wDyVCq+NtfIrrC2ciETmyW/dWB/48/u4yLEZ4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "se7DGo8XrlrQDLEcco1tZrQt9kDe+0RTyl2bw/quG4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vr0m2+Zk9lbN6UgWCyn8xJWJOokU3IDYab5U5q1+CgQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XI+eJ8Gy2JktG1gICgoj1qpsfy1tKmH0kglWbaQH6DA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A+UCuNnuAUqnQzspA6TVqUPRmtZmpSex5HFw7THRxs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xaH2Ehfljd19uo0Fvb3iwkdaiWEVQd2YPoitgEPkhSM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "S/iZBJGcc8+qZxyMtab65MMBoSglybwk3x58Nb86gnY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "w14ZE5qqY5YgkS4Zcs9YNbrQbY1XfGOOHNn9bOYnFVQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0MhGd/jEF1vjkKGp+ZMn9SjLK54jkp9W4Hg+Sp/oxaI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "92QZ73e/NRTYgCm4aifaKth6aAsKnLLccBc0zx/qUTY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WOjzemCgFJOiGIp81RSVh/tFlzSTj9eFWcBnsiv2Ycs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DrsP9CmfKPjw5yLL8bnSeAxfNzAwlb+Z8OqCiKgBY7o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lMogqg8veBv6mri3/drMe9afJiKMvevkmGcw9BedfLo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "TxqwNcY8Tg2MPpNdkPBwvfpuTttSYRHU26DGECKYQ9o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "l0u1b4b4vYACWIwfnB7PZac4oDEgjQZCzHruNPTgAIY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "iVSGQ+cCfhbWIrY/v/WBORK92elu9gfRKyGhr6r/k00=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yK1forG50diEXte8ECzjfpHeYsPyuQ/dgxbxn/nzY5k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gIfTLCD3VwnOwkC0zPXWTqaITxX6ZplA69PO2a6zolc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "O/Zxlgh3WqpzJ7+Sd8XWMVID4/GXJUUWaSqfgDUi3b0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZQ6yv368zwahUqSUYH/StL0Qgz/TwS1CzlMjVDvCciI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m2rPEYkjwyiKdonMrKlcF7hya4lFOAUwEePJ3SgrNx8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Mq0yl5iVKlq71bT/dT/fXOWf2n90bTnXFnOdGDN0JOc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6qDGMXipPLC2O6EAAMjO2F9xx4rdqZso4IkPpH2304U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jvQHRQQa2RIszE2LX2Hv2LbRhYawJ6qmtRt8HZzFQXg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ovJXQrkZlpeHRciKyE/WWNm5O389gRgzx1W+Dw596X4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "a4kgRNvYctGYqyQv9qScL/WkljTYVylJ9pE9KDULlxU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qV4Q48vPiCJMTjljotzYKI/zfExWpkKOSHGcAjGyDig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jtI7zbBF+QW/aYYTkn90zzyHLXLgmy7l1bzgMb2oqic=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q0KmJl9txPdn962UNvnfe6UFhdk9YaFZuTm33F+csso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ULNdEqeZJgtmNOhN/Y9INzsE9AnxWYwOMn+pIbRXIFs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "R4oz9+wkdjpKe5tE1jpG7IURAnfvS5fLP4LrD5cZfTE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qG5Z7VhwSu/HT/YFTgDzyAAzJKq51xPw2HeEV5btYC4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OM/1DmIIZ5Qyhtq8TGkHTBEMVKjAnKRZMRXYtTG8ctc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2R5vZbljLXnDFA99YfGuRB7pAdPJVKsT25zLNMC0fUk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OMbavF2EmdAz1fHkLV3ctFEUDfriKhoT2gidwHZ9z1o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MWT4Zrw3/vVvTYMa1Is5Pjr3wEwnBfnEAPPUAHKQhNU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tBkRPfG9yxfKocQx5pAJX0oEHKPL0Tgtr+0UYe09InE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lqxpnDR/H0YgH7RcfKoNoaaRhe1SIazIeMbQ1fu9y3Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "utT1UdR22PWOTrOkZauztX613lAplV4eh/ejTRb7ZSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "S+Y2yFyKi/a6FXhih4yGo29X8I8OT6/zwEoX6NMKT4o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QSjVppg29x6oS5yBg8OFjrFt0tuTpWCuKxfIy0k8YnE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y3r6/Xsfvsl3HksXlVYkJgHUqpQGfICxg3x9f8Zw1qM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BSltHzEwDjFN4du9rDHAPvl22atlcTioEtt+gC5L1tk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0arGXjSN0006UnXbrWsGqhvBair569DeFDUME3Df3rA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s/DumaMad08S+PBUUcrS+v42K0z8HgcdiQtrFAEu2Qs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EzJ8Y8N0OQBTlnvrK82PdevDNZZO4E6CNgYVu8Cj6Ks=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VA4vr8jBPI5QdiPrULzzZjBMIUbG3V7Slg5zm0bFcKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YAOvEB2ZLtq9LQiFViBHWaxxWVVonC2rNYj9tN9s3L0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hgaHMo9aAGS+nBwvqnTjZO+YkiQPY1c1XcIYeaYKHyI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YvaoLt3ZpH0atB0tNzwMjpoxRYJXl0DqSjisMJiGVBE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EMmW6CptFsiLoPOi5/uAJQ2FmeLg6mCpuVLLrRWk7Mc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1jQsNMarSnarlYmXEuoFokeBMg/090qUD9wqo1Zn8Gs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hupXNKhRpJxpyDAAP1TgJ5JMZh9lhbMk6s7D7dMS3C8=", - "subType": "00" - } - } - ] - } - \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Correctness.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Correctness.json deleted file mode 100644 index 4316a31c3e..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Correctness.json +++ /dev/null @@ -1,1158 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Find with $gt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$numberDecimal": "0.0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$gte": { - "$numberDecimal": "0.0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - }, - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$numberDecimal": "1.0" - } - } - } - }, - "result": [] - } - ] - }, - { - "description": "Find with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$lt": { - "$numberDecimal": "1.0" - } - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - ] - } - ] - }, - { - "description": "Find with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$lte": { - "$numberDecimal": "1.0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - }, - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$numberDecimal": "0.0" - }, - "$lt": { - "$numberDecimal": "2.0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - ] - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$in": [ - { - "$numberDecimal": "0.0" - } - ] - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalNoPrecision": { - "$gte": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - }, - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$numberDecimal": "1.0" - } - } - } - } - ] - }, - "result": [] - } - ] - }, - { - "description": "Aggregate with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalNoPrecision": { - "$lt": { - "$numberDecimal": "1.0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalNoPrecision": { - "$lte": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - }, - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$numberDecimal": "0.0" - }, - "$lt": { - "$numberDecimal": "2.0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - ] - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalNoPrecision": { - "$in": [ - { - "$numberDecimal": "0.0" - } - ] - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0.0" - } - } - ] - } - ] - }, - { - "description": "Wrong type: Insert Int", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberInt": "0" - } - } - }, - "result": { - "errorContains": "cannot encrypt element" - } - } - ] - }, - { - "description": "Wrong type: Find Int", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$gte": { - "$numberInt": "0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": { - "errorContains": "field type is not supported" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Correctness.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Correctness.yml deleted file mode 100644 index 8154624799..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Correctness.yml +++ /dev/null @@ -1,293 +0,0 @@ -# Test correctness results. -# Does not include command monitoring expectations or outcome assertions to make tests more readable. - -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "8.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - # Tests for Decimal (without precision) must only run against a replica set. Decimal (without precision) queries are expected to take a long time and may exceed the default mongos timeout. - topology: [ "replicaset" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDecimalNoPrecision', 'bsonType': 'decimal', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Find with $gt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDecimalNoPrecision: { $numberDecimal: "0.0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDecimalNoPrecision: { $numberDecimal: "1.0" } } - - name: find - arguments: - filter: { encryptedDecimalNoPrecision: { $gt: { $numberDecimal: "0.0" } }} - result: [*doc1] - - - description: "Find with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalNoPrecision: { $gte: { $numberDecimal: "0.0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalNoPrecision: { $gt: { $numberDecimal: "1.0" } }} - result: [] - - - description: "Find with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalNoPrecision: { $lt: { $numberDecimal: "1.0" } }} - result: [*doc0] - - - description: "Find with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalNoPrecision: { $lte: { $numberDecimal: "1.0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalNoPrecision: { $gt: { $numberDecimal: "0.0" }, $lt: { $numberDecimal: "2.0"} }} - result: [*doc1] - - - description: "Find with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalNoPrecision: { $numberDecimal: "0.0" } } - result: [*doc0] - - name: find - arguments: - filter: { encryptedDecimalNoPrecision: { $numberDecimal: "1.0" } } - result: [*doc1] - - - description: "Find with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalNoPrecision: { $in: [ {$numberDecimal: "0.0"} ] } } - result: [*doc0] - - - description: "Aggregate with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalNoPrecision: { $gte: { $numberDecimal: "0.0" } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalNoPrecision: { $gt: { $numberDecimal: "1.0" } }} } - result: [] - - - description: "Aggregate with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalNoPrecision: { $lt: { $numberDecimal: "1.0" } }} } - result: [*doc0] - - - description: "Aggregate with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalNoPrecision: { $lte: { $numberDecimal: "1.0" } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalNoPrecision: { $gt: { $numberDecimal: "0.0" }, $lt: { $numberDecimal: "2.0"} }} } - result: [*doc1] - - - description: "Aggregate with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalNoPrecision: { $numberDecimal: "0.0" } } } - result: [*doc0] - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalNoPrecision: { $numberDecimal: "1.0" } } } - result: [*doc1] - - - description: "Aggregate with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalNoPrecision: { $in: [ {$numberDecimal: "0.0"} ] } } } - result: [*doc0] - - - description: "Wrong type: Insert Int" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: { _id: 0, encryptedDecimalNoPrecision: { $numberInt: "0" }} } - result: - # Expect an error from mongocryptd. - errorContains: "cannot encrypt element" - - - description: "Wrong type: Find Int" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: find - arguments: - filter: { encryptedDecimalNoPrecision: { $gte: { $numberInt: "0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: - # expect an error from libmongocrypt. - errorContains: "field type is not supported" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Delete.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Delete.json deleted file mode 100644 index 19cae3c64f..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Delete.json +++ /dev/null @@ -1,1116 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Decimal. Delete.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1" - } - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$numberDecimal": "0" - } - } - } - }, - "result": { - "deletedCount": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "delete": "default", - "deletes": [ - { - "q": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$binary": { - "base64": "DR1jAAADcGF5bG9hZACxYgAABGcAnWIAAAMwAH0AAAAFZAAgAAAAAJu2KgiI8vM+k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CO3i0Z52SZi5RADf8NXwf68T5yad/DAAMxOTQAfQAAAAVkACAAAAAApzcWSAbZWV/Rq+ylRNqqlJqNVR4fhXrz4633/MQOQgcFcwAgAAAAAN/jz/bsEleiuCl+li83EWlG6UMHA8CyaOMRKCkXkSCPBWwAIAAAAAC3Sd+Qg+uFDKpGZHbrQgokXHQ1az1aFl4YK343OB6hcQAAEmNtAAAAAAAAAAAAABBwYXlsb2FkSWQAAAAAABBmaXJzdE9wZXJhdG9yAAEAAAASc3AAAQAAAAAAAAAQdGYAAQAAABNtbgD/////Y46NN8CHrb4J7f/fE214AP////9jjo03wIetvgnt/18A", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "delete" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "rbf3AeBEv4wWFAKknqDxRW5cLNkFvbIs6iJjc6LShQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0l86Ag5OszXpa78SlOUV3K9nff5iC1p0mRXtLg9M1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hn6yuxFHodeyu7ISlhYrbSf9pTiH4TDEvbYLWjTwFO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zdf4y2etKBuIpkEU1zMwoCkCsdisfXZCh8QPamm+drY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rOQ9oMdiK5xxGH+jPzOvwVqdGGnF3+HkJXxn81s6hp4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "61aKKsE3+BJHHWYvs3xSIBvlRmKswmaOo5rygQJguUg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KuDb/GIzqDM8wv7m7m8AECiWJbae5EKKtJRugZx7kR0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Q+t8t2TmNUiCIorVr9F3AlVnX+Mpt2ZYvN+s8UGict8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJRZIpKxUgHyL83kW8cvfjkxN3z6WoNnUg+SQw+LK+k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnUsYjip8SvW0+m9mR5WWTkpK+p6uwJ6yBUAlBnFKMk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PArHlz+yPRYDycAP/PgnI/AkP8Wgmfg++Vf4UG1Bf0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wnIh53Q3jeK8jEBe1n8kJLa89/H0BxO26ZU8SRIAs9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4F8U59gzBLGhq58PEWQk2nch+R0Va7eTUoxMneReUIA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ihKagIW3uT1dm22ROr/g5QaCpxZVj2+Fs/YSdM2Noco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EJtUOOwjkrPUi9mavYAi+Gom9Y2DuFll7aDwo4mq0M0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dIkr8dbaVRQFskAVT6B286BbcBBt1pZPEOcTZqk4ZcI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aYVAcZYkH/Tieoa1XOjE/zCy5AJcVTHjS0NG2QB7muA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sBidL6y8TenseetpioIAAtn0lK/7C8MoW4JXpVYi3z8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Dd2klU/t4R86c2WJcJDAd57k/N7OjvYSO5Vf8KH8sw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I3jZ92WEVmZmgaIkLbuWhBxl7EM6bEjiEttgBJunArA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aGHoQMlgJoGvArjfIbc3nnkoc8SWBxcrN7hSmjMRzos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bpiWPnF/KVBQr5F6MEwc5ZZayzIRvQOLDAm4ntwOi8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI7QVKbE6avWgDD9h4QKyFlnTxFCwd2iLySKakxNR/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XGsge0CnoaXgE3rcpKm8AEeku5QVfokS3kcI+JKV1lk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JQxlryW2Q5WOwfrjAnaZxDvC83Dg6sjRVP5zegf2WiM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YFuHKJOfoqp1iGVxoFjx7bLYgVdsN4GuUFxEgO9HJ5s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z6vUdiCR18ylKomf08uxcQHeRtmyav7/Ecvzz4av3k4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SPGo1Ib5AiP/tSllL7Z5PAypvnKdwJLzt8imfIMSEJQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m94Nh6PFFQFLIib9Cu5LAKavhXnagSHG6F5EF8lD96I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pfEkQI98mB+gm1+JbmVurPAODMFPJ4E8DnqfVyUWbSo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DNj3OVRLbr43s0vd+rgWghOL3FqeO/60npdojC8Ry/M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kAYIQrjHVu49W8FTxyxJeiLVRWWjC9fPcBn+Hx1F+Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aCSO7UVOpoQvu/iridarxkxV1SVxU1i9HVSYXUAeXk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Gh6hTP/yj1IKlXQ+Q69KTfMlGZjEcXoRLGbQHNFo/1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/gDgIFQ4tAlJk3GN48IS5Qa5IPmErwGk8CHxAbp6gs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PICyimwPjxpusyKxNssOOwUotAUbygpyEtORsVGXT8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4lu+cBHyAUvuxC6JUNyHLzHsCogGSWFFnUCkDwfQdgI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pSndkmoNUJwXjgkbkgOrT5f9nSvuoMEZOkwAN9ElRaE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tyW+D4i26QihNM5MuBM+wnt5AdWGSJaJ4X5ydc9iWTU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9Syjr8RoxUgPKr+O5rsCu07AvcebA4P8IVKyS1NVLWc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "67tPfDYnK2tmrioI51fOBG0ygajcV0pLo5+Zm/rEW7U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y0EiPRxYTuS1eVTIaPQUQBBxwkyxNckbePvKgChwd0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NWd+2veAaeXQgR3vCvzlI4R1WW67D5YsVLdoXfdb8qg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PY5RQqKQsL2GqBBSPNOEVpojNFRX/NijCghIpxD6CZk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lcvwTyEjFlssCJtdjRpdN6oY+C7bxZY+WA+QAqzj9zg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWE7XRNylvTwO/9Fv56dNqUaQWMmESNS/GNIwgBaEI0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ijwlrUeS8nRYqK1F8kiCYF0mNDolEZS+/lJO1Lg93C8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8KzV+qYGYuIjoNj8eEpnTuHrMYuhzphl80rS6wrODuU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wDyTLjSEFF895hSQsHvmoEQVS6KIkZOtq1c9dVogm9I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SGrtPuMYCjUrfKF0Pq/thdaQzmGBMUvlwN3ORIu9tHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KySHON3hIoUk4xWcwTqk6IL0kgjzjxgMBObVIkCGvk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hBIdS9j0XJPeT4ot73ngELkpUoSixvRBvdOL9z48jY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Tx6um0q9HjS5ZvlFhvukpI6ORnyrXMWVW1OoxvgqII0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zFKlyfX5H81+d4A4J3FKn4T5JfG+OWtR06ddyX4Mxas=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cGgCDuPV7MeMMYEDpgOupqyNP4BQ4H7rBnd2QygumgM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IPaUoy98v11EoglTpJ4kBlEawoZ8y7BPwzjLYBpkvHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Pfo4Am6tOWAyZNn8G9W5HWWGC3ZWmX0igI/RRB870Ro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fnTSjd7bC1Udoq6iM7UDnHAC/lsIXSHp/Gy332qw+/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fApBgVRrTDyEumkeWs5p3ag9KB48SbU4Si0dl7Ns9rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QxudfBItgoCnUj5NXVnSmWH3HK76YtKkMmzn4lyyUYY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sSOvwhKa29Wq94bZ5jGIiJQGbG1uBrKSBfOYBz/oZeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FdaMgwwJ0NKsqmPZLC5oE+/0D74Dfpvig3LaI5yW5Fs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sRWBy12IERN43BSZIrnBfC9+zFBUdvjTlkqIH81NGt4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/4tIRpxKhoOwnXAiFn1Z7Xmric4USOIfKvTYQXk3QTc=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Delete.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Delete.yml deleted file mode 100644 index daf89dd91c..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Delete.yml +++ /dev/null @@ -1,899 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - # Tests for Decimal (without precision) must only run against a replica set. Decimal (without precision) queries are expected to take a long time and may exceed the default mongos timeout. - topology: [ "replicaset" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDecimalNoPrecision', 'bsonType': 'decimal', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Decimal. Delete." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDecimalNoPrecision: { $numberDecimal: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDecimalNoPrecision: { $numberDecimal: "1" } } - - name: deleteOne - arguments: - filter: { "encryptedDecimalNoPrecision": { $gt: {$numberDecimal: "0" }} } - result: - deletedCount: 1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDecimalNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDecimalNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - delete: *collection_name - deletes: [ - { - "q": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$binary": { - "base64": "DR1jAAADcGF5bG9hZACxYgAABGcAnWIAAAMwAH0AAAAFZAAgAAAAAJu2KgiI8vM+kz9qD3ZQzFQY5qbgYqCqHG5R4jAlnlwXBXMAIAAAAAAAUXxFXsz764T79sGCdhxvNd5b6E/9p61FonsHyEIhogVsACAAAAAAt19RL3Oo5ni5L8kcvgOJYLgVYyXJExwP8pkuzLG7f/kAAzEAfQAAAAVkACAAAAAAPQPvL0ARjujSv2Rkm8r7spVsgeC1K3FWcskGGZ3OdDIFcwAgAAAAACgNn660GmefR8jLqzgR1u5O+Uocx9GyEHiBqVGko5FZBWwAIAAAAADflr+fsnZngm6KRWYgHa9JzK+bXogWl9evBU9sQUHPHQADMgB9AAAABWQAIAAAAAD2Zi6kcxmaD2mY3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A", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ] - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: delete - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "rbf3AeBEv4wWFAKknqDxRW5cLNkFvbIs6iJjc6LShQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0l86Ag5OszXpa78SlOUV3K9nff5iC1p0mRXtLg9M1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hn6yuxFHodeyu7ISlhYrbSf9pTiH4TDEvbYLWjTwFO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zdf4y2etKBuIpkEU1zMwoCkCsdisfXZCh8QPamm+drY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rOQ9oMdiK5xxGH+jPzOvwVqdGGnF3+HkJXxn81s6hp4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "61aKKsE3+BJHHWYvs3xSIBvlRmKswmaOo5rygQJguUg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KuDb/GIzqDM8wv7m7m8AECiWJbae5EKKtJRugZx7kR0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Q+t8t2TmNUiCIorVr9F3AlVnX+Mpt2ZYvN+s8UGict8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJRZIpKxUgHyL83kW8cvfjkxN3z6WoNnUg+SQw+LK+k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnUsYjip8SvW0+m9mR5WWTkpK+p6uwJ6yBUAlBnFKMk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PArHlz+yPRYDycAP/PgnI/AkP8Wgmfg++Vf4UG1Bf0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wnIh53Q3jeK8jEBe1n8kJLa89/H0BxO26ZU8SRIAs9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4F8U59gzBLGhq58PEWQk2nch+R0Va7eTUoxMneReUIA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ihKagIW3uT1dm22ROr/g5QaCpxZVj2+Fs/YSdM2Noco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EJtUOOwjkrPUi9mavYAi+Gom9Y2DuFll7aDwo4mq0M0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dIkr8dbaVRQFskAVT6B286BbcBBt1pZPEOcTZqk4ZcI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aYVAcZYkH/Tieoa1XOjE/zCy5AJcVTHjS0NG2QB7muA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sBidL6y8TenseetpioIAAtn0lK/7C8MoW4JXpVYi3z8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Dd2klU/t4R86c2WJcJDAd57k/N7OjvYSO5Vf8KH8sw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I3jZ92WEVmZmgaIkLbuWhBxl7EM6bEjiEttgBJunArA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aGHoQMlgJoGvArjfIbc3nnkoc8SWBxcrN7hSmjMRzos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bpiWPnF/KVBQr5F6MEwc5ZZayzIRvQOLDAm4ntwOi8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI7QVKbE6avWgDD9h4QKyFlnTxFCwd2iLySKakxNR/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XGsge0CnoaXgE3rcpKm8AEeku5QVfokS3kcI+JKV1lk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JQxlryW2Q5WOwfrjAnaZxDvC83Dg6sjRVP5zegf2WiM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YFuHKJOfoqp1iGVxoFjx7bLYgVdsN4GuUFxEgO9HJ5s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z6vUdiCR18ylKomf08uxcQHeRtmyav7/Ecvzz4av3k4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SPGo1Ib5AiP/tSllL7Z5PAypvnKdwJLzt8imfIMSEJQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m94Nh6PFFQFLIib9Cu5LAKavhXnagSHG6F5EF8lD96I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pfEkQI98mB+gm1+JbmVurPAODMFPJ4E8DnqfVyUWbSo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DNj3OVRLbr43s0vd+rgWghOL3FqeO/60npdojC8Ry/M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kAYIQrjHVu49W8FTxyxJeiLVRWWjC9fPcBn+Hx1F+Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aCSO7UVOpoQvu/iridarxkxV1SVxU1i9HVSYXUAeXk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Gh6hTP/yj1IKlXQ+Q69KTfMlGZjEcXoRLGbQHNFo/1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/gDgIFQ4tAlJk3GN48IS5Qa5IPmErwGk8CHxAbp6gs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PICyimwPjxpusyKxNssOOwUotAUbygpyEtORsVGXT8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4lu+cBHyAUvuxC6JUNyHLzHsCogGSWFFnUCkDwfQdgI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pSndkmoNUJwXjgkbkgOrT5f9nSvuoMEZOkwAN9ElRaE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tyW+D4i26QihNM5MuBM+wnt5AdWGSJaJ4X5ydc9iWTU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9Syjr8RoxUgPKr+O5rsCu07AvcebA4P8IVKyS1NVLWc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "67tPfDYnK2tmrioI51fOBG0ygajcV0pLo5+Zm/rEW7U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y0EiPRxYTuS1eVTIaPQUQBBxwkyxNckbePvKgChwd0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NWd+2veAaeXQgR3vCvzlI4R1WW67D5YsVLdoXfdb8qg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PY5RQqKQsL2GqBBSPNOEVpojNFRX/NijCghIpxD6CZk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lcvwTyEjFlssCJtdjRpdN6oY+C7bxZY+WA+QAqzj9zg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWE7XRNylvTwO/9Fv56dNqUaQWMmESNS/GNIwgBaEI0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ijwlrUeS8nRYqK1F8kiCYF0mNDolEZS+/lJO1Lg93C8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8KzV+qYGYuIjoNj8eEpnTuHrMYuhzphl80rS6wrODuU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wDyTLjSEFF895hSQsHvmoEQVS6KIkZOtq1c9dVogm9I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SGrtPuMYCjUrfKF0Pq/thdaQzmGBMUvlwN3ORIu9tHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KySHON3hIoUk4xWcwTqk6IL0kgjzjxgMBObVIkCGvk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hBIdS9j0XJPeT4ot73ngELkpUoSixvRBvdOL9z48jY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Tx6um0q9HjS5ZvlFhvukpI6ORnyrXMWVW1OoxvgqII0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zFKlyfX5H81+d4A4J3FKn4T5JfG+OWtR06ddyX4Mxas=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cGgCDuPV7MeMMYEDpgOupqyNP4BQ4H7rBnd2QygumgM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IPaUoy98v11EoglTpJ4kBlEawoZ8y7BPwzjLYBpkvHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Pfo4Am6tOWAyZNn8G9W5HWWGC3ZWmX0igI/RRB870Ro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fnTSjd7bC1Udoq6iM7UDnHAC/lsIXSHp/Gy332qw+/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fApBgVRrTDyEumkeWs5p3ag9KB48SbU4Si0dl7Ns9rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QxudfBItgoCnUj5NXVnSmWH3HK76YtKkMmzn4lyyUYY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sSOvwhKa29Wq94bZ5jGIiJQGbG1uBrKSBfOYBz/oZeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FdaMgwwJ0NKsqmPZLC5oE+/0D74Dfpvig3LaI5yW5Fs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sRWBy12IERN43BSZIrnBfC9+zFBUdvjTlkqIH81NGt4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/4tIRpxKhoOwnXAiFn1Z7Xmric4USOIfKvTYQXk3QTc=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-FindOneAndUpdate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-FindOneAndUpdate.json deleted file mode 100644 index 4ab3b63ea5..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-FindOneAndUpdate.json +++ /dev/null @@ -1,1906 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Decimal. FindOneAndUpdate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1" - } - } - } - }, - { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$numberDecimal": "0" - } - } - }, - "update": { - "$set": { - "encryptedDecimalNoPrecision": { - "$numberDecimal": "2" - } - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default", - "query": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$binary": { - "base64": "DR1jAAADcGF5bG9hZACxYgAABGcAnWIAAAMwAH0AAAAFZAAgAAAAAJu2KgiI8vM+kz9qD3ZQzFQY5qbgYqCqHG5R4jAlnlwXBXMAIAAAAAAAUXxFXsz764T79sGCdhxvNd5b6E/9p61FonsHyEIhogVsACAAAAAAt19RL3Oo5ni5L8kcvgOJYLgVYyXJExwP8pkuzLG7f/kAAzEAfQAAAAVkACAAAAAAPQPvL0ARjujSv2Rkm8r7spVsgeC1K3FWcskGGZ3OdDIFcwAgAAAAACgNn660GmefR8jLqzgR1u5O+Uocx9GyEHiBqVGko5FZBWwAIAAAAADflr+fsnZngm6KRWYgHa9JzK+bXogWl9evBU9sQUHPHQADMgB9AAAABWQAIAAAAAD2Zi6kcxmaD2mY3VWrP+wYJMP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- } - } - } - }, - "update": { - "$set": { - "encryptedDecimalNoPrecision": { - "$$type": "binData" - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "findAndModify" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "rbf3AeBEv4wWFAKknqDxRW5cLNkFvbIs6iJjc6LShQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0l86Ag5OszXpa78SlOUV3K9nff5iC1p0mRXtLg9M1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hn6yuxFHodeyu7ISlhYrbSf9pTiH4TDEvbYLWjTwFO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zdf4y2etKBuIpkEU1zMwoCkCsdisfXZCh8QPamm+drY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rOQ9oMdiK5xxGH+jPzOvwVqdGGnF3+HkJXxn81s6hp4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "61aKKsE3+BJHHWYvs3xSIBvlRmKswmaOo5rygQJguUg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KuDb/GIzqDM8wv7m7m8AECiWJbae5EKKtJRugZx7kR0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Q+t8t2TmNUiCIorVr9F3AlVnX+Mpt2ZYvN+s8UGict8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJRZIpKxUgHyL83kW8cvfjkxN3z6WoNnUg+SQw+LK+k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnUsYjip8SvW0+m9mR5WWTkpK+p6uwJ6yBUAlBnFKMk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PArHlz+yPRYDycAP/PgnI/AkP8Wgmfg++Vf4UG1Bf0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wnIh53Q3jeK8jEBe1n8kJLa89/H0BxO26ZU8SRIAs9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4F8U59gzBLGhq58PEWQk2nch+R0Va7eTUoxMneReUIA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ihKagIW3uT1dm22ROr/g5QaCpxZVj2+Fs/YSdM2Noco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EJtUOOwjkrPUi9mavYAi+Gom9Y2DuFll7aDwo4mq0M0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dIkr8dbaVRQFskAVT6B286BbcBBt1pZPEOcTZqk4ZcI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aYVAcZYkH/Tieoa1XOjE/zCy5AJcVTHjS0NG2QB7muA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sBidL6y8TenseetpioIAAtn0lK/7C8MoW4JXpVYi3z8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Dd2klU/t4R86c2WJcJDAd57k/N7OjvYSO5Vf8KH8sw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I3jZ92WEVmZmgaIkLbuWhBxl7EM6bEjiEttgBJunArA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aGHoQMlgJoGvArjfIbc3nnkoc8SWBxcrN7hSmjMRzos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bpiWPnF/KVBQr5F6MEwc5ZZayzIRvQOLDAm4ntwOi8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI7QVKbE6avWgDD9h4QKyFlnTxFCwd2iLySKakxNR/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XGsge0CnoaXgE3rcpKm8AEeku5QVfokS3kcI+JKV1lk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JQxlryW2Q5WOwfrjAnaZxDvC83Dg6sjRVP5zegf2WiM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YFuHKJOfoqp1iGVxoFjx7bLYgVdsN4GuUFxEgO9HJ5s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z6vUdiCR18ylKomf08uxcQHeRtmyav7/Ecvzz4av3k4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SPGo1Ib5AiP/tSllL7Z5PAypvnKdwJLzt8imfIMSEJQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m94Nh6PFFQFLIib9Cu5LAKavhXnagSHG6F5EF8lD96I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pfEkQI98mB+gm1+JbmVurPAODMFPJ4E8DnqfVyUWbSo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DNj3OVRLbr43s0vd+rgWghOL3FqeO/60npdojC8Ry/M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kAYIQrjHVu49W8FTxyxJeiLVRWWjC9fPcBn+Hx1F+Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aCSO7UVOpoQvu/iridarxkxV1SVxU1i9HVSYXUAeXk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Gh6hTP/yj1IKlXQ+Q69KTfMlGZjEcXoRLGbQHNFo/1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/gDgIFQ4tAlJk3GN48IS5Qa5IPmErwGk8CHxAbp6gs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PICyimwPjxpusyKxNssOOwUotAUbygpyEtORsVGXT8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4lu+cBHyAUvuxC6JUNyHLzHsCogGSWFFnUCkDwfQdgI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pSndkmoNUJwXjgkbkgOrT5f9nSvuoMEZOkwAN9ElRaE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tyW+D4i26QihNM5MuBM+wnt5AdWGSJaJ4X5ydc9iWTU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9Syjr8RoxUgPKr+O5rsCu07AvcebA4P8IVKyS1NVLWc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "67tPfDYnK2tmrioI51fOBG0ygajcV0pLo5+Zm/rEW7U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y0EiPRxYTuS1eVTIaPQUQBBxwkyxNckbePvKgChwd0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NWd+2veAaeXQgR3vCvzlI4R1WW67D5YsVLdoXfdb8qg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PY5RQqKQsL2GqBBSPNOEVpojNFRX/NijCghIpxD6CZk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lcvwTyEjFlssCJtdjRpdN6oY+C7bxZY+WA+QAqzj9zg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWE7XRNylvTwO/9Fv56dNqUaQWMmESNS/GNIwgBaEI0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ijwlrUeS8nRYqK1F8kiCYF0mNDolEZS+/lJO1Lg93C8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8KzV+qYGYuIjoNj8eEpnTuHrMYuhzphl80rS6wrODuU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wDyTLjSEFF895hSQsHvmoEQVS6KIkZOtq1c9dVogm9I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SGrtPuMYCjUrfKF0Pq/thdaQzmGBMUvlwN3ORIu9tHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KySHON3hIoUk4xWcwTqk6IL0kgjzjxgMBObVIkCGvk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hBIdS9j0XJPeT4ot73ngELkpUoSixvRBvdOL9z48jY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Tx6um0q9HjS5ZvlFhvukpI6ORnyrXMWVW1OoxvgqII0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zFKlyfX5H81+d4A4J3FKn4T5JfG+OWtR06ddyX4Mxas=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cGgCDuPV7MeMMYEDpgOupqyNP4BQ4H7rBnd2QygumgM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IPaUoy98v11EoglTpJ4kBlEawoZ8y7BPwzjLYBpkvHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Pfo4Am6tOWAyZNn8G9W5HWWGC3ZWmX0igI/RRB870Ro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fnTSjd7bC1Udoq6iM7UDnHAC/lsIXSHp/Gy332qw+/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fApBgVRrTDyEumkeWs5p3ag9KB48SbU4Si0dl7Ns9rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QxudfBItgoCnUj5NXVnSmWH3HK76YtKkMmzn4lyyUYY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sSOvwhKa29Wq94bZ5jGIiJQGbG1uBrKSBfOYBz/oZeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FdaMgwwJ0NKsqmPZLC5oE+/0D74Dfpvig3LaI5yW5Fs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sRWBy12IERN43BSZIrnBfC9+zFBUdvjTlkqIH81NGt4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/4tIRpxKhoOwnXAiFn1Z7Xmric4USOIfKvTYQXk3QTc=", - "subType": "00" - } - } - ] - }, - { - "_id": { - "$numberInt": "1" - }, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "Mr/laWHUijZT5VT3x2a7crb7wgd/UXOGz8jr8BVqBpM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wXVD/HSbBljko0jJcaxJ1nrzs2+pchLQqYR3vywS8SU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VDCpBYsJIxTfcI6Zgf7FTmKMxUffQv+Ys8zt5dlK76I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zYDslUwOUVNwTYkETfjceH/PU3bac9X3UuQyYJ19qK0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rAOmHSz18Jx107xpbv9fYcPOmh/KPAqge0PAtuhIRnc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BFOB1OGVUen7VsOuS0g8Ti7oDsTt2Yj/k/7ta8YAdGM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2fckE5SPs0GU+akDkUEM6mm0EtcV3WDE/sQsnTtodlk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "mi9+aNjuwIvaMpSHENvKzKRAmX9cYguo2mXLvOoftHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "K6TWn4VcWWkz/gkUkLmbtwkG7SNeABICmLDnoYJFlLU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z+2/cEtGU0Fq7QJFNGA/0y4aWAsw0ncG6X0LYRqwS3c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rrSIf+lgcNZFbbUkS9BmE045jRWBpcBJXHzfMVEFuzE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KlHL3Kyje1/LMIfgbCqw1SolxffJvvgsYBV5y77wxuA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hzJ1YBoETmYeCh352dBmG8d8Wse/bUcqojTWpWQlgsc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lSdcllDXx8MA+s0GULjDA1lQkcV0L8/aHtZ6dM2pZ2c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "HGr7JLTTA7ksAnlmjSIwwdBVvgr3fv46/FTdiCPYpos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "mMr25v1VwOEVZ8xaNUTHJCcsYqV+kwK6RzGYilxPtJ4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "129hJbziPJzNo0IoTU3bECdge0FtaPW8dm4dyNVNwYU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "doiLJ96qoo+v7NqIAZLq6BI5axV8Id8gT5vyJ1ZZ0PM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cW/Lcul3xYmfyvI/0x/+ybN78aQmBK1XIGs1EEU09N8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1aVIwzu9N5EJV9yEES+/g6hOTH7cA2NTcLIc59cu0wU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kw5tyl7Ew0r1wFyrN1mB9FiVW2hK2BxxxUuJDNWjyjQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ADAY2YBrm6RJBDY/eLLcfNxmSJku+mefz74gH66oyco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8gkqB1LojzPrstpFG7RHYmWxXpIlPDTqWnNsXH7XDRU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "TESfVQMDQjfTZmHmUeYUE2XrokJ6CcrsKx/GmypGjOw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qFM+HFVQ539S0Ouynd1fBHoemFxtU9PRxE5+Dq7Ljy4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jPiFgUZteSmOg4wf3bsEKCZzcnxmMoILsgp/GaZD+dM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YaWUgJhYgPNN7TkFK16H8SsQS226JguaVhOIQxZwQNQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x90/Qk3AgyaFsvWf2KUCu5XF3j76WFSjt/GrnG01060=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZGWybWL/xlEdMYRFCZDUoz10sywTf7U/7wufsb78lH0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8l4ganN66jIcdxfHAdYLaym/mdzUUQ8TViw3MDRySPc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c8p5XEGTqxqvRGVlR+nkxw9uUdoqDqTB0jlYQ361qMA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1ZGFLlpQBcU3zIUg8MmgWwFKVz/SaA7eSYFrfe3Hb70=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "34529174M77rHr3Ftn9r8jU4a5ztYtyVhMn1wryZSkU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YkQ4pxFWzc49MS0vZM6S8mNo4wAwo21rePBeF3C+9mI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MhOf4mYY00KKVhptOcXf0bXB7WfuuM801MRJg4vXPgc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7pbbD8ihNIYIBJ3tAUPGzHpFPpIeCTAk5L88qCB0/9w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "C9Q5PoNJTQo6pmNzXEEXUEqH22//UUWY1gqILcIywec=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "AqGVk1QjDNDLYWGRBX/nv9QdGR2SEgXZEhF0EWBAiSE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/sGI3VCbJUKATULJmhTayPOeVW+5MjWSvVCqS77sRbU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yOtbL0ih7gsuoxVtRrACMz+4N5uo7jIR7zzmtih2Beo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uA6dkb2Iyg9Su8UNDvZzkPx33kPZtWr/CCuEY+XgzUM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1DoSFPdHIplqZk+DyWAmEPckWwXw/GdB25NLmzeEZhk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OfDVS0T3ZuIXI/LNbTp6C9UbPIWLKiMy6Wx+9tqNl+g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3PZjHXbmG6GtPz+iapKtQ3yY4PoFFgjIy+fV2xQv1YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kaoLN0BoBWsmqE7kKkJQejATmLShd8qffcAmlhsxsGY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vpiw9KgQdegGmp7IJnSGX2miujRLU0xzs0ITTqbPW7c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NuXFf7xGUefYjIUTuMxNUTCfVHrF8oL0AT7dPv5Plk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8Tz53LxtfEBJ9eR+d2690kwNsqPV6XyKo2PlqZCbUrc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "e6zsOmHSyV8tyQtSX6BSwui6wK9v1xG3giY/IILJQ2w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2fedFMCxa2DzmIpfbDKGXhQg0PPwbUv6vIWdwwlvhms=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yEJKMFnWXTC8tJUfzCInzQRByNEPjHxpw4L4m8No91Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YbFuWwOiFuQyOzIJXDbOkCWC2DyrG+248TBuVCa1pXU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "w7IkwGdrguwDrar5+w0Z3va5wXyZ4VXJkDMISyRjPGo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YmJUoILTRJPhyIyWyXJTsQ6KSZHHbEpwPVup6Ldm/Ko=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FvMjcwVZJmfh6FP/yBg2wgskK+KHD8YVUY6WtrE8xbg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "h4HCtD4HyYz0nci49IVAa10Z4NJD/FHnRMV4sRX6qro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nC7BpXCmym+a0Is2kReM9cYN2M1Eh5rVo8fjms14Oiw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1qtVWaeVo649ZZZtN8gXbwLgMWGLhz8beODbvru0I7Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Ej+mC0QFyMNIiSjR939S+iGBm7dm+1xObu5IcF/OpbU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UQ8LbUG3cMegbr9yKfKanAPQE1EfPkFciVDrNqZ5GHY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4iI3mXIDjnX+ralk1HhJY43mZx2uTJM7hsv9MQzTX7E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0WQCcs3rvsasgohERHHCaBM4Iy6yomS4qJ5To3/yYiw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qDCTVPoue1/DOAGNAlUstdA9Sid8MgEY4e5EzHcVHRk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9F9Mus0UnlzHb8E8ImxgXtz6SU98YXD0JqswOKw/Bzs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pctHpHKVBBcsahQ6TNh6/1V1ZrqOtKSAPtATV6BJqh0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vfR3C/4cPkVdxtNaqtF/v635ONbhTf5WbwJM6s4EXNE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ejP43xUBIex6szDcqExAFpx1IE/Ksi5ywJ84GKDFRrs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jbP4AWYd3S2f3ejmMG7dS5IbrFol48UUoT+ve3JLN6U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CiDifI7958sUjNqJUBQULeyF7x0Up3loPWvYKw9uAuw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "e2dQFsiHqd2BFHNhlSxocjd+cPs4wkcUW/CnCz4KNuM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PJFckVmzBipqaEqsuP2mkjhJE4qhw36NhfQ9DcOHyEU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "S3MeuJhET/B8VcfZYDR9fvX0nscDj416jdDekhmK11s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CGVHZRXpuNtQviDB2Kj03Q8uvs4w3RwTgV847R7GwPw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yUGgmgyLrxbEpDVy89XN3c2cmFpZXWWmuJ/35zVZ+Jw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "inb6Q97mL1a9onfNTT8v9wsoi/fz7KXKq3p8j90AU9c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CCyYx/4npq9xGO1lsCo8ZJhFO9/tN7DB+/DTE778rYg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "LNnYw4fwbiAZu0kBdAHPEm/OFnreS+oArdB5O/l/I98=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "P006SxmUS/RjiQJVYPdMFnNo3827GIEmSzagggkg05Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "oyvwY+WsnYV6UHuPki1o0ILJ2jN4uyXf9yaUNtZJyBA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "36Lk3RHWh1wmtCWC/Yj6jNIo17U5y6SofAgQjzjVxD8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vOOo8FqeHnuO9mqOYjIb4vgwIwVyXZ5Y+bY5d9tGFUM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bJiDJjwQRNxqxlGjRm5lLziFhcfTDCnQ/qU1V85qcRg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2Qgrm1n0wUELAQnpkEiIHB856yv76q8jLbpiucetcm0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "5ciPOYxTK0WDwwYyfs7yiVymwtYQXDELLxmM4JLl4/o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "31dC2WUSIOKQc4jwT6PikfeYTwi80mTlh7P31T5KNQU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YluTV2Mu53EGCKLcWfHZb0BM/IPW2xJdG3vYlDMEsM4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dh/8lGo2Ek6KukSwutH6Q35iy8TgV0FN0SJqe0ZVHN8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EVw6HpIs3BKen2qY2gz4y5dw1JpXilfh07msZfQqJpc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FYolLla9L8EZMROEdWetozroU40Dnmwwx2jIMrr7c1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8M6k4QIutSIj6CM41vvkQtuFsaGrjoR9SZJVSLbfGKQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9LM0VoddDNHway442MqY+Z7vohB2UHau/cddshhzf40=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "66i8Ytco4Yq/FMl6pIRZazz3CZlu8fO2OI6Pne0pvHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2a/HgX+MjZxjXtSvHgF1yEpHMJBkl8Caee8XrJtn0WM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "frhBM662c4ZVG7mWP8K/HhRjd01lydW/cPcHnDjifqc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6k1T7Q1t668PBqv6fwpVnT1HWh7Am5LtbKvwPJKcpGU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UlJ5Edfusp8S/Pyhw6KTglIejmbr1HO0zUeHn/qFETA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jsxsB+1ECB3assUdoC333do9tYH+LglHmVSJHy4N8Hg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2nzIQxGYF7j3bGsIesECEOqhObKs/9ywknPHeJ3yges=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xJYKtuWrX90JrJVoYtnwP7Ce59XQGFYoalxpNfBXEH0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NLI5lriBTleGCELcHBtNnmnvwSRkHHaLOX4cKboMgTw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hUOQV0RmE5aJdJww1AR9rirJG4zOYPo+6cCkgn/BGvQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "h4G2Of76AgxcUziBwCyH+ayMOpdBWzg4yFrTfehSC2c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VuamM75RzGfQpj2/Y1jSVuQLrhy6OAwlZxjuQLB/9Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kn9+hLq7hvw02xr9vrplOCDXKBTuFhfbX7d5v/l85Pg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fAiGqKyLZpGngBYFbtYUYt8LUrJ49vYafiboifTDjxs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BxRILymgfVJCczqjUIWXcfrfSgrrYkxTM5VTg0HkZLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CrFY/PzfPU2zsFkGLu/dI6mEeizZzCR+uYgjZBAHro0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "AEbrIuwvXLTtYgMjOqnGQ8y8axUn5Ukrn7UZRSyfQVw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ouWeVH3PEFg+dKWlXc6BmqirJOaVWjJbMzZbCsce4dA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+hd6xFB+EG+kVP7WH4uMd1CLaWMnt5xJRaY/Guuga9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zmpGalfAOL3gmcUMJYcLYIRT/2VDO/1Dw4KdYZoNcng=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2PbHAoM/46J2UIZ/vyksKzmVVfxA7YUyIxWeL/N/vBk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7fD9x+zk5MVFesb59Klqiwwmve7P5ON/5COURXj5smE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tlrNQ4jaq051iaWonuv1sSrYhKkL1LtNZuHsvATha3s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fBodm28iClNpvlRyVq0dOdXQ08S7/N3aDwid+PdWvRo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "O+/nnRqT3Zv7yMMGug8GhKHaWy6u7BfRGtZoj0sdN1c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "5AZZ/RTMY4Photnm/cpXZr/HnFRi3eljacMsipkJLHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "oFVyo/kgoMxBIk2VE52ySSimeyU+Gr0EfCwapXnTpKA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z8v59DfcnviA0mzvnUk+URVO0UuqAWvtarEgJva/n1c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "P64GOntZ+zBJEHkigoh9FSxSO+rJTqR20z5aiGQ9an4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xMbSuDPfWuO/Dm7wuVl06GnzG9uzTlJJX9vFy7boGlY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kXPB19mRClxdH2UsHwlttS6lLU2uHvzuZgZz7kC45jU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NDVjVYXAw4k0w4tFzvs7QDq39aaU3HQor4I2XMKKnCk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uKw/+ErVfpTO1dGUfd3T/eWfZW3nUxXCdBGdjvHtZ88=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "av0uxEzWkizYWm0QUM/MN1hLibnxPvCWJKwjOV4yVQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ERwUC47dvgOBzIsEESMIioLYbFOxOe8PtJTnmDkKuHM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2gseKlG5Le12fS/vj4eaED4lturF16kAgJ1TpW3HxEE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7Cvg0Y3j/5i2F1TeXxlMmU7xwif5dCmwkZAOrVC5K2Y=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-FindOneAndUpdate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-FindOneAndUpdate.yml deleted file mode 100644 index e470f42db6..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-FindOneAndUpdate.yml +++ /dev/null @@ -1,1672 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - # Tests for Decimal (without precision) must only run against a replica set. Decimal (without precision) queries are expected to take a long time and may exceed the default mongos timeout. - topology: [ "replicaset" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDecimalNoPrecision', 'bsonType': 'decimal', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Decimal. FindOneAndUpdate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDecimalNoPrecision: { $numberDecimal: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDecimalNoPrecision: { $numberDecimal: "1" } } - - name: findOneAndUpdate - arguments: - filter: { encryptedDecimalNoPrecision: { $gt: {$numberDecimal: "0"}} } - update: { "$set": { "encryptedDecimalNoPrecision": {$numberDecimal: "2"}}} - returnDocument: Before - result: *doc1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDecimalNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDecimalNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - findAndModify: *collection_name - query: { - "encryptedDecimalNoPrecision": { - "$gt": { - "$binary": { - "base64": "DR1jAAADcGF5bG9hZACxYgAABGcAnWIAAAMwAH0AAAAFZAAgAAAAAJu2KgiI8vM+kz9qD3ZQzFQY5qbgYqCqHG5R4jAlnlwXBXMAIAAAAAAAUXxFXsz764T79sGCdhxvNd5b6E/9p61FonsHyEIhogVsACAAAAAAt19RL3Oo5ni5L8kcvgOJYLgVYyXJExwP8pkuzLG7f/kAAzEAfQAAAAVkACAAAAAAPQPvL0ARjujSv2Rkm8r7spVsgeC1K3FWcskGGZ3OdDIFcwAgAAAAACgNn660GmefR8jLqzgR1u5O+Uocx9GyEHiBqVGko5FZBWwAIAAAAADflr+fsnZngm6KRWYgHa9JzK+bXogWl9evBU9sQUHPHQADMgB9AAAABWQAIAAAAAD2Zi6kcxmaD2mY3VWrP+wYJMPg6cSBIYPapxaFQxYFdQVzACAAAAAAM/cV36BLBY3xFBXsXJY8M9EHHOc/qrmdc2CJmj3M89gFbAAgAAAAAOpydOrKxx6m2gquSDV2Vv3w10GocmNCFeOo/fRhRH9JAAMzAH0AAAAFZAAgAAAAAOaNqI9srQ/mI9gwbk+VkizGBBH/PPWOVusgnfPk3tY1BXMAIAAAAAAc96O/pwKCmHCagT6T/QV/wz4vqO+R22GsZ1dse2Vg6QVsACAAAAAAgzIak+Q3UFLTHXPmJ+MuEklFtR3eLtvM+jdKkmGCV/YAAzQAfQAAAAVkACAAAAAA0Xl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FRG/br7USELR98sIdgE9OQCRBGV5JZCO+uPMgBWwAIAAAAABt7qSmn3gxJu7aswsbUiwvO+G6lXj/Xhx+J/zQyZxzLAADMTkyAH0AAAAFZAAgAAAAAGInUYv0lP/rK7McM8taEHXRefk8Q2AunrvWqdfSV7UaBXMAIAAAAACE+WPxJ3gan7iRTbIxXXx+bKVcaf8kP4JD8DcwU0aL7wVsACAAAAAAUC4eTprX4DUZn2X+UXYU6QjtiXk+u57yoOPBbPQUmDkAAzE5MwB9AAAABWQAIAAAAACmHlg2ud3cplXlTsNTpvNnY6Qm1Fce0m899COamoDjaQVzACAAAAAArtJQeJIlepBWRU2aYar7+YGYVQ7dfDc1oxgTmA8r9q0FbAAgAAAAAOk45vg5VqZHAFCO3i0Z52SZi5RADf8NXwf68T5yad/DAAMxOTQAfQAAAAVkACAAAAAApzcWSAbZWV/Rq+ylRNqqlJqNVR4fhXrz4633/MQOQgcFcwAgAAAAAN/jz/bsEleiuCl+li83EWlG6UMHA8CyaOMRKCkXkSCPBWwAIAAAAAC3Sd+Qg+uFDKpGZHbrQgokXHQ1az1aFl4YK343OB6hcQAAEmNtAAAAAAAAAAAAABBwYXlsb2FkSWQAAAAAABBmaXJzdE9wZXJhdG9yAAEAAAASc3AAAQAAAAAAAAAQdGYAAQAAABNtbgD/////Y46NN8CHrb4J7f/fE214AP////9jjo03wIetvgnt/18A", - "subType": "06" - } - } - } - } - update: { "$set": {"encryptedDecimalNoPrecision": { $$type: "binData" }} } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: findAndModify - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "rbf3AeBEv4wWFAKknqDxRW5cLNkFvbIs6iJjc6LShQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0l86Ag5OszXpa78SlOUV3K9nff5iC1p0mRXtLg9M1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hn6yuxFHodeyu7ISlhYrbSf9pTiH4TDEvbYLWjTwFO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zdf4y2etKBuIpkEU1zMwoCkCsdisfXZCh8QPamm+drY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rOQ9oMdiK5xxGH+jPzOvwVqdGGnF3+HkJXxn81s6hp4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "61aKKsE3+BJHHWYvs3xSIBvlRmKswmaOo5rygQJguUg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KuDb/GIzqDM8wv7m7m8AECiWJbae5EKKtJRugZx7kR0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Q+t8t2TmNUiCIorVr9F3AlVnX+Mpt2ZYvN+s8UGict8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJRZIpKxUgHyL83kW8cvfjkxN3z6WoNnUg+SQw+LK+k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnUsYjip8SvW0+m9mR5WWTkpK+p6uwJ6yBUAlBnFKMk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PArHlz+yPRYDycAP/PgnI/AkP8Wgmfg++Vf4UG1Bf0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wnIh53Q3jeK8jEBe1n8kJLa89/H0BxO26ZU8SRIAs9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4F8U59gzBLGhq58PEWQk2nch+R0Va7eTUoxMneReUIA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ihKagIW3uT1dm22ROr/g5QaCpxZVj2+Fs/YSdM2Noco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EJtUOOwjkrPUi9mavYAi+Gom9Y2DuFll7aDwo4mq0M0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dIkr8dbaVRQFskAVT6B286BbcBBt1pZPEOcTZqk4ZcI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aYVAcZYkH/Tieoa1XOjE/zCy5AJcVTHjS0NG2QB7muA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sBidL6y8TenseetpioIAAtn0lK/7C8MoW4JXpVYi3z8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Dd2klU/t4R86c2WJcJDAd57k/N7OjvYSO5Vf8KH8sw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I3jZ92WEVmZmgaIkLbuWhBxl7EM6bEjiEttgBJunArA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aGHoQMlgJoGvArjfIbc3nnkoc8SWBxcrN7hSmjMRzos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bpiWPnF/KVBQr5F6MEwc5ZZayzIRvQOLDAm4ntwOi8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI7QVKbE6avWgDD9h4QKyFlnTxFCwd2iLySKakxNR/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XGsge0CnoaXgE3rcpKm8AEeku5QVfokS3kcI+JKV1lk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JQxlryW2Q5WOwfrjAnaZxDvC83Dg6sjRVP5zegf2WiM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YFuHKJOfoqp1iGVxoFjx7bLYgVdsN4GuUFxEgO9HJ5s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z6vUdiCR18ylKomf08uxcQHeRtmyav7/Ecvzz4av3k4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SPGo1Ib5AiP/tSllL7Z5PAypvnKdwJLzt8imfIMSEJQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m94Nh6PFFQFLIib9Cu5LAKavhXnagSHG6F5EF8lD96I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pfEkQI98mB+gm1+JbmVurPAODMFPJ4E8DnqfVyUWbSo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DNj3OVRLbr43s0vd+rgWghOL3FqeO/60npdojC8Ry/M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kAYIQrjHVu49W8FTxyxJeiLVRWWjC9fPcBn+Hx1F+Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aCSO7UVOpoQvu/iridarxkxV1SVxU1i9HVSYXUAeXk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Gh6hTP/yj1IKlXQ+Q69KTfMlGZjEcXoRLGbQHNFo/1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/gDgIFQ4tAlJk3GN48IS5Qa5IPmErwGk8CHxAbp6gs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PICyimwPjxpusyKxNssOOwUotAUbygpyEtORsVGXT8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4lu+cBHyAUvuxC6JUNyHLzHsCogGSWFFnUCkDwfQdgI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pSndkmoNUJwXjgkbkgOrT5f9nSvuoMEZOkwAN9ElRaE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tyW+D4i26QihNM5MuBM+wnt5AdWGSJaJ4X5ydc9iWTU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9Syjr8RoxUgPKr+O5rsCu07AvcebA4P8IVKyS1NVLWc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "67tPfDYnK2tmrioI51fOBG0ygajcV0pLo5+Zm/rEW7U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y0EiPRxYTuS1eVTIaPQUQBBxwkyxNckbePvKgChwd0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NWd+2veAaeXQgR3vCvzlI4R1WW67D5YsVLdoXfdb8qg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PY5RQqKQsL2GqBBSPNOEVpojNFRX/NijCghIpxD6CZk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lcvwTyEjFlssCJtdjRpdN6oY+C7bxZY+WA+QAqzj9zg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWE7XRNylvTwO/9Fv56dNqUaQWMmESNS/GNIwgBaEI0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ijwlrUeS8nRYqK1F8kiCYF0mNDolEZS+/lJO1Lg93C8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8KzV+qYGYuIjoNj8eEpnTuHrMYuhzphl80rS6wrODuU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wDyTLjSEFF895hSQsHvmoEQVS6KIkZOtq1c9dVogm9I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SGrtPuMYCjUrfKF0Pq/thdaQzmGBMUvlwN3ORIu9tHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KySHON3hIoUk4xWcwTqk6IL0kgjzjxgMBObVIkCGvk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hBIdS9j0XJPeT4ot73ngELkpUoSixvRBvdOL9z48jY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Tx6um0q9HjS5ZvlFhvukpI6ORnyrXMWVW1OoxvgqII0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zFKlyfX5H81+d4A4J3FKn4T5JfG+OWtR06ddyX4Mxas=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cGgCDuPV7MeMMYEDpgOupqyNP4BQ4H7rBnd2QygumgM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IPaUoy98v11EoglTpJ4kBlEawoZ8y7BPwzjLYBpkvHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Pfo4Am6tOWAyZNn8G9W5HWWGC3ZWmX0igI/RRB870Ro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fnTSjd7bC1Udoq6iM7UDnHAC/lsIXSHp/Gy332qw+/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fApBgVRrTDyEumkeWs5p3ag9KB48SbU4Si0dl7Ns9rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QxudfBItgoCnUj5NXVnSmWH3HK76YtKkMmzn4lyyUYY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sSOvwhKa29Wq94bZ5jGIiJQGbG1uBrKSBfOYBz/oZeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FdaMgwwJ0NKsqmPZLC5oE+/0D74Dfpvig3LaI5yW5Fs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sRWBy12IERN43BSZIrnBfC9+zFBUdvjTlkqIH81NGt4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/4tIRpxKhoOwnXAiFn1Z7Xmric4USOIfKvTYQXk3QTc=", - "subType": "00" - } - } - ] - } - - - { - "_id": { - "$numberInt": "1" - }, - "encryptedDecimalNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "Mr/laWHUijZT5VT3x2a7crb7wgd/UXOGz8jr8BVqBpM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wXVD/HSbBljko0jJcaxJ1nrzs2+pchLQqYR3vywS8SU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VDCpBYsJIxTfcI6Zgf7FTmKMxUffQv+Ys8zt5dlK76I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zYDslUwOUVNwTYkETfjceH/PU3bac9X3UuQyYJ19qK0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rAOmHSz18Jx107xpbv9fYcPOmh/KPAqge0PAtuhIRnc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BFOB1OGVUen7VsOuS0g8Ti7oDsTt2Yj/k/7ta8YAdGM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2fckE5SPs0GU+akDkUEM6mm0EtcV3WDE/sQsnTtodlk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "mi9+aNjuwIvaMpSHENvKzKRAmX9cYguo2mXLvOoftHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "K6TWn4VcWWkz/gkUkLmbtwkG7SNeABICmLDnoYJFlLU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z+2/cEtGU0Fq7QJFNGA/0y4aWAsw0ncG6X0LYRqwS3c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rrSIf+lgcNZFbbUkS9BmE045jRWBpcBJXHzfMVEFuzE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KlHL3Kyje1/LMIfgbCqw1SolxffJvvgsYBV5y77wxuA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hzJ1YBoETmYeCh352dBmG8d8Wse/bUcqojTWpWQlgsc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lSdcllDXx8MA+s0GULjDA1lQkcV0L8/aHtZ6dM2pZ2c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "HGr7JLTTA7ksAnlmjSIwwdBVvgr3fv46/FTdiCPYpos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "mMr25v1VwOEVZ8xaNUTHJCcsYqV+kwK6RzGYilxPtJ4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "129hJbziPJzNo0IoTU3bECdge0FtaPW8dm4dyNVNwYU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "doiLJ96qoo+v7NqIAZLq6BI5axV8Id8gT5vyJ1ZZ0PM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cW/Lcul3xYmfyvI/0x/+ybN78aQmBK1XIGs1EEU09N8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1aVIwzu9N5EJV9yEES+/g6hOTH7cA2NTcLIc59cu0wU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kw5tyl7Ew0r1wFyrN1mB9FiVW2hK2BxxxUuJDNWjyjQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ADAY2YBrm6RJBDY/eLLcfNxmSJku+mefz74gH66oyco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8gkqB1LojzPrstpFG7RHYmWxXpIlPDTqWnNsXH7XDRU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "TESfVQMDQjfTZmHmUeYUE2XrokJ6CcrsKx/GmypGjOw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qFM+HFVQ539S0Ouynd1fBHoemFxtU9PRxE5+Dq7Ljy4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jPiFgUZteSmOg4wf3bsEKCZzcnxmMoILsgp/GaZD+dM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YaWUgJhYgPNN7TkFK16H8SsQS226JguaVhOIQxZwQNQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x90/Qk3AgyaFsvWf2KUCu5XF3j76WFSjt/GrnG01060=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZGWybWL/xlEdMYRFCZDUoz10sywTf7U/7wufsb78lH0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8l4ganN66jIcdxfHAdYLaym/mdzUUQ8TViw3MDRySPc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c8p5XEGTqxqvRGVlR+nkxw9uUdoqDqTB0jlYQ361qMA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1ZGFLlpQBcU3zIUg8MmgWwFKVz/SaA7eSYFrfe3Hb70=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "34529174M77rHr3Ftn9r8jU4a5ztYtyVhMn1wryZSkU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YkQ4pxFWzc49MS0vZM6S8mNo4wAwo21rePBeF3C+9mI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MhOf4mYY00KKVhptOcXf0bXB7WfuuM801MRJg4vXPgc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7pbbD8ihNIYIBJ3tAUPGzHpFPpIeCTAk5L88qCB0/9w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "C9Q5PoNJTQo6pmNzXEEXUEqH22//UUWY1gqILcIywec=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "AqGVk1QjDNDLYWGRBX/nv9QdGR2SEgXZEhF0EWBAiSE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/sGI3VCbJUKATULJmhTayPOeVW+5MjWSvVCqS77sRbU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yOtbL0ih7gsuoxVtRrACMz+4N5uo7jIR7zzmtih2Beo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uA6dkb2Iyg9Su8UNDvZzkPx33kPZtWr/CCuEY+XgzUM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1DoSFPdHIplqZk+DyWAmEPckWwXw/GdB25NLmzeEZhk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OfDVS0T3ZuIXI/LNbTp6C9UbPIWLKiMy6Wx+9tqNl+g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3PZjHXbmG6GtPz+iapKtQ3yY4PoFFgjIy+fV2xQv1YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kaoLN0BoBWsmqE7kKkJQejATmLShd8qffcAmlhsxsGY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vpiw9KgQdegGmp7IJnSGX2miujRLU0xzs0ITTqbPW7c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NuXFf7xGUefYjIUTuMxNUTCfVHrF8oL0AT7dPv5Plk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8Tz53LxtfEBJ9eR+d2690kwNsqPV6XyKo2PlqZCbUrc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "e6zsOmHSyV8tyQtSX6BSwui6wK9v1xG3giY/IILJQ2w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2fedFMCxa2DzmIpfbDKGXhQg0PPwbUv6vIWdwwlvhms=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yEJKMFnWXTC8tJUfzCInzQRByNEPjHxpw4L4m8No91Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YbFuWwOiFuQyOzIJXDbOkCWC2DyrG+248TBuVCa1pXU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "w7IkwGdrguwDrar5+w0Z3va5wXyZ4VXJkDMISyRjPGo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YmJUoILTRJPhyIyWyXJTsQ6KSZHHbEpwPVup6Ldm/Ko=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FvMjcwVZJmfh6FP/yBg2wgskK+KHD8YVUY6WtrE8xbg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "h4HCtD4HyYz0nci49IVAa10Z4NJD/FHnRMV4sRX6qro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nC7BpXCmym+a0Is2kReM9cYN2M1Eh5rVo8fjms14Oiw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1qtVWaeVo649ZZZtN8gXbwLgMWGLhz8beODbvru0I7Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Ej+mC0QFyMNIiSjR939S+iGBm7dm+1xObu5IcF/OpbU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UQ8LbUG3cMegbr9yKfKanAPQE1EfPkFciVDrNqZ5GHY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4iI3mXIDjnX+ralk1HhJY43mZx2uTJM7hsv9MQzTX7E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0WQCcs3rvsasgohERHHCaBM4Iy6yomS4qJ5To3/yYiw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qDCTVPoue1/DOAGNAlUstdA9Sid8MgEY4e5EzHcVHRk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9F9Mus0UnlzHb8E8ImxgXtz6SU98YXD0JqswOKw/Bzs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pctHpHKVBBcsahQ6TNh6/1V1ZrqOtKSAPtATV6BJqh0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vfR3C/4cPkVdxtNaqtF/v635ONbhTf5WbwJM6s4EXNE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ejP43xUBIex6szDcqExAFpx1IE/Ksi5ywJ84GKDFRrs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jbP4AWYd3S2f3ejmMG7dS5IbrFol48UUoT+ve3JLN6U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CiDifI7958sUjNqJUBQULeyF7x0Up3loPWvYKw9uAuw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "e2dQFsiHqd2BFHNhlSxocjd+cPs4wkcUW/CnCz4KNuM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PJFckVmzBipqaEqsuP2mkjhJE4qhw36NhfQ9DcOHyEU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "S3MeuJhET/B8VcfZYDR9fvX0nscDj416jdDekhmK11s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CGVHZRXpuNtQviDB2Kj03Q8uvs4w3RwTgV847R7GwPw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yUGgmgyLrxbEpDVy89XN3c2cmFpZXWWmuJ/35zVZ+Jw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "inb6Q97mL1a9onfNTT8v9wsoi/fz7KXKq3p8j90AU9c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CCyYx/4npq9xGO1lsCo8ZJhFO9/tN7DB+/DTE778rYg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "LNnYw4fwbiAZu0kBdAHPEm/OFnreS+oArdB5O/l/I98=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "P006SxmUS/RjiQJVYPdMFnNo3827GIEmSzagggkg05Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "oyvwY+WsnYV6UHuPki1o0ILJ2jN4uyXf9yaUNtZJyBA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "36Lk3RHWh1wmtCWC/Yj6jNIo17U5y6SofAgQjzjVxD8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vOOo8FqeHnuO9mqOYjIb4vgwIwVyXZ5Y+bY5d9tGFUM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bJiDJjwQRNxqxlGjRm5lLziFhcfTDCnQ/qU1V85qcRg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2Qgrm1n0wUELAQnpkEiIHB856yv76q8jLbpiucetcm0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "5ciPOYxTK0WDwwYyfs7yiVymwtYQXDELLxmM4JLl4/o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "31dC2WUSIOKQc4jwT6PikfeYTwi80mTlh7P31T5KNQU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YluTV2Mu53EGCKLcWfHZb0BM/IPW2xJdG3vYlDMEsM4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dh/8lGo2Ek6KukSwutH6Q35iy8TgV0FN0SJqe0ZVHN8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EVw6HpIs3BKen2qY2gz4y5dw1JpXilfh07msZfQqJpc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FYolLla9L8EZMROEdWetozroU40Dnmwwx2jIMrr7c1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8M6k4QIutSIj6CM41vvkQtuFsaGrjoR9SZJVSLbfGKQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9LM0VoddDNHway442MqY+Z7vohB2UHau/cddshhzf40=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "66i8Ytco4Yq/FMl6pIRZazz3CZlu8fO2OI6Pne0pvHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2a/HgX+MjZxjXtSvHgF1yEpHMJBkl8Caee8XrJtn0WM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "frhBM662c4ZVG7mWP8K/HhRjd01lydW/cPcHnDjifqc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6k1T7Q1t668PBqv6fwpVnT1HWh7Am5LtbKvwPJKcpGU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UlJ5Edfusp8S/Pyhw6KTglIejmbr1HO0zUeHn/qFETA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jsxsB+1ECB3assUdoC333do9tYH+LglHmVSJHy4N8Hg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2nzIQxGYF7j3bGsIesECEOqhObKs/9ywknPHeJ3yges=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xJYKtuWrX90JrJVoYtnwP7Ce59XQGFYoalxpNfBXEH0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NLI5lriBTleGCELcHBtNnmnvwSRkHHaLOX4cKboMgTw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hUOQV0RmE5aJdJww1AR9rirJG4zOYPo+6cCkgn/BGvQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "h4G2Of76AgxcUziBwCyH+ayMOpdBWzg4yFrTfehSC2c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VuamM75RzGfQpj2/Y1jSVuQLrhy6OAwlZxjuQLB/9Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kn9+hLq7hvw02xr9vrplOCDXKBTuFhfbX7d5v/l85Pg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fAiGqKyLZpGngBYFbtYUYt8LUrJ49vYafiboifTDjxs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BxRILymgfVJCczqjUIWXcfrfSgrrYkxTM5VTg0HkZLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CrFY/PzfPU2zsFkGLu/dI6mEeizZzCR+uYgjZBAHro0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "AEbrIuwvXLTtYgMjOqnGQ8y8axUn5Ukrn7UZRSyfQVw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ouWeVH3PEFg+dKWlXc6BmqirJOaVWjJbMzZbCsce4dA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+hd6xFB+EG+kVP7WH4uMd1CLaWMnt5xJRaY/Guuga9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zmpGalfAOL3gmcUMJYcLYIRT/2VDO/1Dw4KdYZoNcng=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2PbHAoM/46J2UIZ/vyksKzmVVfxA7YUyIxWeL/N/vBk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7fD9x+zk5MVFesb59Klqiwwmve7P5ON/5COURXj5smE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tlrNQ4jaq051iaWonuv1sSrYhKkL1LtNZuHsvATha3s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fBodm28iClNpvlRyVq0dOdXQ08S7/N3aDwid+PdWvRo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "O+/nnRqT3Zv7yMMGug8GhKHaWy6u7BfRGtZoj0sdN1c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "5AZZ/RTMY4Photnm/cpXZr/HnFRi3eljacMsipkJLHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "oFVyo/kgoMxBIk2VE52ySSimeyU+Gr0EfCwapXnTpKA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z8v59DfcnviA0mzvnUk+URVO0UuqAWvtarEgJva/n1c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "P64GOntZ+zBJEHkigoh9FSxSO+rJTqR20z5aiGQ9an4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xMbSuDPfWuO/Dm7wuVl06GnzG9uzTlJJX9vFy7boGlY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kXPB19mRClxdH2UsHwlttS6lLU2uHvzuZgZz7kC45jU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NDVjVYXAw4k0w4tFzvs7QDq39aaU3HQor4I2XMKKnCk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uKw/+ErVfpTO1dGUfd3T/eWfZW3nUxXCdBGdjvHtZ88=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "av0uxEzWkizYWm0QUM/MN1hLibnxPvCWJKwjOV4yVQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ERwUC47dvgOBzIsEESMIioLYbFOxOe8PtJTnmDkKuHM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2gseKlG5Le12fS/vj4eaED4lturF16kAgJ1TpW3HxEE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7Cvg0Y3j/5i2F1TeXxlMmU7xwif5dCmwkZAOrVC5K2Y=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-InsertFind.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-InsertFind.json deleted file mode 100644 index 5a2adf6907..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-InsertFind.json +++ /dev/null @@ -1,1893 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Decimal. Insert and Find.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$numberDecimal": "0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$binary": { - "base64": "DR1jAAADcGF5bG9hZACxYgAABGcAnWIAAAMwAH0AAAAFZAAgAAAAAJu2KgiI8vM+kz9qD3ZQzFQY5qbgYqCqHG5R4jAlnlwXBXMAIAAAAAAAUXxFXsz764T79sGCdhxvNd5b6E/9p61FonsHyEIhogVsACAAAAAAt19RL3Oo5ni5L8kcvgOJYLgVYyXJExwP8pkuzLG7f/kAAzEAfQAAAAVkACAAAAAAPQPvL0ARjujSv2Rkm8r7spVsgeC1K3FWcskGGZ3OdDIFcwAgAAAAACgNn660GmefR8jLqzgR1u5O+Uocx9GyEHiBqVGko5FZBWwAIAAAAADflr+fsnZngm6KRWYgHa9JzK+bXogWl9evBU9sQUHPHQADMgB9AAAABWQAIAAAAAD2Zi6kcxmaD2mY3VWrP+wYJMPg6cSBIYPapxaFQxYFdQVzACAAAAAAM/cV36BLBY3xFBXsXJY8M9EHHOc/qrmdc2CJmj3M89gFbAAgAAAAAOpydOrKxx6m2gquSDV2Vv3w10GocmNCFeOo/fRhRH9JAAMzAH0AAAAFZAAgAAAAAOaNqI9srQ/mI9gwbk+VkizGBBH/PPWOVusgnfPk3tY1BXMAIAAAAAAc96O/pwKCmHCagT6T/QV/wz4vqO+R22GsZ1dse2Vg6QVsACAAAAAAgzIak+Q3UFLTHXPmJ+MuEklFtR3eLtvM+jdKkmGCV/YAAzQAfQAAAAVkACAAAAAA0XlQgy/Yu97EQOjronl9b3dcR1DFn3deuVhtTLbJZHkFcwAgAAAAACoMnpVl6EFJak8A+t5N4RFnQhkQEBnNAx8wDqmq5U/dBWwAIAAAAACR26FJif673qpwF1J1FEkQGJ1Ywcr/ZW6JQ7meGqzt1QADNQB9AAAABWQAIAAAAAA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WPxJ3gan7iRTbIxXXx+bKVcaf8kP4JD8DcwU0aL7wVsACAAAAAAUC4eTprX4DUZn2X+UXYU6QjtiXk+u57yoOPBbPQUmDkAAzE5MwB9AAAABWQAIAAAAACmHlg2ud3cplXlTsNTpvNnY6Qm1Fce0m899COamoDjaQVzACAAAAAArtJQeJIlepBWRU2aYar7+YGYVQ7dfDc1oxgTmA8r9q0FbAAgAAAAAOk45vg5VqZHAFCO3i0Z52SZi5RADf8NXwf68T5yad/DAAMxOTQAfQAAAAVkACAAAAAApzcWSAbZWV/Rq+ylRNqqlJqNVR4fhXrz4633/MQOQgcFcwAgAAAAAN/jz/bsEleiuCl+li83EWlG6UMHA8CyaOMRKCkXkSCPBWwAIAAAAAC3Sd+Qg+uFDKpGZHbrQgokXHQ1az1aFl4YK343OB6hcQAAEmNtAAAAAAAAAAAAABBwYXlsb2FkSWQAAAAAABBmaXJzdE9wZXJhdG9yAAEAAAASc3AAAQAAAAAAAAAQdGYAAQAAABNtbgD/////Y46NN8CHrb4J7f/fE214AP////9jjo03wIetvgnt/18A", - "subType": "06" - } - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "rbf3AeBEv4wWFAKknqDxRW5cLNkFvbIs6iJjc6LShQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0l86Ag5OszXpa78SlOUV3K9nff5iC1p0mRXtLg9M1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hn6yuxFHodeyu7ISlhYrbSf9pTiH4TDEvbYLWjTwFO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zdf4y2etKBuIpkEU1zMwoCkCsdisfXZCh8QPamm+drY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rOQ9oMdiK5xxGH+jPzOvwVqdGGnF3+HkJXxn81s6hp4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "61aKKsE3+BJHHWYvs3xSIBvlRmKswmaOo5rygQJguUg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KuDb/GIzqDM8wv7m7m8AECiWJbae5EKKtJRugZx7kR0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Q+t8t2TmNUiCIorVr9F3AlVnX+Mpt2ZYvN+s8UGict8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJRZIpKxUgHyL83kW8cvfjkxN3z6WoNnUg+SQw+LK+k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnUsYjip8SvW0+m9mR5WWTkpK+p6uwJ6yBUAlBnFKMk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PArHlz+yPRYDycAP/PgnI/AkP8Wgmfg++Vf4UG1Bf0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wnIh53Q3jeK8jEBe1n8kJLa89/H0BxO26ZU8SRIAs9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4F8U59gzBLGhq58PEWQk2nch+R0Va7eTUoxMneReUIA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ihKagIW3uT1dm22ROr/g5QaCpxZVj2+Fs/YSdM2Noco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EJtUOOwjkrPUi9mavYAi+Gom9Y2DuFll7aDwo4mq0M0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dIkr8dbaVRQFskAVT6B286BbcBBt1pZPEOcTZqk4ZcI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aYVAcZYkH/Tieoa1XOjE/zCy5AJcVTHjS0NG2QB7muA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sBidL6y8TenseetpioIAAtn0lK/7C8MoW4JXpVYi3z8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Dd2klU/t4R86c2WJcJDAd57k/N7OjvYSO5Vf8KH8sw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I3jZ92WEVmZmgaIkLbuWhBxl7EM6bEjiEttgBJunArA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aGHoQMlgJoGvArjfIbc3nnkoc8SWBxcrN7hSmjMRzos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bpiWPnF/KVBQr5F6MEwc5ZZayzIRvQOLDAm4ntwOi8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI7QVKbE6avWgDD9h4QKyFlnTxFCwd2iLySKakxNR/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XGsge0CnoaXgE3rcpKm8AEeku5QVfokS3kcI+JKV1lk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JQxlryW2Q5WOwfrjAnaZxDvC83Dg6sjRVP5zegf2WiM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YFuHKJOfoqp1iGVxoFjx7bLYgVdsN4GuUFxEgO9HJ5s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z6vUdiCR18ylKomf08uxcQHeRtmyav7/Ecvzz4av3k4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SPGo1Ib5AiP/tSllL7Z5PAypvnKdwJLzt8imfIMSEJQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m94Nh6PFFQFLIib9Cu5LAKavhXnagSHG6F5EF8lD96I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pfEkQI98mB+gm1+JbmVurPAODMFPJ4E8DnqfVyUWbSo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DNj3OVRLbr43s0vd+rgWghOL3FqeO/60npdojC8Ry/M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kAYIQrjHVu49W8FTxyxJeiLVRWWjC9fPcBn+Hx1F+Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aCSO7UVOpoQvu/iridarxkxV1SVxU1i9HVSYXUAeXk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Gh6hTP/yj1IKlXQ+Q69KTfMlGZjEcXoRLGbQHNFo/1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/gDgIFQ4tAlJk3GN48IS5Qa5IPmErwGk8CHxAbp6gs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PICyimwPjxpusyKxNssOOwUotAUbygpyEtORsVGXT8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4lu+cBHyAUvuxC6JUNyHLzHsCogGSWFFnUCkDwfQdgI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pSndkmoNUJwXjgkbkgOrT5f9nSvuoMEZOkwAN9ElRaE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tyW+D4i26QihNM5MuBM+wnt5AdWGSJaJ4X5ydc9iWTU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9Syjr8RoxUgPKr+O5rsCu07AvcebA4P8IVKyS1NVLWc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "67tPfDYnK2tmrioI51fOBG0ygajcV0pLo5+Zm/rEW7U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y0EiPRxYTuS1eVTIaPQUQBBxwkyxNckbePvKgChwd0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NWd+2veAaeXQgR3vCvzlI4R1WW67D5YsVLdoXfdb8qg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PY5RQqKQsL2GqBBSPNOEVpojNFRX/NijCghIpxD6CZk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lcvwTyEjFlssCJtdjRpdN6oY+C7bxZY+WA+QAqzj9zg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWE7XRNylvTwO/9Fv56dNqUaQWMmESNS/GNIwgBaEI0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ijwlrUeS8nRYqK1F8kiCYF0mNDolEZS+/lJO1Lg93C8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8KzV+qYGYuIjoNj8eEpnTuHrMYuhzphl80rS6wrODuU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wDyTLjSEFF895hSQsHvmoEQVS6KIkZOtq1c9dVogm9I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SGrtPuMYCjUrfKF0Pq/thdaQzmGBMUvlwN3ORIu9tHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KySHON3hIoUk4xWcwTqk6IL0kgjzjxgMBObVIkCGvk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hBIdS9j0XJPeT4ot73ngELkpUoSixvRBvdOL9z48jY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Tx6um0q9HjS5ZvlFhvukpI6ORnyrXMWVW1OoxvgqII0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zFKlyfX5H81+d4A4J3FKn4T5JfG+OWtR06ddyX4Mxas=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cGgCDuPV7MeMMYEDpgOupqyNP4BQ4H7rBnd2QygumgM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IPaUoy98v11EoglTpJ4kBlEawoZ8y7BPwzjLYBpkvHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Pfo4Am6tOWAyZNn8G9W5HWWGC3ZWmX0igI/RRB870Ro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fnTSjd7bC1Udoq6iM7UDnHAC/lsIXSHp/Gy332qw+/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fApBgVRrTDyEumkeWs5p3ag9KB48SbU4Si0dl7Ns9rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QxudfBItgoCnUj5NXVnSmWH3HK76YtKkMmzn4lyyUYY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sSOvwhKa29Wq94bZ5jGIiJQGbG1uBrKSBfOYBz/oZeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FdaMgwwJ0NKsqmPZLC5oE+/0D74Dfpvig3LaI5yW5Fs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sRWBy12IERN43BSZIrnBfC9+zFBUdvjTlkqIH81NGt4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/4tIRpxKhoOwnXAiFn1Z7Xmric4USOIfKvTYQXk3QTc=", - "subType": "00" - } - } - ] - }, - { - "_id": { - "$numberInt": "1" - }, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RGTjNVEsNJb+DG7DpPOam8rQWD5HZAMpRyiTQaw7tk8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I93Md7QNPGmEEGYU1+VVCqBPBEvXdqHPtTJtMOn06Yk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "GecBFQ1PemlECWZWCl7f74vmsL6eB6mzQ9n6tK6FYfs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QpjhZl+O1ORifgtCZuWAdcP6OKL7IZ2cA46v8FJcV28=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RlQWwhU+uVv0a+9IB5cUkEfvHBvOw3B1Sx6WfPWMqes=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubb81XTC7U+4tcNzf1oYvOY6gR5hC2Izqx54f4GuJ0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6M4Q5NMQ9TqNnjzGOxIkiUIY8TEL0I3XD1QnhefQUqU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BtInzk9t2FFMCEY6AQ7zN8jwrrZEs2irSv6q0Q4NaIw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vxXfETu9cuBIpRBo3jUUU04mJIH/aAhLX8K6VI5Xv0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wXPCdS+q23zi1bkPnaVG2j0PsVtxdeSLJ//h6J1x8RU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KY3KkfBAsN2l80wbpj41G0gwBR5KmmFnZcagg7D3ENk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI8NFAxXCX4VOnY5X73K6KI/Yspd3aR94KV39MhJlAw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nFxH0UC3mATKA6Vboz+QX/hAjj19kF/SH6H5Cne7qC0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q8hYqIYaIi7nOdG/7qQZYnz8Bsacfi66M1nVku4SH08=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4saA92R4arp4anvD9xFtze+sNcQqTEhPHyl1h70A8NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DbIziOBRRyeQS6RtBR09E37LV+CTKrEjGoRMLSpG6eE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Fv80Plp/7w2gnVqrwawLd6qhJ10G4NCDm3re67cNq4Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "T/T2oiQCBBES4YN7EodzPRdabZSFlYIClHBym+bQUZE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZQgHD3l46Ujqtbnj1VbbeM29C9wJzOhz+yZ/7XdSrxk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ltlFKzWvyZvHxDFOYDd/XXJ6kUiJj0ln2HTCEz2o4Z4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "flW8A7bltC1u8bzx0WJtxosGJdOVsJFfbx33jxnpFGg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SXO+92QbMKwUSG2t27ciunV1c3VvFkUuDmSczpRe008=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+KioGs1GM+xRBzFE67ePTWj04KMSE5/Y6qUF7nJ5kvU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L3xNVbh6YH+RzqABN+5Jgb7T234Efpn766DmUvxIxgg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hPF+60mBYPjh21dEmPlBhKgyc9S2qLtTkypYvnqP2Fc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EletRsETy2HcjaPIm2c8CkT7ch/P3pJJDC8hasepcSU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "r5bMXUaNKqLPxZ+TG9HYTG4aSDgcpim27rN8rQFkM0w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Q7Erdr8+/S0wUEDDIqlS5XjBVWvhZY65K0uUDb6+Ns=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xEcnhXy35hbXNVBPOOt3TUHbxvKfQ48KjA9b6/rbMqQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "T8bEpiQNgsEudXvyKE9SZlSvbpV/LUaslsdqgSFltyo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hIoiaF2YjnxDbODfhFEB+JGZ5nf8suD3Shck5bwQ3N0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qnA6qzejeRJ0rsZaZ0zOvKAaXyxt5lpscKQNYFZNl4k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "anAKCL2DN/le2VaP0n2ucYSEH/DaaEH/8Sa4OqTZsRA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JCZlBJaFm618oWYSnT9Jr1MtwFVw4BZjOzO+5yWgR90=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yxyk4n9762WzcDVGnTn4jCqUnSMIVCrLDIjCX1QVj34=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fDI6fdKvDJwim5/CQwWZEzcrXE3LHgy7FTtffcC7tXE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Vex+gcz5T+WkzsVZQrkqUR2ryyZbnaOGuWpYvjN0zCw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8TLEXz+Gbbp6llHpZXVjLsdlYY9f6hrKpHVpyfDe0RY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7fTyt5BrunypS65TfOzFW2E2qdIuT4SLeDeGlbQoJCs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8fKGrkqN0/KuSjyXgDBmRauDKrSa//JBKRWHEB9xBf4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s4codmG7uN4ss6P357jL21lazEe90M9GOK5WrOknSV0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RkSpua8XF+NUdxVDU90EbLUTTyZFX3tt3atBTroFaRk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "LnTCuCDyAHK5B9KXzjtwGmWB+qergQk2OCjnIx9MI2A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cBFh0virAX4pVXf/udIGI2951i0+0aZAdJcBVGtYnT4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "G54X6myQXWZ5fw/G31en3QbdgfXzL9+hFTtJpnWMqDI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EdsiiuezcsFJFnYIyGjCOhnqMj1BOwTB5EFxN+ERUkg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dVH9MXLtk0WTwGQ3xmrhOqfropMUkDW3o6paNPGl3NU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sB3HqXKWY3pKbuEH8BTbfNIGfbY+7/ZbOc3XC+JRNNI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WHyDk62Xhqbo4/iie2aLIM4x2uuAjv6102dJSHI58oM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pNUFuHpeNRDUZ/NrtII2c6sNc9eGR1lIUlIyXKERA+0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UPa+pdCqnN0bfAptdzldQOSd01gidrDKy8KhWrpSKAI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "l+7dOAlo+HUffMqFYXL6pgUFeTbwOM9CjKQLxEoLtc4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SRnDXV/rN6C8xwMutv9E1luv3DOUio3VkgPr8Cpm7Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QcH6gl+gX7xZ7OWhUNQMbndJy0Piz49pDo6RsnLkVSA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "t+uL4DnfsI/Zll/KXWW1cOKX3Hu8WIkm3pt9efCVSAQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "myutHDctku/+Uug/nD8gRbYvmx/IovtoAAC2/fz2oHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6C+cjD0e0nSCP6cPqQYbNG7SlOd6Mfvi8hyfm7Ng+D8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zg01JSoOj9oBKT0S1ldJucXzY5AKgreS+h2xJreWTOs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7qQ80/FjodHl1m1py/Oii0/9C/xWbLdhaRXQ+kkCP10=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YwWMNH07vL6c5Nhg+MRnVByhzUunu8y0VLM9z/XvR5U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Dle8bU98+fudAbc14SToZFkwvV3tcYVsjDug0NWljpc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "J+eKL1vPJmlzltvhI6Li5Fz/TJmi3Ng+ehRTcs46API=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB3XzfFygLwC3WHkj0up+VbEd25KKoce1vOpG/5bwK4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vnVnmOnL+z2pqwE+A6cVKS0Iwy4F4/2IiElJca9bUQM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+lG5r/Fpqry3BtFuvY67+RntmHAMDoLVOSGc6ZoXPb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L5MXQertqc6uj7ADe8aWKbd1sYHPCE7P1VYVg9Zc3VI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "imKONuZgopt0bhM3GMX2WVPwQYMTobuUUEdhcLfHs4c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "eOkU1J1uVbiVFWBerbXsSIVcF2nqiicTkFy4x7kFHB8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gI0uDhXeoH/UatDQKEf4qo8FHzWZDhb/wuWTqbq/ID4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cOkd5Aa3btYhtojE/smsF/PJnULqQ4NNqTkU6KXTFmo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "AWNJMs1MTe294oFipp8Y6P0CjpkZ4qCZoClQF3XcHq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6gJtlzXOFhGYrVbTuRMmvMlDTwXdNtR9aGBlHZPwIMw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "LEmwVGA/xsEG7UrcOoYLFu6KCXgijzFznenknuDacm8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "mIRFPTXRrGaPtp/Ydij2jgkRe4uoUvAKxW2d8b9zYL0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "B+Uv2u48WALOO0L311z+eryjYQzKJVMfdHMZPhOAFmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "INXXp0wDyVCq+NtfIrrC2ciETmyW/dWB/48/u4yLEZ4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "se7DGo8XrlrQDLEcco1tZrQt9kDe+0RTyl2bw/quG4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vr0m2+Zk9lbN6UgWCyn8xJWJOokU3IDYab5U5q1+CgQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XI+eJ8Gy2JktG1gICgoj1qpsfy1tKmH0kglWbaQH6DA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A+UCuNnuAUqnQzspA6TVqUPRmtZmpSex5HFw7THRxs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xaH2Ehfljd19uo0Fvb3iwkdaiWEVQd2YPoitgEPkhSM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "S/iZBJGcc8+qZxyMtab65MMBoSglybwk3x58Nb86gnY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "w14ZE5qqY5YgkS4Zcs9YNbrQbY1XfGOOHNn9bOYnFVQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0MhGd/jEF1vjkKGp+ZMn9SjLK54jkp9W4Hg+Sp/oxaI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "92QZ73e/NRTYgCm4aifaKth6aAsKnLLccBc0zx/qUTY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WOjzemCgFJOiGIp81RSVh/tFlzSTj9eFWcBnsiv2Ycs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DrsP9CmfKPjw5yLL8bnSeAxfNzAwlb+Z8OqCiKgBY7o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lMogqg8veBv6mri3/drMe9afJiKMvevkmGcw9BedfLo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "TxqwNcY8Tg2MPpNdkPBwvfpuTttSYRHU26DGECKYQ9o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "l0u1b4b4vYACWIwfnB7PZac4oDEgjQZCzHruNPTgAIY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "iVSGQ+cCfhbWIrY/v/WBORK92elu9gfRKyGhr6r/k00=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yK1forG50diEXte8ECzjfpHeYsPyuQ/dgxbxn/nzY5k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gIfTLCD3VwnOwkC0zPXWTqaITxX6ZplA69PO2a6zolc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "O/Zxlgh3WqpzJ7+Sd8XWMVID4/GXJUUWaSqfgDUi3b0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZQ6yv368zwahUqSUYH/StL0Qgz/TwS1CzlMjVDvCciI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m2rPEYkjwyiKdonMrKlcF7hya4lFOAUwEePJ3SgrNx8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Mq0yl5iVKlq71bT/dT/fXOWf2n90bTnXFnOdGDN0JOc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6qDGMXipPLC2O6EAAMjO2F9xx4rdqZso4IkPpH2304U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jvQHRQQa2RIszE2LX2Hv2LbRhYawJ6qmtRt8HZzFQXg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ovJXQrkZlpeHRciKyE/WWNm5O389gRgzx1W+Dw596X4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "a4kgRNvYctGYqyQv9qScL/WkljTYVylJ9pE9KDULlxU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qV4Q48vPiCJMTjljotzYKI/zfExWpkKOSHGcAjGyDig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jtI7zbBF+QW/aYYTkn90zzyHLXLgmy7l1bzgMb2oqic=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q0KmJl9txPdn962UNvnfe6UFhdk9YaFZuTm33F+csso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ULNdEqeZJgtmNOhN/Y9INzsE9AnxWYwOMn+pIbRXIFs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "R4oz9+wkdjpKe5tE1jpG7IURAnfvS5fLP4LrD5cZfTE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qG5Z7VhwSu/HT/YFTgDzyAAzJKq51xPw2HeEV5btYC4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OM/1DmIIZ5Qyhtq8TGkHTBEMVKjAnKRZMRXYtTG8ctc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2R5vZbljLXnDFA99YfGuRB7pAdPJVKsT25zLNMC0fUk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OMbavF2EmdAz1fHkLV3ctFEUDfriKhoT2gidwHZ9z1o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MWT4Zrw3/vVvTYMa1Is5Pjr3wEwnBfnEAPPUAHKQhNU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tBkRPfG9yxfKocQx5pAJX0oEHKPL0Tgtr+0UYe09InE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lqxpnDR/H0YgH7RcfKoNoaaRhe1SIazIeMbQ1fu9y3Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "utT1UdR22PWOTrOkZauztX613lAplV4eh/ejTRb7ZSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "S+Y2yFyKi/a6FXhih4yGo29X8I8OT6/zwEoX6NMKT4o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QSjVppg29x6oS5yBg8OFjrFt0tuTpWCuKxfIy0k8YnE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y3r6/Xsfvsl3HksXlVYkJgHUqpQGfICxg3x9f8Zw1qM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BSltHzEwDjFN4du9rDHAPvl22atlcTioEtt+gC5L1tk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0arGXjSN0006UnXbrWsGqhvBair569DeFDUME3Df3rA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s/DumaMad08S+PBUUcrS+v42K0z8HgcdiQtrFAEu2Qs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EzJ8Y8N0OQBTlnvrK82PdevDNZZO4E6CNgYVu8Cj6Ks=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VA4vr8jBPI5QdiPrULzzZjBMIUbG3V7Slg5zm0bFcKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YAOvEB2ZLtq9LQiFViBHWaxxWVVonC2rNYj9tN9s3L0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hgaHMo9aAGS+nBwvqnTjZO+YkiQPY1c1XcIYeaYKHyI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YvaoLt3ZpH0atB0tNzwMjpoxRYJXl0DqSjisMJiGVBE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EMmW6CptFsiLoPOi5/uAJQ2FmeLg6mCpuVLLrRWk7Mc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1jQsNMarSnarlYmXEuoFokeBMg/090qUD9wqo1Zn8Gs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hupXNKhRpJxpyDAAP1TgJ5JMZh9lhbMk6s7D7dMS3C8=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-InsertFind.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-InsertFind.yml deleted file mode 100644 index 0007eeff67..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-InsertFind.yml +++ /dev/null @@ -1,1668 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - # Tests for Decimal (without precision) must only run against a replica set. Decimal (without precision) queries are expected to take a long time and may exceed the default mongos timeout. - topology: [ "replicaset" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDecimalNoPrecision', 'bsonType': 'decimal', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Decimal. Insert and Find." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDecimalNoPrecision: { $numberDecimal: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDecimalNoPrecision: { $numberDecimal: "1" } } - - name: find - arguments: - filter: { encryptedDecimalNoPrecision: { $gt: { $numberDecimal: "0" } } } - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDecimalNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDecimalNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: - "encryptedDecimalNoPrecision": { - "$gt": { - "$binary": { - "base64": "DR1jAAADcGF5bG9hZACxYgAABGcAnWIAAAMwAH0AAAAFZAAgAAAAAJu2KgiI8vM+kz9qD3ZQzFQY5qbgYqCqHG5R4jAlnlwXBXMAIAAAAAAAUXxFXsz764T79sGCdhxvNd5b6E/9p61FonsHyEIhogVsACAAAAAAt19RL3Oo5ni5L8kcvgOJYLgVYyXJExwP8pkuzLG7f/kAAzEAfQAAAAVkACAAAAAAPQPvL0ARjujSv2Rkm8r7spVsgeC1K3FW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Fl4YK343OB6hcQAAEmNtAAAAAAAAAAAAABBwYXlsb2FkSWQAAAAAABBmaXJzdE9wZXJhdG9yAAEAAAASc3AAAQAAAAAAAAAQdGYAAQAAABNtbgD/////Y46NN8CHrb4J7f/fE214AP////9jjo03wIetvgnt/18A", - "subType": "06" - } - } - } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "rbf3AeBEv4wWFAKknqDxRW5cLNkFvbIs6iJjc6LShQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0l86Ag5OszXpa78SlOUV3K9nff5iC1p0mRXtLg9M1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hn6yuxFHodeyu7ISlhYrbSf9pTiH4TDEvbYLWjTwFO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zdf4y2etKBuIpkEU1zMwoCkCsdisfXZCh8QPamm+drY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rOQ9oMdiK5xxGH+jPzOvwVqdGGnF3+HkJXxn81s6hp4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "61aKKsE3+BJHHWYvs3xSIBvlRmKswmaOo5rygQJguUg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KuDb/GIzqDM8wv7m7m8AECiWJbae5EKKtJRugZx7kR0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Q+t8t2TmNUiCIorVr9F3AlVnX+Mpt2ZYvN+s8UGict8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJRZIpKxUgHyL83kW8cvfjkxN3z6WoNnUg+SQw+LK+k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnUsYjip8SvW0+m9mR5WWTkpK+p6uwJ6yBUAlBnFKMk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PArHlz+yPRYDycAP/PgnI/AkP8Wgmfg++Vf4UG1Bf0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wnIh53Q3jeK8jEBe1n8kJLa89/H0BxO26ZU8SRIAs9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4F8U59gzBLGhq58PEWQk2nch+R0Va7eTUoxMneReUIA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ihKagIW3uT1dm22ROr/g5QaCpxZVj2+Fs/YSdM2Noco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EJtUOOwjkrPUi9mavYAi+Gom9Y2DuFll7aDwo4mq0M0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dIkr8dbaVRQFskAVT6B286BbcBBt1pZPEOcTZqk4ZcI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aYVAcZYkH/Tieoa1XOjE/zCy5AJcVTHjS0NG2QB7muA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sBidL6y8TenseetpioIAAtn0lK/7C8MoW4JXpVYi3z8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Dd2klU/t4R86c2WJcJDAd57k/N7OjvYSO5Vf8KH8sw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I3jZ92WEVmZmgaIkLbuWhBxl7EM6bEjiEttgBJunArA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aGHoQMlgJoGvArjfIbc3nnkoc8SWBxcrN7hSmjMRzos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bpiWPnF/KVBQr5F6MEwc5ZZayzIRvQOLDAm4ntwOi8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI7QVKbE6avWgDD9h4QKyFlnTxFCwd2iLySKakxNR/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XGsge0CnoaXgE3rcpKm8AEeku5QVfokS3kcI+JKV1lk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JQxlryW2Q5WOwfrjAnaZxDvC83Dg6sjRVP5zegf2WiM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YFuHKJOfoqp1iGVxoFjx7bLYgVdsN4GuUFxEgO9HJ5s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z6vUdiCR18ylKomf08uxcQHeRtmyav7/Ecvzz4av3k4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SPGo1Ib5AiP/tSllL7Z5PAypvnKdwJLzt8imfIMSEJQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m94Nh6PFFQFLIib9Cu5LAKavhXnagSHG6F5EF8lD96I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pfEkQI98mB+gm1+JbmVurPAODMFPJ4E8DnqfVyUWbSo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DNj3OVRLbr43s0vd+rgWghOL3FqeO/60npdojC8Ry/M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kAYIQrjHVu49W8FTxyxJeiLVRWWjC9fPcBn+Hx1F+Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aCSO7UVOpoQvu/iridarxkxV1SVxU1i9HVSYXUAeXk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Gh6hTP/yj1IKlXQ+Q69KTfMlGZjEcXoRLGbQHNFo/1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/gDgIFQ4tAlJk3GN48IS5Qa5IPmErwGk8CHxAbp6gs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PICyimwPjxpusyKxNssOOwUotAUbygpyEtORsVGXT8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4lu+cBHyAUvuxC6JUNyHLzHsCogGSWFFnUCkDwfQdgI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pSndkmoNUJwXjgkbkgOrT5f9nSvuoMEZOkwAN9ElRaE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tyW+D4i26QihNM5MuBM+wnt5AdWGSJaJ4X5ydc9iWTU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9Syjr8RoxUgPKr+O5rsCu07AvcebA4P8IVKyS1NVLWc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "67tPfDYnK2tmrioI51fOBG0ygajcV0pLo5+Zm/rEW7U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y0EiPRxYTuS1eVTIaPQUQBBxwkyxNckbePvKgChwd0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NWd+2veAaeXQgR3vCvzlI4R1WW67D5YsVLdoXfdb8qg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PY5RQqKQsL2GqBBSPNOEVpojNFRX/NijCghIpxD6CZk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lcvwTyEjFlssCJtdjRpdN6oY+C7bxZY+WA+QAqzj9zg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWE7XRNylvTwO/9Fv56dNqUaQWMmESNS/GNIwgBaEI0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ijwlrUeS8nRYqK1F8kiCYF0mNDolEZS+/lJO1Lg93C8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8KzV+qYGYuIjoNj8eEpnTuHrMYuhzphl80rS6wrODuU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wDyTLjSEFF895hSQsHvmoEQVS6KIkZOtq1c9dVogm9I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SGrtPuMYCjUrfKF0Pq/thdaQzmGBMUvlwN3ORIu9tHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KySHON3hIoUk4xWcwTqk6IL0kgjzjxgMBObVIkCGvk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hBIdS9j0XJPeT4ot73ngELkpUoSixvRBvdOL9z48jY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Tx6um0q9HjS5ZvlFhvukpI6ORnyrXMWVW1OoxvgqII0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zFKlyfX5H81+d4A4J3FKn4T5JfG+OWtR06ddyX4Mxas=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cGgCDuPV7MeMMYEDpgOupqyNP4BQ4H7rBnd2QygumgM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IPaUoy98v11EoglTpJ4kBlEawoZ8y7BPwzjLYBpkvHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Pfo4Am6tOWAyZNn8G9W5HWWGC3ZWmX0igI/RRB870Ro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fnTSjd7bC1Udoq6iM7UDnHAC/lsIXSHp/Gy332qw+/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fApBgVRrTDyEumkeWs5p3ag9KB48SbU4Si0dl7Ns9rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QxudfBItgoCnUj5NXVnSmWH3HK76YtKkMmzn4lyyUYY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sSOvwhKa29Wq94bZ5jGIiJQGbG1uBrKSBfOYBz/oZeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FdaMgwwJ0NKsqmPZLC5oE+/0D74Dfpvig3LaI5yW5Fs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sRWBy12IERN43BSZIrnBfC9+zFBUdvjTlkqIH81NGt4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/4tIRpxKhoOwnXAiFn1Z7Xmric4USOIfKvTYQXk3QTc=", - "subType": "00" - } - } - ] - } - - - { - "_id": { - "$numberInt": "1" - }, - "encryptedDecimalNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RGTjNVEsNJb+DG7DpPOam8rQWD5HZAMpRyiTQaw7tk8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I93Md7QNPGmEEGYU1+VVCqBPBEvXdqHPtTJtMOn06Yk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "GecBFQ1PemlECWZWCl7f74vmsL6eB6mzQ9n6tK6FYfs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QpjhZl+O1ORifgtCZuWAdcP6OKL7IZ2cA46v8FJcV28=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RlQWwhU+uVv0a+9IB5cUkEfvHBvOw3B1Sx6WfPWMqes=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubb81XTC7U+4tcNzf1oYvOY6gR5hC2Izqx54f4GuJ0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6M4Q5NMQ9TqNnjzGOxIkiUIY8TEL0I3XD1QnhefQUqU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BtInzk9t2FFMCEY6AQ7zN8jwrrZEs2irSv6q0Q4NaIw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vxXfETu9cuBIpRBo3jUUU04mJIH/aAhLX8K6VI5Xv0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wXPCdS+q23zi1bkPnaVG2j0PsVtxdeSLJ//h6J1x8RU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KY3KkfBAsN2l80wbpj41G0gwBR5KmmFnZcagg7D3ENk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI8NFAxXCX4VOnY5X73K6KI/Yspd3aR94KV39MhJlAw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nFxH0UC3mATKA6Vboz+QX/hAjj19kF/SH6H5Cne7qC0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q8hYqIYaIi7nOdG/7qQZYnz8Bsacfi66M1nVku4SH08=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4saA92R4arp4anvD9xFtze+sNcQqTEhPHyl1h70A8NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DbIziOBRRyeQS6RtBR09E37LV+CTKrEjGoRMLSpG6eE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Fv80Plp/7w2gnVqrwawLd6qhJ10G4NCDm3re67cNq4Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "T/T2oiQCBBES4YN7EodzPRdabZSFlYIClHBym+bQUZE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZQgHD3l46Ujqtbnj1VbbeM29C9wJzOhz+yZ/7XdSrxk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ltlFKzWvyZvHxDFOYDd/XXJ6kUiJj0ln2HTCEz2o4Z4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "flW8A7bltC1u8bzx0WJtxosGJdOVsJFfbx33jxnpFGg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SXO+92QbMKwUSG2t27ciunV1c3VvFkUuDmSczpRe008=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+KioGs1GM+xRBzFE67ePTWj04KMSE5/Y6qUF7nJ5kvU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L3xNVbh6YH+RzqABN+5Jgb7T234Efpn766DmUvxIxgg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hPF+60mBYPjh21dEmPlBhKgyc9S2qLtTkypYvnqP2Fc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EletRsETy2HcjaPIm2c8CkT7ch/P3pJJDC8hasepcSU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "r5bMXUaNKqLPxZ+TG9HYTG4aSDgcpim27rN8rQFkM0w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Q7Erdr8+/S0wUEDDIqlS5XjBVWvhZY65K0uUDb6+Ns=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xEcnhXy35hbXNVBPOOt3TUHbxvKfQ48KjA9b6/rbMqQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "T8bEpiQNgsEudXvyKE9SZlSvbpV/LUaslsdqgSFltyo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hIoiaF2YjnxDbODfhFEB+JGZ5nf8suD3Shck5bwQ3N0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qnA6qzejeRJ0rsZaZ0zOvKAaXyxt5lpscKQNYFZNl4k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "anAKCL2DN/le2VaP0n2ucYSEH/DaaEH/8Sa4OqTZsRA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JCZlBJaFm618oWYSnT9Jr1MtwFVw4BZjOzO+5yWgR90=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yxyk4n9762WzcDVGnTn4jCqUnSMIVCrLDIjCX1QVj34=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fDI6fdKvDJwim5/CQwWZEzcrXE3LHgy7FTtffcC7tXE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Vex+gcz5T+WkzsVZQrkqUR2ryyZbnaOGuWpYvjN0zCw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8TLEXz+Gbbp6llHpZXVjLsdlYY9f6hrKpHVpyfDe0RY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7fTyt5BrunypS65TfOzFW2E2qdIuT4SLeDeGlbQoJCs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8fKGrkqN0/KuSjyXgDBmRauDKrSa//JBKRWHEB9xBf4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s4codmG7uN4ss6P357jL21lazEe90M9GOK5WrOknSV0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RkSpua8XF+NUdxVDU90EbLUTTyZFX3tt3atBTroFaRk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "LnTCuCDyAHK5B9KXzjtwGmWB+qergQk2OCjnIx9MI2A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cBFh0virAX4pVXf/udIGI2951i0+0aZAdJcBVGtYnT4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "G54X6myQXWZ5fw/G31en3QbdgfXzL9+hFTtJpnWMqDI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EdsiiuezcsFJFnYIyGjCOhnqMj1BOwTB5EFxN+ERUkg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dVH9MXLtk0WTwGQ3xmrhOqfropMUkDW3o6paNPGl3NU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sB3HqXKWY3pKbuEH8BTbfNIGfbY+7/ZbOc3XC+JRNNI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WHyDk62Xhqbo4/iie2aLIM4x2uuAjv6102dJSHI58oM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pNUFuHpeNRDUZ/NrtII2c6sNc9eGR1lIUlIyXKERA+0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UPa+pdCqnN0bfAptdzldQOSd01gidrDKy8KhWrpSKAI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "l+7dOAlo+HUffMqFYXL6pgUFeTbwOM9CjKQLxEoLtc4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SRnDXV/rN6C8xwMutv9E1luv3DOUio3VkgPr8Cpm7Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QcH6gl+gX7xZ7OWhUNQMbndJy0Piz49pDo6RsnLkVSA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "t+uL4DnfsI/Zll/KXWW1cOKX3Hu8WIkm3pt9efCVSAQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "myutHDctku/+Uug/nD8gRbYvmx/IovtoAAC2/fz2oHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6C+cjD0e0nSCP6cPqQYbNG7SlOd6Mfvi8hyfm7Ng+D8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zg01JSoOj9oBKT0S1ldJucXzY5AKgreS+h2xJreWTOs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7qQ80/FjodHl1m1py/Oii0/9C/xWbLdhaRXQ+kkCP10=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YwWMNH07vL6c5Nhg+MRnVByhzUunu8y0VLM9z/XvR5U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Dle8bU98+fudAbc14SToZFkwvV3tcYVsjDug0NWljpc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "J+eKL1vPJmlzltvhI6Li5Fz/TJmi3Ng+ehRTcs46API=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB3XzfFygLwC3WHkj0up+VbEd25KKoce1vOpG/5bwK4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vnVnmOnL+z2pqwE+A6cVKS0Iwy4F4/2IiElJca9bUQM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+lG5r/Fpqry3BtFuvY67+RntmHAMDoLVOSGc6ZoXPb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L5MXQertqc6uj7ADe8aWKbd1sYHPCE7P1VYVg9Zc3VI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "imKONuZgopt0bhM3GMX2WVPwQYMTobuUUEdhcLfHs4c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "eOkU1J1uVbiVFWBerbXsSIVcF2nqiicTkFy4x7kFHB8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gI0uDhXeoH/UatDQKEf4qo8FHzWZDhb/wuWTqbq/ID4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cOkd5Aa3btYhtojE/smsF/PJnULqQ4NNqTkU6KXTFmo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "AWNJMs1MTe294oFipp8Y6P0CjpkZ4qCZoClQF3XcHq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6gJtlzXOFhGYrVbTuRMmvMlDTwXdNtR9aGBlHZPwIMw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "LEmwVGA/xsEG7UrcOoYLFu6KCXgijzFznenknuDacm8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "mIRFPTXRrGaPtp/Ydij2jgkRe4uoUvAKxW2d8b9zYL0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "B+Uv2u48WALOO0L311z+eryjYQzKJVMfdHMZPhOAFmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "INXXp0wDyVCq+NtfIrrC2ciETmyW/dWB/48/u4yLEZ4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "se7DGo8XrlrQDLEcco1tZrQt9kDe+0RTyl2bw/quG4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vr0m2+Zk9lbN6UgWCyn8xJWJOokU3IDYab5U5q1+CgQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XI+eJ8Gy2JktG1gICgoj1qpsfy1tKmH0kglWbaQH6DA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A+UCuNnuAUqnQzspA6TVqUPRmtZmpSex5HFw7THRxs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xaH2Ehfljd19uo0Fvb3iwkdaiWEVQd2YPoitgEPkhSM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "S/iZBJGcc8+qZxyMtab65MMBoSglybwk3x58Nb86gnY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "w14ZE5qqY5YgkS4Zcs9YNbrQbY1XfGOOHNn9bOYnFVQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0MhGd/jEF1vjkKGp+ZMn9SjLK54jkp9W4Hg+Sp/oxaI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "92QZ73e/NRTYgCm4aifaKth6aAsKnLLccBc0zx/qUTY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WOjzemCgFJOiGIp81RSVh/tFlzSTj9eFWcBnsiv2Ycs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DrsP9CmfKPjw5yLL8bnSeAxfNzAwlb+Z8OqCiKgBY7o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lMogqg8veBv6mri3/drMe9afJiKMvevkmGcw9BedfLo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "TxqwNcY8Tg2MPpNdkPBwvfpuTttSYRHU26DGECKYQ9o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "l0u1b4b4vYACWIwfnB7PZac4oDEgjQZCzHruNPTgAIY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "iVSGQ+cCfhbWIrY/v/WBORK92elu9gfRKyGhr6r/k00=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yK1forG50diEXte8ECzjfpHeYsPyuQ/dgxbxn/nzY5k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gIfTLCD3VwnOwkC0zPXWTqaITxX6ZplA69PO2a6zolc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "O/Zxlgh3WqpzJ7+Sd8XWMVID4/GXJUUWaSqfgDUi3b0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZQ6yv368zwahUqSUYH/StL0Qgz/TwS1CzlMjVDvCciI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m2rPEYkjwyiKdonMrKlcF7hya4lFOAUwEePJ3SgrNx8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Mq0yl5iVKlq71bT/dT/fXOWf2n90bTnXFnOdGDN0JOc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6qDGMXipPLC2O6EAAMjO2F9xx4rdqZso4IkPpH2304U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jvQHRQQa2RIszE2LX2Hv2LbRhYawJ6qmtRt8HZzFQXg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ovJXQrkZlpeHRciKyE/WWNm5O389gRgzx1W+Dw596X4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "a4kgRNvYctGYqyQv9qScL/WkljTYVylJ9pE9KDULlxU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qV4Q48vPiCJMTjljotzYKI/zfExWpkKOSHGcAjGyDig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jtI7zbBF+QW/aYYTkn90zzyHLXLgmy7l1bzgMb2oqic=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q0KmJl9txPdn962UNvnfe6UFhdk9YaFZuTm33F+csso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ULNdEqeZJgtmNOhN/Y9INzsE9AnxWYwOMn+pIbRXIFs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "R4oz9+wkdjpKe5tE1jpG7IURAnfvS5fLP4LrD5cZfTE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qG5Z7VhwSu/HT/YFTgDzyAAzJKq51xPw2HeEV5btYC4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OM/1DmIIZ5Qyhtq8TGkHTBEMVKjAnKRZMRXYtTG8ctc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2R5vZbljLXnDFA99YfGuRB7pAdPJVKsT25zLNMC0fUk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OMbavF2EmdAz1fHkLV3ctFEUDfriKhoT2gidwHZ9z1o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MWT4Zrw3/vVvTYMa1Is5Pjr3wEwnBfnEAPPUAHKQhNU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tBkRPfG9yxfKocQx5pAJX0oEHKPL0Tgtr+0UYe09InE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lqxpnDR/H0YgH7RcfKoNoaaRhe1SIazIeMbQ1fu9y3Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "utT1UdR22PWOTrOkZauztX613lAplV4eh/ejTRb7ZSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "S+Y2yFyKi/a6FXhih4yGo29X8I8OT6/zwEoX6NMKT4o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QSjVppg29x6oS5yBg8OFjrFt0tuTpWCuKxfIy0k8YnE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y3r6/Xsfvsl3HksXlVYkJgHUqpQGfICxg3x9f8Zw1qM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BSltHzEwDjFN4du9rDHAPvl22atlcTioEtt+gC5L1tk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0arGXjSN0006UnXbrWsGqhvBair569DeFDUME3Df3rA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s/DumaMad08S+PBUUcrS+v42K0z8HgcdiQtrFAEu2Qs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EzJ8Y8N0OQBTlnvrK82PdevDNZZO4E6CNgYVu8Cj6Ks=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VA4vr8jBPI5QdiPrULzzZjBMIUbG3V7Slg5zm0bFcKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YAOvEB2ZLtq9LQiFViBHWaxxWVVonC2rNYj9tN9s3L0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hgaHMo9aAGS+nBwvqnTjZO+YkiQPY1c1XcIYeaYKHyI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YvaoLt3ZpH0atB0tNzwMjpoxRYJXl0DqSjisMJiGVBE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EMmW6CptFsiLoPOi5/uAJQ2FmeLg6mCpuVLLrRWk7Mc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1jQsNMarSnarlYmXEuoFokeBMg/090qUD9wqo1Zn8Gs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hupXNKhRpJxpyDAAP1TgJ5JMZh9lhbMk6s7D7dMS3C8=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Update.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Update.json deleted file mode 100644 index b840d38347..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Update.json +++ /dev/null @@ -1,1910 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Decimal. Update.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$numberDecimal": "1" - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$numberDecimal": "0" - } - } - }, - "update": { - "$set": { - "encryptedDecimalNoPrecision": { - "$numberDecimal": "2" - } - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command_name": "update", - "command": { - "update": "default", - "ordered": true, - "updates": [ - { - "q": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$binary": { - "base64": "DR1jAAADcGF5bG9hZACxYgAABGcAnWIAAAMwAH0AAAAFZAAgAAAAAJu2KgiI8vM+kz9qD3ZQzFQY5qbgYqCqHG5R4jAlnlwXBXMAIAAAAAAAUXxFXsz764T79sGCdhxvNd5b6E/9p61FonsHyEIhogVsACAAAAAAt19RL3Oo5ni5L8kcvgOJYLgVYyXJExwP8pkuzLG7f/kAAzEAfQAAAAVkACAAAAAAPQPvL0ARjujSv2Rkm8r7spVsgeC1K3FWcskGGZ3OdDIFcwAgAAAAACgNn660GmefR8jLqzgR1u5O+Uocx9GyEHiBqVGko5FZBWwAIAAAAADflr+fsnZngm6KRWYgHa9JzK+bXogWl9evBU9sQUHPHQADMgB9AAAABWQAIAAA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214AP////9jjo03wIetvgnt/18A", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedDecimalNoPrecision": { - "$$type": "binData" - } - } - } - } - ], - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalNoPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - }, - "$db": "default" - } - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "rbf3AeBEv4wWFAKknqDxRW5cLNkFvbIs6iJjc6LShQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0l86Ag5OszXpa78SlOUV3K9nff5iC1p0mRXtLg9M1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hn6yuxFHodeyu7ISlhYrbSf9pTiH4TDEvbYLWjTwFO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zdf4y2etKBuIpkEU1zMwoCkCsdisfXZCh8QPamm+drY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rOQ9oMdiK5xxGH+jPzOvwVqdGGnF3+HkJXxn81s6hp4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "61aKKsE3+BJHHWYvs3xSIBvlRmKswmaOo5rygQJguUg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KuDb/GIzqDM8wv7m7m8AECiWJbae5EKKtJRugZx7kR0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Q+t8t2TmNUiCIorVr9F3AlVnX+Mpt2ZYvN+s8UGict8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJRZIpKxUgHyL83kW8cvfjkxN3z6WoNnUg+SQw+LK+k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnUsYjip8SvW0+m9mR5WWTkpK+p6uwJ6yBUAlBnFKMk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PArHlz+yPRYDycAP/PgnI/AkP8Wgmfg++Vf4UG1Bf0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wnIh53Q3jeK8jEBe1n8kJLa89/H0BxO26ZU8SRIAs9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4F8U59gzBLGhq58PEWQk2nch+R0Va7eTUoxMneReUIA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ihKagIW3uT1dm22ROr/g5QaCpxZVj2+Fs/YSdM2Noco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EJtUOOwjkrPUi9mavYAi+Gom9Y2DuFll7aDwo4mq0M0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dIkr8dbaVRQFskAVT6B286BbcBBt1pZPEOcTZqk4ZcI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aYVAcZYkH/Tieoa1XOjE/zCy5AJcVTHjS0NG2QB7muA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sBidL6y8TenseetpioIAAtn0lK/7C8MoW4JXpVYi3z8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Dd2klU/t4R86c2WJcJDAd57k/N7OjvYSO5Vf8KH8sw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I3jZ92WEVmZmgaIkLbuWhBxl7EM6bEjiEttgBJunArA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aGHoQMlgJoGvArjfIbc3nnkoc8SWBxcrN7hSmjMRzos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bpiWPnF/KVBQr5F6MEwc5ZZayzIRvQOLDAm4ntwOi8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI7QVKbE6avWgDD9h4QKyFlnTxFCwd2iLySKakxNR/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XGsge0CnoaXgE3rcpKm8AEeku5QVfokS3kcI+JKV1lk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JQxlryW2Q5WOwfrjAnaZxDvC83Dg6sjRVP5zegf2WiM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YFuHKJOfoqp1iGVxoFjx7bLYgVdsN4GuUFxEgO9HJ5s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z6vUdiCR18ylKomf08uxcQHeRtmyav7/Ecvzz4av3k4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SPGo1Ib5AiP/tSllL7Z5PAypvnKdwJLzt8imfIMSEJQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m94Nh6PFFQFLIib9Cu5LAKavhXnagSHG6F5EF8lD96I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pfEkQI98mB+gm1+JbmVurPAODMFPJ4E8DnqfVyUWbSo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DNj3OVRLbr43s0vd+rgWghOL3FqeO/60npdojC8Ry/M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kAYIQrjHVu49W8FTxyxJeiLVRWWjC9fPcBn+Hx1F+Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aCSO7UVOpoQvu/iridarxkxV1SVxU1i9HVSYXUAeXk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Gh6hTP/yj1IKlXQ+Q69KTfMlGZjEcXoRLGbQHNFo/1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/gDgIFQ4tAlJk3GN48IS5Qa5IPmErwGk8CHxAbp6gs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PICyimwPjxpusyKxNssOOwUotAUbygpyEtORsVGXT8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4lu+cBHyAUvuxC6JUNyHLzHsCogGSWFFnUCkDwfQdgI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pSndkmoNUJwXjgkbkgOrT5f9nSvuoMEZOkwAN9ElRaE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tyW+D4i26QihNM5MuBM+wnt5AdWGSJaJ4X5ydc9iWTU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9Syjr8RoxUgPKr+O5rsCu07AvcebA4P8IVKyS1NVLWc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "67tPfDYnK2tmrioI51fOBG0ygajcV0pLo5+Zm/rEW7U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y0EiPRxYTuS1eVTIaPQUQBBxwkyxNckbePvKgChwd0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NWd+2veAaeXQgR3vCvzlI4R1WW67D5YsVLdoXfdb8qg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PY5RQqKQsL2GqBBSPNOEVpojNFRX/NijCghIpxD6CZk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lcvwTyEjFlssCJtdjRpdN6oY+C7bxZY+WA+QAqzj9zg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWE7XRNylvTwO/9Fv56dNqUaQWMmESNS/GNIwgBaEI0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ijwlrUeS8nRYqK1F8kiCYF0mNDolEZS+/lJO1Lg93C8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8KzV+qYGYuIjoNj8eEpnTuHrMYuhzphl80rS6wrODuU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wDyTLjSEFF895hSQsHvmoEQVS6KIkZOtq1c9dVogm9I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SGrtPuMYCjUrfKF0Pq/thdaQzmGBMUvlwN3ORIu9tHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KySHON3hIoUk4xWcwTqk6IL0kgjzjxgMBObVIkCGvk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hBIdS9j0XJPeT4ot73ngELkpUoSixvRBvdOL9z48jY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Tx6um0q9HjS5ZvlFhvukpI6ORnyrXMWVW1OoxvgqII0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zFKlyfX5H81+d4A4J3FKn4T5JfG+OWtR06ddyX4Mxas=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cGgCDuPV7MeMMYEDpgOupqyNP4BQ4H7rBnd2QygumgM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IPaUoy98v11EoglTpJ4kBlEawoZ8y7BPwzjLYBpkvHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Pfo4Am6tOWAyZNn8G9W5HWWGC3ZWmX0igI/RRB870Ro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fnTSjd7bC1Udoq6iM7UDnHAC/lsIXSHp/Gy332qw+/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fApBgVRrTDyEumkeWs5p3ag9KB48SbU4Si0dl7Ns9rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QxudfBItgoCnUj5NXVnSmWH3HK76YtKkMmzn4lyyUYY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sSOvwhKa29Wq94bZ5jGIiJQGbG1uBrKSBfOYBz/oZeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FdaMgwwJ0NKsqmPZLC5oE+/0D74Dfpvig3LaI5yW5Fs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sRWBy12IERN43BSZIrnBfC9+zFBUdvjTlkqIH81NGt4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/4tIRpxKhoOwnXAiFn1Z7Xmric4USOIfKvTYQXk3QTc=", - "subType": "00" - } - } - ] - }, - { - "_id": { - "$numberInt": "1" - }, - "encryptedDecimalNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "Mr/laWHUijZT5VT3x2a7crb7wgd/UXOGz8jr8BVqBpM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wXVD/HSbBljko0jJcaxJ1nrzs2+pchLQqYR3vywS8SU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VDCpBYsJIxTfcI6Zgf7FTmKMxUffQv+Ys8zt5dlK76I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zYDslUwOUVNwTYkETfjceH/PU3bac9X3UuQyYJ19qK0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rAOmHSz18Jx107xpbv9fYcPOmh/KPAqge0PAtuhIRnc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BFOB1OGVUen7VsOuS0g8Ti7oDsTt2Yj/k/7ta8YAdGM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2fckE5SPs0GU+akDkUEM6mm0EtcV3WDE/sQsnTtodlk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "mi9+aNjuwIvaMpSHENvKzKRAmX9cYguo2mXLvOoftHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "K6TWn4VcWWkz/gkUkLmbtwkG7SNeABICmLDnoYJFlLU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z+2/cEtGU0Fq7QJFNGA/0y4aWAsw0ncG6X0LYRqwS3c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rrSIf+lgcNZFbbUkS9BmE045jRWBpcBJXHzfMVEFuzE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KlHL3Kyje1/LMIfgbCqw1SolxffJvvgsYBV5y77wxuA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hzJ1YBoETmYeCh352dBmG8d8Wse/bUcqojTWpWQlgsc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lSdcllDXx8MA+s0GULjDA1lQkcV0L8/aHtZ6dM2pZ2c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "HGr7JLTTA7ksAnlmjSIwwdBVvgr3fv46/FTdiCPYpos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "mMr25v1VwOEVZ8xaNUTHJCcsYqV+kwK6RzGYilxPtJ4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "129hJbziPJzNo0IoTU3bECdge0FtaPW8dm4dyNVNwYU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "doiLJ96qoo+v7NqIAZLq6BI5axV8Id8gT5vyJ1ZZ0PM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cW/Lcul3xYmfyvI/0x/+ybN78aQmBK1XIGs1EEU09N8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1aVIwzu9N5EJV9yEES+/g6hOTH7cA2NTcLIc59cu0wU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kw5tyl7Ew0r1wFyrN1mB9FiVW2hK2BxxxUuJDNWjyjQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ADAY2YBrm6RJBDY/eLLcfNxmSJku+mefz74gH66oyco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8gkqB1LojzPrstpFG7RHYmWxXpIlPDTqWnNsXH7XDRU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "TESfVQMDQjfTZmHmUeYUE2XrokJ6CcrsKx/GmypGjOw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qFM+HFVQ539S0Ouynd1fBHoemFxtU9PRxE5+Dq7Ljy4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jPiFgUZteSmOg4wf3bsEKCZzcnxmMoILsgp/GaZD+dM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YaWUgJhYgPNN7TkFK16H8SsQS226JguaVhOIQxZwQNQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x90/Qk3AgyaFsvWf2KUCu5XF3j76WFSjt/GrnG01060=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZGWybWL/xlEdMYRFCZDUoz10sywTf7U/7wufsb78lH0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8l4ganN66jIcdxfHAdYLaym/mdzUUQ8TViw3MDRySPc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c8p5XEGTqxqvRGVlR+nkxw9uUdoqDqTB0jlYQ361qMA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1ZGFLlpQBcU3zIUg8MmgWwFKVz/SaA7eSYFrfe3Hb70=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "34529174M77rHr3Ftn9r8jU4a5ztYtyVhMn1wryZSkU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YkQ4pxFWzc49MS0vZM6S8mNo4wAwo21rePBeF3C+9mI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MhOf4mYY00KKVhptOcXf0bXB7WfuuM801MRJg4vXPgc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7pbbD8ihNIYIBJ3tAUPGzHpFPpIeCTAk5L88qCB0/9w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "C9Q5PoNJTQo6pmNzXEEXUEqH22//UUWY1gqILcIywec=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "AqGVk1QjDNDLYWGRBX/nv9QdGR2SEgXZEhF0EWBAiSE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/sGI3VCbJUKATULJmhTayPOeVW+5MjWSvVCqS77sRbU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yOtbL0ih7gsuoxVtRrACMz+4N5uo7jIR7zzmtih2Beo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uA6dkb2Iyg9Su8UNDvZzkPx33kPZtWr/CCuEY+XgzUM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1DoSFPdHIplqZk+DyWAmEPckWwXw/GdB25NLmzeEZhk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OfDVS0T3ZuIXI/LNbTp6C9UbPIWLKiMy6Wx+9tqNl+g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3PZjHXbmG6GtPz+iapKtQ3yY4PoFFgjIy+fV2xQv1YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kaoLN0BoBWsmqE7kKkJQejATmLShd8qffcAmlhsxsGY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vpiw9KgQdegGmp7IJnSGX2miujRLU0xzs0ITTqbPW7c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NuXFf7xGUefYjIUTuMxNUTCfVHrF8oL0AT7dPv5Plk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8Tz53LxtfEBJ9eR+d2690kwNsqPV6XyKo2PlqZCbUrc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "e6zsOmHSyV8tyQtSX6BSwui6wK9v1xG3giY/IILJQ2w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2fedFMCxa2DzmIpfbDKGXhQg0PPwbUv6vIWdwwlvhms=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yEJKMFnWXTC8tJUfzCInzQRByNEPjHxpw4L4m8No91Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YbFuWwOiFuQyOzIJXDbOkCWC2DyrG+248TBuVCa1pXU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "w7IkwGdrguwDrar5+w0Z3va5wXyZ4VXJkDMISyRjPGo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YmJUoILTRJPhyIyWyXJTsQ6KSZHHbEpwPVup6Ldm/Ko=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FvMjcwVZJmfh6FP/yBg2wgskK+KHD8YVUY6WtrE8xbg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "h4HCtD4HyYz0nci49IVAa10Z4NJD/FHnRMV4sRX6qro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nC7BpXCmym+a0Is2kReM9cYN2M1Eh5rVo8fjms14Oiw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1qtVWaeVo649ZZZtN8gXbwLgMWGLhz8beODbvru0I7Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Ej+mC0QFyMNIiSjR939S+iGBm7dm+1xObu5IcF/OpbU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UQ8LbUG3cMegbr9yKfKanAPQE1EfPkFciVDrNqZ5GHY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4iI3mXIDjnX+ralk1HhJY43mZx2uTJM7hsv9MQzTX7E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0WQCcs3rvsasgohERHHCaBM4Iy6yomS4qJ5To3/yYiw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qDCTVPoue1/DOAGNAlUstdA9Sid8MgEY4e5EzHcVHRk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9F9Mus0UnlzHb8E8ImxgXtz6SU98YXD0JqswOKw/Bzs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pctHpHKVBBcsahQ6TNh6/1V1ZrqOtKSAPtATV6BJqh0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vfR3C/4cPkVdxtNaqtF/v635ONbhTf5WbwJM6s4EXNE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ejP43xUBIex6szDcqExAFpx1IE/Ksi5ywJ84GKDFRrs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jbP4AWYd3S2f3ejmMG7dS5IbrFol48UUoT+ve3JLN6U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CiDifI7958sUjNqJUBQULeyF7x0Up3loPWvYKw9uAuw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "e2dQFsiHqd2BFHNhlSxocjd+cPs4wkcUW/CnCz4KNuM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PJFckVmzBipqaEqsuP2mkjhJE4qhw36NhfQ9DcOHyEU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "S3MeuJhET/B8VcfZYDR9fvX0nscDj416jdDekhmK11s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CGVHZRXpuNtQviDB2Kj03Q8uvs4w3RwTgV847R7GwPw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yUGgmgyLrxbEpDVy89XN3c2cmFpZXWWmuJ/35zVZ+Jw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "inb6Q97mL1a9onfNTT8v9wsoi/fz7KXKq3p8j90AU9c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CCyYx/4npq9xGO1lsCo8ZJhFO9/tN7DB+/DTE778rYg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "LNnYw4fwbiAZu0kBdAHPEm/OFnreS+oArdB5O/l/I98=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "P006SxmUS/RjiQJVYPdMFnNo3827GIEmSzagggkg05Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "oyvwY+WsnYV6UHuPki1o0ILJ2jN4uyXf9yaUNtZJyBA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "36Lk3RHWh1wmtCWC/Yj6jNIo17U5y6SofAgQjzjVxD8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vOOo8FqeHnuO9mqOYjIb4vgwIwVyXZ5Y+bY5d9tGFUM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bJiDJjwQRNxqxlGjRm5lLziFhcfTDCnQ/qU1V85qcRg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2Qgrm1n0wUELAQnpkEiIHB856yv76q8jLbpiucetcm0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "5ciPOYxTK0WDwwYyfs7yiVymwtYQXDELLxmM4JLl4/o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "31dC2WUSIOKQc4jwT6PikfeYTwi80mTlh7P31T5KNQU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YluTV2Mu53EGCKLcWfHZb0BM/IPW2xJdG3vYlDMEsM4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dh/8lGo2Ek6KukSwutH6Q35iy8TgV0FN0SJqe0ZVHN8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EVw6HpIs3BKen2qY2gz4y5dw1JpXilfh07msZfQqJpc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FYolLla9L8EZMROEdWetozroU40Dnmwwx2jIMrr7c1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8M6k4QIutSIj6CM41vvkQtuFsaGrjoR9SZJVSLbfGKQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9LM0VoddDNHway442MqY+Z7vohB2UHau/cddshhzf40=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "66i8Ytco4Yq/FMl6pIRZazz3CZlu8fO2OI6Pne0pvHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2a/HgX+MjZxjXtSvHgF1yEpHMJBkl8Caee8XrJtn0WM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "frhBM662c4ZVG7mWP8K/HhRjd01lydW/cPcHnDjifqc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6k1T7Q1t668PBqv6fwpVnT1HWh7Am5LtbKvwPJKcpGU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UlJ5Edfusp8S/Pyhw6KTglIejmbr1HO0zUeHn/qFETA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jsxsB+1ECB3assUdoC333do9tYH+LglHmVSJHy4N8Hg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2nzIQxGYF7j3bGsIesECEOqhObKs/9ywknPHeJ3yges=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xJYKtuWrX90JrJVoYtnwP7Ce59XQGFYoalxpNfBXEH0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NLI5lriBTleGCELcHBtNnmnvwSRkHHaLOX4cKboMgTw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hUOQV0RmE5aJdJww1AR9rirJG4zOYPo+6cCkgn/BGvQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "h4G2Of76AgxcUziBwCyH+ayMOpdBWzg4yFrTfehSC2c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VuamM75RzGfQpj2/Y1jSVuQLrhy6OAwlZxjuQLB/9Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kn9+hLq7hvw02xr9vrplOCDXKBTuFhfbX7d5v/l85Pg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fAiGqKyLZpGngBYFbtYUYt8LUrJ49vYafiboifTDjxs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BxRILymgfVJCczqjUIWXcfrfSgrrYkxTM5VTg0HkZLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CrFY/PzfPU2zsFkGLu/dI6mEeizZzCR+uYgjZBAHro0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "AEbrIuwvXLTtYgMjOqnGQ8y8axUn5Ukrn7UZRSyfQVw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ouWeVH3PEFg+dKWlXc6BmqirJOaVWjJbMzZbCsce4dA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+hd6xFB+EG+kVP7WH4uMd1CLaWMnt5xJRaY/Guuga9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zmpGalfAOL3gmcUMJYcLYIRT/2VDO/1Dw4KdYZoNcng=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2PbHAoM/46J2UIZ/vyksKzmVVfxA7YUyIxWeL/N/vBk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7fD9x+zk5MVFesb59Klqiwwmve7P5ON/5COURXj5smE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tlrNQ4jaq051iaWonuv1sSrYhKkL1LtNZuHsvATha3s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fBodm28iClNpvlRyVq0dOdXQ08S7/N3aDwid+PdWvRo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "O+/nnRqT3Zv7yMMGug8GhKHaWy6u7BfRGtZoj0sdN1c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "5AZZ/RTMY4Photnm/cpXZr/HnFRi3eljacMsipkJLHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "oFVyo/kgoMxBIk2VE52ySSimeyU+Gr0EfCwapXnTpKA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z8v59DfcnviA0mzvnUk+URVO0UuqAWvtarEgJva/n1c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "P64GOntZ+zBJEHkigoh9FSxSO+rJTqR20z5aiGQ9an4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xMbSuDPfWuO/Dm7wuVl06GnzG9uzTlJJX9vFy7boGlY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kXPB19mRClxdH2UsHwlttS6lLU2uHvzuZgZz7kC45jU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NDVjVYXAw4k0w4tFzvs7QDq39aaU3HQor4I2XMKKnCk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uKw/+ErVfpTO1dGUfd3T/eWfZW3nUxXCdBGdjvHtZ88=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "av0uxEzWkizYWm0QUM/MN1hLibnxPvCWJKwjOV4yVQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ERwUC47dvgOBzIsEESMIioLYbFOxOe8PtJTnmDkKuHM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2gseKlG5Le12fS/vj4eaED4lturF16kAgJ1TpW3HxEE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7Cvg0Y3j/5i2F1TeXxlMmU7xwif5dCmwkZAOrVC5K2Y=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Update.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Update.yml deleted file mode 100644 index b1d1c4c00e..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Decimal-Update.yml +++ /dev/null @@ -1,1685 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - # Tests for Decimal (without precision) must only run against a replica set. Decimal (without precision) queries are expected to take a long time and may exceed the default mongos timeout. - topology: [ "replicaset" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDecimalNoPrecision', 'bsonType': 'decimal', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Decimal. Update." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDecimalNoPrecision: { $numberDecimal: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDecimalNoPrecision: { $numberDecimal: "1" } } - - name: updateOne - arguments: - filter: { encryptedDecimalNoPrecision: { $gt: { $numberDecimal: "0" } } } - update: { "$set": { "encryptedDecimalNoPrecision": { $numberDecimal: "2" } }} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDecimalNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDecimalNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command_name: update - command: - "update": "default" - "ordered": true - "updates": [ - { - "q": { - "encryptedDecimalNoPrecision": { - "$gt": { - "$binary": { - "base64": "DR1jAAADcGF5bG9hZACxYgAABGcAnWIAAAMwAH0AAAAFZAAgAAAAAJu2KgiI8vM+kz9qD3ZQzFQY5qbgYqCqHG5R4jAlnlwXBXMAIAAAAAAAUXxFXsz764T79sGCdhxvNd5b6E/9p61FonsHyEIhogVsACAAAAAAt19RL3Oo5ni5L8kcvgOJYLgVYyXJExwP8pkuzLG7f/kAAzEAfQAAAAVkACAAAAAAPQPvL0ARjujSv2Rkm8r7spVsgeC1K3FWcskGGZ3OdDIFcwAgAAAAACgNn660GmefR8jLqzgR1u5O+Uocx9GyEHiBqVGko5FZBWwAIAAAAADflr+fsnZngm6KRWYgHa9JzK+bXogWl9evBU9sQUHPHQADMgB9AAAABWQAIAAAAAD2Zi6kcxmaD2mY3VWrP+wYJMPg6cSBIYPapxaFQxYFdQVzACAAAAAAM/cV36BLBY3xFBXsXJY8M9EHHOc/qrmdc2CJmj3M89gFbAAgAAAAAOpydOrKxx6m2gquSDV2Vv3w10GocmNCFeOo/fRhRH9JAAMzAH0AAAAFZAAgAAAAAOaNqI9srQ/mI9gwbk+VkizGBBH/PPWOVusgnfPk3tY1BXMAIAAAAAAc96O/pwKCmHCagT6T/QV/wz4vqO+R22GsZ1dse2Vg6QVsACAAAAAAgzIak+Q3UFLTHXPmJ+MuEklFtR3eLtvM+jdKk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qHNrVqcyyt7nO8FcwAgAAAAAMv2CebFRG/br7USELR98sIdgE9OQCRBGV5JZCO+uPMgBWwAIAAAAABt7qSmn3gxJu7aswsbUiwvO+G6lXj/Xhx+J/zQyZxzLAADMTkyAH0AAAAFZAAgAAAAAGInUYv0lP/rK7McM8taEHXRefk8Q2AunrvWqdfSV7UaBXMAIAAAAACE+WPxJ3gan7iRTbIxXXx+bKVcaf8kP4JD8DcwU0aL7wVsACAAAAAAUC4eTprX4DUZn2X+UXYU6QjtiXk+u57yoOPBbPQUmDkAAzE5MwB9AAAABWQAIAAAAACmHlg2ud3cplXlTsNTpvNnY6Qm1Fce0m899COamoDjaQVzACAAAAAArtJQeJIlepBWRU2aYar7+YGYVQ7dfDc1oxgTmA8r9q0FbAAgAAAAAOk45vg5VqZHAFCO3i0Z52SZi5RADf8NXwf68T5yad/DAAMxOTQAfQAAAAVkACAAAAAApzcWSAbZWV/Rq+ylRNqqlJqNVR4fhXrz4633/MQOQgcFcwAgAAAAAN/jz/bsEleiuCl+li83EWlG6UMHA8CyaOMRKCkXkSCPBWwAIAAAAAC3Sd+Qg+uFDKpGZHbrQgokXHQ1az1aFl4YK343OB6hcQAAEmNtAAAAAAAAAAAAABBwYXlsb2FkSWQAAAAAABBmaXJzdE9wZXJhdG9yAAEAAAASc3AAAQAAAAAAAAAQdGYAAQAAABNtbgD/////Y46NN8CHrb4J7f/fE214AP////9jjo03wIetvgnt/18A", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedDecimalNoPrecision": { $$type: "binData" } - } - } - } - ] - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - "$db": "default" - - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "rbf3AeBEv4wWFAKknqDxRW5cLNkFvbIs6iJjc6LShQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0l86Ag5OszXpa78SlOUV3K9nff5iC1p0mRXtLg9M1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hn6yuxFHodeyu7ISlhYrbSf9pTiH4TDEvbYLWjTwFO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zdf4y2etKBuIpkEU1zMwoCkCsdisfXZCh8QPamm+drY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rOQ9oMdiK5xxGH+jPzOvwVqdGGnF3+HkJXxn81s6hp4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "61aKKsE3+BJHHWYvs3xSIBvlRmKswmaOo5rygQJguUg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KuDb/GIzqDM8wv7m7m8AECiWJbae5EKKtJRugZx7kR0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Q+t8t2TmNUiCIorVr9F3AlVnX+Mpt2ZYvN+s8UGict8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJRZIpKxUgHyL83kW8cvfjkxN3z6WoNnUg+SQw+LK+k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnUsYjip8SvW0+m9mR5WWTkpK+p6uwJ6yBUAlBnFKMk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PArHlz+yPRYDycAP/PgnI/AkP8Wgmfg++Vf4UG1Bf0E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wnIh53Q3jeK8jEBe1n8kJLa89/H0BxO26ZU8SRIAs9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4F8U59gzBLGhq58PEWQk2nch+R0Va7eTUoxMneReUIA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ihKagIW3uT1dm22ROr/g5QaCpxZVj2+Fs/YSdM2Noco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EJtUOOwjkrPUi9mavYAi+Gom9Y2DuFll7aDwo4mq0M0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dIkr8dbaVRQFskAVT6B286BbcBBt1pZPEOcTZqk4ZcI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aYVAcZYkH/Tieoa1XOjE/zCy5AJcVTHjS0NG2QB7muA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sBidL6y8TenseetpioIAAtn0lK/7C8MoW4JXpVYi3z8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0Dd2klU/t4R86c2WJcJDAd57k/N7OjvYSO5Vf8KH8sw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I3jZ92WEVmZmgaIkLbuWhBxl7EM6bEjiEttgBJunArA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aGHoQMlgJoGvArjfIbc3nnkoc8SWBxcrN7hSmjMRzos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bpiWPnF/KVBQr5F6MEwc5ZZayzIRvQOLDAm4ntwOi8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tI7QVKbE6avWgDD9h4QKyFlnTxFCwd2iLySKakxNR/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XGsge0CnoaXgE3rcpKm8AEeku5QVfokS3kcI+JKV1lk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JQxlryW2Q5WOwfrjAnaZxDvC83Dg6sjRVP5zegf2WiM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YFuHKJOfoqp1iGVxoFjx7bLYgVdsN4GuUFxEgO9HJ5s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z6vUdiCR18ylKomf08uxcQHeRtmyav7/Ecvzz4av3k4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SPGo1Ib5AiP/tSllL7Z5PAypvnKdwJLzt8imfIMSEJQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "m94Nh6PFFQFLIib9Cu5LAKavhXnagSHG6F5EF8lD96I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pfEkQI98mB+gm1+JbmVurPAODMFPJ4E8DnqfVyUWbSo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DNj3OVRLbr43s0vd+rgWghOL3FqeO/60npdojC8Ry/M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kAYIQrjHVu49W8FTxyxJeiLVRWWjC9fPcBn+Hx1F+Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "aCSO7UVOpoQvu/iridarxkxV1SVxU1i9HVSYXUAeXk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Gh6hTP/yj1IKlXQ+Q69KTfMlGZjEcXoRLGbQHNFo/1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/gDgIFQ4tAlJk3GN48IS5Qa5IPmErwGk8CHxAbp6gs0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PICyimwPjxpusyKxNssOOwUotAUbygpyEtORsVGXT8g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4lu+cBHyAUvuxC6JUNyHLzHsCogGSWFFnUCkDwfQdgI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pSndkmoNUJwXjgkbkgOrT5f9nSvuoMEZOkwAN9ElRaE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tyW+D4i26QihNM5MuBM+wnt5AdWGSJaJ4X5ydc9iWTU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9Syjr8RoxUgPKr+O5rsCu07AvcebA4P8IVKyS1NVLWc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "67tPfDYnK2tmrioI51fOBG0ygajcV0pLo5+Zm/rEW7U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "y0EiPRxYTuS1eVTIaPQUQBBxwkyxNckbePvKgChwd0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NWd+2veAaeXQgR3vCvzlI4R1WW67D5YsVLdoXfdb8qg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PY5RQqKQsL2GqBBSPNOEVpojNFRX/NijCghIpxD6CZk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lcvwTyEjFlssCJtdjRpdN6oY+C7bxZY+WA+QAqzj9zg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWE7XRNylvTwO/9Fv56dNqUaQWMmESNS/GNIwgBaEI0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ijwlrUeS8nRYqK1F8kiCYF0mNDolEZS+/lJO1Lg93C8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8KzV+qYGYuIjoNj8eEpnTuHrMYuhzphl80rS6wrODuU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wDyTLjSEFF895hSQsHvmoEQVS6KIkZOtq1c9dVogm9I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SGrtPuMYCjUrfKF0Pq/thdaQzmGBMUvlwN3ORIu9tHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KySHON3hIoUk4xWcwTqk6IL0kgjzjxgMBObVIkCGvk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hBIdS9j0XJPeT4ot73ngELkpUoSixvRBvdOL9z48jY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Tx6um0q9HjS5ZvlFhvukpI6ORnyrXMWVW1OoxvgqII0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zFKlyfX5H81+d4A4J3FKn4T5JfG+OWtR06ddyX4Mxas=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cGgCDuPV7MeMMYEDpgOupqyNP4BQ4H7rBnd2QygumgM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IPaUoy98v11EoglTpJ4kBlEawoZ8y7BPwzjLYBpkvHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Pfo4Am6tOWAyZNn8G9W5HWWGC3ZWmX0igI/RRB870Ro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fnTSjd7bC1Udoq6iM7UDnHAC/lsIXSHp/Gy332qw+/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fApBgVRrTDyEumkeWs5p3ag9KB48SbU4Si0dl7Ns9rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QxudfBItgoCnUj5NXVnSmWH3HK76YtKkMmzn4lyyUYY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sSOvwhKa29Wq94bZ5jGIiJQGbG1uBrKSBfOYBz/oZeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FdaMgwwJ0NKsqmPZLC5oE+/0D74Dfpvig3LaI5yW5Fs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "sRWBy12IERN43BSZIrnBfC9+zFBUdvjTlkqIH81NGt4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/4tIRpxKhoOwnXAiFn1Z7Xmric4USOIfKvTYQXk3QTc=", - "subType": "00" - } - } - ] - } - - - { - "_id": { - "$numberInt": "1" - }, - "encryptedDecimalNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "Mr/laWHUijZT5VT3x2a7crb7wgd/UXOGz8jr8BVqBpM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wXVD/HSbBljko0jJcaxJ1nrzs2+pchLQqYR3vywS8SU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VDCpBYsJIxTfcI6Zgf7FTmKMxUffQv+Ys8zt5dlK76I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zYDslUwOUVNwTYkETfjceH/PU3bac9X3UuQyYJ19qK0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rAOmHSz18Jx107xpbv9fYcPOmh/KPAqge0PAtuhIRnc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BFOB1OGVUen7VsOuS0g8Ti7oDsTt2Yj/k/7ta8YAdGM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2fckE5SPs0GU+akDkUEM6mm0EtcV3WDE/sQsnTtodlk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "mi9+aNjuwIvaMpSHENvKzKRAmX9cYguo2mXLvOoftHQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "K6TWn4VcWWkz/gkUkLmbtwkG7SNeABICmLDnoYJFlLU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z+2/cEtGU0Fq7QJFNGA/0y4aWAsw0ncG6X0LYRqwS3c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rrSIf+lgcNZFbbUkS9BmE045jRWBpcBJXHzfMVEFuzE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KlHL3Kyje1/LMIfgbCqw1SolxffJvvgsYBV5y77wxuA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hzJ1YBoETmYeCh352dBmG8d8Wse/bUcqojTWpWQlgsc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lSdcllDXx8MA+s0GULjDA1lQkcV0L8/aHtZ6dM2pZ2c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "HGr7JLTTA7ksAnlmjSIwwdBVvgr3fv46/FTdiCPYpos=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "mMr25v1VwOEVZ8xaNUTHJCcsYqV+kwK6RzGYilxPtJ4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "129hJbziPJzNo0IoTU3bECdge0FtaPW8dm4dyNVNwYU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "doiLJ96qoo+v7NqIAZLq6BI5axV8Id8gT5vyJ1ZZ0PM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cW/Lcul3xYmfyvI/0x/+ybN78aQmBK1XIGs1EEU09N8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1aVIwzu9N5EJV9yEES+/g6hOTH7cA2NTcLIc59cu0wU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kw5tyl7Ew0r1wFyrN1mB9FiVW2hK2BxxxUuJDNWjyjQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ADAY2YBrm6RJBDY/eLLcfNxmSJku+mefz74gH66oyco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8gkqB1LojzPrstpFG7RHYmWxXpIlPDTqWnNsXH7XDRU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "TESfVQMDQjfTZmHmUeYUE2XrokJ6CcrsKx/GmypGjOw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qFM+HFVQ539S0Ouynd1fBHoemFxtU9PRxE5+Dq7Ljy4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jPiFgUZteSmOg4wf3bsEKCZzcnxmMoILsgp/GaZD+dM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YaWUgJhYgPNN7TkFK16H8SsQS226JguaVhOIQxZwQNQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x90/Qk3AgyaFsvWf2KUCu5XF3j76WFSjt/GrnG01060=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZGWybWL/xlEdMYRFCZDUoz10sywTf7U/7wufsb78lH0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8l4ganN66jIcdxfHAdYLaym/mdzUUQ8TViw3MDRySPc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c8p5XEGTqxqvRGVlR+nkxw9uUdoqDqTB0jlYQ361qMA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1ZGFLlpQBcU3zIUg8MmgWwFKVz/SaA7eSYFrfe3Hb70=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "34529174M77rHr3Ftn9r8jU4a5ztYtyVhMn1wryZSkU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YkQ4pxFWzc49MS0vZM6S8mNo4wAwo21rePBeF3C+9mI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MhOf4mYY00KKVhptOcXf0bXB7WfuuM801MRJg4vXPgc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7pbbD8ihNIYIBJ3tAUPGzHpFPpIeCTAk5L88qCB0/9w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "C9Q5PoNJTQo6pmNzXEEXUEqH22//UUWY1gqILcIywec=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "AqGVk1QjDNDLYWGRBX/nv9QdGR2SEgXZEhF0EWBAiSE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/sGI3VCbJUKATULJmhTayPOeVW+5MjWSvVCqS77sRbU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yOtbL0ih7gsuoxVtRrACMz+4N5uo7jIR7zzmtih2Beo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uA6dkb2Iyg9Su8UNDvZzkPx33kPZtWr/CCuEY+XgzUM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1DoSFPdHIplqZk+DyWAmEPckWwXw/GdB25NLmzeEZhk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OfDVS0T3ZuIXI/LNbTp6C9UbPIWLKiMy6Wx+9tqNl+g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3PZjHXbmG6GtPz+iapKtQ3yY4PoFFgjIy+fV2xQv1YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kaoLN0BoBWsmqE7kKkJQejATmLShd8qffcAmlhsxsGY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vpiw9KgQdegGmp7IJnSGX2miujRLU0xzs0ITTqbPW7c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NuXFf7xGUefYjIUTuMxNUTCfVHrF8oL0AT7dPv5Plk4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8Tz53LxtfEBJ9eR+d2690kwNsqPV6XyKo2PlqZCbUrc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "e6zsOmHSyV8tyQtSX6BSwui6wK9v1xG3giY/IILJQ2w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2fedFMCxa2DzmIpfbDKGXhQg0PPwbUv6vIWdwwlvhms=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yEJKMFnWXTC8tJUfzCInzQRByNEPjHxpw4L4m8No91Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YbFuWwOiFuQyOzIJXDbOkCWC2DyrG+248TBuVCa1pXU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "w7IkwGdrguwDrar5+w0Z3va5wXyZ4VXJkDMISyRjPGo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YmJUoILTRJPhyIyWyXJTsQ6KSZHHbEpwPVup6Ldm/Ko=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FvMjcwVZJmfh6FP/yBg2wgskK+KHD8YVUY6WtrE8xbg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "h4HCtD4HyYz0nci49IVAa10Z4NJD/FHnRMV4sRX6qro=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nC7BpXCmym+a0Is2kReM9cYN2M1Eh5rVo8fjms14Oiw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1qtVWaeVo649ZZZtN8gXbwLgMWGLhz8beODbvru0I7Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Ej+mC0QFyMNIiSjR939S+iGBm7dm+1xObu5IcF/OpbU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UQ8LbUG3cMegbr9yKfKanAPQE1EfPkFciVDrNqZ5GHY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4iI3mXIDjnX+ralk1HhJY43mZx2uTJM7hsv9MQzTX7E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0WQCcs3rvsasgohERHHCaBM4Iy6yomS4qJ5To3/yYiw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qDCTVPoue1/DOAGNAlUstdA9Sid8MgEY4e5EzHcVHRk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9F9Mus0UnlzHb8E8ImxgXtz6SU98YXD0JqswOKw/Bzs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pctHpHKVBBcsahQ6TNh6/1V1ZrqOtKSAPtATV6BJqh0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vfR3C/4cPkVdxtNaqtF/v635ONbhTf5WbwJM6s4EXNE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ejP43xUBIex6szDcqExAFpx1IE/Ksi5ywJ84GKDFRrs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jbP4AWYd3S2f3ejmMG7dS5IbrFol48UUoT+ve3JLN6U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CiDifI7958sUjNqJUBQULeyF7x0Up3loPWvYKw9uAuw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "e2dQFsiHqd2BFHNhlSxocjd+cPs4wkcUW/CnCz4KNuM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PJFckVmzBipqaEqsuP2mkjhJE4qhw36NhfQ9DcOHyEU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "S3MeuJhET/B8VcfZYDR9fvX0nscDj416jdDekhmK11s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CGVHZRXpuNtQviDB2Kj03Q8uvs4w3RwTgV847R7GwPw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yUGgmgyLrxbEpDVy89XN3c2cmFpZXWWmuJ/35zVZ+Jw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "inb6Q97mL1a9onfNTT8v9wsoi/fz7KXKq3p8j90AU9c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CCyYx/4npq9xGO1lsCo8ZJhFO9/tN7DB+/DTE778rYg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "LNnYw4fwbiAZu0kBdAHPEm/OFnreS+oArdB5O/l/I98=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "P006SxmUS/RjiQJVYPdMFnNo3827GIEmSzagggkg05Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "oyvwY+WsnYV6UHuPki1o0ILJ2jN4uyXf9yaUNtZJyBA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "36Lk3RHWh1wmtCWC/Yj6jNIo17U5y6SofAgQjzjVxD8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vOOo8FqeHnuO9mqOYjIb4vgwIwVyXZ5Y+bY5d9tGFUM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bJiDJjwQRNxqxlGjRm5lLziFhcfTDCnQ/qU1V85qcRg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2Qgrm1n0wUELAQnpkEiIHB856yv76q8jLbpiucetcm0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "5ciPOYxTK0WDwwYyfs7yiVymwtYQXDELLxmM4JLl4/o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "31dC2WUSIOKQc4jwT6PikfeYTwi80mTlh7P31T5KNQU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YluTV2Mu53EGCKLcWfHZb0BM/IPW2xJdG3vYlDMEsM4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dh/8lGo2Ek6KukSwutH6Q35iy8TgV0FN0SJqe0ZVHN8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EVw6HpIs3BKen2qY2gz4y5dw1JpXilfh07msZfQqJpc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FYolLla9L8EZMROEdWetozroU40Dnmwwx2jIMrr7c1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "8M6k4QIutSIj6CM41vvkQtuFsaGrjoR9SZJVSLbfGKQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9LM0VoddDNHway442MqY+Z7vohB2UHau/cddshhzf40=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "66i8Ytco4Yq/FMl6pIRZazz3CZlu8fO2OI6Pne0pvHU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2a/HgX+MjZxjXtSvHgF1yEpHMJBkl8Caee8XrJtn0WM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "frhBM662c4ZVG7mWP8K/HhRjd01lydW/cPcHnDjifqc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6k1T7Q1t668PBqv6fwpVnT1HWh7Am5LtbKvwPJKcpGU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UlJ5Edfusp8S/Pyhw6KTglIejmbr1HO0zUeHn/qFETA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jsxsB+1ECB3assUdoC333do9tYH+LglHmVSJHy4N8Hg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2nzIQxGYF7j3bGsIesECEOqhObKs/9ywknPHeJ3yges=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xJYKtuWrX90JrJVoYtnwP7Ce59XQGFYoalxpNfBXEH0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NLI5lriBTleGCELcHBtNnmnvwSRkHHaLOX4cKboMgTw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hUOQV0RmE5aJdJww1AR9rirJG4zOYPo+6cCkgn/BGvQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "h4G2Of76AgxcUziBwCyH+ayMOpdBWzg4yFrTfehSC2c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VuamM75RzGfQpj2/Y1jSVuQLrhy6OAwlZxjuQLB/9Ss=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kn9+hLq7hvw02xr9vrplOCDXKBTuFhfbX7d5v/l85Pg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fAiGqKyLZpGngBYFbtYUYt8LUrJ49vYafiboifTDjxs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BxRILymgfVJCczqjUIWXcfrfSgrrYkxTM5VTg0HkZLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CrFY/PzfPU2zsFkGLu/dI6mEeizZzCR+uYgjZBAHro0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "AEbrIuwvXLTtYgMjOqnGQ8y8axUn5Ukrn7UZRSyfQVw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ouWeVH3PEFg+dKWlXc6BmqirJOaVWjJbMzZbCsce4dA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+hd6xFB+EG+kVP7WH4uMd1CLaWMnt5xJRaY/Guuga9Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zmpGalfAOL3gmcUMJYcLYIRT/2VDO/1Dw4KdYZoNcng=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2PbHAoM/46J2UIZ/vyksKzmVVfxA7YUyIxWeL/N/vBk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7fD9x+zk5MVFesb59Klqiwwmve7P5ON/5COURXj5smE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tlrNQ4jaq051iaWonuv1sSrYhKkL1LtNZuHsvATha3s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fBodm28iClNpvlRyVq0dOdXQ08S7/N3aDwid+PdWvRo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "O+/nnRqT3Zv7yMMGug8GhKHaWy6u7BfRGtZoj0sdN1c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "5AZZ/RTMY4Photnm/cpXZr/HnFRi3eljacMsipkJLHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "oFVyo/kgoMxBIk2VE52ySSimeyU+Gr0EfCwapXnTpKA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Z8v59DfcnviA0mzvnUk+URVO0UuqAWvtarEgJva/n1c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "P64GOntZ+zBJEHkigoh9FSxSO+rJTqR20z5aiGQ9an4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xMbSuDPfWuO/Dm7wuVl06GnzG9uzTlJJX9vFy7boGlY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kXPB19mRClxdH2UsHwlttS6lLU2uHvzuZgZz7kC45jU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NDVjVYXAw4k0w4tFzvs7QDq39aaU3HQor4I2XMKKnCk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uKw/+ErVfpTO1dGUfd3T/eWfZW3nUxXCdBGdjvHtZ88=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "av0uxEzWkizYWm0QUM/MN1hLibnxPvCWJKwjOV4yVQY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ERwUC47dvgOBzIsEESMIioLYbFOxOe8PtJTnmDkKuHM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2gseKlG5Le12fS/vj4eaED4lturF16kAgJ1TpW3HxEE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7Cvg0Y3j/5i2F1TeXxlMmU7xwif5dCmwkZAOrVC5K2Y=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Aggregate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Aggregate.json deleted file mode 100644 index 271f57b125..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Aggregate.json +++ /dev/null @@ -1,584 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range DecimalPrecision. Aggregate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$gt": { - "$numberDecimal": "0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDecimalPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "default", - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$gt": { - "$binary": { - "base64": "DRYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58Ea+1HLJOWxN5lNcrWEFcwAgAAAAAEBo5AWZyC41b9ayjWNQSL4iYEAIwR/JG+ssN8bdoK9RBWwAIAAAAACEndE0SLxFSElOrNnqeX0EPmgDio3udZjVREy4JLS3sQADMgB9AAAABWQAIAAAAABbiLaoxAA6rinMJw1hC8ZUiq6UU1AQaPFn/py/Y06WuQVzACAAAAAAhtDasFkvYE7SCNu1je/hxdE9TJtAvvH3NtdEbKzNbCUFbAAgAAAAAIGepU1RSCF8sWODHEpKglsoqw3VBBH4a/URGxgGzbq2AAMzAH0AAAAFZAAgAAAAALORWwSr+tYNxcil2KIGSbNhTHvcPbdj+rLVQNx21S/KBXMAIAAAAAD6diZ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zE2AH0AAAAFZAAgAAAAAFH9l9GGA1I52atJV5jNUf1lx8jBjoEoVoME97v5GFJiBXMAIAAAAAC1qH3Kd78Dr9NGbw7y9D/XYBwv5h1LLO8la5OU7g8UkQVsACAAAAAArZ6atJCYrVfHB8dSNPOFf6nnDADBMJcIEj8ljPvxHp8AAzE3AH0AAAAFZAAgAAAAADtbVEI2tdkrowEMdkacD2w0Y3T3Ofi7PH6HmA6sP0c/BXMAIAAAAADuBSROnZHA+NgUPH8d0LnWFiDsM2bY8bzjC1+elSsIygVsACAAAAAAR0G2m+uANoWknkr/NerFcG+fECVxNIs0cqbY1t/U/0MAAzE4AH0AAAAFZAAgAAAAAAh3WpeMVlikPFYj9hLj+fmIqVt6omCSF75W3TPExyWpBXMAIAAAAAAsQkRmwqeVj2gGE03orb6PtrIzDt6dDU3hgSQi8E2wKgVsACAAAAAA3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAABNtbgAAAAAAAAAAAAAAAAAAAD4wE214ANAHAAAAAAAAAAAAAAAAPjAA", - "subType": "06" - } - } - } - } - } - ], - "cursor": {}, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "aggregate" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - }, - { - "_id": { - "$numberInt": "1" - }, - "encryptedDecimalPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "mVZb+Ra0EYjQ4Zrh9X//E2T8MRj7NMqm5GUJXhRrBEI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MgwakFvPyBlwqFTbhWUF79URJQWFoJTGotlEVSPPUsQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DyBERpMSD5lEM5Nhpcn4WGgxgn/mkUVJp+PYSLX5jsE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I43iazc0xj1WVbYB/V+uTL/tughN1bBlxh1iypBnNsA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wjOBa/ATMuOywFmuPgC0GF/oeLqu0Z7eK5udzkTPbis=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gRQVwiR+m+0Vg8ZDXqrQQcVnTyobwCXNaA4BCJVXtMc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WUZ6huwx0ZbLb0R00uiC9FOJzsUocUN8qE5+YRenkvQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7s79aKEuPgQcS/YPOOVcYNZvHIo7FFsWtFCrnDKXefA=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Aggregate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Aggregate.yml deleted file mode 100644 index e6d153a08d..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Aggregate.yml +++ /dev/null @@ -1,317 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDecimalPrecision', 'bsonType': 'decimal', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberDecimal': '0.0'}, 'max': {'$numberDecimal': '200.0'}, 'precision': {'$numberInt': '2'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range DecimalPrecision. Aggregate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDecimalPrecision: { $numberDecimal: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDecimalPrecision: { $numberDecimal: "1" } } - - name: aggregate - arguments: - pipeline: [{ $match: { "encryptedDecimalPrecision": { $gt: {$numberDecimal: "0" }} } }] - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDecimalPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDecimalPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - aggregate: *collection_name - pipeline: [ - { - "$match": { - "encryptedDecimalPrecision": { - "$gt": { - "$binary": { - "base64": "DRYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58Ea+1HLJOWxN5lNcrWEFcwAgAAAAAEBo5AWZyC41b9ayjWNQSL4iYEAIwR/JG+ssN8bdoK9RBWwAIAAAAACEndE0SLxFSElOrNnqeX0EPmgDio3udZjVREy4JLS3sQADMgB9AAAABWQAIAAAAABbiLaoxAA6rinMJw1hC8ZUiq6UU1AQaPFn/py/Y06WuQVzACAAAAAAhtDasFkvYE7SCNu1je/hxdE9TJtAvvH3NtdEbKzNbCUFbAAgAAAAAIGepU1RSCF8sWODHEpKglsoqw3VBBH4a/URGxgGzbq2AAMzAH0AAAAFZAAgAAAAALORWwSr+tYNxcil2KIGSbNhTHvcPbdj+rLVQNx21S/KBXMAIAAAAAD6diZBkPEJ1cQy06LAxdbNK8Nlxbb44fH4Wk3Y3260nQVsACAAAAAA1eYAZBFHlDiaDAljWi8blGQ2nvvZa5AO5doeo0SFZsgAAzQAfQAAAAVkACAAAAAAG5XMK96PjClNlUvg82j4pMY1YxsznZfj4uNweD394FoFcwAgAAAAAKHgQLdGJ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AAzE3AH0AAAAFZAAgAAAAADtbVEI2tdkrowEMdkacD2w0Y3T3Ofi7PH6HmA6sP0c/BXMAIAAAAADuBSROnZHA+NgUPH8d0LnWFiDsM2bY8bzjC1+elSsIygVsACAAAAAAR0G2m+uANoWknkr/NerFcG+fECVxNIs0cqbY1t/U/0MAAzE4AH0AAAAFZAAgAAAAAAh3WpeMVlikPFYj9hLj+fmIqVt6omCSF75W3TPExyWpBXMAIAAAAAAsQkRmwqeVj2gGE03orb6PtrIzDt6dDU3hgSQi8E2wKgVsACAAAAAA3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAABNtbgAAAAAAAAAAAAAAAAAAAD4wE214ANAHAAAAAAAAAAAAAAAAPjAA", - "subType": "06" - } - } - } - } - } - ] - cursor: {} - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: aggregate - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - } - - - { - "_id": { - "$numberInt": "1" - }, - "encryptedDecimalPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "mVZb+Ra0EYjQ4Zrh9X//E2T8MRj7NMqm5GUJXhRrBEI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MgwakFvPyBlwqFTbhWUF79URJQWFoJTGotlEVSPPUsQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DyBERpMSD5lEM5Nhpcn4WGgxgn/mkUVJp+PYSLX5jsE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I43iazc0xj1WVbYB/V+uTL/tughN1bBlxh1iypBnNsA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wjOBa/ATMuOywFmuPgC0GF/oeLqu0Z7eK5udzkTPbis=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gRQVwiR+m+0Vg8ZDXqrQQcVnTyobwCXNaA4BCJVXtMc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WUZ6huwx0ZbLb0R00uiC9FOJzsUocUN8qE5+YRenkvQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7s79aKEuPgQcS/YPOOVcYNZvHIo7FFsWtFCrnDKXefA=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Correctness.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Correctness.json deleted file mode 100644 index 8954445887..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Correctness.json +++ /dev/null @@ -1,1650 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Find with $gt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$gt": { - "$numberDecimal": "0.0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$gte": { - "$numberDecimal": "0.0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - }, - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$gt": { - "$numberDecimal": "1.0" - } - } - } - }, - "result": [] - } - ] - }, - { - "description": "Find with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$lt": { - "$numberDecimal": "1.0" - } - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - ] - } - ] - }, - { - "description": "Find with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$lte": { - "$numberDecimal": "1.0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - }, - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $lt below min", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$lt": { - "$numberDecimal": "0.0" - } - } - } - }, - "result": { - "errorContains": "must be greater than the range minimum" - } - } - ] - }, - { - "description": "Find with $gt above max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$gt": { - "$numberDecimal": "200.0" - } - } - } - }, - "result": { - "errorContains": "must be less than the range max" - } - } - ] - }, - { - "description": "Find with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$gt": { - "$numberDecimal": "0.0" - }, - "$lt": { - "$numberDecimal": "2.0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - ] - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with full range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$gte": { - "$numberDecimal": "0.0" - }, - "$lte": { - "$numberDecimal": "200.0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - }, - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$in": [ - { - "$numberDecimal": "0.0" - } - ] - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - ] - } - ] - }, - { - "description": "Insert out of range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "-1" - } - } - }, - "result": { - "errorContains": "value must be greater than or equal to the minimum value" - } - } - ] - }, - { - "description": "Insert min and max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 200, - "encryptedDecimalPrecision": { - "$numberDecimal": "200.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - }, - { - "_id": 200, - "encryptedDecimalPrecision": { - "$numberDecimal": "200.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$gte": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - }, - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$gt": { - "$numberDecimal": "1.0" - } - } - } - } - ] - }, - "result": [] - } - ] - }, - { - "description": "Aggregate with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$lt": { - "$numberDecimal": "1.0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$lte": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - }, - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $lt below min", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$lt": { - "$numberDecimal": "0.0" - } - } - } - } - ] - }, - "result": { - "errorContains": "must be greater than the range minimum" - } - } - ] - }, - { - "description": "Aggregate with $gt above max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$gt": { - "$numberDecimal": "200.0" - } - } - } - } - ] - }, - "result": { - "errorContains": "must be less than the range max" - } - } - ] - }, - { - "description": "Aggregate with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$gt": { - "$numberDecimal": "0.0" - }, - "$lt": { - "$numberDecimal": "2.0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - ] - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with full range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$gte": { - "$numberDecimal": "0.0" - }, - "$lte": { - "$numberDecimal": "200.0" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - }, - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDecimalPrecision": { - "$in": [ - { - "$numberDecimal": "0.0" - } - ] - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0.0" - } - } - ] - } - ] - }, - { - "description": "Wrong type: Insert Int", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberInt": "0" - } - } - }, - "result": { - "errorContains": "cannot encrypt element" - } - } - ] - }, - { - "description": "Wrong type: Find Int", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$gte": { - "$numberInt": "0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": { - "errorContains": "field type is not supported" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Correctness.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Correctness.yml deleted file mode 100644 index cd1ced0b8f..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Correctness.yml +++ /dev/null @@ -1,424 +0,0 @@ -# Test correctness results. -# Does not include command monitoring expectations or outcome assertions to make tests more readable. - -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "8.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDecimalPrecision', 'bsonType': 'decimal', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberDecimal': '0.0'}, 'max': {'$numberDecimal': '200.0'}, 'precision': {'$numberInt': '2'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Find with $gt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDecimalPrecision: { $numberDecimal: "0.0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDecimalPrecision: { $numberDecimal: "1.0" } } - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $gt: { $numberDecimal: "0.0" } }} - result: [*doc1] - - - description: "Find with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $gte: { $numberDecimal: "0.0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $gt: { $numberDecimal: "1.0" } }} - result: [] - - - description: "Find with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $lt: { $numberDecimal: "1.0" } }} - result: [*doc0] - - - description: "Find with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $lte: { $numberDecimal: "1.0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $lt below min" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $lt: { $numberDecimal: "0.0" } }} - result: - errorContains: must be greater than the range minimum - - - description: "Find with $gt above max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $gt: { $numberDecimal: "200.0" } }} - result: - errorContains: must be less than the range max - - - description: "Find with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $gt: { $numberDecimal: "0.0" }, $lt: { $numberDecimal: "2.0"} }} - result: [*doc1] - - - description: "Find with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $numberDecimal: "0.0" } } - result: [*doc0] - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $numberDecimal: "1.0" } } - result: [*doc1] - - - description: "Find with full range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $gte: {$numberDecimal: "0.0"}, $lte: {$numberDecimal: "200.0"} } } - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $in: [ {$numberDecimal: "0.0"} ] } } - result: [*doc0] - - - description: "Insert out of range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: { _id: 0, encryptedDecimalPrecision: { $numberDecimal: "-1" }} - result: - errorContains: value must be greater than or equal to the minimum value - - - description: "Insert min and max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: *doc0 - - name: insertOne - arguments: - document: &doc200 { _id: 200, encryptedDecimalPrecision: { $numberDecimal: "200.0" }} - - name: find - arguments: - filter: {} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc200] - - - description: "Aggregate with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalPrecision: { $gte: { $numberDecimal: "0.0" } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalPrecision: { $gt: { $numberDecimal: "1.0" } }} } - result: [] - - - description: "Aggregate with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalPrecision: { $lt: { $numberDecimal: "1.0" } }} } - result: [*doc0] - - - description: "Aggregate with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalPrecision: { $lte: { $numberDecimal: "1.0" } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $lt below min" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalPrecision: { $lt: { $numberDecimal: "0.0" } }} } - result: - errorContains: must be greater than the range minimum - - - description: "Aggregate with $gt above max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalPrecision: { $gt: { $numberDecimal: "200.0" } }} } - result: - errorContains: must be less than the range max - - - description: "Aggregate with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalPrecision: { $gt: { $numberDecimal: "0.0" }, $lt: { $numberDecimal: "2.0"} }} } - result: [*doc1] - - - description: "Aggregate with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalPrecision: { $numberDecimal: "0.0" } } } - result: [*doc0] - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalPrecision: { $numberDecimal: "1.0" } } } - result: [*doc1] - - - description: "Aggregate with full range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalPrecision: { $gte: {$numberDecimal: "0.0"}, $lte: {$numberDecimal: "200.0"} } } } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDecimalPrecision: { $in: [ {$numberDecimal: "0.0"} ] } } } - result: [*doc0] - - - description: "Wrong type: Insert Int" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: { _id: 0, encryptedDecimalPrecision: { $numberInt: "0" }} } - result: - # Expect an error from mongocryptd. - errorContains: "cannot encrypt element" - - - description: "Wrong type: Find Int" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $gte: { $numberInt: "0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: - # expect an error from libmongocrypt. - errorContains: "field type is not supported" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Delete.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Delete.json deleted file mode 100644 index 7b3d5d8225..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Delete.json +++ /dev/null @@ -1,476 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range DecimalPrecision. Delete.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1" - } - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$gt": { - "$numberDecimal": "0" - } - } - } - }, - "result": { - "deletedCount": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDecimalPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "delete": "default", - "deletes": [ - { - "q": { - "encryptedDecimalPrecision": { - "$gt": { - "$binary": { - "base64": "DRYKAAAD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A3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAABNtbgAAAAAAAAAAAAAAAAAAAD4wE214ANAHAAAAAAAAAAAAAAAAPjAA", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "delete" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Delete.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Delete.yml deleted file mode 100644 index af78be2dc2..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Delete.yml +++ /dev/null @@ -1,220 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDecimalPrecision', 'bsonType': 'decimal', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberDecimal': '0.0'}, 'max': {'$numberDecimal': '200.0'}, 'precision': {'$numberInt': '2'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range DecimalPrecision. Delete." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDecimalPrecision: { $numberDecimal: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDecimalPrecision: { $numberDecimal: "1" } } - - name: deleteOne - arguments: - filter: { "encryptedDecimalPrecision": { $gt: {$numberDecimal: "0" }} } - result: - deletedCount: 1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDecimalPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDecimalPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - delete: *collection_name - deletes: [ - { - "q": { - "encryptedDecimalPrecision": { - "$gt": { - "$binary": { - "base64": "DRYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58Ea+1HLJOWxN5lNcrWEFcwAgAAAAAEBo5AWZyC41b9ayjWNQSL4iYEAIwR/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wp4tVRpPmVWsfydkYN3UHh6TMuBXMAIAAAAAAeD6mDnQeLlbC9i0sVgE8+RH6y+e94OJQ0tJ0PvblVSgVsACAAAAAAWp4jvretbDEsqEMzP/WLTnwOiJwCtfrCiB6m8k+yEMoAAzE1AH0AAAAFZAAgAAAAAAZZ538coNPwyRjhEwr5P8Xw32oWOJF+R+nfCGgy2qO3BXMAIAAAAACOPLnJlKwGNPDBReRKnHfteq0wFb3ezhrc7BVXs8RUHwVsACAAAAAA+lGesNk3+SyB/60rSvdQ2aN2vfJPR7llJVhufGTNhHkAAzE2AH0AAAAFZAAgAAAAAFH9l9GGA1I52atJV5jNUf1lx8jBjoEoVoME97v5GFJiBXMAIAAAAAC1qH3Kd78Dr9NGbw7y9D/XYBwv5h1LLO8la5OU7g8UkQVsACAAAAAArZ6atJCYrVfHB8dSNPOFf6nnDADBMJcIEj8ljPvxHp8AAzE3AH0AAAAFZAAgAAAAADtbVEI2tdkrowEMdkacD2w0Y3T3Ofi7PH6HmA6sP0c/BXMAIAAAAADuBSROnZHA+NgUPH8d0LnWFiDsM2bY8bzjC1+elSsIygVsACAAAAAAR0G2m+uANoWknkr/NerFcG+fECVxNIs0cqbY1t/U/0MAAzE4AH0AAAAFZAAgAAAAAAh3WpeMVlikPFYj9hLj+fmIqVt6omCSF75W3TPExyWpBXMAIAAAAAAsQkRmwqeVj2gGE03orb6PtrIzDt6dDU3hgSQi8E2wKgVsACAAAAAA3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAABNtbgAAAAAAAAAAAAAAAAAAAD4wE214ANAHAAAAAAAAAAAAAAAAPjAA", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ] - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: delete - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-FindOneAndUpdate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-FindOneAndUpdate.json deleted file mode 100644 index af371f7b3f..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-FindOneAndUpdate.json +++ /dev/null @@ -1,588 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range DecimalPrecision. FindOneAndUpdate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1" - } - } - } - }, - { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$gt": { - "$numberDecimal": "0" - } - } - }, - "update": { - "$set": { - "encryptedDecimalPrecision": { - "$numberDecimal": "2" - } - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDecimalPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default", - "query": { - "encryptedDecimalPrecision": { - "$gt": { - "$binary": { - "base64": "DRYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBd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dGYAAQAAABNtbgAAAAAAAAAAAAAAAAAAAD4wE214ANAHAAAAAAAAAAAAAAAAPjAA", - "subType": "06" - } - } - } - }, - "update": { - "$set": { - "encryptedDecimalPrecision": { - "$$type": "binData" - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "findAndModify" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - }, - { - "_id": { - "$numberInt": "1" - }, - "encryptedDecimalPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "V6knyt7Zq2CG3++l75UtBx2m32iGAPjHiAe439Bf02w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0OKSXELxPP85SBVwDGf3LtMEQCJ8TTkFUl/+6jlkdb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uEw0lpQtBppR3vqV9j9+NQRSBF1BzZukb8c9IhyWvxc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zVhZ7Q59O087ji49oMJvBIgeir2oqvUpnh4p53GcTow=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dowrzKs+qJhRMZyKDbhjXbuX43FbmUKOaw9I8YlOZDw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ep5B6cska6THLIF7Mn3tn3RvV9EiwLSt0eZM/CLRUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "URNp/YmmDh5wIZUfAzzgPyJeMNiVx9PMsz52DZRujGY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wlM4IAQhhKQEzoVqS8b1Ddd50GB95OFb9LnzOwyjCP4=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-FindOneAndUpdate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-FindOneAndUpdate.yml deleted file mode 100644 index ac1de049fd..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-FindOneAndUpdate.yml +++ /dev/null @@ -1,315 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDecimalPrecision', 'bsonType': 'decimal', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberDecimal': '0.0'}, 'max': {'$numberDecimal': '200.0'}, 'precision': {'$numberInt': '2'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range DecimalPrecision. FindOneAndUpdate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDecimalPrecision: { $numberDecimal: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDecimalPrecision: { $numberDecimal: "1" } } - - name: findOneAndUpdate - arguments: - filter: { encryptedDecimalPrecision: { $gt: {$numberDecimal: "0"}} } - update: { "$set": { "encryptedDecimalPrecision": {$numberDecimal: "2"}}} - returnDocument: Before - result: *doc1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDecimalPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDecimalPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - findAndModify: *collection_name - query: { - "encryptedDecimalPrecision": { - "$gt": { - "$binary": { - "base64": "DRYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58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alPrecision": { $$type: "binData" }} } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: findAndModify - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": { - "$numberInt": "0" - }, - "encryptedDecimalPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - } - - - { - "_id": { - "$numberInt": "1" - }, - "encryptedDecimalPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "V6knyt7Zq2CG3++l75UtBx2m32iGAPjHiAe439Bf02w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0OKSXELxPP85SBVwDGf3LtMEQCJ8TTkFUl/+6jlkdb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uEw0lpQtBppR3vqV9j9+NQRSBF1BzZukb8c9IhyWvxc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zVhZ7Q59O087ji49oMJvBIgeir2oqvUpnh4p53GcTow=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dowrzKs+qJhRMZyKDbhjXbuX43FbmUKOaw9I8YlOZDw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ep5B6cska6THLIF7Mn3tn3RvV9EiwLSt0eZM/CLRUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "URNp/YmmDh5wIZUfAzzgPyJeMNiVx9PMsz52DZRujGY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wlM4IAQhhKQEzoVqS8b1Ddd50GB95OFb9LnzOwyjCP4=", - "subType": "00" - } - } - ] - } diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-InsertFind.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-InsertFind.json deleted file mode 100644 index bbe81f87ad..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-InsertFind.json +++ /dev/null @@ -1,571 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range DecimalPrecision. Insert and Find.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$gt": { - "$numberDecimal": "0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDecimalPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "encryptedDecimalPrecision": { - "$gt": { - "$binary": { - "base64": "DRYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMz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AAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAABNtbgAAAAAAAAAAAAAAAAAAAD4wE214ANAHAAAAAAAAAAAAAAAAPjAA", - "subType": "06" - } - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDecimalPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "mVZb+Ra0EYjQ4Zrh9X//E2T8MRj7NMqm5GUJXhRrBEI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MgwakFvPyBlwqFTbhWUF79URJQWFoJTGotlEVSPPUsQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DyBERpMSD5lEM5Nhpcn4WGgxgn/mkUVJp+PYSLX5jsE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I43iazc0xj1WVbYB/V+uTL/tughN1bBlxh1iypBnNsA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wjOBa/ATMuOywFmuPgC0GF/oeLqu0Z7eK5udzkTPbis=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gRQVwiR+m+0Vg8ZDXqrQQcVnTyobwCXNaA4BCJVXtMc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WUZ6huwx0ZbLb0R00uiC9FOJzsUocUN8qE5+YRenkvQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7s79aKEuPgQcS/YPOOVcYNZvHIo7FFsWtFCrnDKXefA=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-InsertFind.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-InsertFind.yml deleted file mode 100644 index ca04f412a6..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-InsertFind.yml +++ /dev/null @@ -1,307 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDecimalPrecision', 'bsonType': 'decimal', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberDecimal': '0.0'}, 'max': {'$numberDecimal': '200.0'}, 'precision': {'$numberInt': '2'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range DecimalPrecision. Insert and Find." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDecimalPrecision: { $numberDecimal: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDecimalPrecision: { $numberDecimal: "1" } } - - name: find - arguments: - filter: { encryptedDecimalPrecision: { $gt: { $numberDecimal: "0" } } } - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDecimalPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDecimalPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: - "encryptedDecimalPrecision": { - "$gt": { - "$binary": { - "base64": "DRYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58Ea+1HLJOWxN5lNcrWEFcwAgAAAAAEBo5AWZyC41b9ayjWNQSL4iYEAIwR/JG+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tVRpPmVWsfydkYN3UHh6TMuBXMAIAAAAAAeD6mDnQeLlbC9i0sVgE8+RH6y+e94OJQ0tJ0PvblVSgVsACAAAAAAWp4jvretbDEsqEMzP/WLTnwOiJwCtfrCiB6m8k+yEMoAAzE1AH0AAAAFZAAgAAAAAAZZ538coNPwyRjhEwr5P8Xw32oWOJF+R+nfCGgy2qO3BXMAIAAAAACOPLnJlKwGNPDBReRKnHfteq0wFb3ezhrc7BVXs8RUHwVsACAAAAAA+lGesNk3+SyB/60rSvdQ2aN2vfJPR7llJVhufGTNhHkAAzE2AH0AAAAFZAAgAAAAAFH9l9GGA1I52atJV5jNUf1lx8jBjoEoVoME97v5GFJiBXMAIAAAAAC1qH3Kd78Dr9NGbw7y9D/XYBwv5h1LLO8la5OU7g8UkQVsACAAAAAArZ6atJCYrVfHB8dSNPOFf6nnDADBMJcIEj8ljPvxHp8AAzE3AH0AAAAFZAAgAAAAADtbVEI2tdkrowEMdkacD2w0Y3T3Ofi7PH6HmA6sP0c/BXMAIAAAAADuBSROnZHA+NgUPH8d0LnWFiDsM2bY8bzjC1+elSsIygVsACAAAAAAR0G2m+uANoWknkr/NerFcG+fECVxNIs0cqbY1t/U/0MAAzE4AH0AAAAFZAAgAAAAAAh3WpeMVlikPFYj9hLj+fmIqVt6omCSF75W3TPExyWpBXMAIAAAAAAsQkRmwqeVj2gGE03orb6PtrIzDt6dDU3hgSQi8E2wKgVsACAAAAAA3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAABNtbgAAAAAAAAAAAAAAAAAAAD4wE214ANAHAAAAAAAAAAAAAAAAPjAA", - "subType": "06" - } - } - } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDecimalPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDecimalPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "mVZb+Ra0EYjQ4Zrh9X//E2T8MRj7NMqm5GUJXhRrBEI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MgwakFvPyBlwqFTbhWUF79URJQWFoJTGotlEVSPPUsQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DyBERpMSD5lEM5Nhpcn4WGgxgn/mkUVJp+PYSLX5jsE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I43iazc0xj1WVbYB/V+uTL/tughN1bBlxh1iypBnNsA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wjOBa/ATMuOywFmuPgC0GF/oeLqu0Z7eK5udzkTPbis=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gRQVwiR+m+0Vg8ZDXqrQQcVnTyobwCXNaA4BCJVXtMc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WUZ6huwx0ZbLb0R00uiC9FOJzsUocUN8qE5+YRenkvQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7s79aKEuPgQcS/YPOOVcYNZvHIo7FFsWtFCrnDKXefA=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Update.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Update.json deleted file mode 100644 index 987bdf1aa6..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Update.json +++ /dev/null @@ -1,588 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range DecimalPrecision. Update.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDecimalPrecision": { - "$numberDecimal": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDecimalPrecision": { - "$numberDecimal": "1" - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "encryptedDecimalPrecision": { - "$gt": { - "$numberDecimal": "0" - } - } - }, - "update": { - "$set": { - "encryptedDecimalPrecision": { - "$numberDecimal": "2" - } - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDecimalPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command_name": "update", - "command": { - "update": "default", - "ordered": true, - "updates": [ - { - "q": { - "encryptedDecimalPrecision": { - "$gt": { - "$binary": { - "base64": "DRYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGI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EnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAABNtbgAAAAAAAAAAAAAAAAAAAD4wE214ANAHAAAAAAAAAAAAAAAAPjAA", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedDecimalPrecision": { - "$$type": "binData" - } - } - } - } - ], - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDecimalPrecision", - "bsonType": "decimal", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDecimal": "0.0" - }, - "max": { - "$numberDecimal": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - }, - "$db": "default" - } - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDecimalPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDecimalPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "V6knyt7Zq2CG3++l75UtBx2m32iGAPjHiAe439Bf02w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0OKSXELxPP85SBVwDGf3LtMEQCJ8TTkFUl/+6jlkdb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uEw0lpQtBppR3vqV9j9+NQRSBF1BzZukb8c9IhyWvxc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zVhZ7Q59O087ji49oMJvBIgeir2oqvUpnh4p53GcTow=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dowrzKs+qJhRMZyKDbhjXbuX43FbmUKOaw9I8YlOZDw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ep5B6cska6THLIF7Mn3tn3RvV9EiwLSt0eZM/CLRUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "URNp/YmmDh5wIZUfAzzgPyJeMNiVx9PMsz52DZRujGY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wlM4IAQhhKQEzoVqS8b1Ddd50GB95OFb9LnzOwyjCP4=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Update.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Update.yml deleted file mode 100644 index b8ca8df782..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DecimalPrecision-Update.yml +++ /dev/null @@ -1,324 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDecimalPrecision', 'bsonType': 'decimal', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberDecimal': '0.0'}, 'max': {'$numberDecimal': '200.0'}, 'precision': {'$numberInt': '2'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range DecimalPrecision. Update." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDecimalPrecision: { $numberDecimal: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDecimalPrecision: { $numberDecimal: "1" } } - - name: updateOne - arguments: - filter: { encryptedDecimalPrecision: { $gt: { $numberDecimal: "0" } } } - update: { "$set": { "encryptedDecimalPrecision": { $numberDecimal: "2" } }} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDecimalPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDecimalPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command_name: update - command: - "update": "default" - "ordered": true - "updates": [ - { - "q": { - "encryptedDecimalPrecision": { - "$gt": { - "$binary": { - "base64": "DRYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58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ryptedDecimalPrecision": { $$type: "binData" } - } - } - } - ] - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - "$db": "default" - - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDecimalPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDecimalPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "V6knyt7Zq2CG3++l75UtBx2m32iGAPjHiAe439Bf02w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0OKSXELxPP85SBVwDGf3LtMEQCJ8TTkFUl/+6jlkdb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uEw0lpQtBppR3vqV9j9+NQRSBF1BzZukb8c9IhyWvxc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zVhZ7Q59O087ji49oMJvBIgeir2oqvUpnh4p53GcTow=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dowrzKs+qJhRMZyKDbhjXbuX43FbmUKOaw9I8YlOZDw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ep5B6cska6THLIF7Mn3tn3RvV9EiwLSt0eZM/CLRUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "URNp/YmmDh5wIZUfAzzgPyJeMNiVx9PMsz52DZRujGY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wlM4IAQhhKQEzoVqS8b1Ddd50GB95OFb9LnzOwyjCP4=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Defaults.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Defaults.json deleted file mode 100644 index c2a119cb7f..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Defaults.json +++ /dev/null @@ -1,381 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range applies defaults for trimFactor and sparsity", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$gt": { - "$numberInt": "0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "encryptedInt": { - "$gt": { - "$binary": { - "base64": "DRgbAAADcGF5bG9hZADEGgAABGcAsBoAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAA30oqY6NKy1KWDWf6Z36DtA2QsL9JRALvHX6smxz8cb4FcwAgAAAAADIhM0hCHwFGH+k7kPGuZlO+v5TjV6RRwA5FqUKM60o0BWwAIAAAAABTMPNUweBKrILSCxc5gcgjn9pTkkKX7KqWXgNMk4q7XgADMgB9AAAABWQAIAAAAACnCDvYEbgR9fWe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AcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAIAAAAAAAAAEHRmAAYAAAAQbW4AAAAAABBteADIAAAAAA==", - "subType": "06" - } - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - } - ] - }, - { - "_id": { - "$numberInt": "1" - }, - "encryptedInt": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Defaults.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Defaults.yml deleted file mode 100644 index 91fb9eb77c..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Defaults.yml +++ /dev/null @@ -1,157 +0,0 @@ -# Test "range" field with defaults for `trimFactor` and `sparsity`. -# Test requires libmongocrypt with changes in MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - topology: [ "replicaset", "sharded", "load-balanced" ] # Exclude "standalone". QE collections are not supported on standalone. -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - # Exclude `trimFactor` and `sparsity` - "contention": { "$numberLong": "0" }, - "min": { "$numberInt": "0" }, - "max": { "$numberInt": "200" } - } - } - ] -} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range applies defaults for trimFactor and sparsity" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedInt: { $numberInt: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedInt: { $numberInt: "1" } } - - name: find - arguments: - filter: { encryptedInt: { $gt: { $numberInt: "0" } } } - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: &encryptionInformation - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: *encryptionInformation - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: - "encryptedInt": { - "$gt": { - "$binary": { - "base64": "DRgbAAADcGF5bG9hZADEGgAABGcAsBoAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAA30oqY6NKy1KWDWf6Z36DtA2QsL9JRALvHX6smxz8cb4FcwAgAAAAADIhM0hCHwFGH+k7kPGuZlO+v5TjV6RRwA5FqUKM60o0BWwAIAAAAABTMPN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UyAH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAIAAAAAAAAAEHRmAAYAAAAQbW4AAAAAABBteADIAAAAAA==", - "subType": "06" - } - } - } - encryptionInformation: *encryptionInformation - command_name: find - outcome: - collection: - data: - - - { - "_id": 0, - "encryptedInt": { $$type: "binData" }, - # Expected contents of `__safeContent__` require MONGOCRYPT-698 to apply expected `trimFactor`. - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - } - ] - } - - - { - "_id": { - "$numberInt": "1" - }, - "encryptedInt": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Aggregate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Aggregate.json deleted file mode 100644 index daa7f4e973..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Aggregate.json +++ /dev/null @@ -1,1132 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Double. Aggregate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$numberDouble": "0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "default", - "pipeline": [ - { - "$match": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$binary": { - "base64": "DbMkAAADcGF5bG9hZABXJAAABGcAQyQAAAMwAH0AAAAFZAAgAAAAAHgYoMGjEE6fAlAhICv0+doHcVX8CmMVxyq7+jlyGrvmBXMAIAAAAAC/5MQZgTHuIr/O5Z3mXPvqrom5JTQ8IeSpQGhO9sB+8gVsACAAAAAAuPSXVmJUAUpTQg/A9Bu1hYczZF58KEhVofakygbsvJQAAzEAfQAAAAVkACAAAAAA2kiWNvEc4zunJ1jzvuClFC9hjZMYruKCqAaxq+oY8EAFcwAgAAAAACofIS72Cm6s866UCk+evTH3CvKBj/uZd72sAL608rzTBWwAIAAAAADuCQ/M2xLeALF0UFZtJb22QGOhHmJv6xoO+kZIHcDeiAADMgB9AAAABWQAIAAAAABkfoBGmU3hjYBvQbjNW19kfXneBQsQQPRfUL3UAwI2cAVzACAAAAAAUpK2BUOqX/DGdX5YJniEZMWkofxHqeAbXceEGJxhp8AFbAAgAAAAAKUaLzIldNIZv6RHE+FwbMjzcNHqPESwF/37mm43VPrsAAMzAH0AAAAFZAAgAAAAAFNprhQ3ZwIcYbuzLolAT5n/vc14P9kUUQComDu6eFyKBXMAIAAAAAAcx9z9pk32YbPV/sfPZl9ALIEVsqoLXgqWLVK/tP+heAVsACAAAAAA/qxvuvJbAHwwhfrPVpmCFzNvg2cU/NXaWgqgYUZpgXwAAzQAfQAAAAVkACAAAAAAODI+pB2pCuB+YmNEUAgtMfNdt3DmSkrJ96gRzLphgb8FcwAgAAAAAAT7dewFDxUDECQ3zVq75/cUN4IP+zsqhkP5+czUwlJIBWwAIAAAAACFGeOtd5zBXTJ4JYonkn/HXZfHipUlqGwIRUcH/VTatwADNQB9AAAABWQAIAAAAACNAk+yTZ4Ewk1En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CkPaDmD/ePAJpMuNOCBhni8AAzY4AH0AAAAFZAAgAAAAAOBePJvccPMJmy515KB1AkXF5Pi8NOG4V8psWy0SPRP+BXMAIAAAAAB3dOJG9xIDtEKCRzeNnPS3bFZepMj8UKBobKpSoCPqpgVsACAAAAAAPG3IxQVOdZrr509ggm5FKizWWoZPuVtOgOIGZ3m+pdEAAzY5AH0AAAAFZAAgAAAAABUvRrDQKEXLMdhnzXRdhiL6AGNs2TojPky+YVLXs+JnBXMAIAAAAAD1kYicbEEcPzD4QtuSYQQWDPq8fuUWGddpWayKn3dT9QVsACAAAAAA9+Sf7PbyFcY45hP9oTfjQiOUS3vEIAT8C0vOHymwYSUAAzcwAH0AAAAFZAAgAAAAAOvSnpujeKNen4pqc2HR63C5s5oJ1Vf4CsbKoYQvkwl5BXMAIAAAAACw2+vAMdibzd2YVVNfk81yXkFZP0WLJ82JBxJmXnYE+QVsACAAAAAArQ/E1ACyhK4ZyLqH9mNkCU7WClqRQTGyW9tciSGG/EMAAzcxAH0AAAAFZAAgAAAAAAo0xfGG7tJ3GWhgPVhW5Zn239nTD3PadShCNRc9TwdNBXMAIAAAAADZh243oOhenu0s/P/5KZLBDh9ADqKHtSWcXpO9D2sIjgVsACAAAAAAlgTPaoQKz+saU8rwCT3UiNOdG6hdpjzFx9GBn08ZkBEAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAABbW4A////////7/8BbXgA////////738A", - "subType": "06" - } - } - } - } - } - ], - "cursor": {}, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "aggregate" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "2FIZh/9N+NeJEQwxYIX5ikQT85xJzulBNReXk8PnG/s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I93Md7QNPGmEEGYU1+VVCqBPBEvXdqHPtTJtMOn06Yk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "GecBFQ1PemlECWZWCl7f74vmsL6eB6mzQ9n6tK6FYfs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QpjhZl+O1ORifgtCZuWAdcP6OKL7IZ2cA46v8FJcV28=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FWXI/yZ1M+2fIboeMCDMlp+I2NwPQDtoM/wWselOPYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uk26nvN/LdRLaBphiBgIZzT0sSpoO1z0RdDWRm/xrSA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hiiYSH1KZovAULc7rlmEU74wCjzDR+mm6ZnsgvFQjMw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hRzvMvWPX0sJme+wck67lwbKDFaWOa+Eyef+JSdc1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PSx5D+zqC9c295dguX4+EobT4IEzfffdfjzC8DWpB5Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QzfXQCVTjPQv2h21v95HYPq8uCsVJ2tPnjv79gAaM9M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XcGDO/dlTcEMLqwcm55UmOqK+KpBmbzZO1LIzX7GPaQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Lf+o4E7YB5ynzUPC6KTyW0lj6Cg9oLIu1Sdd1ODHctA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wAuVn02LAVo5Y+TUocvkoenFYWzpu38k0NmGZOsAjS4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yJGDtveLbbo/0HtCtiTSsvVI/0agg/U1bFaQ0yhK12o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KsEy0zgYcmkM+O/fWF9z3aJGIk22XCk+Aw96HB6JU68=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "p+AnMI5ZxdJMSIEJmXXya+FeH5yubmOdViwUO89j0Rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/jLix56jzeywBtNuGw55lCXyebQoSIhbful0hOKxKDY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fvDvSPomtJsl1S3+8/tzFCE8scHIdJY5hB9CdTEsoFo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "oV5hOJzPXxfTuRdKIlF4uYEoMDuqH+G7/3qgndDr0PM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3ALwcvLj3VOfgD6OqXAO13h1ZkOv46R6+Oy6SUKh53I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gxaB9FJj0IM+InhvAjwWaex3UIZ9SAnDiUd5WHSY/l0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "66NPvDygJzKJqddfNuDuNOpvGajjFRtvhkwfUkiYmXw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1dWcQIocRAcO9XnXYqbhl83jc0RgjQpsrWd8dC27trg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "npos0Uf1DT3ztSCjPVY9EImlRnTHB1KLrvmVSqBQ/8E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "TEI9qBx/tK1l1H0v1scMG8Srmtwo5VxWHADPBSlWrXk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3wUN2ypQKoj+5ASkeIK9ycxhahVxyTmGopigoUAlyYs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o/oksSnUS+nIq6ozWTbB5bJh+NoaPj8deAA23uxiWCk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KExYPruhA31e8xuSwvfUfDcyY/H2Va6taUd0k4yFgLc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/x+dNfxdd/lkx8Z8VZVfoYl7LPoaZ/iKEzZXBrAtIJc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DE4cmjFLPqZlmRomO0qQiruUBtzoCe8ZdNRcfNH92pU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M6EKNcLPw/iojAChgYUSieaBYWcbsjKtB94SaHOr8vk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+qP49lDPeyhaduTvXJgtJEqHNEYANVu9Bg3Bxz7Td9w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ruMrC2VIS+VKbJwCFb3bfkaLTju9nE+yPONV9s0M0Vo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EbjDlSB5JKnDKff4d8hOmaOwJ7B9Q6NQFisLj+DPC+0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "C/yYOTB94edyqAbiQNu8/H7FoG3yRRjHDkMykz4+Mv0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CBxqrejG+qQQq2YTd6iP/06kiu2CxxzBFaZK3Ofb1CM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2ZOQ/fpho+AbDENWBZaln7wRoepIRdhyT648dr8O5cU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EghIgEPz01+myPgj8oid+PgncvobvC7vjvG3THEEQ0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "92CysZYNF8riwAMhdrIPKxfODw9p07cKQy/Snn8XmVY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VO0LeTBQmsEf7sCHzTnZwUPNTqRZ49R8V5E9XnZ/5N4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "exs8BQMJq7U6ZXYgIizT7XN+X/hOmmn4YEuzev9zgSI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qHpS4k1I+gPniNp4CA8TY8lLN36vBYmgbKMFpbYMEqg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+7lWKCKAWFw6gPZdHE6E8KIfI14/fSvtWUmllb5WLi0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YiH/US0q6679hWblFDDKNqUjCgggoU8sUCssTIF1QbU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YgwkKElEubNfvXL9hJxzqQUQtHiXN/OCGxNL1MUZZlM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hZFST4INZTTuhvJlGJeMwlUAK270UCOTCDeBAnN4a7g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "24I1Zw35AuGnK3CqJhbCwYb0IPuu5sCRrM5iyeITOLc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vgD12JB4Q1S/kGPSQ1KOgp386KnG1GbM/5+60oRGcGw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+wNE+OL+CB9d4AUJdVxd56jUJCAXmmk9fapuB2TAc4g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uhQh1B2Pe4RkNw/kPEcgaLenuikKoRf1iyfZhpXdodc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "eu8gjAUIp8ybO204AgeOq5v1neI1yljqy5v3I6lo1lM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7QG6oVbASBAjrnCPxzzUNnuFSFNlKhbuBafkF8pr7Is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PUS1xb2oHSDTdYltutoSSxBiJ1NjxH3l2kA4P1CZLEs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XPMh/JDC/O93gJJCwwgJDb8ssWZvRvezNmKmyn3nIfk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jWz+KGwMk/GOvFAK2rOxF3OjxeZAWfmUQ1HGJ7icw4A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o7XbW68pc6flYigf3LW4WAGUWxpeqxaQLkHUhUR9RZ8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nqR+g60+5U0okbqJadSqGgnC+j1JcP8rwMcfzOs2ACI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hz43qVK95tSfbYFtaE/8fE97XMk1RiO8XpWjwZHB80o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "noZUWlZ8M6KXU5rkifyo8/duw5IL7/fXbJvT7bNmW9k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WONVHCuPSanXDRQQ/3tmyJ0Vq+Lu/4hRaMUf0g0kSuw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UEaj6vQRoIghE8Movd8AGXhtwIOXlP4cBsECIUvE5Y8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "D3n2YcO8+PB4C8brDo7kxKjF9Y844rVkdRMLTgsQkrw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "C+YA0G9KjxZVaWwOMuh/dcnHnHAlYnbFrRl0IEpmsY0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rUnmbmQanxrbFPYYrwyQ53x66OSt27yAvF+s48ezKDc=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Aggregate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Aggregate.yml deleted file mode 100644 index 23453decfc..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Aggregate.yml +++ /dev/null @@ -1,901 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDoubleNoPrecision', 'bsonType': 'double', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Double. Aggregate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDoubleNoPrecision: { $numberDouble: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDoubleNoPrecision: { $numberDouble: "1" } } - - name: aggregate - arguments: - pipeline: [{ $match: { "encryptedDoubleNoPrecision": { $gt: {$numberDouble: "0" }} } }] - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDoubleNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDoubleNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - aggregate: *collection_name - pipeline: [ - { - "$match": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$binary": { - "base64": "DbMkAAADcGF5bG9hZABXJAAABGcAQyQAAAMwAH0AAAAFZAAgAAAAAHgYoMGjEE6fAlAhICv0+doHcVX8CmMVxyq7+jlyGrvmBXMAIAAAAAC/5MQZgTHuIr/O5Z3mXPvqrom5JTQ8IeSpQGhO9sB+8gVsACAAAAAAuPSXVmJUAUpTQg/A9Bu1hYczZF58KEhVofakygbsvJQAAzEAfQAAAAVkACAAAAAA2kiWNvEc4zunJ1jzvuClFC9hjZMYruKCqAaxq+oY8EAFcwAgAAAAACofIS72Cm6s866UCk+evTH3CvKBj/uZd72sAL608rzTBWwAIAAAAADuCQ/M2xLeALF0UFZtJb22QGOhHmJv6xoO+kZIHcDeiAADMgB9AAAABWQAIAAAAABkfoBGmU3hjYBvQbjNW19kfXneBQsQQPRfUL3UAwI2cAVzACAAAAAAUpK2BUOqX/DGdX5YJniEZMWkofxHqeAbXceEGJxhp8AFbAAgAAAAAKUaLzIldNIZv6RHE+FwbMjzcNHqPESwF/37mm43VPrsAAMzAH0AAAAFZAAgAAAAAFNprhQ3ZwIcYbuzLolAT5n/vc14P9kUUQComDu6eFyKBXMAIAAAAAAcx9z9pk32YbPV/sfPZl9ALIEVsqoLXgqWLVK/tP+heAVsACAAAAAA/qxvuvJbAHwwhfrPVpmCFzNvg2cU/NXaWgqgYUZpgXwAAzQAfQAAAAVkACAAAAAAODI+pB2pCuB+YmNEUAgtMfNdt3DmSkrJ96gRzLphgb8FcwAgAAAAAAT7dewFDxUDECQ3zVq75/cUN4IP+zsqhkP5+czUwlJIBWwAIAAAAACFGeOtd5zBXTJ4JYonkn/HXZfHipUlqGwIRUcH/VTatwADNQB9AAAABWQAIAAAAACNAk+yTZ4Ewk1EnotQK8O3h1gg9I7pr9q2+4po1iJVgAVzACAAAAAAUj/LesmtEsgqYVzMJ67umVA11hJTdDXwbxDoQ71vWyUFbAAgAAAAABlnhpgTQ0WjLb5u0b/vEyd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RzeNnPS3bFZepMj8UKBobKpSoCPqpgVsACAAAAAAPG3IxQVOdZrr509ggm5FKizWWoZPuVtOgOIGZ3m+pdEAAzY5AH0AAAAFZAAgAAAAABUvRrDQKEXLMdhnzXRdhiL6AGNs2TojPky+YVLXs+JnBXMAIAAAAAD1kYicbEEcPzD4QtuSYQQWDPq8fuUWGddpWayKn3dT9QVsACAAAAAA9+Sf7PbyFcY45hP9oTfjQiOUS3vEIAT8C0vOHymwYSUAAzcwAH0AAAAFZAAgAAAAAOvSnpujeKNen4pqc2HR63C5s5oJ1Vf4CsbKoYQvkwl5BXMAIAAAAACw2+vAMdibzd2YVVNfk81yXkFZP0WLJ82JBxJmXnYE+QVsACAAAAAArQ/E1ACyhK4ZyLqH9mNkCU7WClqRQTGyW9tciSGG/EMAAzcxAH0AAAAFZAAgAAAAAAo0xfGG7tJ3GWhgPVhW5Zn239nTD3PadShCNRc9TwdNBXMAIAAAAADZh243oOhenu0s/P/5KZLBDh9ADqKHtSWcXpO9D2sIjgVsACAAAAAAlgTPaoQKz+saU8rwCT3UiNOdG6hdpjzFx9GBn08ZkBEAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAABbW4A////////7/8BbXgA////////738A", - "subType": "06" - } - } - } - } - } - ] - cursor: {} - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: aggregate - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDoubleNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDoubleNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "2FIZh/9N+NeJEQwxYIX5ikQT85xJzulBNReXk8PnG/s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I93Md7QNPGmEEGYU1+VVCqBPBEvXdqHPtTJtMOn06Yk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "GecBFQ1PemlECWZWCl7f74vmsL6eB6mzQ9n6tK6FYfs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QpjhZl+O1ORifgtCZuWAdcP6OKL7IZ2cA46v8FJcV28=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FWXI/yZ1M+2fIboeMCDMlp+I2NwPQDtoM/wWselOPYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uk26nvN/LdRLaBphiBgIZzT0sSpoO1z0RdDWRm/xrSA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hiiYSH1KZovAULc7rlmEU74wCjzDR+mm6ZnsgvFQjMw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hRzvMvWPX0sJme+wck67lwbKDFaWOa+Eyef+JSdc1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PSx5D+zqC9c295dguX4+EobT4IEzfffdfjzC8DWpB5Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QzfXQCVTjPQv2h21v95HYPq8uCsVJ2tPnjv79gAaM9M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XcGDO/dlTcEMLqwcm55UmOqK+KpBmbzZO1LIzX7GPaQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Lf+o4E7YB5ynzUPC6KTyW0lj6Cg9oLIu1Sdd1ODHctA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wAuVn02LAVo5Y+TUocvkoenFYWzpu38k0NmGZOsAjS4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yJGDtveLbbo/0HtCtiTSsvVI/0agg/U1bFaQ0yhK12o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KsEy0zgYcmkM+O/fWF9z3aJGIk22XCk+Aw96HB6JU68=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "p+AnMI5ZxdJMSIEJmXXya+FeH5yubmOdViwUO89j0Rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/jLix56jzeywBtNuGw55lCXyebQoSIhbful0hOKxKDY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fvDvSPomtJsl1S3+8/tzFCE8scHIdJY5hB9CdTEsoFo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "oV5hOJzPXxfTuRdKIlF4uYEoMDuqH+G7/3qgndDr0PM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3ALwcvLj3VOfgD6OqXAO13h1ZkOv46R6+Oy6SUKh53I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gxaB9FJj0IM+InhvAjwWaex3UIZ9SAnDiUd5WHSY/l0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "66NPvDygJzKJqddfNuDuNOpvGajjFRtvhkwfUkiYmXw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1dWcQIocRAcO9XnXYqbhl83jc0RgjQpsrWd8dC27trg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "npos0Uf1DT3ztSCjPVY9EImlRnTHB1KLrvmVSqBQ/8E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "TEI9qBx/tK1l1H0v1scMG8Srmtwo5VxWHADPBSlWrXk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3wUN2ypQKoj+5ASkeIK9ycxhahVxyTmGopigoUAlyYs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o/oksSnUS+nIq6ozWTbB5bJh+NoaPj8deAA23uxiWCk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KExYPruhA31e8xuSwvfUfDcyY/H2Va6taUd0k4yFgLc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/x+dNfxdd/lkx8Z8VZVfoYl7LPoaZ/iKEzZXBrAtIJc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DE4cmjFLPqZlmRomO0qQiruUBtzoCe8ZdNRcfNH92pU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M6EKNcLPw/iojAChgYUSieaBYWcbsjKtB94SaHOr8vk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+qP49lDPeyhaduTvXJgtJEqHNEYANVu9Bg3Bxz7Td9w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ruMrC2VIS+VKbJwCFb3bfkaLTju9nE+yPONV9s0M0Vo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EbjDlSB5JKnDKff4d8hOmaOwJ7B9Q6NQFisLj+DPC+0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "C/yYOTB94edyqAbiQNu8/H7FoG3yRRjHDkMykz4+Mv0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CBxqrejG+qQQq2YTd6iP/06kiu2CxxzBFaZK3Ofb1CM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2ZOQ/fpho+AbDENWBZaln7wRoepIRdhyT648dr8O5cU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EghIgEPz01+myPgj8oid+PgncvobvC7vjvG3THEEQ0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "92CysZYNF8riwAMhdrIPKxfODw9p07cKQy/Snn8XmVY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VO0LeTBQmsEf7sCHzTnZwUPNTqRZ49R8V5E9XnZ/5N4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "exs8BQMJq7U6ZXYgIizT7XN+X/hOmmn4YEuzev9zgSI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qHpS4k1I+gPniNp4CA8TY8lLN36vBYmgbKMFpbYMEqg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+7lWKCKAWFw6gPZdHE6E8KIfI14/fSvtWUmllb5WLi0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YiH/US0q6679hWblFDDKNqUjCgggoU8sUCssTIF1QbU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YgwkKElEubNfvXL9hJxzqQUQtHiXN/OCGxNL1MUZZlM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hZFST4INZTTuhvJlGJeMwlUAK270UCOTCDeBAnN4a7g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "24I1Zw35AuGnK3CqJhbCwYb0IPuu5sCRrM5iyeITOLc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vgD12JB4Q1S/kGPSQ1KOgp386KnG1GbM/5+60oRGcGw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+wNE+OL+CB9d4AUJdVxd56jUJCAXmmk9fapuB2TAc4g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uhQh1B2Pe4RkNw/kPEcgaLenuikKoRf1iyfZhpXdodc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "eu8gjAUIp8ybO204AgeOq5v1neI1yljqy5v3I6lo1lM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7QG6oVbASBAjrnCPxzzUNnuFSFNlKhbuBafkF8pr7Is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PUS1xb2oHSDTdYltutoSSxBiJ1NjxH3l2kA4P1CZLEs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XPMh/JDC/O93gJJCwwgJDb8ssWZvRvezNmKmyn3nIfk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jWz+KGwMk/GOvFAK2rOxF3OjxeZAWfmUQ1HGJ7icw4A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o7XbW68pc6flYigf3LW4WAGUWxpeqxaQLkHUhUR9RZ8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nqR+g60+5U0okbqJadSqGgnC+j1JcP8rwMcfzOs2ACI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hz43qVK95tSfbYFtaE/8fE97XMk1RiO8XpWjwZHB80o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "noZUWlZ8M6KXU5rkifyo8/duw5IL7/fXbJvT7bNmW9k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WONVHCuPSanXDRQQ/3tmyJ0Vq+Lu/4hRaMUf0g0kSuw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UEaj6vQRoIghE8Movd8AGXhtwIOXlP4cBsECIUvE5Y8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "D3n2YcO8+PB4C8brDo7kxKjF9Y844rVkdRMLTgsQkrw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "C+YA0G9KjxZVaWwOMuh/dcnHnHAlYnbFrRl0IEpmsY0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rUnmbmQanxrbFPYYrwyQ53x66OSt27yAvF+s48ezKDc=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Correctness.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Correctness.json deleted file mode 100644 index edb336743c..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Correctness.json +++ /dev/null @@ -1,1160 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Find with $gt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$numberDouble": "0.0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$gte": { - "$numberDouble": "0.0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - }, - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$numberDouble": "1.0" - } - } - } - }, - "result": [] - } - ] - }, - { - "description": "Find with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$lt": { - "$numberDouble": "1.0" - } - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - ] - } - ] - }, - { - "description": "Find with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$lte": { - "$numberDouble": "1.0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - }, - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$numberDouble": "0.0" - }, - "$lt": { - "$numberDouble": "2.0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - ] - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$in": [ - { - "$numberDouble": "0.0" - } - ] - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoubleNoPrecision": { - "$gte": { - "$numberDouble": "0.0" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - }, - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$numberDouble": "1.0" - } - } - } - } - ] - }, - "result": [] - } - ] - }, - { - "description": "Aggregate with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoubleNoPrecision": { - "$lt": { - "$numberDouble": "1.0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoubleNoPrecision": { - "$lte": { - "$numberDouble": "1.0" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - }, - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$numberDouble": "0.0" - }, - "$lt": { - "$numberDouble": "2.0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - ] - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoubleNoPrecision": { - "$in": [ - { - "$numberDouble": "0.0" - } - ] - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0.0" - } - } - ] - } - ] - }, - { - "description": "Wrong type: Insert Int", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberInt": "0" - } - } - }, - "result": { - "errorContains": "cannot encrypt element" - } - } - ] - }, - { - "description": "Wrong type: Find Int", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$gte": { - "$numberInt": "0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": { - "errorContains": "field type is not supported" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Correctness.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Correctness.yml deleted file mode 100644 index 54a116e5ce..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Correctness.yml +++ /dev/null @@ -1,292 +0,0 @@ -# Test correctness results. -# Does not include command monitoring expectations or outcome assertions to make tests more readable. - -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "8.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDoubleNoPrecision', 'bsonType': 'double', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Find with $gt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDoubleNoPrecision: { $numberDouble: "0.0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDoubleNoPrecision: { $numberDouble: "1.0" } } - - name: find - arguments: - filter: { encryptedDoubleNoPrecision: { $gt: { $numberDouble: "0.0" } }} - result: [*doc1] - - - description: "Find with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoubleNoPrecision: { $gte: { $numberDouble: "0.0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoubleNoPrecision: { $gt: { $numberDouble: "1.0" } }} - result: [] - - - description: "Find with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoubleNoPrecision: { $lt: { $numberDouble: "1.0" } }} - result: [*doc0] - - - description: "Find with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoubleNoPrecision: { $lte: { $numberDouble: "1.0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoubleNoPrecision: { $gt: { $numberDouble: "0.0" }, $lt: { $numberDouble: "2.0"} }} - result: [*doc1] - - - description: "Find with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoubleNoPrecision: { $numberDouble: "0.0" } } - result: [*doc0] - - name: find - arguments: - filter: { encryptedDoubleNoPrecision: { $numberDouble: "1.0" } } - result: [*doc1] - - - description: "Find with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoubleNoPrecision: { $in: [ {$numberDouble: "0.0"} ] } } - result: [*doc0] - - - description: "Aggregate with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoubleNoPrecision: { $gte: { $numberDouble: "0.0" } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoubleNoPrecision: { $gt: { $numberDouble: "1.0" } }} } - result: [] - - - description: "Aggregate with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoubleNoPrecision: { $lt: { $numberDouble: "1.0" } }} } - result: [*doc0] - - - description: "Aggregate with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoubleNoPrecision: { $lte: { $numberDouble: "1.0" } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoubleNoPrecision: { $gt: { $numberDouble: "0.0" }, $lt: { $numberDouble: "2.0"} }} } - result: [*doc1] - - - description: "Aggregate with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoubleNoPrecision: { $numberDouble: "0.0" } } } - result: [*doc0] - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoubleNoPrecision: { $numberDouble: "1.0" } } } - result: [*doc1] - - - description: "Aggregate with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoubleNoPrecision: { $in: [ {$numberDouble: "0.0"} ] } } } - result: [*doc0] - - - description: "Wrong type: Insert Int" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: { _id: 0, encryptedDoubleNoPrecision: { $numberInt: "0" }} } - result: - # Expect an error from mongocryptd. - errorContains: "cannot encrypt element" - - - description: "Wrong type: Find Int" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: find - arguments: - filter: { encryptedDoubleNoPrecision: { $gte: { $numberInt: "0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: - # expect an error from libmongocrypt. - errorContains: "field type is not supported" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Delete.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Delete.json deleted file mode 100644 index 4a9c1f27b5..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Delete.json +++ /dev/null @@ -1,732 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Double. Delete.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1" - } - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$numberDouble": "0" - } - } - } - }, - "result": { - "deletedCount": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "delete": "default", - "deletes": [ - { - "q": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$binary": { - "base64": "DbMkAAADcGF5bG9hZABXJAAABGcAQyQAAAMwAH0AAAAFZAAgAAAAAHgYoMGjEE6fAlAhICv0+doHcVX8CmMVxyq7+jlyGrvmBXMAIAAAAAC/5MQZgTHuIr/O5Z3mXPvqrom5JTQ8IeSpQGhO9sB+8gVsACAAAAAAuPSXVmJUAUpTQg/A9Bu1hYczZF58KEhVofakygbsvJQAAzEAfQAAAAVkACAAAAAA2kiWNvEc4zunJ1jzvuClFC9hjZMYruKCqAaxq+oY8EAFcwAgAAAAACofIS72Cm6s866UCk+evTH3CvKBj/uZd72sAL608rzTBWwAIAAAAADuCQ/M2xLeALF0UFZtJb22QGOhHmJv6xoO+kZIHcDeiAADMgB9AAAABWQAIAAAAABkfoBGmU3hjYBvQbjNW19kfXneBQsQQPRfUL3UAwI2cAVzACAAAAAAUpK2BUOqX/DGdX5YJniEZMWkofxHqeAbXceEGJxhp8AFbAAgAAAAAKUaLzIldNIZv6RHE+FwbMjzcNHqPESwF/37mm43VPrsAAMzAH0AAAAFZAAgAAAAAFNprhQ3ZwIcYbuzLolAT5n/vc14P9kUUQComDu6eFyKBXMAIAAAAAAcx9z9pk32YbPV/sfPZl9ALIEVsqoLXgqWLVK/tP+heAVsACAAAAAA/qxvuvJbAHwwhfrPVpmCFzNvg2cU/NXaWgqgYUZpgXwAAzQAfQAAAAVkACAAAAAAODI+pB2pCuB+YmNEUAgtMfNdt3DmSkrJ96gRzLphgb8FcwAgAAAAAAT7dewFDxUDECQ3zVq75/cUN4IP+zsqhkP5+czUwlJIBWwAIAAAAACFGeOtd5zBXTJ4JYonkn/HXZfHip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4jhwQlBgQWLA7Ph5bhgwVsACAAAAAAqkC8zYASvkVrp0pqmDyFCkPaDmD/ePAJpMuNOCBhni8AAzY4AH0AAAAFZAAgAAAAAOBePJvccPMJmy515KB1AkXF5Pi8NOG4V8psWy0SPRP+BXMAIAAAAAB3dOJG9xIDtEKCRzeNnPS3bFZepMj8UKBobKpSoCPqpgVsACAAAAAAPG3IxQVOdZrr509ggm5FKizWWoZPuVtOgOIGZ3m+pdEAAzY5AH0AAAAFZAAgAAAAABUvRrDQKEXLMdhnzXRdhiL6AGNs2TojPky+YVLXs+JnBXMAIAAAAAD1kYicbEEcPzD4QtuSYQQWDPq8fuUWGddpWayKn3dT9QVsACAAAAAA9+Sf7PbyFcY45hP9oTfjQiOUS3vEIAT8C0vOHymwYSUAAzcwAH0AAAAFZAAgAAAAAOvSnpujeKNen4pqc2HR63C5s5oJ1Vf4CsbKoYQvkwl5BXMAIAAAAACw2+vAMdibzd2YVVNfk81yXkFZP0WLJ82JBxJmXnYE+QVsACAAAAAArQ/E1ACyhK4ZyLqH9mNkCU7WClqRQTGyW9tciSGG/EMAAzcxAH0AAAAFZAAgAAAAAAo0xfGG7tJ3GWhgPVhW5Zn239nTD3PadShCNRc9TwdNBXMAIAAAAADZh243oOhenu0s/P/5KZLBDh9ADqKHtSWcXpO9D2sIjgVsACAAAAAAlgTPaoQKz+saU8rwCT3UiNOdG6hdpjzFx9GBn08ZkBEAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAABbW4A////////7/8BbXgA////////738A", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "delete" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Delete.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Delete.yml deleted file mode 100644 index ff71e8f1d9..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Delete.yml +++ /dev/null @@ -1,512 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDoubleNoPrecision', 'bsonType': 'double', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Double. Delete." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDoubleNoPrecision: { $numberDouble: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDoubleNoPrecision: { $numberDouble: "1" } } - - name: deleteOne - arguments: - filter: { "encryptedDoubleNoPrecision": { $gt: {$numberDouble: "0" }} } - result: - deletedCount: 1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDoubleNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDoubleNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - delete: *collection_name - deletes: [ - { - "q": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$binary": { - "base64": "DbMkAAADcGF5bG9hZABXJAAABGcAQyQAAAMwAH0AAAAFZAAgAAAAAHgYoMGjEE6fAlAhICv0+doHcVX8CmMVxyq7+jlyGrvmBXMAIAAAAAC/5MQZgTHuIr/O5Z3mXPvqrom5JTQ8IeSpQGhO9sB+8gVsACAAAAAAuPSXVmJUAUpTQg/A9Bu1hYczZF58KEhVofakygbsvJQAAzEAfQAAAAVkACAAAAAA2kiWNvEc4zunJ1jzvuClFC9hjZMYruKCqAaxq+oY8EAFcwAgAAAAACofIS72Cm6s866UCk+evTH3CvKBj/uZd72sAL608rzTBWwAIAAAAADuCQ/M2xLeALF0UFZtJb22QGOhHmJv6xoO+kZIHcDeiAADMgB9AAAABWQAIAAAAABkfoBGmU3hjYBvQbjNW19kfXneBQsQQPRfUL3UAwI2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TD3PadShCNRc9TwdNBXMAIAAAAADZh243oOhenu0s/P/5KZLBDh9ADqKHtSWcXpO9D2sIjgVsACAAAAAAlgTPaoQKz+saU8rwCT3UiNOdG6hdpjzFx9GBn08ZkBEAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAABbW4A////////7/8BbXgA////////738A", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ] - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: delete - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDoubleNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-FindOneAndUpdate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-FindOneAndUpdate.json deleted file mode 100644 index d7860de83e..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-FindOneAndUpdate.json +++ /dev/null @@ -1,1136 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Double. FindOneAndUpdate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1" - } - } - } - }, - { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$numberDouble": "0" - } - } - }, - "update": { - "$set": { - "encryptedDoubleNoPrecision": { - "$numberDouble": "2" - } - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default", - "query": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$binary": { - "base64": "DbMkAAADcGF5bG9hZABXJAAABGcAQyQAAAMwAH0AAAAFZAAgAAAAAHgYoMGjEE6fAlAhICv0+doHcVX8CmMVxyq7+jlyGrvmBXMAIAAAAAC/5MQZgTHuIr/O5Z3mXPvqrom5JTQ8IeSpQGhO9sB+8gVsACAAAAAAuPSXVmJUAUpTQg/A9Bu1hYczZF58KEhVofakygbsvJQAAzEAfQAAAAVkACAAAAAA2kiWNvEc4zunJ1jzvuClFC9hjZMYruKCqAaxq+oY8EAFcwAgAAAAACofIS72Cm6s866UCk+evTH3CvKBj/uZd72sAL608rzTBWwAIAAAAADuCQ/M2xLeALF0UFZtJb22QGOhHmJv6xoO+kZIHcDeiAADMgB9AAAABWQAIAAAAABkfoBGmU3hjYBvQbjNW19kfXneBQsQQPRfUL3UAwI2cAVzACAAAAAAUpK2BUOqX/DGdX5YJniEZMWkofxHqeAbXceEGJxhp8AFbAAgAAAAAKUaLzIldNIZv6RHE+FwbMjzcNHqPESwF/37mm43VPrsAAMzAH0AAAAFZAAgAAAAAFNprhQ3ZwIcYbuzLolAT5n/vc14P9kUUQComDu6eFyKBXMAIAAAAAAcx9z9pk32YbPV/sfPZl9ALIEVsqoLXgqWLVK/tP+heAVsACAAAAAA/qxvuvJbAHwwhfrPVpmCFzNvg2c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set": { - "encryptedDoubleNoPrecision": { - "$$type": "binData" - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "findAndModify" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "HI88j1zrIsFoijIXKybr9mYubNV5uVeODyLHFH4Ueco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wXVD/HSbBljko0jJcaxJ1nrzs2+pchLQqYR3vywS8SU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KhscCh+tt/pp8lxtKZQSPPUU94RvJYPKG/sjtzIa4Ws=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RISnuNrTTVNW5HnwCgQJ301pFw8DOcYrAMQIwVwjOkI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Ra5zukLh2boua0Bh74qA+mtIoixGXlsNsxiJqHtqdTI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "eqr0v+NNWXWszi9ni8qH58Q6gw5x737tJvH3lPaNHO4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d42QupriWIwGrFAquXNFi0ehEuidIbHLFZtg1Sm2nN8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2azRVxaaTIJKcgY2FU012gcyP8Y05cRDpfUaMnCBaQU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3nlgkM4K/AAcHesRYYdEu24UGetHodVnVfHzw4yxZBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hqy91FNmAAac2zUaPO6eWFkx0/37rOWGrwXN+fzL0tU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "akX+fmscSDSF9pB5MPj56iaJPtohr0hfXNk/OPWsGv8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1ZvUb10Q7cN4cNLktd5yNjqgtawsYnkbeVBZV6WuY/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "otCwtuKiY4hCyXvYzXvo10OcnzZppebo38KsAlq49QM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Mty8EscckeT/dhMfrPFyDbLnmMOcYRUQ3mLK4KTu6V8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tnvgLLkJINO7csREYu4dEVe1ICrBeu7OP+HdfoX3M2E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kOefsHgEVhkJ17UuP7Dxogy6sAQbzf1SFPKCj6XRlrQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F+JQ79xavpaHdJzdhvwyHbzdZJLNHAymc/+67La3gao=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NCZ9zp5rDRceENuSgAfTLEyKg0YgmXAhK0B8WSj7+Pw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wL1CJ7cYR5slx8mHq++uMdjDfkt9037lQTUztEMF56M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "txefkzTMITZE+XvvRFZ7QcgwDT/7m8jNmxRk4QBaoZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jFunW3v1tSYMyZtQQD28eEy9qqDp4Kqo7gMN29N4bfQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QMO915KUiS3X3R1bU1YoafVM2s0NeHo3EjgTA9PnGwY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nwdKJEXdilzvb7494vbuDJ+y6SrfJahza1dYIsHIWVI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vpWMX+T/VXXajFo0UbuYjtp0AEzBU0Y+lP+ih2EQ7mg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1lmzG0J1DhKDRhhq5y5Buygu4G8eV2X0t7kUY90EohM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SiKqpXqO0trwhFvBWK274hMklpCgMhNs/JY84yyn/NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7cPGPYCKPTay+ZR9Gx6oOueduOgaFrSuAXmNDpDHXdI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4THEYvAkjs2Fh7FIe5LC45P4i4N0L7ob67UOVbhp6Nk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "B+UGsChLLZR7iqnt8yq91OgmTgwiUKTJhFxY4NT0O6c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X1uYwBCsCg1H+PnKdwtBqXlt0zKEURi8bOM940GcPfk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xYOgT5l7shlNXCwHlguovmDkcEnF8dXyYlTyYrgZ8GE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vFMTZqV8bh1+gcKzTkXweMddJlgdUnwX0DWzUUaMok4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4HI0y9FrtleZxZ7M6INdNhLelrQ2Rv/+ykWCBl+tMC8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jpJ0bBE474OUkn1vUiLWumIBtYmwc7J5+LQU/nyeLQc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jQTPeXZvdxY/DjtPfYfKUArIDsf0E9MVFy2O26sv1ec=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QLLto0ExR2ZYMGqlyaMZc/hXFFTlwmgtKbiVq/xJIeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yBJNviU1nchbGbhx6InXCVRXa90sEepz1EwbYuKXu2U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jpEf0vHxrPu9gTJutNXSi2g/2Mc4WXFEN7yHonZEb7A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "E09kLFckMYwNuhggMxmPtwndyvIAx+Vl+b2CV6FP75s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "N+ue6/cLPb5NssmJCCeo18LlbKPz6r2z20AsnTKRvOo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yVQNZP8hhsvNGyDph2QP2qTNdXZTiIEVineKg+Qf33o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cSC9uI+9c5S8X+0G7amVyug1p0ZlgBsbEDYYyezBevQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1NpZGjoQzuQtekj80Rifxe9HbE08W07dfwxaFHaVn84=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "5Ghuq/8l11Ug9Uf/RTwf9On3OxOwIXUcb9soiy4J7/w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0LWKaEty6ywxLFhDaAqulqfMnYc+tgPfH4apyEeKg80=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OwSthmCBtt6NIAoAh7aCbj82Yr/+9t8U7WuBQhFT3AQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "iYiyg6/1isqbMdvFPIGucu3cNM4NAZNtJhHpGZ4eM+c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "waBgs8jWuGJPIF5zCRh6OmIyfK5GCBQgTMfmKSR2wyY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1Jdtbe2BKJXPU2G9ywOrlODZ/cNYEQlKzAW3aMe1Hy4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xaLEnNUS/2ySerBpb9dN/D31t+wYcKekwTfkwtni0Mc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bIVBrOhOvr6cL55Tr24+B+CC9MiG7U6K54aAr2IXXuw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6Cdq5wroGu2TEFnekuT7LhOpd/K/+PcipIljcHU9QL4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "K5l64vI4S/pLviLW6Pl0U3iQkI3ge0xg4RAHcEsyKJo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bzhuvZ0Ls22yIOX+Hz51eAHlSuDbWR/e0u4EhfdpHbc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Qv+fr6uD4o0bZRp69QJCFL6zvn3G82c7L+N1IFzj7H0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XAmISMbD3aEyQT+BQEphCKFNa0F0GDKFuhM9cGceKoQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4VLCokntMfm1AogpUnYGvhV7nllWSo3mS3hVESMy+hA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xiXNLj/CipEH63Vb5cidi8q9X47EF4f3HtJSOH7mfM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4XlCYfYBjI9XA5zOSgTiEBYcZsdwyXL+f5XtH2xUIOc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "k6DfQy7ZYJIkEly2B5hjOZznL4NcgMkllZjJLb7yq7w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZzM6gwWesa3lxbZVZthpPFs2s3GV0RZREE2zOMhBRBo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "US+jeMeeOd7J0wR0efJtq2/18lcO8YFvhT4O3DeaonQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b6iSxiI1FM9SzxuG1bHqGA1i4+3GOi0/SPW00XB4L7o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kn3LsxAVkzIZKK9I6fi0Cctr0yjXOYgaQWMCoj4hLpM=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-FindOneAndUpdate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-FindOneAndUpdate.yml deleted file mode 100644 index 48f018e468..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-FindOneAndUpdate.yml +++ /dev/null @@ -1,899 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDoubleNoPrecision', 'bsonType': 'double', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Double. FindOneAndUpdate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDoubleNoPrecision: { $numberDouble: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDoubleNoPrecision: { $numberDouble: "1" } } - - name: findOneAndUpdate - arguments: - filter: { encryptedDoubleNoPrecision: { $gt: {$numberDouble: "0"}} } - update: { "$set": { "encryptedDoubleNoPrecision": {$numberDouble: "2"}}} - returnDocument: Before - result: *doc1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDoubleNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDoubleNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - findAndModify: *collection_name - query: { - "encryptedDoubleNoPrecision": { - "$gt": { - "$binary": { - "base64": "DbMkAAADcGF5bG9hZABXJAAABGcAQyQAAAMwAH0AAAAFZAAgAAAAAHgYoMGjEE6fAlAhICv0+doHcVX8CmMVxyq7+jlyGrvmBXMAIAAAAAC/5MQZgTHuIr/O5Z3mXPvqrom5JTQ8IeSpQGhO9sB+8gVsACAAAAAAuPSXVmJUAUpTQg/A9Bu1hYczZF58KEhVofakygbsvJQAAzEAfQAAAAVkACAAAAAA2kiWNvEc4zunJ1jzvuClFC9hjZMYruKCqAaxq+oY8EAFcwAgAAAAACofIS72Cm6s866UCk+evTH3CvKBj/uZd72sAL608rzTBWwAIAAAAADuCQ/M2xLeALF0UFZtJb22QGOhHmJv6xoO+kZIHcDeiAADMgB9AAAABWQAIAAAAABkfoBGmU3hjYBvQbjNW19kfXneBQsQQPRfUL3UAwI2cAVzACAAAAAAUpK2BUOqX/DGdX5YJniEZMWkofxHqeAbXceEGJxhp8AFbAAgAAAAAKUaLzIldNIZv6RHE+FwbMjzcNHqPESwF/37mm43VPrsAAMzAH0AAAAFZAAgAAAAAFNprhQ3ZwIcYbuzLolAT5n/vc14P9kUUQComDu6eFyKBXMAIAAAAAAcx9z9pk32YbPV/sfPZl9ALIEVsqoLXgqWLVK/tP+heAVsACAAAAAA/qxvuvJbAHwwhfrPVpmCFzNvg2cU/NXaWgqgYUZpgXwAAzQAfQAAAAVkAC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0reyaCjbJuVLJzbSLx1OBuBoQu+090kgW4RurVacAAzY3AH0AAAAFZAAgAAAAACHvDsaPhoSb6DeGnKQ1QOpGYAgK82qpnqwcmzSeWaJHBXMAIAAAAABRq3C5+dOfnkAHM5Mg5hPB3O4jhwQlBgQWLA7Ph5bhgwVsACAAAAAAqkC8zYASvkVrp0pqmDyFCkPaDmD/ePAJpMuNOCBhni8AAzY4AH0AAAAFZAAgAAAAAOBePJvccPMJmy515KB1AkXF5Pi8NOG4V8psWy0SPRP+BXMAIAAAAAB3dOJG9xIDtEKCRzeNnPS3bFZepMj8UKBobKpSoCPqpgVsACAAAAAAPG3IxQVOdZrr509ggm5FKizWWoZPuVtOgOIGZ3m+pdEAAzY5AH0AAAAFZAAgAAAAABUvRrDQKEXLMdhnzXRdhiL6AGNs2TojPky+YVLXs+JnBXMAIAAAAAD1kYicbEEcPzD4QtuSYQQWDPq8fuUWGddpWayKn3dT9QVsACAAAAAA9+Sf7PbyFcY45hP9oTfjQiOUS3vEIAT8C0vOHymwYSUAAzcwAH0AAAAFZAAgAAAAAOvSnpujeKNen4pqc2HR63C5s5oJ1Vf4CsbKoYQvkwl5BXMAIAAAAACw2+vAMdibzd2YVVNfk81yXkFZP0WLJ82JBxJmXnYE+QVsACAAAAAArQ/E1ACyhK4ZyLqH9mNkCU7WClqRQTGyW9tciSGG/EMAAzcxAH0AAAAFZAAgAAAAAAo0xfGG7tJ3GWhgPVhW5Zn239nTD3PadShCNRc9TwdNBXMAIAAAAADZh243oOhenu0s/P/5KZLBDh9ADqKHtSWcXpO9D2sIjgVsACAAAAAAlgTPaoQKz+saU8rwCT3UiNOdG6hdpjzFx9GBn08ZkBEAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAABbW4A////////7/8BbXgA////////738A", - "subType": "06" - } - } - } - } - update: { "$set": {"encryptedDoubleNoPrecision": { $$type: "binData" }} } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: findAndModify - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDoubleNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDoubleNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "HI88j1zrIsFoijIXKybr9mYubNV5uVeODyLHFH4Ueco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wXVD/HSbBljko0jJcaxJ1nrzs2+pchLQqYR3vywS8SU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KhscCh+tt/pp8lxtKZQSPPUU94RvJYPKG/sjtzIa4Ws=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RISnuNrTTVNW5HnwCgQJ301pFw8DOcYrAMQIwVwjOkI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Ra5zukLh2boua0Bh74qA+mtIoixGXlsNsxiJqHtqdTI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "eqr0v+NNWXWszi9ni8qH58Q6gw5x737tJvH3lPaNHO4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d42QupriWIwGrFAquXNFi0ehEuidIbHLFZtg1Sm2nN8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2azRVxaaTIJKcgY2FU012gcyP8Y05cRDpfUaMnCBaQU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3nlgkM4K/AAcHesRYYdEu24UGetHodVnVfHzw4yxZBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hqy91FNmAAac2zUaPO6eWFkx0/37rOWGrwXN+fzL0tU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "akX+fmscSDSF9pB5MPj56iaJPtohr0hfXNk/OPWsGv8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1ZvUb10Q7cN4cNLktd5yNjqgtawsYnkbeVBZV6WuY/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "otCwtuKiY4hCyXvYzXvo10OcnzZppebo38KsAlq49QM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Mty8EscckeT/dhMfrPFyDbLnmMOcYRUQ3mLK4KTu6V8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tnvgLLkJINO7csREYu4dEVe1ICrBeu7OP+HdfoX3M2E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kOefsHgEVhkJ17UuP7Dxogy6sAQbzf1SFPKCj6XRlrQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F+JQ79xavpaHdJzdhvwyHbzdZJLNHAymc/+67La3gao=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NCZ9zp5rDRceENuSgAfTLEyKg0YgmXAhK0B8WSj7+Pw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wL1CJ7cYR5slx8mHq++uMdjDfkt9037lQTUztEMF56M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "txefkzTMITZE+XvvRFZ7QcgwDT/7m8jNmxRk4QBaoZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jFunW3v1tSYMyZtQQD28eEy9qqDp4Kqo7gMN29N4bfQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QMO915KUiS3X3R1bU1YoafVM2s0NeHo3EjgTA9PnGwY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nwdKJEXdilzvb7494vbuDJ+y6SrfJahza1dYIsHIWVI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vpWMX+T/VXXajFo0UbuYjtp0AEzBU0Y+lP+ih2EQ7mg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1lmzG0J1DhKDRhhq5y5Buygu4G8eV2X0t7kUY90EohM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SiKqpXqO0trwhFvBWK274hMklpCgMhNs/JY84yyn/NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7cPGPYCKPTay+ZR9Gx6oOueduOgaFrSuAXmNDpDHXdI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4THEYvAkjs2Fh7FIe5LC45P4i4N0L7ob67UOVbhp6Nk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "B+UGsChLLZR7iqnt8yq91OgmTgwiUKTJhFxY4NT0O6c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X1uYwBCsCg1H+PnKdwtBqXlt0zKEURi8bOM940GcPfk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xYOgT5l7shlNXCwHlguovmDkcEnF8dXyYlTyYrgZ8GE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vFMTZqV8bh1+gcKzTkXweMddJlgdUnwX0DWzUUaMok4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4HI0y9FrtleZxZ7M6INdNhLelrQ2Rv/+ykWCBl+tMC8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jpJ0bBE474OUkn1vUiLWumIBtYmwc7J5+LQU/nyeLQc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jQTPeXZvdxY/DjtPfYfKUArIDsf0E9MVFy2O26sv1ec=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QLLto0ExR2ZYMGqlyaMZc/hXFFTlwmgtKbiVq/xJIeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yBJNviU1nchbGbhx6InXCVRXa90sEepz1EwbYuKXu2U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jpEf0vHxrPu9gTJutNXSi2g/2Mc4WXFEN7yHonZEb7A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "E09kLFckMYwNuhggMxmPtwndyvIAx+Vl+b2CV6FP75s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "N+ue6/cLPb5NssmJCCeo18LlbKPz6r2z20AsnTKRvOo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yVQNZP8hhsvNGyDph2QP2qTNdXZTiIEVineKg+Qf33o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cSC9uI+9c5S8X+0G7amVyug1p0ZlgBsbEDYYyezBevQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1NpZGjoQzuQtekj80Rifxe9HbE08W07dfwxaFHaVn84=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "5Ghuq/8l11Ug9Uf/RTwf9On3OxOwIXUcb9soiy4J7/w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0LWKaEty6ywxLFhDaAqulqfMnYc+tgPfH4apyEeKg80=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OwSthmCBtt6NIAoAh7aCbj82Yr/+9t8U7WuBQhFT3AQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "iYiyg6/1isqbMdvFPIGucu3cNM4NAZNtJhHpGZ4eM+c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "waBgs8jWuGJPIF5zCRh6OmIyfK5GCBQgTMfmKSR2wyY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1Jdtbe2BKJXPU2G9ywOrlODZ/cNYEQlKzAW3aMe1Hy4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xaLEnNUS/2ySerBpb9dN/D31t+wYcKekwTfkwtni0Mc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bIVBrOhOvr6cL55Tr24+B+CC9MiG7U6K54aAr2IXXuw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6Cdq5wroGu2TEFnekuT7LhOpd/K/+PcipIljcHU9QL4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "K5l64vI4S/pLviLW6Pl0U3iQkI3ge0xg4RAHcEsyKJo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bzhuvZ0Ls22yIOX+Hz51eAHlSuDbWR/e0u4EhfdpHbc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Qv+fr6uD4o0bZRp69QJCFL6zvn3G82c7L+N1IFzj7H0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XAmISMbD3aEyQT+BQEphCKFNa0F0GDKFuhM9cGceKoQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4VLCokntMfm1AogpUnYGvhV7nllWSo3mS3hVESMy+hA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xiXNLj/CipEH63Vb5cidi8q9X47EF4f3HtJSOH7mfM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4XlCYfYBjI9XA5zOSgTiEBYcZsdwyXL+f5XtH2xUIOc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "k6DfQy7ZYJIkEly2B5hjOZznL4NcgMkllZjJLb7yq7w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZzM6gwWesa3lxbZVZthpPFs2s3GV0RZREE2zOMhBRBo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "US+jeMeeOd7J0wR0efJtq2/18lcO8YFvhT4O3DeaonQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b6iSxiI1FM9SzxuG1bHqGA1i4+3GOi0/SPW00XB4L7o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kn3LsxAVkzIZKK9I6fi0Cctr0yjXOYgaQWMCoj4hLpM=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-InsertFind.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-InsertFind.json deleted file mode 100644 index 934af381f1..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-InsertFind.json +++ /dev/null @@ -1,1123 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Double. Insert and Find.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$numberDouble": "0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$binary": { - "base64": "DbMkAAADcGF5bG9hZABXJAAABGcAQyQAAAMwAH0AAAAFZAAgAAAAAHgYoMGjEE6fAlAhICv0+doHcVX8CmMVxyq7+jlyGrvmBXMAIAAAAAC/5MQZgTHuIr/O5Z3mXPvqrom5JTQ8IeSpQGhO9sB+8gVsACAAAAAAuPSXVmJUAUpTQg/A9Bu1hYczZF58KEhVofakygbsvJQAAzEAfQAAAAVkACAAAAAA2kiWNvEc4zunJ1jzvuClFC9hjZMYruKCqAaxq+oY8EAFcwAgAAAAACofIS72Cm6s866UCk+evTH3CvKBj/uZd72sAL608rzTBWwAIAAAAADuCQ/M2xLeALF0UFZtJb22QGOhHmJv6xoO+kZIHcDeiAADMgB9AAAABWQAIAAAAABkfoBGmU3hjYBvQbjNW19kfXneBQsQQPRfUL3UAwI2cAVzACAAAAAAUpK2BUOqX/DGdX5YJniEZMWkofxHqeAbXceEGJxhp8AFbAAgAAAAAKUaLzIldNIZv6RHE+FwbMjzcNHqPESwF/37mm43VPrsAAMzA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x9GBn08ZkBEAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAABbW4A////////7/8BbXgA////////738A", - "subType": "06" - } - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "2FIZh/9N+NeJEQwxYIX5ikQT85xJzulBNReXk8PnG/s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I93Md7QNPGmEEGYU1+VVCqBPBEvXdqHPtTJtMOn06Yk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "GecBFQ1PemlECWZWCl7f74vmsL6eB6mzQ9n6tK6FYfs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QpjhZl+O1ORifgtCZuWAdcP6OKL7IZ2cA46v8FJcV28=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FWXI/yZ1M+2fIboeMCDMlp+I2NwPQDtoM/wWselOPYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uk26nvN/LdRLaBphiBgIZzT0sSpoO1z0RdDWRm/xrSA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hiiYSH1KZovAULc7rlmEU74wCjzDR+mm6ZnsgvFQjMw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hRzvMvWPX0sJme+wck67lwbKDFaWOa+Eyef+JSdc1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PSx5D+zqC9c295dguX4+EobT4IEzfffdfjzC8DWpB5Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QzfXQCVTjPQv2h21v95HYPq8uCsVJ2tPnjv79gAaM9M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XcGDO/dlTcEMLqwcm55UmOqK+KpBmbzZO1LIzX7GPaQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Lf+o4E7YB5ynzUPC6KTyW0lj6Cg9oLIu1Sdd1ODHctA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wAuVn02LAVo5Y+TUocvkoenFYWzpu38k0NmGZOsAjS4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yJGDtveLbbo/0HtCtiTSsvVI/0agg/U1bFaQ0yhK12o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KsEy0zgYcmkM+O/fWF9z3aJGIk22XCk+Aw96HB6JU68=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "p+AnMI5ZxdJMSIEJmXXya+FeH5yubmOdViwUO89j0Rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/jLix56jzeywBtNuGw55lCXyebQoSIhbful0hOKxKDY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fvDvSPomtJsl1S3+8/tzFCE8scHIdJY5hB9CdTEsoFo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "oV5hOJzPXxfTuRdKIlF4uYEoMDuqH+G7/3qgndDr0PM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3ALwcvLj3VOfgD6OqXAO13h1ZkOv46R6+Oy6SUKh53I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gxaB9FJj0IM+InhvAjwWaex3UIZ9SAnDiUd5WHSY/l0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "66NPvDygJzKJqddfNuDuNOpvGajjFRtvhkwfUkiYmXw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1dWcQIocRAcO9XnXYqbhl83jc0RgjQpsrWd8dC27trg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "npos0Uf1DT3ztSCjPVY9EImlRnTHB1KLrvmVSqBQ/8E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "TEI9qBx/tK1l1H0v1scMG8Srmtwo5VxWHADPBSlWrXk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3wUN2ypQKoj+5ASkeIK9ycxhahVxyTmGopigoUAlyYs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o/oksSnUS+nIq6ozWTbB5bJh+NoaPj8deAA23uxiWCk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KExYPruhA31e8xuSwvfUfDcyY/H2Va6taUd0k4yFgLc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/x+dNfxdd/lkx8Z8VZVfoYl7LPoaZ/iKEzZXBrAtIJc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DE4cmjFLPqZlmRomO0qQiruUBtzoCe8ZdNRcfNH92pU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M6EKNcLPw/iojAChgYUSieaBYWcbsjKtB94SaHOr8vk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+qP49lDPeyhaduTvXJgtJEqHNEYANVu9Bg3Bxz7Td9w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ruMrC2VIS+VKbJwCFb3bfkaLTju9nE+yPONV9s0M0Vo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EbjDlSB5JKnDKff4d8hOmaOwJ7B9Q6NQFisLj+DPC+0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "C/yYOTB94edyqAbiQNu8/H7FoG3yRRjHDkMykz4+Mv0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CBxqrejG+qQQq2YTd6iP/06kiu2CxxzBFaZK3Ofb1CM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2ZOQ/fpho+AbDENWBZaln7wRoepIRdhyT648dr8O5cU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EghIgEPz01+myPgj8oid+PgncvobvC7vjvG3THEEQ0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "92CysZYNF8riwAMhdrIPKxfODw9p07cKQy/Snn8XmVY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VO0LeTBQmsEf7sCHzTnZwUPNTqRZ49R8V5E9XnZ/5N4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "exs8BQMJq7U6ZXYgIizT7XN+X/hOmmn4YEuzev9zgSI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qHpS4k1I+gPniNp4CA8TY8lLN36vBYmgbKMFpbYMEqg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+7lWKCKAWFw6gPZdHE6E8KIfI14/fSvtWUmllb5WLi0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YiH/US0q6679hWblFDDKNqUjCgggoU8sUCssTIF1QbU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YgwkKElEubNfvXL9hJxzqQUQtHiXN/OCGxNL1MUZZlM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hZFST4INZTTuhvJlGJeMwlUAK270UCOTCDeBAnN4a7g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "24I1Zw35AuGnK3CqJhbCwYb0IPuu5sCRrM5iyeITOLc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vgD12JB4Q1S/kGPSQ1KOgp386KnG1GbM/5+60oRGcGw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+wNE+OL+CB9d4AUJdVxd56jUJCAXmmk9fapuB2TAc4g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uhQh1B2Pe4RkNw/kPEcgaLenuikKoRf1iyfZhpXdodc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "eu8gjAUIp8ybO204AgeOq5v1neI1yljqy5v3I6lo1lM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7QG6oVbASBAjrnCPxzzUNnuFSFNlKhbuBafkF8pr7Is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PUS1xb2oHSDTdYltutoSSxBiJ1NjxH3l2kA4P1CZLEs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XPMh/JDC/O93gJJCwwgJDb8ssWZvRvezNmKmyn3nIfk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jWz+KGwMk/GOvFAK2rOxF3OjxeZAWfmUQ1HGJ7icw4A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o7XbW68pc6flYigf3LW4WAGUWxpeqxaQLkHUhUR9RZ8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nqR+g60+5U0okbqJadSqGgnC+j1JcP8rwMcfzOs2ACI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hz43qVK95tSfbYFtaE/8fE97XMk1RiO8XpWjwZHB80o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "noZUWlZ8M6KXU5rkifyo8/duw5IL7/fXbJvT7bNmW9k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WONVHCuPSanXDRQQ/3tmyJ0Vq+Lu/4hRaMUf0g0kSuw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UEaj6vQRoIghE8Movd8AGXhtwIOXlP4cBsECIUvE5Y8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "D3n2YcO8+PB4C8brDo7kxKjF9Y844rVkdRMLTgsQkrw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "C+YA0G9KjxZVaWwOMuh/dcnHnHAlYnbFrRl0IEpmsY0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rUnmbmQanxrbFPYYrwyQ53x66OSt27yAvF+s48ezKDc=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-InsertFind.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-InsertFind.yml deleted file mode 100644 index 9216cf7b41..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-InsertFind.yml +++ /dev/null @@ -1,895 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDoubleNoPrecision', 'bsonType': 'double', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Double. Insert and Find." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDoubleNoPrecision: { $numberDouble: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDoubleNoPrecision: { $numberDouble: "1" } } - - name: find - arguments: - filter: { encryptedDoubleNoPrecision: { $gt: { $numberDouble: "0" } } } - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDoubleNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDoubleNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: - "encryptedDoubleNoPrecision": { - "$gt": { - "$binary": { - "base64": "DbMkAAADcGF5bG9hZABXJAAABGcAQyQAAAMwAH0AAAAFZAAgAAAAAHgYoMGjEE6fAlAhICv0+doHcVX8CmMVxyq7+jlyGrvmBXMAIAAAAAC/5MQZgTHuIr/O5Z3mXPvqrom5JTQ8IeSpQGhO9sB+8gVsACAAAAAAuPSXVmJUAUpTQg/A9Bu1hYczZF58KEhVofakygbsvJQAAzEAfQAAAAVkACAAAAAA2kiWNvEc4zunJ1jzvuClFC9hjZMYruKCqAaxq+oY8EAFcwAgAAAAACofIS72Cm6s866UCk+evTH3CvKBj/uZd72sAL608rzTBWwAIAAAAADuCQ/M2xLeALF0UFZtJb22QGOhHmJv6xoO+kZIHcDeiAADMgB9AAAABWQAIAAAAABkfoBGmU3hjYBvQbjNW19kfXneBQsQQPRfUL3UAwI2cAVzACAAAAAAUpK2BUOqX/DGdX5YJniEZMWkofxHqeAbXceEGJxhp8AFbAAgAAAAAKUaLzIldNIZv6RHE+FwbMjzcNHqPESwF/37mm43VPrsAAMzAH0AAAAFZAAgAAAAAFNprhQ3ZwIcYbuzLolAT5n/vc14P9kUUQComDu6eFyKBXMAIAAAAAAcx9z9pk32YbPV/sfPZl9ALIEVsqoLXgqWLVK/tP+heAVsACAAAAAA/qxvuvJbAHwwhfrPVpmCFzNvg2cU/NXa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schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDoubleNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDoubleNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "2FIZh/9N+NeJEQwxYIX5ikQT85xJzulBNReXk8PnG/s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I93Md7QNPGmEEGYU1+VVCqBPBEvXdqHPtTJtMOn06Yk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "GecBFQ1PemlECWZWCl7f74vmsL6eB6mzQ9n6tK6FYfs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QpjhZl+O1ORifgtCZuWAdcP6OKL7IZ2cA46v8FJcV28=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FWXI/yZ1M+2fIboeMCDMlp+I2NwPQDtoM/wWselOPYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uk26nvN/LdRLaBphiBgIZzT0sSpoO1z0RdDWRm/xrSA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hiiYSH1KZovAULc7rlmEU74wCjzDR+mm6ZnsgvFQjMw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hRzvMvWPX0sJme+wck67lwbKDFaWOa+Eyef+JSdc1s4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PSx5D+zqC9c295dguX4+EobT4IEzfffdfjzC8DWpB5Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QzfXQCVTjPQv2h21v95HYPq8uCsVJ2tPnjv79gAaM9M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XcGDO/dlTcEMLqwcm55UmOqK+KpBmbzZO1LIzX7GPaQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Lf+o4E7YB5ynzUPC6KTyW0lj6Cg9oLIu1Sdd1ODHctA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wAuVn02LAVo5Y+TUocvkoenFYWzpu38k0NmGZOsAjS4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yJGDtveLbbo/0HtCtiTSsvVI/0agg/U1bFaQ0yhK12o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KsEy0zgYcmkM+O/fWF9z3aJGIk22XCk+Aw96HB6JU68=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "p+AnMI5ZxdJMSIEJmXXya+FeH5yubmOdViwUO89j0Rc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/jLix56jzeywBtNuGw55lCXyebQoSIhbful0hOKxKDY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fvDvSPomtJsl1S3+8/tzFCE8scHIdJY5hB9CdTEsoFo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "oV5hOJzPXxfTuRdKIlF4uYEoMDuqH+G7/3qgndDr0PM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3ALwcvLj3VOfgD6OqXAO13h1ZkOv46R6+Oy6SUKh53I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gxaB9FJj0IM+InhvAjwWaex3UIZ9SAnDiUd5WHSY/l0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "66NPvDygJzKJqddfNuDuNOpvGajjFRtvhkwfUkiYmXw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1dWcQIocRAcO9XnXYqbhl83jc0RgjQpsrWd8dC27trg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "npos0Uf1DT3ztSCjPVY9EImlRnTHB1KLrvmVSqBQ/8E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "TEI9qBx/tK1l1H0v1scMG8Srmtwo5VxWHADPBSlWrXk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3wUN2ypQKoj+5ASkeIK9ycxhahVxyTmGopigoUAlyYs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o/oksSnUS+nIq6ozWTbB5bJh+NoaPj8deAA23uxiWCk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KExYPruhA31e8xuSwvfUfDcyY/H2Va6taUd0k4yFgLc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "/x+dNfxdd/lkx8Z8VZVfoYl7LPoaZ/iKEzZXBrAtIJc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DE4cmjFLPqZlmRomO0qQiruUBtzoCe8ZdNRcfNH92pU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M6EKNcLPw/iojAChgYUSieaBYWcbsjKtB94SaHOr8vk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+qP49lDPeyhaduTvXJgtJEqHNEYANVu9Bg3Bxz7Td9w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ruMrC2VIS+VKbJwCFb3bfkaLTju9nE+yPONV9s0M0Vo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EbjDlSB5JKnDKff4d8hOmaOwJ7B9Q6NQFisLj+DPC+0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "C/yYOTB94edyqAbiQNu8/H7FoG3yRRjHDkMykz4+Mv0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CBxqrejG+qQQq2YTd6iP/06kiu2CxxzBFaZK3Ofb1CM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2ZOQ/fpho+AbDENWBZaln7wRoepIRdhyT648dr8O5cU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "EghIgEPz01+myPgj8oid+PgncvobvC7vjvG3THEEQ0M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "92CysZYNF8riwAMhdrIPKxfODw9p07cKQy/Snn8XmVY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VO0LeTBQmsEf7sCHzTnZwUPNTqRZ49R8V5E9XnZ/5N4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "exs8BQMJq7U6ZXYgIizT7XN+X/hOmmn4YEuzev9zgSI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qHpS4k1I+gPniNp4CA8TY8lLN36vBYmgbKMFpbYMEqg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+7lWKCKAWFw6gPZdHE6E8KIfI14/fSvtWUmllb5WLi0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YiH/US0q6679hWblFDDKNqUjCgggoU8sUCssTIF1QbU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YgwkKElEubNfvXL9hJxzqQUQtHiXN/OCGxNL1MUZZlM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hZFST4INZTTuhvJlGJeMwlUAK270UCOTCDeBAnN4a7g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "24I1Zw35AuGnK3CqJhbCwYb0IPuu5sCRrM5iyeITOLc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vgD12JB4Q1S/kGPSQ1KOgp386KnG1GbM/5+60oRGcGw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+wNE+OL+CB9d4AUJdVxd56jUJCAXmmk9fapuB2TAc4g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uhQh1B2Pe4RkNw/kPEcgaLenuikKoRf1iyfZhpXdodc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "eu8gjAUIp8ybO204AgeOq5v1neI1yljqy5v3I6lo1lM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7QG6oVbASBAjrnCPxzzUNnuFSFNlKhbuBafkF8pr7Is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "PUS1xb2oHSDTdYltutoSSxBiJ1NjxH3l2kA4P1CZLEs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XPMh/JDC/O93gJJCwwgJDb8ssWZvRvezNmKmyn3nIfk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jWz+KGwMk/GOvFAK2rOxF3OjxeZAWfmUQ1HGJ7icw4A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o7XbW68pc6flYigf3LW4WAGUWxpeqxaQLkHUhUR9RZ8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nqR+g60+5U0okbqJadSqGgnC+j1JcP8rwMcfzOs2ACI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Hz43qVK95tSfbYFtaE/8fE97XMk1RiO8XpWjwZHB80o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "noZUWlZ8M6KXU5rkifyo8/duw5IL7/fXbJvT7bNmW9k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WONVHCuPSanXDRQQ/3tmyJ0Vq+Lu/4hRaMUf0g0kSuw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UEaj6vQRoIghE8Movd8AGXhtwIOXlP4cBsECIUvE5Y8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "D3n2YcO8+PB4C8brDo7kxKjF9Y844rVkdRMLTgsQkrw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "C+YA0G9KjxZVaWwOMuh/dcnHnHAlYnbFrRl0IEpmsY0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rUnmbmQanxrbFPYYrwyQ53x66OSt27yAvF+s48ezKDc=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Update.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Update.json deleted file mode 100644 index ec95e0334a..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Update.json +++ /dev/null @@ -1,1140 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Double. Update.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$numberDouble": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$numberDouble": "1" - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$numberDouble": "0" - } - } - }, - "update": { - "$set": { - "encryptedDoubleNoPrecision": { - "$numberDouble": "2" - } - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command_name": "update", - "command": { - "update": "default", - "ordered": true, - "updates": [ - { - "q": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$binary": { - "base64": "DbMkAAADcGF5bG9hZABXJAAABGcAQyQAAAMwAH0AAAAFZAAgAAAAAHgYoMGjEE6fAlAhICv0+doHcVX8CmMVxyq7+jlyGrvmBXMAIAAAAAC/5MQZgTHuIr/O5Z3mXPvqrom5JTQ8IeSpQGhO9sB+8gVsACAAAAAAuPSXVmJUAUpTQg/A9Bu1hYczZF58KEhVofakygbsvJQAAzEAfQAAAAVkACAAAAAA2kiWNvEc4zunJ1jzvuClFC9hjZMYruKCqAaxq+oY8EAFcwAgAAAAACofIS72Cm6s866UCk+evTH3CvKBj/uZd72sAL608rzTBWwAIAAAAADuCQ/M2xLeALF0UFZtJb22QGOhHmJv6xoO+kZIHcDeiAADMgB9AAAABWQAIAAAAABkfoBGmU3hjYBvQbjNW19kfXneBQsQQPRfUL3UAwI2cAVzACAAAAAAUpK2BUOqX/DGdX5YJniEZMWkofxHqeAbXceEGJxhp8AFbAAgAAAAAKU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jgVsACAAAAAAlgTPaoQKz+saU8rwCT3UiNOdG6hdpjzFx9GBn08ZkBEAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAABbW4A////////7/8BbXgA////////738A", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedDoubleNoPrecision": { - "$$type": "binData" - } - } - } - } - ], - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoubleNoPrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - } - } - } - ] - } - } - }, - "$db": "default" - } - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDoubleNoPrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "HI88j1zrIsFoijIXKybr9mYubNV5uVeODyLHFH4Ueco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wXVD/HSbBljko0jJcaxJ1nrzs2+pchLQqYR3vywS8SU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KhscCh+tt/pp8lxtKZQSPPUU94RvJYPKG/sjtzIa4Ws=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RISnuNrTTVNW5HnwCgQJ301pFw8DOcYrAMQIwVwjOkI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Ra5zukLh2boua0Bh74qA+mtIoixGXlsNsxiJqHtqdTI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "eqr0v+NNWXWszi9ni8qH58Q6gw5x737tJvH3lPaNHO4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d42QupriWIwGrFAquXNFi0ehEuidIbHLFZtg1Sm2nN8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2azRVxaaTIJKcgY2FU012gcyP8Y05cRDpfUaMnCBaQU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3nlgkM4K/AAcHesRYYdEu24UGetHodVnVfHzw4yxZBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hqy91FNmAAac2zUaPO6eWFkx0/37rOWGrwXN+fzL0tU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "akX+fmscSDSF9pB5MPj56iaJPtohr0hfXNk/OPWsGv8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1ZvUb10Q7cN4cNLktd5yNjqgtawsYnkbeVBZV6WuY/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "otCwtuKiY4hCyXvYzXvo10OcnzZppebo38KsAlq49QM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Mty8EscckeT/dhMfrPFyDbLnmMOcYRUQ3mLK4KTu6V8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tnvgLLkJINO7csREYu4dEVe1ICrBeu7OP+HdfoX3M2E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kOefsHgEVhkJ17UuP7Dxogy6sAQbzf1SFPKCj6XRlrQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F+JQ79xavpaHdJzdhvwyHbzdZJLNHAymc/+67La3gao=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NCZ9zp5rDRceENuSgAfTLEyKg0YgmXAhK0B8WSj7+Pw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wL1CJ7cYR5slx8mHq++uMdjDfkt9037lQTUztEMF56M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "txefkzTMITZE+XvvRFZ7QcgwDT/7m8jNmxRk4QBaoZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jFunW3v1tSYMyZtQQD28eEy9qqDp4Kqo7gMN29N4bfQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QMO915KUiS3X3R1bU1YoafVM2s0NeHo3EjgTA9PnGwY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nwdKJEXdilzvb7494vbuDJ+y6SrfJahza1dYIsHIWVI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vpWMX+T/VXXajFo0UbuYjtp0AEzBU0Y+lP+ih2EQ7mg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1lmzG0J1DhKDRhhq5y5Buygu4G8eV2X0t7kUY90EohM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SiKqpXqO0trwhFvBWK274hMklpCgMhNs/JY84yyn/NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7cPGPYCKPTay+ZR9Gx6oOueduOgaFrSuAXmNDpDHXdI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4THEYvAkjs2Fh7FIe5LC45P4i4N0L7ob67UOVbhp6Nk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "B+UGsChLLZR7iqnt8yq91OgmTgwiUKTJhFxY4NT0O6c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X1uYwBCsCg1H+PnKdwtBqXlt0zKEURi8bOM940GcPfk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xYOgT5l7shlNXCwHlguovmDkcEnF8dXyYlTyYrgZ8GE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vFMTZqV8bh1+gcKzTkXweMddJlgdUnwX0DWzUUaMok4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4HI0y9FrtleZxZ7M6INdNhLelrQ2Rv/+ykWCBl+tMC8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jpJ0bBE474OUkn1vUiLWumIBtYmwc7J5+LQU/nyeLQc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jQTPeXZvdxY/DjtPfYfKUArIDsf0E9MVFy2O26sv1ec=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QLLto0ExR2ZYMGqlyaMZc/hXFFTlwmgtKbiVq/xJIeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yBJNviU1nchbGbhx6InXCVRXa90sEepz1EwbYuKXu2U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jpEf0vHxrPu9gTJutNXSi2g/2Mc4WXFEN7yHonZEb7A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "E09kLFckMYwNuhggMxmPtwndyvIAx+Vl+b2CV6FP75s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "N+ue6/cLPb5NssmJCCeo18LlbKPz6r2z20AsnTKRvOo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yVQNZP8hhsvNGyDph2QP2qTNdXZTiIEVineKg+Qf33o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cSC9uI+9c5S8X+0G7amVyug1p0ZlgBsbEDYYyezBevQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1NpZGjoQzuQtekj80Rifxe9HbE08W07dfwxaFHaVn84=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "5Ghuq/8l11Ug9Uf/RTwf9On3OxOwIXUcb9soiy4J7/w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0LWKaEty6ywxLFhDaAqulqfMnYc+tgPfH4apyEeKg80=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OwSthmCBtt6NIAoAh7aCbj82Yr/+9t8U7WuBQhFT3AQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "iYiyg6/1isqbMdvFPIGucu3cNM4NAZNtJhHpGZ4eM+c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "waBgs8jWuGJPIF5zCRh6OmIyfK5GCBQgTMfmKSR2wyY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1Jdtbe2BKJXPU2G9ywOrlODZ/cNYEQlKzAW3aMe1Hy4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xaLEnNUS/2ySerBpb9dN/D31t+wYcKekwTfkwtni0Mc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bIVBrOhOvr6cL55Tr24+B+CC9MiG7U6K54aAr2IXXuw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6Cdq5wroGu2TEFnekuT7LhOpd/K/+PcipIljcHU9QL4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "K5l64vI4S/pLviLW6Pl0U3iQkI3ge0xg4RAHcEsyKJo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bzhuvZ0Ls22yIOX+Hz51eAHlSuDbWR/e0u4EhfdpHbc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Qv+fr6uD4o0bZRp69QJCFL6zvn3G82c7L+N1IFzj7H0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XAmISMbD3aEyQT+BQEphCKFNa0F0GDKFuhM9cGceKoQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4VLCokntMfm1AogpUnYGvhV7nllWSo3mS3hVESMy+hA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xiXNLj/CipEH63Vb5cidi8q9X47EF4f3HtJSOH7mfM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4XlCYfYBjI9XA5zOSgTiEBYcZsdwyXL+f5XtH2xUIOc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "k6DfQy7ZYJIkEly2B5hjOZznL4NcgMkllZjJLb7yq7w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZzM6gwWesa3lxbZVZthpPFs2s3GV0RZREE2zOMhBRBo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "US+jeMeeOd7J0wR0efJtq2/18lcO8YFvhT4O3DeaonQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b6iSxiI1FM9SzxuG1bHqGA1i4+3GOi0/SPW00XB4L7o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kn3LsxAVkzIZKK9I6fi0Cctr0yjXOYgaQWMCoj4hLpM=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Update.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Update.yml deleted file mode 100644 index 8a340ee6e7..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Double-Update.yml +++ /dev/null @@ -1,912 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDoubleNoPrecision', 'bsonType': 'double', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Double. Update." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDoubleNoPrecision: { $numberDouble: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDoubleNoPrecision: { $numberDouble: "1" } } - - name: updateOne - arguments: - filter: { encryptedDoubleNoPrecision: { $gt: { $numberDouble: "0" } } } - update: { "$set": { "encryptedDoubleNoPrecision": { $numberDouble: "2" } }} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDoubleNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDoubleNoPrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command_name: update - command: - "update": "default" - "ordered": true - "updates": [ - { - "q": { - "encryptedDoubleNoPrecision": { - "$gt": { - "$binary": { - "base64": "DbMkAAADcGF5bG9hZABXJAAABGcAQyQAAAMwAH0AAAAFZAAgAAAAAHgYoMGjEE6fAlAhICv0+doHcVX8CmMVxyq7+jlyGrvmBXMAIAAAAAC/5MQZgTHuIr/O5Z3mXPvqrom5JTQ8IeSpQGhO9sB+8gVsACAAAAAAuPSXVmJUAUpTQg/A9Bu1hYczZF58KEhVofakygbsvJQAAzEAfQAAAAVkACAAAAAA2kiWNvEc4zunJ1jzvuClFC9hjZMYruKCqAaxq+oY8EAFcwAgAAAAACofIS72Cm6s866UCk+evTH3CvKBj/uZd72sAL608rzTBWwAIAAAAADuCQ/M2xLeALF0UFZtJb22QGOhHmJv6xoO+kZIHcDeiAADMgB9AAAABWQAIAAAAABkfoBGmU3hjYBvQbjNW19kfXneBQsQQPRfUL3UAwI2cAVzACAAAAAAUpK2BUOqX/DGdX5YJniEZMWkofxHqeAbXceEGJxhp8AFbAAgAAAAAKUaLzIldNIZv6RHE+FwbMjzcNHqPESwF/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UiNOdG6hdpjzFx9GBn08ZkBEAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAABbW4A////////7/8BbXgA////////738A", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedDoubleNoPrecision": { $$type: "binData" } - } - } - } - ] - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - "$db": "default" - - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDoubleNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "6YrBn2ofIw1b5ooakrLOwF41BWrps8OO0H9WH4/rtlE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "n+XAuFnP8Dov9TnhGFxNx0K/MnVM9WbJ7RouEu0ndO0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yRXojuVdn5GQtD97qYlaCL6cOLmZ7Cvcb3wFjkLUIdM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DuIkdRPITRs55I4SZmgomAHCIsDQmXRhW8+MOznkzSk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SsBk+Et1lTbU+QRPx+xyJ/jMkmfG+QCvQEpip2YYrzA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "crCIzOd8KhHvvUlX7M1v9bhvU4pLdTc+X2SuqoKU5Ek=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "YOWdCw4UrqnxkAaVjqmC4sKQDMVMHEpFGnlxpxdaU6E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "M3SShp81Ff8tQ632qKbv9MUcN6wjDaBReI0VXNu6Xh4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gzHlSPxpM0hT75kQvWFzGlOxKvDoiKQZOr19V6l2zXI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "s3JnppOGYw9SL2Q1kMAZs948v2F5PrpXjGei/HioDWs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cG6+3Gk/zEH68P/uuuwiAUVCuyJwa1LeV+t29FlPPAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dupdvR3AyJtM+g9NDKiaLVOtGca387JQp8w+V03m7Ig=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JqEQc5svj2jTvZ6LLA5ivE+kTb/0aRemSEmxk4G7Zrg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "szcXXXKnob+p3SoM4yED2R920LeJ7cVsclPMFTe4CeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "o1QoGVXmuBdHwHm7aCtGMlMVKrjFdYvJXpoq6uhIAZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Jfm5wPlqqLCJRGQIqRq2NGmpn7s0Vrih2H3YAOoI2YU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zMHLb8ARbsYo8Ld05bqnGFf1Usha6EGb8QKwdSAyps0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yQdtq9lh5pugL7/i0Bj/PuZUUBUIzf+7wj1rl5y736w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wGWVZdO7qIuyDg/BqDgqjgoQ02h5YYgwXQB1oCin2NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "by9HMLj6NTEpgztZ5HSN6GxImkXPcaFINYDzgZY33X8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tWo0vbasi7bXmn/MsOx13VC1IsWtpx/nYp0uj4iMzdA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tQQpndUYd5O87lOtrGjH3wl9VsOK0ray7RMasL90sBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cQjXEDCMsOpKLLf+vlTgIHA+cbSJdzqhbSX9Wvh95aA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7yMpU48IxK9SzP2cx3VnTownGEwFmeFofuuFT97SuuY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kSOx1kz0CmBgzKQHZlo65ZUY1DIv9A99JRm+Us2y6Ew=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ubQpdPBe6/xvtr+AcXdfYLSvYCR4ot0tivehkCsupb4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xal+iCJ6FTefRQToyoNksc9NCZShyn04NDGi4IYrcoM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d7jU4iOK50xHxlkSifcxlZFCM46TSgQzoYivxG3HNLY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tJvl2nsBLBVzL3pp6sKWCL4UXeh3q/roYBJjSb74ve0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OIUCaKRvIx9t1w6Hxlz1IcQTdPNCfdRNwnnTm10W+X0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A9tvzsiElotOUVIB4CqfQp9mAwqvTM35YkmAR170aHA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lI8gpK7hpb7c9x4RQugsxMnQay5LZJmwslZdvMx/dcE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dNCzh40U0XvdKnSDi3HRQOWQftEsDVqc4uUvsVFGoq8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "IP+iwEBWBwVVZIdpaMu8k5+soFCz+TZkYn3drKZ9grE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pnqyh6e0y5svHkJDShlN9CHV0WvMBE4QbtJpQw5ZCXc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "elEl42tbVDoRTLjAhZUFEtXiut4b3PVhg/1ZLZSQdtE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vHuu2FxwclMHqyE6JBYbTYgbEkB0dqb/JuaxsvfwsmY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xTf7NCe3Gf8QpE78HR5OknlLTKfs9J+RN9UZpH6fnso=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XiWSasRnJAulGR6+LCVD3mwRObXylqYWR9jvpywq12c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MZMxEQ5ikx0PG1YFIExv0UnTZogsvgeOEZTpzvBDn4w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yZMyMZBDrWbAhvnic7vvIYhmO9m5H2iuv0c8KNZrBzY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xxM14hTPY5j0vvcK2C7YAEjzdsfUTFHozHC0hEo1bxI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+01rqR1xVwkpGXcstbk1ItJqFVjH6Q8MGxEN3Cm9Y1A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xOpLV0Z2VTRJ3iWtnWZcsyjXubTIkYWo31cO+HV1o1k=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BWUOLqgLBqc5NwxVlSV5H3KFQPXbCp7mdo+jF+8cJqY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "fuQb1S6xZDGlrEbK+kI23aL53PP1PVNwqICnZNt9Yzg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfscnoibFttahLdPVC4Ee+47ewGFKpDSU7M6HX19bKE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rpSW2awybNVeKtat91VFxqbINoTfNhPfQAu+d73Xtf8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "9M/CP9ccOIIj2LLFmE0GFDO0Ban2wsNalEXfM6+h+1s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WrEMG49l1ye4MhXs5ZS9tz8P6h+hDvthIg/2wW9ne1Q=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ImNhbfeyfH8qIEeA5ic0s3dAQBdzzTBS+CPsNih9vZ0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dWP33YDSn04UKJN2ogh2Rui0iW/0q2y18OCDRVcfyoo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "lYv0isAtfGh6H9tdp3cp2eHU7q2J+uk7QrgcxtK3w7Y=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "VGMoamB/+7zTOYcY/pqJc96xlv2PdW4hwsIAEIslTDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yNeBWMF7BnD9wVwz2PgJsvWr77QiVvvWUvJF0+fqBug=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SfpvObJ+tJBXSvqeN7vlOfmhYign635lciYAJIjUtY8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dsen4NqjzVGjpjufiTMs3+gqeD09EbnuogPgxrJECwg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "pxCWVM3sn19NsFEpgHbgLa+PmYlhN3mMiP0Wk8kJhYw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q11KNvJszjYIB9n9HcC+N4uz11a3eRj1L3BH9scKMDQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "A1PmkgcEToWh1JiVWE6mI5jUu7poxWWuCUt/cgRUUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "qJo3Hu4PJeanL7XEaWXO/n3YsodhZyd+MJOOmB9Kpd8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "BkBKLO8URFscfRY9Bav/1+L9mLohDgNr/MkZtGiraIs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "rZq5WA3Hx3xthOyHAJXK//f8pE2qbz7YKu3TIMp9GFY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X07a/Lm80p5xd4RFs1dNmw+90tmPDPdGiAKVZkxd4zY=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDoubleNoPrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "HI88j1zrIsFoijIXKybr9mYubNV5uVeODyLHFH4Ueco=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wXVD/HSbBljko0jJcaxJ1nrzs2+pchLQqYR3vywS8SU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "KhscCh+tt/pp8lxtKZQSPPUU94RvJYPKG/sjtzIa4Ws=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RISnuNrTTVNW5HnwCgQJ301pFw8DOcYrAMQIwVwjOkI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Ra5zukLh2boua0Bh74qA+mtIoixGXlsNsxiJqHtqdTI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "eqr0v+NNWXWszi9ni8qH58Q6gw5x737tJvH3lPaNHO4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "d42QupriWIwGrFAquXNFi0ehEuidIbHLFZtg1Sm2nN8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "2azRVxaaTIJKcgY2FU012gcyP8Y05cRDpfUaMnCBaQU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "3nlgkM4K/AAcHesRYYdEu24UGetHodVnVfHzw4yxZBM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "hqy91FNmAAac2zUaPO6eWFkx0/37rOWGrwXN+fzL0tU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "akX+fmscSDSF9pB5MPj56iaJPtohr0hfXNk/OPWsGv8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1ZvUb10Q7cN4cNLktd5yNjqgtawsYnkbeVBZV6WuY/I=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "otCwtuKiY4hCyXvYzXvo10OcnzZppebo38KsAlq49QM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Mty8EscckeT/dhMfrPFyDbLnmMOcYRUQ3mLK4KTu6V8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "tnvgLLkJINO7csREYu4dEVe1ICrBeu7OP+HdfoX3M2E=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kOefsHgEVhkJ17UuP7Dxogy6sAQbzf1SFPKCj6XRlrQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F+JQ79xavpaHdJzdhvwyHbzdZJLNHAymc/+67La3gao=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "NCZ9zp5rDRceENuSgAfTLEyKg0YgmXAhK0B8WSj7+Pw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wL1CJ7cYR5slx8mHq++uMdjDfkt9037lQTUztEMF56M=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "txefkzTMITZE+XvvRFZ7QcgwDT/7m8jNmxRk4QBaoZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jFunW3v1tSYMyZtQQD28eEy9qqDp4Kqo7gMN29N4bfQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QMO915KUiS3X3R1bU1YoafVM2s0NeHo3EjgTA9PnGwY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "nwdKJEXdilzvb7494vbuDJ+y6SrfJahza1dYIsHIWVI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vpWMX+T/VXXajFo0UbuYjtp0AEzBU0Y+lP+ih2EQ7mg=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1lmzG0J1DhKDRhhq5y5Buygu4G8eV2X0t7kUY90EohM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SiKqpXqO0trwhFvBWK274hMklpCgMhNs/JY84yyn/NE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7cPGPYCKPTay+ZR9Gx6oOueduOgaFrSuAXmNDpDHXdI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4THEYvAkjs2Fh7FIe5LC45P4i4N0L7ob67UOVbhp6Nk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "B+UGsChLLZR7iqnt8yq91OgmTgwiUKTJhFxY4NT0O6c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X1uYwBCsCg1H+PnKdwtBqXlt0zKEURi8bOM940GcPfk=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xYOgT5l7shlNXCwHlguovmDkcEnF8dXyYlTyYrgZ8GE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "vFMTZqV8bh1+gcKzTkXweMddJlgdUnwX0DWzUUaMok4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4HI0y9FrtleZxZ7M6INdNhLelrQ2Rv/+ykWCBl+tMC8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jpJ0bBE474OUkn1vUiLWumIBtYmwc7J5+LQU/nyeLQc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jQTPeXZvdxY/DjtPfYfKUArIDsf0E9MVFy2O26sv1ec=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "QLLto0ExR2ZYMGqlyaMZc/hXFFTlwmgtKbiVq/xJIeI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yBJNviU1nchbGbhx6InXCVRXa90sEepz1EwbYuKXu2U=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jpEf0vHxrPu9gTJutNXSi2g/2Mc4WXFEN7yHonZEb7A=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "E09kLFckMYwNuhggMxmPtwndyvIAx+Vl+b2CV6FP75s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "N+ue6/cLPb5NssmJCCeo18LlbKPz6r2z20AsnTKRvOo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "yVQNZP8hhsvNGyDph2QP2qTNdXZTiIEVineKg+Qf33o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cSC9uI+9c5S8X+0G7amVyug1p0ZlgBsbEDYYyezBevQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1NpZGjoQzuQtekj80Rifxe9HbE08W07dfwxaFHaVn84=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "5Ghuq/8l11Ug9Uf/RTwf9On3OxOwIXUcb9soiy4J7/w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0LWKaEty6ywxLFhDaAqulqfMnYc+tgPfH4apyEeKg80=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "OwSthmCBtt6NIAoAh7aCbj82Yr/+9t8U7WuBQhFT3AQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "iYiyg6/1isqbMdvFPIGucu3cNM4NAZNtJhHpGZ4eM+c=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "waBgs8jWuGJPIF5zCRh6OmIyfK5GCBQgTMfmKSR2wyY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "1Jdtbe2BKJXPU2G9ywOrlODZ/cNYEQlKzAW3aMe1Hy4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xaLEnNUS/2ySerBpb9dN/D31t+wYcKekwTfkwtni0Mc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bIVBrOhOvr6cL55Tr24+B+CC9MiG7U6K54aAr2IXXuw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6Cdq5wroGu2TEFnekuT7LhOpd/K/+PcipIljcHU9QL4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "K5l64vI4S/pLviLW6Pl0U3iQkI3ge0xg4RAHcEsyKJo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "bzhuvZ0Ls22yIOX+Hz51eAHlSuDbWR/e0u4EhfdpHbc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Qv+fr6uD4o0bZRp69QJCFL6zvn3G82c7L+N1IFzj7H0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "XAmISMbD3aEyQT+BQEphCKFNa0F0GDKFuhM9cGceKoQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4VLCokntMfm1AogpUnYGvhV7nllWSo3mS3hVESMy+hA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "xiXNLj/CipEH63Vb5cidi8q9X47EF4f3HtJSOH7mfM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "4XlCYfYBjI9XA5zOSgTiEBYcZsdwyXL+f5XtH2xUIOc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "k6DfQy7ZYJIkEly2B5hjOZznL4NcgMkllZjJLb7yq7w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ZzM6gwWesa3lxbZVZthpPFs2s3GV0RZREE2zOMhBRBo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "US+jeMeeOd7J0wR0efJtq2/18lcO8YFvhT4O3DeaonQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b6iSxiI1FM9SzxuG1bHqGA1i4+3GOi0/SPW00XB4L7o=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kn3LsxAVkzIZKK9I6fi0Cctr0yjXOYgaQWMCoj4hLpM=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Aggregate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Aggregate.json deleted file mode 100644 index e8a50ebeca..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Aggregate.json +++ /dev/null @@ -1,580 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range DoublePrecision. Aggregate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$gt": { - "$numberDouble": "0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDoublePrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "default", - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$gt": { - "$binary": { - "base64": "DQYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAA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YXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAAAFtbgAAAAAAAAAAAAFteAAAAAAAAABpQAA=", - "subType": "06" - } - } - } - } - } - ], - "cursor": {}, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "aggregate" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDoublePrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "mVZb+Ra0EYjQ4Zrh9X//E2T8MRj7NMqm5GUJXhRrBEI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MgwakFvPyBlwqFTbhWUF79URJQWFoJTGotlEVSPPUsQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DyBERpMSD5lEM5Nhpcn4WGgxgn/mkUVJp+PYSLX5jsE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I43iazc0xj1WVbYB/V+uTL/tughN1bBlxh1iypBnNsA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wjOBa/ATMuOywFmuPgC0GF/oeLqu0Z7eK5udzkTPbis=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gRQVwiR+m+0Vg8ZDXqrQQcVnTyobwCXNaA4BCJVXtMc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WUZ6huwx0ZbLb0R00uiC9FOJzsUocUN8qE5+YRenkvQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7s79aKEuPgQcS/YPOOVcYNZvHIo7FFsWtFCrnDKXefA=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Aggregate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Aggregate.yml deleted file mode 100644 index 87475991a4..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Aggregate.yml +++ /dev/null @@ -1,313 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDoublePrecision', 'bsonType': 'double', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberDouble': '0.0'}, 'max': {'$numberDouble': '200.0'}, 'precision': {'$numberInt': '2'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range DoublePrecision. Aggregate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDoublePrecision: { $numberDouble: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDoublePrecision: { $numberDouble: "1" } } - - name: aggregate - arguments: - pipeline: [{ $match: { "encryptedDoublePrecision": { $gt: {$numberDouble: "0" }} } }] - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDoublePrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDoublePrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - aggregate: *collection_name - pipeline: [ - { - "$match": { - "encryptedDoublePrecision": { - "$gt": { - "$binary": { - "base64": "DQYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58Ea+1HLJOWxN5lNcrWEFcwAgAAAAAEBo5AWZyC41b9ayjWNQSL4iYEAIwR/JG+ssN8bdoK9RBWwAIAAAAACEndE0SLxFSElOrNnqeX0E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QeLlbC9i0sVgE8+RH6y+e94OJQ0tJ0PvblVSgVsACAAAAAAWp4jvretbDEsqEMzP/WLTnwOiJwCtfrCiB6m8k+yEMoAAzE1AH0AAAAFZAAgAAAAAAZZ538coNPwyRjhEwr5P8Xw32oWOJF+R+nfCGgy2qO3BXMAIAAAAACOPLnJlKwGNPDBReRKnHfteq0wFb3ezhrc7BVXs8RUHwVsACAAAAAA+lGesNk3+SyB/60rSvdQ2aN2vfJPR7llJVhufGTNhHkAAzE2AH0AAAAFZAAgAAAAAFH9l9GGA1I52atJV5jNUf1lx8jBjoEoVoME97v5GFJiBXMAIAAAAAC1qH3Kd78Dr9NGbw7y9D/XYBwv5h1LLO8la5OU7g8UkQVsACAAAAAArZ6atJCYrVfHB8dSNPOFf6nnDADBMJcIEj8ljPvxHp8AAzE3AH0AAAAFZAAgAAAAADtbVEI2tdkrowEMdkacD2w0Y3T3Ofi7PH6HmA6sP0c/BXMAIAAAAADuBSROnZHA+NgUPH8d0LnWFiDsM2bY8bzjC1+elSsIygVsACAAAAAAR0G2m+uANoWknkr/NerFcG+fECVxNIs0cqbY1t/U/0MAAzE4AH0AAAAFZAAgAAAAAAh3WpeMVlikPFYj9hLj+fmIqVt6omCSF75W3TPExyWpBXMAIAAAAAAsQkRmwqeVj2gGE03orb6PtrIzDt6dDU3hgSQi8E2wKgVsACAAAAAA3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAAAFtbgAAAAAAAAAAAAFteAAAAAAAAABpQAA=", - "subType": "06" - } - } - } - } - } - ] - cursor: {} - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: aggregate - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDoublePrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDoublePrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "mVZb+Ra0EYjQ4Zrh9X//E2T8MRj7NMqm5GUJXhRrBEI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MgwakFvPyBlwqFTbhWUF79URJQWFoJTGotlEVSPPUsQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DyBERpMSD5lEM5Nhpcn4WGgxgn/mkUVJp+PYSLX5jsE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I43iazc0xj1WVbYB/V+uTL/tughN1bBlxh1iypBnNsA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wjOBa/ATMuOywFmuPgC0GF/oeLqu0Z7eK5udzkTPbis=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gRQVwiR+m+0Vg8ZDXqrQQcVnTyobwCXNaA4BCJVXtMc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WUZ6huwx0ZbLb0R00uiC9FOJzsUocUN8qE5+YRenkvQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7s79aKEuPgQcS/YPOOVcYNZvHIo7FFsWtFCrnDKXefA=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Correctness.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Correctness.json deleted file mode 100644 index 87d0e3dd8c..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Correctness.json +++ /dev/null @@ -1,1650 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Find with $gt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$gt": { - "$numberDouble": "0.0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$gte": { - "$numberDouble": "0.0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - }, - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$gt": { - "$numberDouble": "1.0" - } - } - } - }, - "result": [] - } - ] - }, - { - "description": "Find with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$lt": { - "$numberDouble": "1.0" - } - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - ] - } - ] - }, - { - "description": "Find with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$lte": { - "$numberDouble": "1.0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - }, - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $lt below min", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$lt": { - "$numberDouble": "0.0" - } - } - } - }, - "result": { - "errorContains": "must be greater than the range minimum" - } - } - ] - }, - { - "description": "Find with $gt above max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$gt": { - "$numberDouble": "200.0" - } - } - } - }, - "result": { - "errorContains": "must be less than the range max" - } - } - ] - }, - { - "description": "Find with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$gt": { - "$numberDouble": "0.0" - }, - "$lt": { - "$numberDouble": "2.0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - ] - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with full range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$gte": { - "$numberDouble": "0.0" - }, - "$lte": { - "$numberDouble": "200.0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - }, - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Find with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$in": [ - { - "$numberDouble": "0.0" - } - ] - } - } - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - ] - } - ] - }, - { - "description": "Insert out of range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "-1" - } - } - }, - "result": { - "errorContains": "value must be greater than or equal to the minimum value" - } - } - ] - }, - { - "description": "Insert min and max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 200, - "encryptedDoublePrecision": { - "$numberDouble": "200.0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - }, - { - "_id": 200, - "encryptedDoublePrecision": { - "$numberDouble": "200.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$gte": { - "$numberDouble": "0.0" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - }, - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$gt": { - "$numberDouble": "1.0" - } - } - } - } - ] - }, - "result": [] - } - ] - }, - { - "description": "Aggregate with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$lt": { - "$numberDouble": "1.0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$lte": { - "$numberDouble": "1.0" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - }, - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $lt below min", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$lt": { - "$numberDouble": "0.0" - } - } - } - } - ] - }, - "result": { - "errorContains": "must be greater than the range minimum" - } - } - ] - }, - { - "description": "Aggregate with $gt above max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$gt": { - "$numberDouble": "200.0" - } - } - } - } - ] - }, - "result": { - "errorContains": "must be less than the range max" - } - } - ] - }, - { - "description": "Aggregate with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$gt": { - "$numberDouble": "0.0" - }, - "$lt": { - "$numberDouble": "2.0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - ] - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with full range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$gte": { - "$numberDouble": "0.0" - }, - "$lte": { - "$numberDouble": "200.0" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - }, - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1.0" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedDoublePrecision": { - "$in": [ - { - "$numberDouble": "0.0" - } - ] - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0.0" - } - } - ] - } - ] - }, - { - "description": "Wrong type: Insert Int", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberInt": "0" - } - } - }, - "result": { - "errorContains": "cannot encrypt element" - } - } - ] - }, - { - "description": "Wrong type: Find Int", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$gte": { - "$numberInt": "0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": { - "errorContains": "field type is not supported" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Correctness.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Correctness.yml deleted file mode 100644 index 9c7a8d22f2..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Correctness.yml +++ /dev/null @@ -1,424 +0,0 @@ -# Test correctness results. -# Does not include command monitoring expectations or outcome assertions to make tests more readable. - -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "8.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDoublePrecision', 'bsonType': 'double', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberDouble': '0.0'}, 'max': {'$numberDouble': '200.0'}, 'precision': {'$numberInt': '2'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Find with $gt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDoublePrecision: { $numberDouble: "0.0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDoublePrecision: { $numberDouble: "1.0" } } - - name: find - arguments: - filter: { encryptedDoublePrecision: { $gt: { $numberDouble: "0.0" } }} - result: [*doc1] - - - description: "Find with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoublePrecision: { $gte: { $numberDouble: "0.0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoublePrecision: { $gt: { $numberDouble: "1.0" } }} - result: [] - - - description: "Find with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoublePrecision: { $lt: { $numberDouble: "1.0" } }} - result: [*doc0] - - - description: "Find with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoublePrecision: { $lte: { $numberDouble: "1.0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $lt below min" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoublePrecision: { $lt: { $numberDouble: "0.0" } }} - result: - errorContains: must be greater than the range minimum - - - description: "Find with $gt above max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoublePrecision: { $gt: { $numberDouble: "200.0" } }} - result: - errorContains: must be less than the range max - - - description: "Find with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoublePrecision: { $gt: { $numberDouble: "0.0" }, $lt: { $numberDouble: "2.0"} }} - result: [*doc1] - - - description: "Find with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoublePrecision: { $numberDouble: "0.0" } } - result: [*doc0] - - name: find - arguments: - filter: { encryptedDoublePrecision: { $numberDouble: "1.0" } } - result: [*doc1] - - - description: "Find with full range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoublePrecision: { $gte: {$numberDouble: "0.0"}, $lte: {$numberDouble: "200.0"} } } - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedDoublePrecision: { $in: [ {$numberDouble: "0.0"} ] } } - result: [*doc0] - - - description: "Insert out of range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: { _id: 0, encryptedDoublePrecision: { $numberDouble: "-1" }} - result: - errorContains: value must be greater than or equal to the minimum value - - - description: "Insert min and max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: *doc0 - - name: insertOne - arguments: - document: &doc200 { _id: 200, encryptedDoublePrecision: { $numberDouble: "200.0" }} - - name: find - arguments: - filter: {} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc200] - - - description: "Aggregate with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoublePrecision: { $gte: { $numberDouble: "0.0" } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoublePrecision: { $gt: { $numberDouble: "1.0" } }} } - result: [] - - - description: "Aggregate with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoublePrecision: { $lt: { $numberDouble: "1.0" } }} } - result: [*doc0] - - - description: "Aggregate with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoublePrecision: { $lte: { $numberDouble: "1.0" } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $lt below min" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoublePrecision: { $lt: { $numberDouble: "0.0" } }} } - result: - errorContains: must be greater than the range minimum - - - description: "Aggregate with $gt above max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoublePrecision: { $gt: { $numberDouble: "200.0" } }} } - result: - errorContains: must be less than the range max - - - description: "Aggregate with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoublePrecision: { $gt: { $numberDouble: "0.0" }, $lt: { $numberDouble: "2.0"} }} } - result: [*doc1] - - - description: "Aggregate with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoublePrecision: { $numberDouble: "0.0" } } } - result: [*doc0] - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoublePrecision: { $numberDouble: "1.0" } } } - result: [*doc1] - - - description: "Aggregate with full range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoublePrecision: { $gte: {$numberDouble: "0.0"}, $lte: {$numberDouble: "200.0"} } } } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedDoublePrecision: { $in: [ {$numberDouble: "0.0"} ] } } } - result: [*doc0] - - - description: "Wrong type: Insert Int" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: { _id: 0, encryptedDoublePrecision: { $numberInt: "0" }} } - result: - # Expect an error from mongocryptd. - errorContains: "cannot encrypt element" - - - description: "Wrong type: Find Int" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: find - arguments: - filter: { encryptedDoublePrecision: { $gte: { $numberInt: "0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: - # expect an error from libmongocrypt. - errorContains: "field type is not supported" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Delete.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Delete.json deleted file mode 100644 index 8a0fecf786..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Delete.json +++ /dev/null @@ -1,474 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range DoublePrecision. Delete.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1" - } - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$gt": { - "$numberDouble": "0" - } - } - } - }, - "result": { - "deletedCount": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDoublePrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "delete": "default", - "deletes": [ - { - "q": { - "encryptedDoublePrecision": { - "$gt": { - "$binary": { - "base64": "DQYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58Ea+1HLJOWxN5lNcrWEFcwAgAAAAAEBo5AWZyC41b9ayjWNQSL4iYEAIwR/JG+ssN8bdoK9RBWwAIAAAAACEndE0SLxFSElOrNnqeX0EPmgDio3udZjVREy4JLS3sQADMgB9AAAABWQAIAAAAABbiLaoxAA6rinMJw1hC8ZUiq6UU1AQaPFn/py/Y06WuQVzACAAAAAAhtDasFkvYE7SCNu1je/hxdE9TJtAvvH3NtdEbKzNbCUFbAAgAAAAAIGepU1RSCF8sWODHEpKglsoqw3VBBH4a/URGxgGzbq2AAMzAH0AAAAFZAAgAAAAALORWwSr+tYNxcil2KIGSbNhTHvcPbdj+rLVQNx21S/KBXMAIAAAAAD6diZBkPEJ1cQy06LAxdbNK8Nlxbb44fH4Wk3Y3260nQVsACAAAAAA1eYAZBFHlDiaDAljWi8blGQ2nvvZa5AO5doeo0SFZsgAAzQAfQAAAAVkACAAAAAAG5XMK96PjClNlUvg82j4pMY1YxsznZfj4uNweD394FoFcwAgAAAAAKHgQLdGJHkrfFg9nB93Ac+3VgBw6aU44MTkKIQ91dZoBWwAIAAAAAAPxXmi+SDJ+40A0KdwfRczexlZQrHjIA+D3oUB0EY9tAADNQB9AAAABWQAIAAAAAA6M++b9I0YFemmWBAWAE3glu2Ah3Ta1FBxAQEIWS0toAVzACAAAAAANXYTqPf1Y6X3Ns6YQIX0C3FKCyWUo+Kk+fNcQvc0WSoFbAA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mIqVt6omCSF75W3TPExyWpBXMAIAAAAAAsQkRmwqeVj2gGE03orb6PtrIzDt6dDU3hgSQi8E2wKgVsACAAAAAA3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAAAFtbgAAAAAAAAAAAAFteAAAAAAAAABpQAA=", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "delete" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Delete.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Delete.yml deleted file mode 100644 index 09952c2f37..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Delete.yml +++ /dev/null @@ -1,218 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDoublePrecision', 'bsonType': 'double', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberDouble': '0.0'}, 'max': {'$numberDouble': '200.0'}, 'precision': {'$numberInt': '2'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range DoublePrecision. Delete." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDoublePrecision: { $numberDouble: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDoublePrecision: { $numberDouble: "1" } } - - name: deleteOne - arguments: - filter: { "encryptedDoublePrecision": { $gt: {$numberDouble: "0" }} } - result: - deletedCount: 1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDoublePrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDoublePrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - delete: *collection_name - deletes: [ - { - "q": { - "encryptedDoublePrecision": { - "$gt": { - "$binary": { - "base64": "DQYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58Ea+1HLJOWxN5lNcrWEFcwAgAAAAAEBo5A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AgAAAAAJaRYmo8zqI2BEUzdSwp4tVRpPmVWsfydkYN3UHh6TMuBXMAIAAAAAAeD6mDnQeLlbC9i0sVgE8+RH6y+e94OJQ0tJ0PvblVSgVsACAAAAAAWp4jvretbDEsqEMzP/WLTnwOiJwCtfrCiB6m8k+yEMoAAzE1AH0AAAAFZAAgAAAAAAZZ538coNPwyRjhEwr5P8Xw32oWOJF+R+nfCGgy2qO3BXMAIAAAAACOPLnJlKwGNPDBReRKnHfteq0wFb3ezhrc7BVXs8RUHwVsACAAAAAA+lGesNk3+SyB/60rSvdQ2aN2vfJPR7llJVhufGTNhHkAAzE2AH0AAAAFZAAgAAAAAFH9l9GGA1I52atJV5jNUf1lx8jBjoEoVoME97v5GFJiBXMAIAAAAAC1qH3Kd78Dr9NGbw7y9D/XYBwv5h1LLO8la5OU7g8UkQVsACAAAAAArZ6atJCYrVfHB8dSNPOFf6nnDADBMJcIEj8ljPvxHp8AAzE3AH0AAAAFZAAgAAAAADtbVEI2tdkrowEMdkacD2w0Y3T3Ofi7PH6HmA6sP0c/BXMAIAAAAADuBSROnZHA+NgUPH8d0LnWFiDsM2bY8bzjC1+elSsIygVsACAAAAAAR0G2m+uANoWknkr/NerFcG+fECVxNIs0cqbY1t/U/0MAAzE4AH0AAAAFZAAgAAAAAAh3WpeMVlikPFYj9hLj+fmIqVt6omCSF75W3TPExyWpBXMAIAAAAAAsQkRmwqeVj2gGE03orb6PtrIzDt6dDU3hgSQi8E2wKgVsACAAAAAA3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAAAFtbgAAAAAAAAAAAAFteAAAAAAAAABpQAA=", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ] - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: delete - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDoublePrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-FindOneAndUpdate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-FindOneAndUpdate.json deleted file mode 100644 index ac77931d61..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-FindOneAndUpdate.json +++ /dev/null @@ -1,584 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range DoublePrecision. FindOneAndUpdate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1" - } - } - } - }, - { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$gt": { - "$numberDouble": "0" - } - } - }, - "update": { - "$set": { - "encryptedDoublePrecision": { - "$numberDouble": "2" - } - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDoublePrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default", - "query": { - "encryptedDoublePrecision": { - "$gt": { - "$binary": { - "base64": "DQYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mK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=", - "subType": "06" - } - } - } - }, - "update": { - "$set": { - "encryptedDoublePrecision": { - "$$type": "binData" - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "findAndModify" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDoublePrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "V6knyt7Zq2CG3++l75UtBx2m32iGAPjHiAe439Bf02w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0OKSXELxPP85SBVwDGf3LtMEQCJ8TTkFUl/+6jlkdb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uEw0lpQtBppR3vqV9j9+NQRSBF1BzZukb8c9IhyWvxc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zVhZ7Q59O087ji49oMJvBIgeir2oqvUpnh4p53GcTow=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dowrzKs+qJhRMZyKDbhjXbuX43FbmUKOaw9I8YlOZDw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ep5B6cska6THLIF7Mn3tn3RvV9EiwLSt0eZM/CLRUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "URNp/YmmDh5wIZUfAzzgPyJeMNiVx9PMsz52DZRujGY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wlM4IAQhhKQEzoVqS8b1Ddd50GB95OFb9LnzOwyjCP4=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-FindOneAndUpdate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-FindOneAndUpdate.yml deleted file mode 100644 index e276b54e46..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-FindOneAndUpdate.yml +++ /dev/null @@ -1,311 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDoublePrecision', 'bsonType': 'double', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberDouble': '0.0'}, 'max': {'$numberDouble': '200.0'}, 'precision': {'$numberInt': '2'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range DoublePrecision. FindOneAndUpdate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDoublePrecision: { $numberDouble: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDoublePrecision: { $numberDouble: "1" } } - - name: findOneAndUpdate - arguments: - filter: { encryptedDoublePrecision: { $gt: {$numberDouble: "0"}} } - update: { "$set": { "encryptedDoublePrecision": {$numberDouble: "2"}}} - returnDocument: Before - result: *doc1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDoublePrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDoublePrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - findAndModify: *collection_name - query: { - "encryptedDoublePrecision": { - "$gt": { - "$binary": { - "base64": "DQYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58Ea+1HLJOWxN5lNcrWEFcwAgAAAAAEBo5AWZyC41b9ayjWNQSL4iYEAIwR/JG+ssN8bdoK9RBWwAIAAAAACEndE0SLxFSElOrNnqeX0EPmgDio3udZjVREy4JL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RH6y+e94OJQ0tJ0PvblVSgVsACAAAAAAWp4jvretbDEsqEMzP/WLTnwOiJwCtfrCiB6m8k+yEMoAAzE1AH0AAAAFZAAgAAAAAAZZ538coNPwyRjhEwr5P8Xw32oWOJF+R+nfCGgy2qO3BXMAIAAAAACOPLnJlKwGNPDBReRKnHfteq0wFb3ezhrc7BVXs8RUHwVsACAAAAAA+lGesNk3+SyB/60rSvdQ2aN2vfJPR7llJVhufGTNhHkAAzE2AH0AAAAFZAAgAAAAAFH9l9GGA1I52atJV5jNUf1lx8jBjoEoVoME97v5GFJiBXMAIAAAAAC1qH3Kd78Dr9NGbw7y9D/XYBwv5h1LLO8la5OU7g8UkQVsACAAAAAArZ6atJCYrVfHB8dSNPOFf6nnDADBMJcIEj8ljPvxHp8AAzE3AH0AAAAFZAAgAAAAADtbVEI2tdkrowEMdkacD2w0Y3T3Ofi7PH6HmA6sP0c/BXMAIAAAAADuBSROnZHA+NgUPH8d0LnWFiDsM2bY8bzjC1+elSsIygVsACAAAAAAR0G2m+uANoWknkr/NerFcG+fECVxNIs0cqbY1t/U/0MAAzE4AH0AAAAFZAAgAAAAAAh3WpeMVlikPFYj9hLj+fmIqVt6omCSF75W3TPExyWpBXMAIAAAAAAsQkRmwqeVj2gGE03orb6PtrIzDt6dDU3hgSQi8E2wKgVsACAAAAAA3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAAAFtbgAAAAAAAAAAAAFteAAAAAAAAABpQAA=", - "subType": "06" - } - } - } - } - update: { "$set": {"encryptedDoublePrecision": { $$type: "binData" }} } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: findAndModify - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDoublePrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDoublePrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "V6knyt7Zq2CG3++l75UtBx2m32iGAPjHiAe439Bf02w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0OKSXELxPP85SBVwDGf3LtMEQCJ8TTkFUl/+6jlkdb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uEw0lpQtBppR3vqV9j9+NQRSBF1BzZukb8c9IhyWvxc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zVhZ7Q59O087ji49oMJvBIgeir2oqvUpnh4p53GcTow=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dowrzKs+qJhRMZyKDbhjXbuX43FbmUKOaw9I8YlOZDw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ep5B6cska6THLIF7Mn3tn3RvV9EiwLSt0eZM/CLRUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "URNp/YmmDh5wIZUfAzzgPyJeMNiVx9PMsz52DZRujGY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wlM4IAQhhKQEzoVqS8b1Ddd50GB95OFb9LnzOwyjCP4=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-InsertFind.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-InsertFind.json deleted file mode 100644 index 5dcc09dca9..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-InsertFind.json +++ /dev/null @@ -1,571 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range DoublePrecision. Insert and Find.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$gt": { - "$numberDouble": "0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDoublePrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "encryptedDoublePrecision": { - "$gt": { - "$binary": { - "base64": "DQYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58Ea+1HLJO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8MX20J/i9n0AAzE0AH0AAAAFZAAgAAAAAJaRYmo8zqI2BEUzdSwp4tVRpPmVWsfydkYN3UHh6TMuBXMAIAAAAAAeD6mDnQeLlbC9i0sVgE8+RH6y+e94OJQ0tJ0PvblVSgVsACAAAAAAWp4jvretbDEsqEMzP/WLTnwOiJwCtfrCiB6m8k+yEMoAAzE1AH0AAAAFZAAgAAAAAAZZ538coNPwyRjhEwr5P8Xw32oWOJF+R+nfCGgy2qO3BXMAIAAAAACOPLnJlKwGNPDBReRKnHfteq0wFb3ezhrc7BVXs8RUHwVsACAAAAAA+lGesNk3+SyB/60rSvdQ2aN2vfJPR7llJVhufGTNhHkAAzE2AH0AAAAFZAAgAAAAAFH9l9GGA1I52atJV5jNUf1lx8jBjoEoVoME97v5GFJiBXMAIAAAAAC1qH3Kd78Dr9NGbw7y9D/XYBwv5h1LLO8la5OU7g8UkQVsACAAAAAArZ6atJCYrVfHB8dSNPOFf6nnDADBMJcIEj8ljPvxHp8AAzE3AH0AAAAFZAAgAAAAADtbVEI2tdkrowEMdkacD2w0Y3T3Ofi7PH6HmA6sP0c/BXMAIAAAAADuBSROnZHA+NgUPH8d0LnWFiDsM2bY8bzjC1+elSsIygVsACAAAAAAR0G2m+uANoWknkr/NerFcG+fECVxNIs0cqbY1t/U/0MAAzE4AH0AAAAFZAAgAAAAAAh3WpeMVlikPFYj9hLj+fmIqVt6omCSF75W3TPExyWpBXMAIAAAAAAsQkRmwqeVj2gGE03orb6PtrIzDt6dDU3hgSQi8E2wKgVsACAAAAAA3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAAAFtbgAAAAAAAAAAAAFteAAAAAAAAABpQAA=", - "subType": "06" - } - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDoublePrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "mVZb+Ra0EYjQ4Zrh9X//E2T8MRj7NMqm5GUJXhRrBEI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MgwakFvPyBlwqFTbhWUF79URJQWFoJTGotlEVSPPUsQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DyBERpMSD5lEM5Nhpcn4WGgxgn/mkUVJp+PYSLX5jsE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I43iazc0xj1WVbYB/V+uTL/tughN1bBlxh1iypBnNsA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wjOBa/ATMuOywFmuPgC0GF/oeLqu0Z7eK5udzkTPbis=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gRQVwiR+m+0Vg8ZDXqrQQcVnTyobwCXNaA4BCJVXtMc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WUZ6huwx0ZbLb0R00uiC9FOJzsUocUN8qE5+YRenkvQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7s79aKEuPgQcS/YPOOVcYNZvHIo7FFsWtFCrnDKXefA=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-InsertFind.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-InsertFind.yml deleted file mode 100644 index ed5225a65d..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-InsertFind.yml +++ /dev/null @@ -1,307 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDoublePrecision', 'bsonType': 'double', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberDouble': '0.0'}, 'max': {'$numberDouble': '200.0'}, 'precision': {'$numberInt': '2'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range DoublePrecision. Insert and Find." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDoublePrecision: { $numberDouble: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDoublePrecision: { $numberDouble: "1" } } - - name: find - arguments: - filter: { encryptedDoublePrecision: { $gt: { $numberDouble: "0" } } } - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDoublePrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDoublePrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: - "encryptedDoublePrecision": { - "$gt": { - "$binary": { - "base64": "DQYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58Ea+1HLJOWxN5lNcrWEFcwAgAAAAAEBo5AWZyC41b9ayjWNQSL4iYEAIwR/JG+ssN8bdoK9RBWwAIAAAAACEndE0SLxFSElOrNnqeX0EPmgDio3udZjVREy4JLS3sQADMgB9AAAABWQAIAAAAABbiLaoxAA6rinMJw1hC8ZUiq6UU1AQaPFn/py/Y06WuQVzACAAAAAAhtDasFkvYE7SCNu1je/hxdE9TJtAvvH3NtdEbKzNbCUFbAAgAAAAAIGepU1RSCF8sWODHEpKglsoqw3VBBH4a/URGxgGzbq2AAMzAH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b3ezhrc7BVXs8RUHwVsACAAAAAA+lGesNk3+SyB/60rSvdQ2aN2vfJPR7llJVhufGTNhHkAAzE2AH0AAAAFZAAgAAAAAFH9l9GGA1I52atJV5jNUf1lx8jBjoEoVoME97v5GFJiBXMAIAAAAAC1qH3Kd78Dr9NGbw7y9D/XYBwv5h1LLO8la5OU7g8UkQVsACAAAAAArZ6atJCYrVfHB8dSNPOFf6nnDADBMJcIEj8ljPvxHp8AAzE3AH0AAAAFZAAgAAAAADtbVEI2tdkrowEMdkacD2w0Y3T3Ofi7PH6HmA6sP0c/BXMAIAAAAADuBSROnZHA+NgUPH8d0LnWFiDsM2bY8bzjC1+elSsIygVsACAAAAAAR0G2m+uANoWknkr/NerFcG+fECVxNIs0cqbY1t/U/0MAAzE4AH0AAAAFZAAgAAAAAAh3WpeMVlikPFYj9hLj+fmIqVt6omCSF75W3TPExyWpBXMAIAAAAAAsQkRmwqeVj2gGE03orb6PtrIzDt6dDU3hgSQi8E2wKgVsACAAAAAA3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAAAFtbgAAAAAAAAAAAAFteAAAAAAAAABpQAA=", - "subType": "06" - } - } - } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDoublePrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDoublePrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "mVZb+Ra0EYjQ4Zrh9X//E2T8MRj7NMqm5GUJXhRrBEI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "MgwakFvPyBlwqFTbhWUF79URJQWFoJTGotlEVSPPUsQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "DyBERpMSD5lEM5Nhpcn4WGgxgn/mkUVJp+PYSLX5jsE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "I43iazc0xj1WVbYB/V+uTL/tughN1bBlxh1iypBnNsA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wjOBa/ATMuOywFmuPgC0GF/oeLqu0Z7eK5udzkTPbis=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "gRQVwiR+m+0Vg8ZDXqrQQcVnTyobwCXNaA4BCJVXtMc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "WUZ6huwx0ZbLb0R00uiC9FOJzsUocUN8qE5+YRenkvQ=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "7s79aKEuPgQcS/YPOOVcYNZvHIo7FFsWtFCrnDKXefA=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Update.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Update.json deleted file mode 100644 index 483e3d52e6..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Update.json +++ /dev/null @@ -1,588 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range DoublePrecision. Update.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedDoublePrecision": { - "$numberDouble": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedDoublePrecision": { - "$numberDouble": "1" - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "encryptedDoublePrecision": { - "$gt": { - "$numberDouble": "0" - } - } - }, - "update": { - "$set": { - "encryptedDoublePrecision": { - "$numberDouble": "2" - } - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedDoublePrecision": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command_name": "update", - "command": { - "update": "default", - "ordered": true, - "updates": [ - { - "q": { - "encryptedDoublePrecision": { - "$gt": { - "$binary": { - "base64": "DQYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58Ea+1HLJOWxN5lNcrWEFcwAgAAAAAEBo5AWZyC41b9ayjWNQSL4iYEAIwR/JG+ssN8bdoK9RBWwAIAAAAACEndE0SLxFSElOrNnqeX0EPmgDio3udZjVREy4JLS3sQADMgB9AAAABWQAIAAAAABbiLaoxAA6rinMJw1hC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EsqEMzP/WLTnwOiJwCtfrCiB6m8k+yEMoAAzE1AH0AAAAFZAAgAAAAAAZZ538coNPwyRjhEwr5P8Xw32oWOJF+R+nfCGgy2qO3BXMAIAAAAACOPLnJlKwGNPDBReRKnHfteq0wFb3ezhrc7BVXs8RUHwVsACAAAAAA+lGesNk3+SyB/60rSvdQ2aN2vfJPR7llJVhufGTNhHkAAzE2AH0AAAAFZAAgAAAAAFH9l9GGA1I52atJV5jNUf1lx8jBjoEoVoME97v5GFJiBXMAIAAAAAC1qH3Kd78Dr9NGbw7y9D/XYBwv5h1LLO8la5OU7g8UkQVsACAAAAAArZ6atJCYrVfHB8dSNPOFf6nnDADBMJcIEj8ljPvxHp8AAzE3AH0AAAAFZAAgAAAAADtbVEI2tdkrowEMdkacD2w0Y3T3Ofi7PH6HmA6sP0c/BXMAIAAAAADuBSROnZHA+NgUPH8d0LnWFiDsM2bY8bzjC1+elSsIygVsACAAAAAAR0G2m+uANoWknkr/NerFcG+fECVxNIs0cqbY1t/U/0MAAzE4AH0AAAAFZAAgAAAAAAh3WpeMVlikPFYj9hLj+fmIqVt6omCSF75W3TPExyWpBXMAIAAAAAAsQkRmwqeVj2gGE03orb6PtrIzDt6dDU3hgSQi8E2wKgVsACAAAAAA3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAAAFtbgAAAAAAAAAAAAFteAAAAAAAAABpQAA=", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedDoublePrecision": { - "$$type": "binData" - } - } - } - } - ], - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedDoublePrecision", - "bsonType": "double", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberDouble": "0.0" - }, - "max": { - "$numberDouble": "200.0" - }, - "precision": { - "$numberInt": "2" - } - } - } - ] - } - } - }, - "$db": "default" - } - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedDoublePrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedDoublePrecision": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "V6knyt7Zq2CG3++l75UtBx2m32iGAPjHiAe439Bf02w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0OKSXELxPP85SBVwDGf3LtMEQCJ8TTkFUl/+6jlkdb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uEw0lpQtBppR3vqV9j9+NQRSBF1BzZukb8c9IhyWvxc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zVhZ7Q59O087ji49oMJvBIgeir2oqvUpnh4p53GcTow=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dowrzKs+qJhRMZyKDbhjXbuX43FbmUKOaw9I8YlOZDw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ep5B6cska6THLIF7Mn3tn3RvV9EiwLSt0eZM/CLRUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "URNp/YmmDh5wIZUfAzzgPyJeMNiVx9PMsz52DZRujGY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wlM4IAQhhKQEzoVqS8b1Ddd50GB95OFb9LnzOwyjCP4=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Update.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Update.yml deleted file mode 100644 index 7ed6f16bf7..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-DoublePrecision-Update.yml +++ /dev/null @@ -1,326 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDoublePrecision', 'bsonType': 'double', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberDouble': '0.0'}, 'max': {'$numberDouble': '200.0'}, 'precision': {'$numberInt': '2'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range DoublePrecision. Update." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedDoublePrecision: { $numberDouble: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedDoublePrecision: { $numberDouble: "1" } } - - name: updateOne - arguments: - filter: { encryptedDoublePrecision: { $gt: { $numberDouble: "0" } } } - update: { "$set": { "encryptedDoublePrecision": { $numberDouble: "2" } }} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedDoublePrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedDoublePrecision": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command_name: update - command: - - "update": "default" - "ordered": true - "updates": [ - { - "q": { - "encryptedDoublePrecision": { - "$gt": { - "$binary": { - "base64": "DQYKAAADcGF5bG9hZACiCQAABGcAjgkAAAMwAH0AAAAFZAAgAAAAAHdJ2Vnb4MMzqVYVssjSdDy8XU4GVzMTfGifGETgQ2mYBXMAIAAAAAD7cFfKJGIXo6PjyeX2ria02CckW7dWFDoY/3FyBdm1NQVsACAAAAAAhEPSNv4M023A3hzNFuy83+hIKuZ2mKRY954N++aEOBUAAzEAfQAAAAVkACAAAAAAlmvfDrZoydUet4eCVMq7z6a58Ea+1HLJOWxN5lNcrWEFcwAgAAAAAEBo5AWZyC41b9ayjWNQSL4iYEAIwR/JG+ssN8bdoK9RBWwAIAAAAACEndE0SLxFSElOrNnqeX0EPmgDio3udZjVREy4JLS3sQADMgB9AAAABWQAIAAAAABbiLaoxAA6rinMJw1hC8ZUiq6UU1AQaPFn/py/Y06WuQVzACAAAAAAhtDasFkvYE7SCNu1je/hxdE9TJtAvvH3NtdEbKzNbCUFbAAgAAAAAIGepU1RSCF8sWODHEpKglsoqw3VBBH4a/URGxgGzbq2AAMzAH0AAAAFZAAgAAAAALORWwSr+tYNxcil2KIGSbN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SyB/60rSvdQ2aN2vfJPR7llJVhufGTNhHkAAzE2AH0AAAAFZAAgAAAAAFH9l9GGA1I52atJV5jNUf1lx8jBjoEoVoME97v5GFJiBXMAIAAAAAC1qH3Kd78Dr9NGbw7y9D/XYBwv5h1LLO8la5OU7g8UkQVsACAAAAAArZ6atJCYrVfHB8dSNPOFf6nnDADBMJcIEj8ljPvxHp8AAzE3AH0AAAAFZAAgAAAAADtbVEI2tdkrowEMdkacD2w0Y3T3Ofi7PH6HmA6sP0c/BXMAIAAAAADuBSROnZHA+NgUPH8d0LnWFiDsM2bY8bzjC1+elSsIygVsACAAAAAAR0G2m+uANoWknkr/NerFcG+fECVxNIs0cqbY1t/U/0MAAzE4AH0AAAAFZAAgAAAAAAh3WpeMVlikPFYj9hLj+fmIqVt6omCSF75W3TPExyWpBXMAIAAAAAAsQkRmwqeVj2gGE03orb6PtrIzDt6dDU3hgSQi8E2wKgVsACAAAAAA3GHaRE2RAcaBRd8VzmYzWeBD2Gmy91eTK1k8YdWObZcAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHBuAAIAAAAQdGYAAQAAAAFtbgAAAAAAAAAAAAFteAAAAAAAAABpQAA=", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedDoublePrecision": { $$type: "binData" } - } - } - } - ] - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - "$db": "default" - - - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedDoublePrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "Dri0CXmL78L2DOgk9w0DwxHOMGMzih7m6l59vgy+WWo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "b7d8mRzD1kI1tdc7uNL+YAUonJ6pODLsRLkArfEKSkM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "Xg8C1/A0KJaXOw4i+26Rv03/CydaaunOzXh0CIT+gn8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "UoKUDw2wJYToUCcFaIs03YQSTksYR0MIOTJllwODqKc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "c/5cwAT0C5jber2xlJnWD3a5tVDy0nRtr5HG02hoFOY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wSUrRXavAGaajNeqC5mEUH1K67oYl5Wy9RNIzKjwLAM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6vrp4wWDtHEgHWR99I70WVDzevg1Fk/Pw5U8gUDa0OU=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedDoublePrecision": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "V6knyt7Zq2CG3++l75UtBx2m32iGAPjHiAe439Bf02w=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "0OKSXELxPP85SBVwDGf3LtMEQCJ8TTkFUl/+6jlkdb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uEw0lpQtBppR3vqV9j9+NQRSBF1BzZukb8c9IhyWvxc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zVhZ7Q59O087ji49oMJvBIgeir2oqvUpnh4p53GcTow=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "dowrzKs+qJhRMZyKDbhjXbuX43FbmUKOaw9I8YlOZDw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ep5B6cska6THLIF7Mn3tn3RvV9EiwLSt0eZM/CLRUDc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "URNp/YmmDh5wIZUfAzzgPyJeMNiVx9PMsz52DZRujGY=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "wlM4IAQhhKQEzoVqS8b1Ddd50GB95OFb9LnzOwyjCP4=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Aggregate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Aggregate.json deleted file mode 100644 index 6cd837c789..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Aggregate.json +++ /dev/null @@ -1,484 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Int. Aggregate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$gt": { - "$numberInt": "0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "default", - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$gt": { - "$binary": { - "base64": "DW0FAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAYO/qaw0+92HAryxOUG7iK6hnIy3OaUA9jIqtHdvcq8YFbAAgAAAAAHrUYj8A0hVgc6VklpDiljOnykrUSfEsjm56XO/bsfKdAAMzAH0AAAAFZAAgAAAAAOK8brUuc2onBNDRtfYMR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uAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAQbW4AAAAAABBteADIAAAAAA==", - "subType": "06" - } - } - } - } - } - ], - "cursor": {}, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "aggregate" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedInt": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Aggregate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Aggregate.yml deleted file mode 100644 index f677bdedf9..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Aggregate.yml +++ /dev/null @@ -1,229 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedInt', 'bsonType': 'int', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberInt': '0'}, 'max': {'$numberInt': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Int. Aggregate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedInt: { $numberInt: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedInt: { $numberInt: "1" } } - - name: aggregate - arguments: - pipeline: [{ $match: { "encryptedInt": { $gt: {$numberInt: "0" }} } }] - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - aggregate: *collection_name - pipeline: [ - { - "$match": { - "encryptedInt": { - "$gt": { - "$binary": { - "base64": "DW0FAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSri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AADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAQbW4AAAAAABBteADIAAAAAA==", - "subType": "06" - } - } - } - } - } - ] - cursor: {} - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: aggregate - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedInt": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedInt": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Correctness.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Correctness.json deleted file mode 100644 index 9dc4e4e501..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Correctness.json +++ /dev/null @@ -1,1644 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Find with $gt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$gt": { - "$numberInt": "0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ] - }, - { - "description": "Find with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$gte": { - "$numberInt": "0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - }, - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ] - }, - { - "description": "Find with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$gt": { - "$numberInt": "1" - } - } - } - }, - "result": [] - } - ] - }, - { - "description": "Find with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$lt": { - "$numberInt": "1" - } - } - } - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - ] - } - ] - }, - { - "description": "Find with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$lte": { - "$numberInt": "1" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - }, - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ] - }, - { - "description": "Find with $lt below min", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$lt": { - "$numberInt": "0" - } - } - } - }, - "result": { - "errorContains": "must be greater than the range minimum" - } - } - ] - }, - { - "description": "Find with $gt above max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$gt": { - "$numberInt": "200" - } - } - } - }, - "result": { - "errorContains": "must be less than the range maximum" - } - } - ] - }, - { - "description": "Find with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$gt": { - "$numberInt": "0" - }, - "$lt": { - "$numberInt": "2" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ] - }, - { - "description": "Find with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$numberInt": "0" - } - } - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - ] - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$numberInt": "1" - } - } - }, - "result": [ - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ] - }, - { - "description": "Find with full range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$gte": { - "$numberInt": "0" - }, - "$lte": { - "$numberInt": "200" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - }, - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ] - }, - { - "description": "Find with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$in": [ - { - "$numberInt": "0" - } - ] - } - } - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - ] - } - ] - }, - { - "description": "Insert out of range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "-1" - } - } - }, - "result": { - "errorContains": "value must be greater than or equal to the minimum value" - } - } - ] - }, - { - "description": "Insert min and max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 200, - "encryptedInt": { - "$numberInt": "200" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - }, - { - "_id": 200, - "encryptedInt": { - "$numberInt": "200" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$gte": { - "$numberInt": "0" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - }, - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$gt": { - "$numberInt": "1" - } - } - } - } - ] - }, - "result": [] - } - ] - }, - { - "description": "Aggregate with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$lt": { - "$numberInt": "1" - } - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$lte": { - "$numberInt": "1" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - }, - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $lt below min", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$lt": { - "$numberInt": "0" - } - } - } - } - ] - }, - "result": { - "errorContains": "must be greater than the range minimum" - } - } - ] - }, - { - "description": "Aggregate with $gt above max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$gt": { - "$numberInt": "200" - } - } - } - } - ] - }, - "result": { - "errorContains": "must be less than the range maximum" - } - } - ] - }, - { - "description": "Aggregate with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$gt": { - "$numberInt": "0" - }, - "$lt": { - "$numberInt": "2" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ] - }, - { - "description": "Aggregate with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$numberInt": "0" - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - ] - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$numberInt": "1" - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ] - }, - { - "description": "Aggregate with full range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$gte": { - "$numberInt": "0" - }, - "$lte": { - "$numberInt": "200" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - }, - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedInt": { - "$in": [ - { - "$numberInt": "0" - } - ] - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - ] - } - ] - }, - { - "description": "Wrong type: Insert Double", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberDouble": "0" - } - } - }, - "result": { - "errorContains": "cannot encrypt element" - } - } - ] - }, - { - "description": "Wrong type: Find Double", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$gte": { - "$numberDouble": "0" - } - } - } - }, - "result": { - "errorContains": "field type is not supported" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Correctness.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Correctness.yml deleted file mode 100644 index 9cb1cb368f..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Correctness.yml +++ /dev/null @@ -1,423 +0,0 @@ -# Test correctness results. -# Does not include command monitoring expectations or outcome assertions to make tests more readable. - -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "8.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedInt', 'bsonType': 'int', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberInt': '0'}, 'max': {'$numberInt': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Find with $gt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedInt: { $numberInt: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedInt: { $numberInt: "1" } } - - name: find - arguments: - filter: { encryptedInt: { $gt: { $numberInt: "0" } }} - result: [*doc1] - - - description: "Find with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedInt: { $gte: { $numberInt: "0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedInt: { $gt: { $numberInt: "1" } }} - result: [] - - - description: "Find with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedInt: { $lt: { $numberInt: "1" } }} - result: [*doc0] - - - description: "Find with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedInt: { $lte: { $numberInt: "1" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $lt below min" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedInt: { $lt: { $numberInt: "0" } }} - result: - errorContains: must be greater than the range minimum - - - description: "Find with $gt above max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedInt: { $gt: { $numberInt: "200" } }} - result: - errorContains: must be less than the range maximum - - - description: "Find with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedInt: { $gt: { $numberInt: "0" }, $lt: { $numberInt: "2"} }} - result: [*doc1] - - - description: "Find with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedInt: { $numberInt: "0" } } - result: [*doc0] - - name: find - arguments: - filter: { encryptedInt: { $numberInt: "1" } } - result: [*doc1] - - - description: "Find with full range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedInt: { $gte: {$numberInt: "0"}, $lte: {$numberInt: "200"} } } - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedInt: { $in: [ {$numberInt: "0"} ] } } - result: [*doc0] - - - description: "Insert out of range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: { _id: 0, encryptedInt: { $numberInt: "-1" }} - result: - errorContains: value must be greater than or equal to the minimum value - - - description: "Insert min and max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: *doc0 - - name: insertOne - arguments: - document: &doc200 { _id: 200, encryptedInt: { $numberInt: "200" }} - - name: find - arguments: - filter: {} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc200] - - - description: "Aggregate with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedInt: { $gte: { $numberInt: "0" } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - - result: [*doc0, *doc1] - - - description: "Aggregate with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedInt: { $gt: { $numberInt: "1" } }} } - result: [] - - - description: "Aggregate with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedInt: { $lt: { $numberInt: "1" } }} } - result: [*doc0] - - - description: "Aggregate with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedInt: { $lte: { $numberInt: "1" } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $lt below min" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedInt: { $lt: { $numberInt: "0" } }} } - result: - errorContains: must be greater than the range minimum - - - description: "Aggregate with $gt above max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedInt: { $gt: { $numberInt: "200" } }} } - result: - errorContains: must be less than the range maximum - - - description: "Aggregate with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedInt: { $gt: { $numberInt: "0" }, $lt: { $numberInt: "2"} }} } - result: [*doc1] - - - description: "Aggregate with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedInt: { $numberInt: "0" } } } - result: [*doc0] - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedInt: { $numberInt: "1" } } } - result: [*doc1] - - - description: "Aggregate with full range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedInt: { $gte: {$numberInt: "0"}, $lte: {$numberInt: "200"} } } } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedInt: { $in: [ {$numberInt: "0"} ] } } } - result: [*doc0] - - - description: "Wrong type: Insert Double" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: { _id: 0, encryptedInt: { $numberDouble: "0" }} } - result: - # Expect an error from mongocryptd. - errorContains: "cannot encrypt element" - - - description: "Wrong type: Find Double" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: find - arguments: - filter: { encryptedInt: { $gte: { $numberDouble: "0" } }} - result: - # expect an error from libmongocrypt. - errorContains: "field type is not supported" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Delete.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Delete.json deleted file mode 100644 index b251db9157..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Delete.json +++ /dev/null @@ -1,420 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Int. Delete.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "encryptedInt": { - "$gt": { - "$numberInt": "0" - } - } - } - }, - "result": { - "deletedCount": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "delete": "default", - "deletes": [ - { - "q": { - "encryptedInt": { - "$gt": { - "$binary": { - "base64": "DW0FAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAYO/qaw0+92HAryxOUG7iK6hnIy3OaUA9jIqtHdvcq8YFbAAgAAAAAHrUYj8A0hVgc6VklpDiljOnykrUSfEsjm56XO/bsfKdAAMzAH0AAAAFZAAgAAAAAOK8brUuc2onBNDRtfYMR736dHj4dQqXod8JG7tAMTsDBXMAIAAAAAAW6SrGAL6Bx0s7ZlsYULFfOAiY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gNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAQbW4AAAAAABBteADIAAAAAA==", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "delete" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Delete.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Delete.yml deleted file mode 100644 index 158358d884..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Delete.yml +++ /dev/null @@ -1,176 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedInt', 'bsonType': 'int', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberInt': '0'}, 'max': {'$numberInt': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Int. Delete." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedInt: { $numberInt: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedInt: { $numberInt: "1" } } - - name: deleteOne - arguments: - filter: { "encryptedInt": { $gt: {$numberInt: "0" }} } - result: - deletedCount: 1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - delete: *collection_name - deletes: [ - { - "q": { - "encryptedInt": { -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AAAAFZAAgAAAAAPcLmtq+V1e+MRlZ7NHq1+mrRVBQje5zj685ZvdsfKvSBXMAIAAAAABdHz/3w2k5km97QN9m7oLFYJaVJneNlMboIlz5yUASQAVsACAAAAAAWbp8JVJnx8fEVAJFa7WMfMa7wXeP5M3C8MX20J/i9n0AAzcAfQAAAAVkACAAAAAAYfLwnoxK6XAGQrJFy8+TIJoq38ldBaO75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAQbW4AAAAAABBteADIAAAAAA==", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ] - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: delete - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedInt": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-FindOneAndUpdate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-FindOneAndUpdate.json deleted file mode 100644 index 6e09b5ea2c..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-FindOneAndUpdate.json +++ /dev/null @@ -1,488 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Int. FindOneAndUpdate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "encryptedInt": { - "$gt": { - "$numberInt": "0" - } - } - }, - "update": { - "$set": { - "encryptedInt": { - "$numberInt": "2" - } - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default", - "query": { - "encryptedInt": { - "$gt": { -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AgAAAAAPcLmtq+V1e+MRlZ7NHq1+mrRVBQje5zj685ZvdsfKvSBXMAIAAAAABdHz/3w2k5km97QN9m7oLFYJaVJneNlMboIlz5yUASQAVsACAAAAAAWbp8JVJnx8fEVAJFa7WMfMa7wXeP5M3C8MX20J/i9n0AAzcAfQAAAAVkACAAAAAAYfLwnoxK6XAGQrJFy8+TIJoq38ldBaO75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAQbW4AAAAAABBteADIAAAAAA==", - "subType": "06" - } - } - } - }, - "update": { - "$set": { - "encryptedInt": { - "$$type": "binData" - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "findAndModify" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedInt": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "hyDcE6QQjPrYJaIS/n7evEZFYcm31Tj89CpEYGF45cI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ty4cnzJdAlbQKnh7px3GEYjBnvO+jIOaKjoTRDtmh3M=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-FindOneAndUpdate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-FindOneAndUpdate.yml deleted file mode 100644 index 6b7fe8f026..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-FindOneAndUpdate.yml +++ /dev/null @@ -1,227 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedInt', 'bsonType': 'int', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberInt': '0'}, 'max': {'$numberInt': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Int. FindOneAndUpdate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedInt: { $numberInt: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedInt: { $numberInt: "1" } } - - name: findOneAndUpdate - arguments: - filter: { encryptedInt: { $gt: {$numberInt: "0"}} } - update: { "$set": { "encryptedInt": {$numberInt: "2"}}} - returnDocument: Before - result: *doc1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - findAndModify: *collection_name - query: { - "encryptedInt": { - "$gt": { - "$binary": { - "base64": "DW0FAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAYO/qaw0+92HAryxOUG7iK6hnIy3OaUA9jIqtHdvcq8YFbAAgAAAAAHrUYj8A0hVgc6VklpDiljOnykrUSfEsjm56XO/bsfKdAAMzAH0AAAAFZAAgAAAAAOK8brUuc2onBNDRtfYMR736dHj4dQqXod8JG7tAMTsDBXMAIAAAAAAW6SrGAL6Bx0s7ZlsYULFfOAiYIGhEWu6md3r+Rk40awVsACAAAAAAIHYXP8RLcCboUmHN3+OlnEw1DxaLSnbTB9PdF228fFAAAzQAfQAAAAVkACAAAAAAV22FGF7ZDwK/EYi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mAAEAAAAQbW4AAAAAABBteADIAAAAAA==", - "subType": "06" - } - } - } - } - update: { "$set": {"encryptedInt": { $$type: "binData" }} } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: findAndModify - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedInt": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedInt": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "hyDcE6QQjPrYJaIS/n7evEZFYcm31Tj89CpEYGF45cI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ty4cnzJdAlbQKnh7px3GEYjBnvO+jIOaKjoTRDtmh3M=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-InsertFind.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-InsertFind.json deleted file mode 100644 index cbab7e7699..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-InsertFind.json +++ /dev/null @@ -1,475 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Int. Insert and Find.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$gt": { - "$numberInt": "0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "encryptedInt": { - "$gt": { - "$binary": { - "base64": "DW0FAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFsw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Joq38ldBaO75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAQbW4AAAAAABBteADIAAAAAA==", - "subType": "06" - } - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedInt": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-InsertFind.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-InsertFind.yml deleted file mode 100644 index ecfc72634b..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-InsertFind.yml +++ /dev/null @@ -1,223 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedInt', 'bsonType': 'int', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberInt': '0'}, 'max': {'$numberInt': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Int. Insert and Find." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedInt: { $numberInt: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedInt: { $numberInt: "1" } } - - name: find - arguments: - filter: { encryptedInt: { $gt: { $numberInt: "0" } } } - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: - "encryptedInt": { - "$gt": { -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AgAAAAAPcLmtq+V1e+MRlZ7NHq1+mrRVBQje5zj685ZvdsfKvSBXMAIAAAAABdHz/3w2k5km97QN9m7oLFYJaVJneNlMboIlz5yUASQAVsACAAAAAAWbp8JVJnx8fEVAJFa7WMfMa7wXeP5M3C8MX20J/i9n0AAzcAfQAAAAVkACAAAAAAYfLwnoxK6XAGQrJFy8+TIJoq38ldBaO75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAQbW4AAAAAABBteADIAAAAAA==", - "subType": "06" - } - } - } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedInt": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedInt": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Update.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Update.json deleted file mode 100644 index cb6b223943..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Update.json +++ /dev/null @@ -1,492 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Int. Update.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedInt": { - "$numberInt": "1" - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "encryptedInt": { - "$gt": { - "$numberInt": "0" - } - } - }, - "update": { - "$set": { - "encryptedInt": { - "$numberInt": "2" - } - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedInt": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command_name": "update", - "command": { - "update": "default", - "ordered": true, - "updates": [ - { - "q": { - "encryptedInt": { - "$gt": { - "$binary": { - "base64": "DW0FAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAYO/qaw0+92HAryxOUG7iK6hnIy3OaUA9jIq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DYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAQbW4AAAAAABBteADIAAAAAA==", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedInt": { - "$$type": "binData" - } - } - } - } - ], - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - } - } - }, - "$db": "default" - } - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedInt": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedInt": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "hyDcE6QQjPrYJaIS/n7evEZFYcm31Tj89CpEYGF45cI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ty4cnzJdAlbQKnh7px3GEYjBnvO+jIOaKjoTRDtmh3M=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Update.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Update.yml deleted file mode 100644 index 6b81bf563b..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Int-Update.yml +++ /dev/null @@ -1,242 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedInt', 'bsonType': 'int', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberInt': '0'}, 'max': {'$numberInt': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Int. Update." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedInt: { $numberInt: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedInt: { $numberInt: "1" } } - - name: updateOne - arguments: - filter: { encryptedInt: { $gt: { $numberInt: "0" } } } - update: { "$set": { "encryptedInt": { $numberInt: "2" } }} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedInt": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command_name: update - command: - - "update": "default" - "ordered": true - "updates": [ - { - "q": { - "encryptedInt": { - "$gt": { - "$binary": { - "base64": "DW0FAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZ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oxK6XAGQrJFy8+TIJoq38ldBaO75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAAQbW4AAAAAABBteADIAAAAAA==", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedInt": { $$type: "binData" } - } - } - } - ] - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - "$db": "default" - - - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedInt": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedInt": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "hyDcE6QQjPrYJaIS/n7evEZFYcm31Tj89CpEYGF45cI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ty4cnzJdAlbQKnh7px3GEYjBnvO+jIOaKjoTRDtmh3M=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Aggregate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Aggregate.json deleted file mode 100644 index 5c4bf10101..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Aggregate.json +++ /dev/null @@ -1,484 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Long. Aggregate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$gt": { - "$numberLong": "0" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedLong": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedLong": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "default", - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAYO/qaw0+92HAryxOUG7iK6hnIy3OaUA9jIqtHdvcq8YFbAAgAAAAAHrUYj8A0hVgc6VklpDiljOnykrUSfEsjm56XO/bsfKdAAMzAH0AAAAFZAAgAAAAAOK8brUuc2onBNDRtfYMR736dHj4dQqXod8JG7tAMTsDBXMAIAAAAAAW6SrGAL6Bx0s7ZlsY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9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAASbW4AAAAAAAAAAAASbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - } - } - ], - "cursor": {}, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "aggregate" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedLong": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedLong": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Aggregate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Aggregate.yml deleted file mode 100644 index 04b315bad1..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Aggregate.yml +++ /dev/null @@ -1,229 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedLong', 'bsonType': 'long', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberLong': '0'}, 'max': {'$numberLong': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Long. Aggregate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedLong: { $numberLong: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedLong: { $numberLong: "1" } } - - name: aggregate - arguments: - pipeline: [{ $match: { "encryptedLong": { $gt: {$numberLong: "0" }} } }] - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedLong": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedLong": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - aggregate: *collection_name - pipeline: [ - { - "$match": { - "encryptedLong": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9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Ija8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAASbW4AAAAAAAAAAAASbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - } - } - ] - cursor: {} - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: aggregate - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedLong": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedLong": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Correctness.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Correctness.json deleted file mode 100644 index d81e0933f8..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Correctness.json +++ /dev/null @@ -1,1644 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Find with $gt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$gt": { - "$numberLong": "0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ] - }, - { - "description": "Find with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$gte": { - "$numberLong": "0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - }, - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ] - }, - { - "description": "Find with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$gt": { - "$numberLong": "1" - } - } - } - }, - "result": [] - } - ] - }, - { - "description": "Find with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$lt": { - "$numberLong": "1" - } - } - } - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - ] - } - ] - }, - { - "description": "Find with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$lte": { - "$numberLong": "1" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - }, - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ] - }, - { - "description": "Find with $lt below min", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$lt": { - "$numberLong": "0" - } - } - } - }, - "result": { - "errorContains": "must be greater than the range minimum" - } - } - ] - }, - { - "description": "Find with $gt above max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$gt": { - "$numberLong": "200" - } - } - } - }, - "result": { - "errorContains": "must be less than the range maximum" - } - } - ] - }, - { - "description": "Find with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$gt": { - "$numberLong": "0" - }, - "$lt": { - "$numberLong": "2" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ] - }, - { - "description": "Find with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$numberLong": "0" - } - } - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - ] - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$numberLong": "1" - } - } - }, - "result": [ - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ] - }, - { - "description": "Find with full range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$gte": { - "$numberLong": "0" - }, - "$lte": { - "$numberLong": "200" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - }, - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ] - }, - { - "description": "Find with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$in": [ - { - "$numberLong": "0" - } - ] - } - } - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - ] - } - ] - }, - { - "description": "Insert out of range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "-1" - } - } - }, - "result": { - "errorContains": "value must be greater than or equal to the minimum value" - } - } - ] - }, - { - "description": "Insert min and max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 200, - "encryptedLong": { - "$numberLong": "200" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - } - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - }, - { - "_id": 200, - "encryptedLong": { - "$numberLong": "200" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$gte": { - "$numberLong": "0" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - }, - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $gt with no results", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$gt": { - "$numberLong": "1" - } - } - } - } - ] - }, - "result": [] - } - ] - }, - { - "description": "Aggregate with $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$lt": { - "$numberLong": "1" - } - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $lte", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$lte": { - "$numberLong": "1" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - }, - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $lt below min", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$lt": { - "$numberLong": "0" - } - } - } - } - ] - }, - "result": { - "errorContains": "must be greater than the range minimum" - } - } - ] - }, - { - "description": "Aggregate with $gt above max", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$gt": { - "$numberLong": "200" - } - } - } - } - ] - }, - "result": { - "errorContains": "must be less than the range maximum" - } - } - ] - }, - { - "description": "Aggregate with $gt and $lt", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$gt": { - "$numberLong": "0" - }, - "$lt": { - "$numberLong": "2" - } - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ] - }, - { - "description": "Aggregate with equality", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$numberLong": "0" - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - ] - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$numberLong": "1" - } - } - } - ] - }, - "result": [ - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ] - }, - { - "description": "Aggregate with full range", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$gte": { - "$numberLong": "0" - }, - "$lte": { - "$numberLong": "200" - } - } - } - }, - { - "$sort": { - "_id": 1 - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - }, - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ] - }, - { - "description": "Aggregate with $in", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "encryptedLong": { - "$in": [ - { - "$numberLong": "0" - } - ] - } - } - } - ] - }, - "result": [ - { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - ] - } - ] - }, - { - "description": "Wrong type: Insert Double", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberDouble": "0" - } - } - }, - "result": { - "errorContains": "cannot encrypt element" - } - } - ] - }, - { - "description": "Wrong type: Find Double", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$gte": { - "$numberDouble": "0" - } - } - } - }, - "result": { - "errorContains": "field type is not supported" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Correctness.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Correctness.yml deleted file mode 100644 index 97b7db2b71..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Correctness.yml +++ /dev/null @@ -1,422 +0,0 @@ -# Test correctness results. -# Does not include command monitoring expectations or outcome assertions to make tests more readable. - -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "8.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedLong', 'bsonType': 'long', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberLong': '0'}, 'max': {'$numberLong': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Find with $gt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedLong: { $numberLong: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedLong: { $numberLong: "1" } } - - name: find - arguments: - filter: { encryptedLong: { $gt: { $numberLong: "0" } }} - result: [*doc1] - - - description: "Find with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedLong: { $gte: { $numberLong: "0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedLong: { $gt: { $numberLong: "1" } }} - result: [] - - - description: "Find with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedLong: { $lt: { $numberLong: "1" } }} - result: [*doc0] - - - description: "Find with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedLong: { $lte: { $numberLong: "1" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $lt below min" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedLong: { $lt: { $numberLong: "0" } }} - result: - errorContains: must be greater than the range minimum - - - description: "Find with $gt above max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedLong: { $gt: { $numberLong: "200" } }} - result: - errorContains: must be less than the range maximum - - - description: "Find with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedLong: { $gt: { $numberLong: "0" }, $lt: { $numberLong: "2"} }} - result: [*doc1] - - - description: "Find with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedLong: { $numberLong: "0" } } - result: [*doc0] - - name: find - arguments: - filter: { encryptedLong: { $numberLong: "1" } } - result: [*doc1] - - - description: "Find with full range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedLong: { $gte: {$numberLong: "0"}, $lte: {$numberLong: "200"} } } - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc1] - - - description: "Find with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: find - arguments: - filter: { encryptedLong: { $in: [ {$numberLong: "0"} ] } } - result: [*doc0] - - - description: "Insert out of range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: { _id: 0, encryptedLong: { $numberLong: "-1" }} - result: - errorContains: value must be greater than or equal to the minimum value - - - description: "Insert min and max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: *doc0 - - name: insertOne - arguments: - document: &doc200 { _id: 200, encryptedLong: { $numberLong: "200" }} - - name: find - arguments: - filter: {} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: [*doc0, *doc200] - - - description: "Aggregate with $gte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedLong: { $gte: { $numberLong: "0" } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $gt with no results" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedLong: { $gt: { $numberLong: "1" } }} } - result: [] - - - description: "Aggregate with $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedLong: { $lt: { $numberLong: "1" } }} } - result: [*doc0] - - - description: "Aggregate with $lte" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedLong: { $lte: { $numberLong: "1" } }} } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $lt below min" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedLong: { $lt: { $numberLong: "0" } }} } - result: - errorContains: must be greater than the range minimum - - - description: "Aggregate with $gt above max" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedLong: { $gt: { $numberLong: "200" } }} } - result: - errorContains: must be less than the range maximum - - - description: "Aggregate with $gt and $lt" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedLong: { $gt: { $numberLong: "0" }, $lt: { $numberLong: "2"} }} } - result: [*doc1] - - - description: "Aggregate with equality" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedLong: { $numberLong: "0" } } } - result: [*doc0] - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedLong: { $numberLong: "1" } } } - result: [*doc1] - - - description: "Aggregate with full range" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedLong: { $gte: {$numberLong: "0"}, $lte: {$numberLong: "200"} } } } - # sort so results from range queries are ordered. - - { $sort: { _id: 1 }} - result: [*doc0, *doc1] - - - description: "Aggregate with $in" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: *doc0 } - - name: insertOne - arguments: { document: *doc1 } - - name: aggregate - arguments: - pipeline: - - { $match: { encryptedLong: { $in: [ {$numberLong: "0"} ] } } } - result: [*doc0] - - - description: "Wrong type: Insert Double" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: { _id: 0, encryptedLong: { $numberDouble: "0" }} } - result: - # Expect an error from mongocryptd. - errorContains: "cannot encrypt element" - - - description: "Wrong type: Find Double" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: find - arguments: - filter: { encryptedLong: { $gte: { $numberDouble: "0" } }} - result: - # expect an error from libmongocrypt. - errorContains: "field type is not supported" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Delete.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Delete.json deleted file mode 100644 index faf0c401b7..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Delete.json +++ /dev/null @@ -1,420 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Long. Delete.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "encryptedLong": { - "$gt": { - "$numberLong": "0" - } - } - } - }, - "result": { - "deletedCount": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedLong": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedLong": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "delete": "default", - "deletes": [ - { - "q": { - "encryptedLong": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAYO/qaw0+92HAryxOUG7iK6hnIy3OaUA9jIqtHdvcq8YFbAAgAAAAAHrUYj8A0hVgc6VklpDiljOnykrUSfEsjm56XO/bsfKdAAMzAH0AAAAFZAAgAAAAAOK8brUuc2onBNDRtfYMR736dHj4dQqXod8JG7tAMTsDBXMAIAAAAAAW6SrGAL6Bx0s7ZlsYULFfOAiYIGhEWu6md3r+Rk40awVsACAAAAAAIHYXP8R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AAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAASbW4AAAAAAAAAAAASbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "delete" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedLong": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Delete.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Delete.yml deleted file mode 100644 index 9bbbf71ae2..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Delete.yml +++ /dev/null @@ -1,176 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedLong', 'bsonType': 'long', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberLong': '0'}, 'max': {'$numberLong': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Long. Delete." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedLong: { $numberLong: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedLong: { $numberLong: "1" } } - - name: deleteOne - arguments: - filter: { "encryptedLong": { $gt: {$numberLong: "0" }} } - result: - deletedCount: 1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedLong": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedLong": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - delete: *collection_name - deletes: [ - { - "q": { - "encryptedLong": { - "$gt": { - "$binary": { - "base64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mtq+V1e+MRlZ7NHq1+mrRVBQje5zj685ZvdsfKvSBXMAIAAAAABdHz/3w2k5km97QN9m7oLFYJaVJneNlMboIlz5yUASQAVsACAAAAAAWbp8JVJnx8fEVAJFa7WMfMa7wXeP5M3C8MX20J/i9n0AAzcAfQAAAAVkACAAAAAAYfLwnoxK6XAGQrJFy8+TIJoq38ldBaO75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAASbW4AAAAAAAAAAAASbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "limit": 1 - } - ] - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: delete - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedLong": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-FindOneAndUpdate.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-FindOneAndUpdate.json deleted file mode 100644 index b233b40b54..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-FindOneAndUpdate.json +++ /dev/null @@ -1,488 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Long. FindOneAndUpdate.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "encryptedLong": { - "$gt": { - "$numberLong": "0" - } - } - }, - "update": { - "$set": { - "encryptedLong": { - "$numberLong": "2" - } - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedLong": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedLong": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default", - "query": { - "encryptedLong": { - "$gt": { - "$binary": { - "base64":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tq+V1e+MRlZ7NHq1+mrRVBQje5zj685ZvdsfKvSBXMAIAAAAABdHz/3w2k5km97QN9m7oLFYJaVJneNlMboIlz5yUASQAVsACAAAAAAWbp8JVJnx8fEVAJFa7WMfMa7wXeP5M3C8MX20J/i9n0AAzcAfQAAAAVkACAAAAAAYfLwnoxK6XAGQrJFy8+TIJoq38ldBaO75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAASbW4AAAAAAAAAAAASbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "update": { - "$set": { - "encryptedLong": { - "$$type": "binData" - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "findAndModify" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedLong": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedLong": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "hyDcE6QQjPrYJaIS/n7evEZFYcm31Tj89CpEYGF45cI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ty4cnzJdAlbQKnh7px3GEYjBnvO+jIOaKjoTRDtmh3M=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-FindOneAndUpdate.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-FindOneAndUpdate.yml deleted file mode 100644 index 8f74e442f1..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-FindOneAndUpdate.yml +++ /dev/null @@ -1,227 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedLong', 'bsonType': 'long', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberLong': '0'}, 'max': {'$numberLong': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Long. FindOneAndUpdate." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedLong: { $numberLong: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedLong: { $numberLong: "1" } } - - name: findOneAndUpdate - arguments: - filter: { encryptedLong: { $gt: {$numberLong: "0"}} } - update: { "$set": { "encryptedLong": {$numberLong: "2"}}} - returnDocument: Before - result: *doc1 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedLong": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedLong": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - findAndModify: *collection_name - query: { - "encryptedLong": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAYO/qaw0+92HAryxOUG7iK6hnIy3OaUA9jIqtHdvcq8YFbAAgAAAAAHrUYj8A0hVgc6VklpDiljOnykrUSfEsjm56XO/bsfKdAAMzAH0AAAAFZAAgAAAAAOK8brUuc2onBNDRtfYMR736dHj4dQqXod8JG7tAMTsDBXMAIAAAAAAW6SrGAL6Bx0s7ZlsYULFfOAiYIGhEWu6md3r+Rk40awVsACAAAAAAIHYXP8RLcCboUmHN3+OlnEw1DxaLSnbTB9PdF228fFAAAzQAfQAAAAVkACAAAAAAV22FGF7ZDwK/EYiGN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AEAAAASbW4AAAAAAAAAAAASbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - } - update: { "$set": {"encryptedLong": { $$type: "binData" }} } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: findAndModify - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedLong": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedLong": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "hyDcE6QQjPrYJaIS/n7evEZFYcm31Tj89CpEYGF45cI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ty4cnzJdAlbQKnh7px3GEYjBnvO+jIOaKjoTRDtmh3M=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-InsertFind.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-InsertFind.json deleted file mode 100644 index 1b787d4cb6..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-InsertFind.json +++ /dev/null @@ -1,475 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Long. Insert and Find.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedLong": { - "$gt": { - "$numberLong": "0" - } - } - } - }, - "result": [ - { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedLong": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedLong": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "encryptedLong": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKq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GQrJFy8+TIJoq38ldBaO75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAASbW4AAAAAAAAAAAASbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedLong": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedLong": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-InsertFind.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-InsertFind.yml deleted file mode 100644 index 595807d5a4..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-InsertFind.yml +++ /dev/null @@ -1,223 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedLong', 'bsonType': 'long', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberLong': '0'}, 'max': {'$numberLong': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Long. Insert and Find." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedLong: { $numberLong: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedLong: { $numberLong: "1" } } - - name: find - arguments: - filter: { encryptedLong: { $gt: { $numberLong: "0" } } } - result: [*doc1] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedLong": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedLong": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - find: *collection_name - fil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Dz5YR4AAM2AH0AAAAFZAAgAAAAAPcLmtq+V1e+MRlZ7NHq1+mrRVBQje5zj685ZvdsfKvSBXMAIAAAAABdHz/3w2k5km97QN9m7oLFYJaVJneNlMboIlz5yUASQAVsACAAAAAAWbp8JVJnx8fEVAJFa7WMfMa7wXeP5M3C8MX20J/i9n0AAzcAfQAAAAVkACAAAAAAYfLwnoxK6XAGQrJFy8+TIJoq38ldBaO75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAASbW4AAAAAAAAAAAASbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedLong": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedLong": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FA74j21GUEJb1DJBOpR9nVnjaDZnd8yAQNuaW9Qi26g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kJv//KVkbrobIBf+QeWC5jxn20mx/P0R1N6aCSMgKM8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "zB+Whi9IUUGxfLEe+lGuIzLX4LFbIhaIAm5lRk65QTc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ybO1QU3CgvhO8JgRXH+HxKszWcpl5aGDYYVa75fHa1g=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "X3Y3eSAbbMg//JgiHHiFpYOpV61t8kkDexI+CQyitH4=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "SlNHXyqVFGDPrX/2ppwog6l4pwj3PKda2TkZbqgfSfA=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "McjV8xwTF3xI7863DYOBdyvIv6UpzThl6v9vBRk05bI=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Update.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Update.json deleted file mode 100644 index 07182bb5e2..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Update.json +++ /dev/null @@ -1,492 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "FLE2 Range Long. Update.", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedLong": { - "$numberLong": "0" - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedLong": { - "$numberLong": "1" - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "encryptedLong": { - "$gt": { - "$numberLong": "0" - } - } - }, - "update": { - "$set": { - "encryptedLong": { - "$numberLong": "2" - } - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 0, - "encryptedLong": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedLong": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command_name": "update", - "command": { - "update": "default", - "ordered": true, - "updates": [ - { - "q": { - "encryptedLong": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsTXKK+FpgQ9Axxmn9N/cCwVsACAAAAAA+MFEd8XfZSpbXKqqPC2L3TEFswkaG5Ff6aSgf8p+XVIAAzEAfQAAAAVkACAAAAAAtL3QIvnZqCF72eS6lKr8ilff7R6kiNklokiTuaU5wNsFcwAgAAAAAEtqr3/X731VB+VrbFcY8ZrJKRo2E0Fd+C8L0EMNcvcCBWwAIAAAAABNPhSriux8W8qbwnhCczE3IzlhNEnGDpUwTFDZSL+eYQADMgB9AAAABWQAIAAAAAB99ZW/7KwXKzl5M3XQsAJ3JbEef90IoxFYBArNiYzlgQVzACAAAAAAY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EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAASbW4AAAAAAAAAAAASbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedLong": { - "$$type": "binData" - } - } - } - } - ], - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedLong", - "bsonType": "long", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberInt": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberLong": "0" - }, - "max": { - "$numberLong": "200" - } - } - } - ] - } - } - }, - "$db": "default" - } - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "encryptedLong": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - }, - { - "_id": 1, - "encryptedLong": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "hyDcE6QQjPrYJaIS/n7evEZFYcm31Tj89CpEYGF45cI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ty4cnzJdAlbQKnh7px3GEYjBnvO+jIOaKjoTRDtmh3M=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Update.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Update.yml deleted file mode 100644 index ac59323550..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-Long-Update.yml +++ /dev/null @@ -1,242 +0,0 @@ - -# Requires libmongocrypt including MONGOCRYPT-702. -runOn: - - minServerVersion: "8.0.0" # Requires 8.0.0-rc14 for SERVER-91889. - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedLong', 'bsonType': 'long', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberLong': '0'}, 'max': {'$numberLong': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "FLE2 Range Long. Update." - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 0, encryptedLong: { $numberLong: "0" } } - - name: insertOne - arguments: - document: &doc1 { _id: 1, encryptedLong: { $numberLong: "1" } } - - name: updateOne - arguments: - filter: { encryptedLong: { $gt: { $numberLong: "0" } } } - update: { "$set": { "encryptedLong": { $numberLong: "2" } }} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { "_id": 0, "encryptedLong": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { "_id": 1, "encryptedLong": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - default.default: - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - command_name: insert - - command_started_event: - command_name: update - command: - - "update": "default" - "ordered": true - "updates": [ - { - "q": { - "encryptedLong": { - "$gt": { - "$binary": { - "base64": "DXUFAAADcGF5bG9hZAAZBQAABGcABQUAAAMwAH0AAAAFZAAgAAAAALGGQ/CRD+pGLD53BZzWcCcYbuGLVEyjzXIx7b+ux/q2BXMAIAAAAACOC6mXEZL27P9hethZbtKYsT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5M3C8MX20J/i9n0AAzcAfQAAAAVkACAAAAAAYfLwnoxK6XAGQrJFy8+TIJoq38ldBaO75h4zA4ZX5tQFcwAgAAAAAC2wk8UcJH5X5XGnDBYmel6srpBkzBhHtt3Jw1u5TSJ1BWwAIAAAAAA9/YU9eI3D7QbXKIw/3/gzWJ6MZrCYhG0j1wNKgRQp5wADOAB9AAAABWQAIAAAAADGvyrtKkIcaV17ynZA7b2k5Pz6OhvxdWNkDvDWJIja8wVzACAAAAAAOLypVKNxf/wR1G8OZjUUsTQzDYeNNhhITxGMSp7euS4FbAAgAAAAAA9EsxoV1B2DcQ1NJRwuxXnvVR+vkD0wbbDYEI/zFEnDAAM5AH0AAAAFZAAgAAAAAEocREw1L0g+roFUchJI2Yd0M0ME2bnErNUYnpyJP1SqBXMAIAAAAAAcE2/JK/8MoSeOchIuAkKh1X3ImoA7p8ujAZIfvIDo6QVsACAAAAAA+W0+zgLr85/PD7P9a94wk6MgNgrizx/XU9aCxAkp1IwAABJjbQAAAAAAAAAAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgABAAAAEnNwAAEAAAAAAAAAEHRmAAEAAAASbW4AAAAAAAAAAAASbXgAyAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedLong": { $$type: "binData" } - } - } - } - ] - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - "$db": "default" - - - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - - { - "_id": 0, - "encryptedLong": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "x7GR49EN0t3WXQDihkrbonK7qNIBYC87tpL/XEUyIYc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "JfYUqWF+OoGjiYkRI4L5iPlF+T1Eleul7Fki22jp4Qc=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "q1RyGfIgsaQHoZFRw+DD28V26rN5hweApPLwExncvT8=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "L2PFeKGvLS6C+DLudR6fGlBq3ERPvjWvRyNRIA2HVb0=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "CWxaNqL3iP1yCixDkcmf9bmW3E5VeN8TJkg1jJe528s=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "+vC6araOEo+fpW7PSIP40/EnzBCj1d2N10Jr3rrXJJM=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "6SV63Mf51Z6A6p2X3rCnJKCu6ku3Oeb45mBYbz+IoAo=", - "subType": "00" - } - } - ] - } - - - { - "_id": 1, - "encryptedLong": { $$type: "binData" }, - "__safeContent__": [ - { - "$binary": { - "base64": "hyDcE6QQjPrYJaIS/n7evEZFYcm31Tj89CpEYGF45cI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "F08nMDWDZc+DbWM7XCEJNNCEYyinRmrvGP7EWhmp4is=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "cXH4688amcDc8kZOJq4UP8cE3R58Zl7e+Qo/1jyspps=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "uURBxvTp3FBCVkd+LPqyuY7d6rMW6SGIJQEPY/wtkZI=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "jG3hax1L3RBp9t38vUt53FsBxgr/+Si/vVISpAylYpE=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "kwtIW8MhH9Ky5xNjBx8gFA/SHh2YVphie7g5FGBzals=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "FHflwFuEMu4xX0ZApHi+pdlBH+oevAtXckCUb5Wv0xU=", - "subType": "00" - } - }, - { - "$binary": { - "base64": "ty4cnzJdAlbQKnh7px3GEYjBnvO+jIOaKjoTRDtmh3M=", - "subType": "00" - } - } - ] - } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-WrongType.json b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-WrongType.json deleted file mode 100644 index 6215604508..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-WrongType.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "8.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ], - "maxServerVersion": "8.99.99" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedInt", - "bsonType": "int", - "queries": { - "queryType": "range", - "contention": { - "$numberLong": "0" - }, - "trimFactor": { - "$numberLong": "1" - }, - "sparsity": { - "$numberLong": "1" - }, - "min": { - "$numberInt": "0" - }, - "max": { - "$numberInt": "200" - } - } - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Wrong type: Insert Double", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberDouble": "0" - } - } - }, - "result": { - "errorContains": "cannot encrypt element" - } - } - ] - }, - { - "description": "Wrong type: Find Double", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 0, - "encryptedInt": { - "$numberInt": "0" - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "encryptedInt": { - "$gte": { - "$numberDouble": "0" - } - } - }, - "sort": { - "_id": 1 - } - }, - "result": { - "errorContains": "field type is not supported" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-WrongType.yml b/testdata/client-side-encryption/legacy/fle2v2-Rangev2-WrongType.yml deleted file mode 100644 index 432f86b423..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Rangev2-WrongType.yml +++ /dev/null @@ -1,44 +0,0 @@ -# Test correctness results. -# Does not include command monitoring expectations or outcome assertions to make tests more readable. - -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "8.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] - maxServerVersion: "8.99.99" -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields { 'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedInt', 'bsonType': 'int', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberLong': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberInt': '0'}, 'max': {'$numberInt': '200'}}}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Wrong type: Insert Double" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: { _id: 0, encryptedInt: { $numberDouble: "0" }} } - result: - # Expect an error from mongocryptd. - errorContains: "cannot encrypt element" - - - description: "Wrong type: Find Double" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: { document: { _id: 0, encryptedInt: { $numberInt: "0" }} } - - name: find - arguments: - filter: { encryptedInt: { $gte: { $numberDouble: "0" } }} - # sort so results from range queries are ordered. - sort: { _id: 1 } - result: - # expect an error from libmongocrypt. - errorContains: "field type is not supported" diff --git a/testdata/client-side-encryption/legacy/fle2v2-Update.json b/testdata/client-side-encryption/legacy/fle2v2-Update.json deleted file mode 100644 index cb260edc0d..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Update.json +++ /dev/null @@ -1,570 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "encrypted_fields": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1648914851981" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Update can query an FLE2 indexed field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedIndexed": "value123" - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "encryptedIndexed": "value123" - }, - "update": { - "$set": { - "foo": "bar" - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "update": "default", - "updates": [ - { - "q": { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPtVteJQAlgb2YMa/+7YWH00sbQPyt7L6Rb8OwBdMmL2BXMAIAAAAAAd44hgVKnEnTFlwNVC14oyc9OZOTspeymusqkRQj57nAVsACAAAAAAaZ9s3G+4znfxStxeOZwcZy1OhzjMGc5hjmdMN+b/w6kSY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "foo": "bar" - } - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "update" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - }, - "foo": "bar", - "__safeContent__": [ - { - "$binary": { - "base64": "ThpoKfQ8AkOzkFfNC1+9PF0pY2nIzfXvRdxQgjkNbBw=", - "subType": "00" - } - } - ] - } - ] - } - } - }, - { - "description": "Update can modify an FLE2 indexed field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encryptedIndexed": "value123" - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "encryptedIndexed": "value123" - }, - "update": { - "$set": { - "encryptedIndexed": "value456" - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "find", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "encryptedIndexed": "value456" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "update": "default", - "updates": [ - { - "q": { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPtVteJQAlgb2YMa/+7YWH00sbQPyt7L6Rb8OwBdMmL2BXMAIAAAAAAd44hgVKnEnTFlwNVC14oyc9OZOTspeymusqkRQj57nAVsACAAAAAAaZ9s3G+4znfxStxeOZwcZy1OhzjMGc5hjmdMN+b/w6kSY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encryptedIndexed": { - "$$type": "binData" - } - } - } - } - ], - "ordered": true, - "encryptionInformation": { - "type": 1, - "schema": { - "default.default": { - "escCollection": "enxcol_.default.esc", - "ecocCollection": "enxcol_.default.ecoc", - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "command_name": "update" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": { - "$eq": 1 - } - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encryptedIndexed": { - "$$type": "binData" - }, - "__safeContent__": [ - { - "$binary": { - "base64": "rhe7/w8Ob8Unl44rGr/moScx6m5VODQnscDhF4Nkn6g=", - "subType": "00" - } - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-Update.yml b/testdata/client-side-encryption/legacy/fle2v2-Update.yml deleted file mode 100644 index 3bed027181..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-Update.yml +++ /dev/null @@ -1,210 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} -key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ] -tests: - - description: "Update can query an FLE2 indexed field" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: {"_id": 1, "encryptedIndexed": "value123" } - - name: updateOne - arguments: - filter: { "encryptedIndexed": "value123" } - update: { "$set": { "foo": "bar"}} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - { "_id": 1, "encryptedIndexed": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - - command_name: insert - - command_started_event: - command: - update: *collection_name - updates: - - { - "q": { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPtVteJQAlgb2YMa/+7YWH00sbQPyt7L6Rb8OwBdMmL2BXMAIAAAAAAd44hgVKnEnTFlwNVC14oyc9OZOTspeymusqkRQj57nAVsACAAAAAAaZ9s3G+4znfxStxeOZwcZy1OhzjMGc5hjmdMN+b/w6kSY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "u": { "$set": { "foo": "bar"} } - } - ordered: true - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - - command_name: update - outcome: - collection: - data: - - { "_id": 1, "encryptedIndexed": { "$$type": "binData" }, "foo": "bar", "__safeContent__": [{ "$binary" : { "base64" : "ThpoKfQ8AkOzkFfNC1+9PF0pY2nIzfXvRdxQgjkNbBw=", "subType" : "00" } }] } - - description: "Update can modify an FLE2 indexed field" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: {"_id": 1, "encryptedIndexed": "value123" } - - name: updateOne - arguments: - filter: { "encryptedIndexed": "value123" } - update: { "$set": { "encryptedIndexed": "value456"}} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - name: find - arguments: - filter: { "_id": 1} - result: - [ "encryptedIndexed": "value456" ] - expectations: - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: datakeys - filter: { - "$or": [ - { - "_id": { - "$in": [ - {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}} - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - { "_id": 1, "encryptedIndexed": { $$type: "binData" } } - ordered: true - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - - command_name: insert - - command_started_event: - command: - update: *collection_name - updates: - - { - "q": { - "encryptedIndexed": { - "$eq": { - "$binary": { - "base64": "DIkAAAAFZAAgAAAAAPtVteJQAlgb2YMa/+7YWH00sbQPyt7L6Rb8OwBdMmL2BXMAIAAAAAAd44hgVKnEnTFlwNVC14oyc9OZOTspeymusqkRQj57nAVsACAAAAAAaZ9s3G+4znfxStxeOZwcZy1OhzjMGc5hjmdMN+b/w6kSY20AAAAAAAAAAAAA", - "subType": "06" - } - } - } - }, - "u": { "$set": { "encryptedIndexed": { "$$type": "binData" }} } - } - ordered: true - encryptionInformation: - type: 1 - schema: - "default.default": - # libmongocrypt applies escCollection and ecocCollection to outgoing command. - escCollection: "enxcol_.default.esc" - ecocCollection: "enxcol_.default.ecoc" - <<: *encrypted_fields - - command_name: update - - command_started_event: - command: - find: *collection_name - filter: { "_id": { "$eq": 1 }} - command_name: find - outcome: - collection: - data: - - { "_id": 1, "encryptedIndexed": { "$$type": "binData" }, "__safeContent__": [{ "$binary" : { "base64" : "rhe7/w8Ob8Unl44rGr/moScx6m5VODQnscDhF4Nkn6g=", "subType" : "00" } }] } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/fle2v2-validatorAndPartialFieldExpression.json b/testdata/client-side-encryption/legacy/fle2v2-validatorAndPartialFieldExpression.json deleted file mode 100644 index 901c4dd841..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-validatorAndPartialFieldExpression.json +++ /dev/null @@ -1,503 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "7.0.0", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "tests": [ - { - "description": "create with a validator on an unencrypted field is OK", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection", - "validator": { - "unencrypted_string": "foo" - } - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - } - ] - }, - { - "description": "create with a validator on an encrypted field is an error", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection", - "validator": { - "encryptedIndexed": "foo" - } - }, - "result": { - "errorContains": "Comparison to encrypted fields not supported" - } - } - ] - }, - { - "description": "collMod with a validator on an unencrypted field is OK", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "collMod": "encryptedCollection", - "validator": { - "unencrypted_string": "foo" - } - } - } - } - ] - }, - { - "description": "collMod with a validator on an encrypted field is an error", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "collMod": "encryptedCollection", - "validator": { - "encryptedIndexed": "foo" - } - } - }, - "result": { - "errorContains": "Comparison to encrypted fields not supported" - } - } - ] - }, - { - "description": "createIndexes with a partialFilterExpression on an unencrypted field is OK", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "createIndexes": "encryptedCollection", - "indexes": [ - { - "name": "name", - "key": { - "name": 1 - }, - "partialFilterExpression": { - "unencrypted_string": "foo" - } - } - ] - } - } - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection", - "index": "name" - } - } - ] - }, - { - "description": "createIndexes with a partialFilterExpression on an encrypted field is an error", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "encryptedFieldsMap": { - "default.encryptedCollection": { - "fields": [ - { - "keyId": { - "$binary": { - "base64": "EjRWeBI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedIndexed", - "bsonType": "string", - "queries": { - "queryType": "equality", - "contention": { - "$numberLong": "0" - } - } - }, - { - "keyId": { - "$binary": { - "base64": "q83vqxI0mHYSNBI0VniQEg==", - "subType": "04" - } - }, - "path": "encryptedUnindexed", - "bsonType": "string" - } - ] - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "createIndexes": "encryptedCollection", - "indexes": [ - { - "name": "name", - "key": { - "name": 1 - }, - "partialFilterExpression": { - "encryptedIndexed": "foo" - } - } - ] - } - }, - "result": { - "errorContains": "Comparison to encrypted fields not supported" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/fle2v2-validatorAndPartialFieldExpression.yml b/testdata/client-side-encryption/legacy/fle2v2-validatorAndPartialFieldExpression.yml deleted file mode 100644 index 3eb90ea935..0000000000 --- a/testdata/client-side-encryption/legacy/fle2v2-validatorAndPartialFieldExpression.yml +++ /dev/null @@ -1,169 +0,0 @@ -# Requires libmongocrypt 1.8.0. -runOn: - # Require server version 6.0.0 to get behavior added in SERVER-64911. - - minServerVersion: "7.0.0" - # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol. - # FLE 2 Encrypted collections are not supported on standalone. - topology: [ "replicaset", "sharded", "load-balanced" ] - -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -tests: - - description: "create with a validator on an unencrypted field is OK" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - encryptedFieldsMap: - "default.encryptedCollection": {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - validator: - unencrypted_string: "foo" - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: "encryptedCollection" - - description: "create with a validator on an encrypted field is an error" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - encryptedFieldsMap: - "default.encryptedCollection": {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - validator: - encryptedIndexed: "foo" - result: - errorContains: "Comparison to encrypted fields not supported" - - description: "collMod with a validator on an unencrypted field is OK" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - encryptedFieldsMap: - "default.encryptedCollection": {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - - name: runCommand - object: database - arguments: - command: - collMod: "encryptedCollection" - validator: - unencrypted_string: "foo" - - description: "collMod with a validator on an encrypted field is an error" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - encryptedFieldsMap: - "default.encryptedCollection": {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - - name: runCommand - object: database - arguments: - command: - collMod: "encryptedCollection" - validator: - encryptedIndexed: "foo" - result: - errorContains: "Comparison to encrypted fields not supported" - - description: "createIndexes with a partialFilterExpression on an unencrypted field is OK" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - encryptedFieldsMap: - "default.encryptedCollection": {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - - name: runCommand - object: database - arguments: - command: - createIndexes: "encryptedCollection" - indexes: - - name: "name" - key: { name: 1 } - partialFilterExpression: - unencrypted_string: "foo" - - name: assertIndexExists - object: testRunner - arguments: - database: *database_name - collection: "encryptedCollection" - index: name - - description: "createIndexes with a partialFilterExpression on an encrypted field is an error" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - encryptedFieldsMap: - "default.encryptedCollection": {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - - name: runCommand - object: database - arguments: - command: - createIndexes: "encryptedCollection" - indexes: - - name: "name" - key: { name: 1 } - partialFilterExpression: - encryptedIndexed: "foo" - result: - errorContains: "Comparison to encrypted fields not supported" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/gcpKMS.json b/testdata/client-side-encryption/legacy/gcpKMS.json deleted file mode 100644 index c2c08b8a23..0000000000 --- a/testdata/client-side-encryption/legacy/gcpKMS.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": { - "properties": { - "encrypted_string_aws": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "encrypted_string_azure": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AZURE+AAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "encrypted_string_gcp": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "GCP+AAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "encrypted_string_local": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "encrypted_string_kmip": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "dBHpr8aITfeBQ15grpbLpQ==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "GCP+AAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "CiQAIgLj0WyktnB4dfYHo5SLZ41K4ASQrjJUaSzl5vvVH0G12G0SiQEAjlV8XPlbnHDEDFbdTO4QIe8ER2/172U1ouLazG0ysDtFFIlSvWX5ZnZUrRMmp/R2aJkzLXEt/zf8Mn4Lfm+itnjgo5R9K4pmPNvvPKNZX5C16lrPT+aA+rd+zXFSmlMg3i5jnxvTdLHhg3G7Q/Uv1ZIJskKt95bzLoe0tUVzRWMYXLIEcohnQg==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1601574333107" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1601574333107" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "gcp", - "projectId": "devprod-drivers", - "location": "global", - "keyRing": "key-ring-csfle", - "keyName": "key-name-csfle" - }, - "keyAltNames": [ - "altname", - "gcp_altname" - ] - } - ], - "tests": [ - { - "description": "Insert a document with auto encryption using GCP KMS provider", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "gcp": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string_gcp": "string0" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "GCP+AAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault" - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_string_gcp": { - "$binary": { - "base64": "ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string_gcp": { - "$binary": { - "base64": "ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg==", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/gcpKMS.yml b/testdata/client-side-encryption/legacy/gcpKMS.yml deleted file mode 100644 index 50b6a40bec..0000000000 --- a/testdata/client-side-encryption/legacy/gcpKMS.yml +++ /dev/null @@ -1,46 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {'properties': {'encrypted_string_aws': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'encrypted_string_azure': {'encrypt': {'keyId': [{'$binary': {'base64': 'AZURE+AAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'encrypted_string_gcp': {'encrypt': {'keyId': [{'$binary': {'base64': 'GCP+AAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'encrypted_string_local': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'encrypted_string_kmip': {'encrypt': {'keyId': [{'$binary': {'base64': 'dBHpr8aITfeBQ15grpbLpQ==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'_id': {'$binary': {'base64': 'GCP+AAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'CiQAIgLj0WyktnB4dfYHo5SLZ41K4ASQrjJUaSzl5vvVH0G12G0SiQEAjlV8XPlbnHDEDFbdTO4QIe8ER2/172U1ouLazG0ysDtFFIlSvWX5ZnZUrRMmp/R2aJkzLXEt/zf8Mn4Lfm+itnjgo5R9K4pmPNvvPKNZX5C16lrPT+aA+rd+zXFSmlMg3i5jnxvTdLHhg3G7Q/Uv1ZIJskKt95bzLoe0tUVzRWMYXLIEcohnQg==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1601574333107'}}, 'updateDate': {'$date': {'$numberLong': '1601574333107'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'gcp', 'projectId': 'devprod-drivers', 'location': 'global', 'keyRing': 'key-ring-csfle', 'keyName': 'key-name-csfle'}, 'keyAltNames': ['altname', 'gcp_altname']}] - -tests: - - description: "Insert a document with auto encryption using GCP KMS provider" - clientOptions: - autoEncryptOpts: - kmsProviders: - gcp: {} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_string_gcp: "string0" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: { $or: [ { _id: { $in: [ {'$binary': {'base64': 'GCP+AAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] } }, { keyAltNames: { $in: [] } } ] } - $db: keyvault - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { _id: 1, encrypted_string_gcp: {'$binary': {'base64': 'ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg==', 'subType': '06'}} } - ordered: true - command_name: insert - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/getMore.json b/testdata/client-side-encryption/legacy/getMore.json deleted file mode 100644 index ee99bf7537..0000000000 --- a/testdata/client-side-encryption/legacy/getMore.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - }, - { - "_id": 3, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACQ76HWOut3DZtQuV90hp1aaCpZn95vZIaWmn+wrBehcEtcFwyJlBdlyzDzZTWPZCPgiFq72Wvh6Y7VbpU9NAp3A==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "getMore with encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "batchSize": 2, - "filter": {} - }, - "result": [ - { - "_id": 1, - "encrypted_string": "string0" - }, - { - "_id": 2, - "encrypted_string": "string1" - }, - { - "_id": 3, - "encrypted_string": "string2" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "batchSize": 2 - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$$type": "long" - }, - "collection": "default", - "batchSize": 2 - }, - "command_name": "getMore" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - }, - { - "_id": 3, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACQ76HWOut3DZtQuV90hp1aaCpZn95vZIaWmn+wrBehcEtcFwyJlBdlyzDzZTWPZCPgiFq72Wvh6Y7VbpU9NAp3A==", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/getMore.yml b/testdata/client-side-encryption/legacy/getMore.yml deleted file mode 100644 index 4359ee8917..0000000000 --- a/testdata/client-side-encryption/legacy/getMore.yml +++ /dev/null @@ -1,61 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - &doc1_encrypted { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } - - &doc2_encrypted { _id: 3, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACQ76HWOut3DZtQuV90hp1aaCpZn95vZIaWmn+wrBehcEtcFwyJlBdlyzDzZTWPZCPgiFq72Wvh6Y7VbpU9NAp3A==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "getMore with encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: find - arguments: - batchSize: 2 - filter: {} - result: - - { _id: 1, encrypted_string: "string0" } - - { _id: 2, encrypted_string: "string1" } - - { _id: 3, encrypted_string: "string2" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - find: *collection_name - batchSize: 2 - command_name: find - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - getMore: { $$type: "long" } - collection: *collection_name - batchSize: 2 - command_name: getMore - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - *doc1_encrypted - - *doc2_encrypted \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/insert.json b/testdata/client-side-encryption/legacy/insert.json deleted file mode 100644 index cf2910fd7a..0000000000 --- a/testdata/client-side-encryption/legacy/insert.json +++ /dev/null @@ -1,344 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "insertOne with encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0", - "random": "abc" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - } - ] - } - } - }, - { - "description": "insertMany with encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertMany", - "arguments": { - "documents": [ - { - "_id": 1, - "encrypted_string": "string0", - "random": "abc" - }, - { - "_id": 2, - "encrypted_string": "string1" - } - ] - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/insert.yml b/testdata/client-side-encryption/legacy/insert.yml deleted file mode 100644 index 99521f0350..0000000000 --- a/testdata/client-side-encryption/legacy/insert.yml +++ /dev/null @@ -1,88 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "insertOne with encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_string: "string0", random: "abc" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}}, random: { $$type: "binData" } } - ordered: true - command_name: insert - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - description: "insertMany with encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertMany - arguments: - documents: - - *doc0 - - &doc1 { _id: 2, encrypted_string: "string1" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - *doc0_encrypted - - &doc1_encrypted { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } - ordered: true - command_name: insert - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - *doc1_encrypted \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/keyAltName.json b/testdata/client-side-encryption/legacy/keyAltName.json deleted file mode 100644 index 7f71b9dbeb..0000000000 --- a/testdata/client-side-encryption/legacy/keyAltName.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Insert with encryption using key alt name", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_w_altname": "string0", - "altname": "altname" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [] - } - }, - { - "keyAltNames": { - "$in": [ - "altname" - ] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_w_altname": { - "$$type": "binData" - }, - "altname": "altname" - } - ], - "ordered": true - }, - "command_name": "insert" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_w_altname": { - "$$type": "binData" - }, - "altname": "altname" - } - ] - } - } - }, - { - "description": "Replace with key alt name fails", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$set": { - "encrypted_w_altname": "string0" - } - }, - "upsert": true - }, - "result": { - "errorContains": "A non-static (JSONPointer) keyId is not supported" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/keyAltName.yml b/testdata/client-side-encryption/legacy/keyAltName.yml deleted file mode 100644 index a7660ba38c..0000000000 --- a/testdata/client-side-encryption/legacy/keyAltName.yml +++ /dev/null @@ -1,64 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Insert with encryption using key alt name" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_w_altname: "string0", altname: "altname" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {$or: [ { _id: { $in: [] } }, { keyAltNames: { $in: [ "altname" ] } } ] } - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { _id: 1, encrypted_w_altname: { $$type: "binData" }, altname: "altname" } - ordered: true - command_name: insert - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - description: "Replace with key alt name fails" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: {} - update: { $set: { encrypted_w_altname: "string0" } } - upsert: true - result: - errorContains: "A non-static (JSONPointer) keyId is not supported" - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: [] \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/keyCache.json b/testdata/client-side-encryption/legacy/keyCache.json deleted file mode 100644 index 912ce80020..0000000000 --- a/testdata/client-side-encryption/legacy/keyCache.json +++ /dev/null @@ -1,270 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Insert with deterministic encryption, then find it", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "keyExpirationMS": 1 - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0" - } - } - }, - { - "name": "wait", - "object": "testRunner", - "arguments": { - "ms": 50 - } - }, - { - "name": "find", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1, - "encrypted_string": "string0" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/keyCache.yml b/testdata/client-side-encryption/legacy/keyCache.yml deleted file mode 100644 index 28acf7a2ee..0000000000 --- a/testdata/client-side-encryption/legacy/keyCache.yml +++ /dev/null @@ -1,69 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Insert with deterministic encryption, then find it" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - keyExpirationMS: 1 - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_string: "string0" } - - name: wait - object: testRunner - arguments: - ms: 50 # Wait long enough to account for coarse time resolution on Windows (CDRIVER-4526). - - name: find - arguments: - filter: { _id: 1 } - result: [*doc0] - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: { _id: 1 } - command_name: find - # The cache has expired and the key must be fetched again - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted diff --git a/testdata/client-side-encryption/legacy/kmipKMS.json b/testdata/client-side-encryption/legacy/kmipKMS.json deleted file mode 100644 index 5749d21ab8..0000000000 --- a/testdata/client-side-encryption/legacy/kmipKMS.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": { - "properties": { - "encrypted_string_aws": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "encrypted_string_azure": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AZURE+AAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "encrypted_string_gcp": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "GCP+AAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "encrypted_string_local": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "encrypted_string_kmip": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "dBHpr8aITfeBQ15grpbLpQ==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "dBHpr8aITfeBQ15grpbLpQ==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "eUYDyB0HuWb+lQgUwO+6qJQyTTDTY2gp9FbemL7ZFo0pvr0x6rm6Ff9OVUTGH6HyMKipaeHdiIJU1dzsLwvqKvi7Beh+U4iaIWX/K0oEg1GOsJc0+Z/in8gNHbGUYLmycHViM3LES3kdt7FdFSUl5rEBHrM71yoNEXImz17QJWMGOuT4x6yoi2pvnaRJwfrI4DjpmnnTrDMac92jgZehbg==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1634220190041" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1634220190041" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "kmip", - "keyId": "1" - }, - "keyAltNames": [ - "altname", - "kmip_altname" - ] - } - ], - "tests": [ - { - "description": "Insert a document with auto encryption using KMIP KMS provider", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "kmip": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string_kmip": "string0" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "dBHpr8aITfeBQ15grpbLpQ==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault" - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_string_kmip": { - "$binary": { - "base64": "AXQR6a/GiE33gUNeYK6Wy6UCKCwtKFIsL8eKObDVxvqGupJNUk7kXswHhB7G5j/C1D+6no+Asra0KgSU43bTL3ooIBLVyIzbV5CDJYqzAsa4WQ==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string_kmip": { - "$binary": { - "base64": "AXQR6a/GiE33gUNeYK6Wy6UCKCwtKFIsL8eKObDVxvqGupJNUk7kXswHhB7G5j/C1D+6no+Asra0KgSU43bTL3ooIBLVyIzbV5CDJYqzAsa4WQ==", - "subType": "06" - } - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/kmipKMS.yml b/testdata/client-side-encryption/legacy/kmipKMS.yml deleted file mode 100644 index 874a92bf3b..0000000000 --- a/testdata/client-side-encryption/legacy/kmipKMS.yml +++ /dev/null @@ -1,46 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {'properties': {'encrypted_string_aws': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'encrypted_string_azure': {'encrypt': {'keyId': [{'$binary': {'base64': 'AZURE+AAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'encrypted_string_gcp': {'encrypt': {'keyId': [{'$binary': {'base64': 'GCP+AAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'encrypted_string_local': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'encrypted_string_kmip': {'encrypt': {'keyId': [{'$binary': {'base64': 'dBHpr8aITfeBQ15grpbLpQ==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'_id': {'$binary': {'base64': 'dBHpr8aITfeBQ15grpbLpQ==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'eUYDyB0HuWb+lQgUwO+6qJQyTTDTY2gp9FbemL7ZFo0pvr0x6rm6Ff9OVUTGH6HyMKipaeHdiIJU1dzsLwvqKvi7Beh+U4iaIWX/K0oEg1GOsJc0+Z/in8gNHbGUYLmycHViM3LES3kdt7FdFSUl5rEBHrM71yoNEXImz17QJWMGOuT4x6yoi2pvnaRJwfrI4DjpmnnTrDMac92jgZehbg==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1634220190041'}}, 'updateDate': {'$date': {'$numberLong': '1634220190041'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'kmip', 'keyId': '1'}, 'keyAltNames': ['altname', 'kmip_altname']}] - -tests: - - description: "Insert a document with auto encryption using KMIP KMS provider" - clientOptions: - autoEncryptOpts: - kmsProviders: - kmip: {} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_string_kmip: "string0" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: { $or: [ { _id: { $in: [ {'$binary': {'base64': 'dBHpr8aITfeBQ15grpbLpQ==', 'subType': '04'}} ] } }, { keyAltNames: { $in: [] } } ] } - $db: keyvault - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { _id: 1, encrypted_string_kmip: {'$binary': {'base64': 'AXQR6a/GiE33gUNeYK6Wy6UCKCwtKFIsL8eKObDVxvqGupJNUk7kXswHhB7G5j/C1D+6no+Asra0KgSU43bTL3ooIBLVyIzbV5CDJYqzAsa4WQ==', 'subType': '06'}} } - ordered: true - command_name: insert - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/localKMS.json b/testdata/client-side-encryption/legacy/localKMS.json deleted file mode 100644 index 67c4ba1308..0000000000 --- a/testdata/client-side-encryption/legacy/localKMS.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": { - "properties": { - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "Ce9HSz/HKKGkIt4uyy+jDuKGA+rLC2cycykMo6vc8jXxqa1UVDYHWq1r+vZKbnnSRBfB981akzRKZCFpC05CTyFqDhXv6OnMjpG97OZEREGIsHEYiJkBW0jJJvfLLgeLsEpBzsro9FztGGXASxyxFRZFhXvHxyiLOKrdWfs7X1O/iK3pEoHMx6uSNSfUOgbebLfIqW7TO++iQS5g1xovXA==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ], - "tests": [ - { - "description": "Insert a document with auto encryption using local KMS provider", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {}, - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0", - "random": "abc" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault" - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACV/+zJmpqMU47yxS/xIVAviGi7wHDuFwaULAixEAoIh0xHz73UYOM3D8D44gcJn67EROjbz4ITpYzzlCJovDL0Q==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACV/+zJmpqMU47yxS/xIVAviGi7wHDuFwaULAixEAoIh0xHz73UYOM3D8D44gcJn67EROjbz4ITpYzzlCJovDL0Q==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/localKMS.yml b/testdata/client-side-encryption/legacy/localKMS.yml deleted file mode 100644 index 4c0d962f32..0000000000 --- a/testdata/client-side-encryption/legacy/localKMS.yml +++ /dev/null @@ -1,47 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {'properties': {'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}}, 'bsonType': 'object'} -key_vault_data: [{'_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'Ce9HSz/HKKGkIt4uyy+jDuKGA+rLC2cycykMo6vc8jXxqa1UVDYHWq1r+vZKbnnSRBfB981akzRKZCFpC05CTyFqDhXv6OnMjpG97OZEREGIsHEYiJkBW0jJJvfLLgeLsEpBzsro9FztGGXASxyxFRZFhXvHxyiLOKrdWfs7X1O/iK3pEoHMx6uSNSfUOgbebLfIqW7TO++iQS5g1xovXA==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}}] - -tests: - - description: "Insert a document with auto encryption using local KMS provider" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_string: "string0", random: "abc" } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: { $or: [ { _id: { $in: [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] } }, { keyAltNames: { $in: [] } } ] } - $db: keyvault - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACV/+zJmpqMU47yxS/xIVAviGi7wHDuFwaULAixEAoIh0xHz73UYOM3D8D44gcJn67EROjbz4ITpYzzlCJovDL0Q==', 'subType': '06'}}, random: { $$type: "binData" } } - ordered: true - command_name: insert - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/localSchema.json b/testdata/client-side-encryption/legacy/localSchema.json deleted file mode 100644 index 4698520f6f..0000000000 --- a/testdata/client-side-encryption/legacy/localSchema.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": {}, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "A local schema should override", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0" - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1, - "encrypted_string": "string0" - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "A local schema with no encryption is an error", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "test": { - "bsonType": "string" - } - }, - "bsonType": "object", - "required": [ - "test" - ] - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0" - } - }, - "result": { - "errorContains": "JSON schema keyword 'required' is only allowed with a remote schema" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/localSchema.yml b/testdata/client-side-encryption/legacy/localSchema.yml deleted file mode 100644 index 89b4bd51d0..0000000000 --- a/testdata/client-side-encryption/legacy/localSchema.yml +++ /dev/null @@ -1,65 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -# configure an empty schema -json_schema: {} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "A local schema should override" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_string: "string0" } - - name: find - arguments: - filter: { _id: 1 } - result: [*doc0] - expectations: - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: { _id: 1 } - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - description: "A local schema with no encryption is an error" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'test': {'bsonType': 'string'}}, 'bsonType': 'object', 'required': ['test']} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: { _id: 1, encrypted_string: "string0" } - result: - errorContains: "JSON schema keyword 'required' is only allowed with a remote schema" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/malformedCiphertext.json b/testdata/client-side-encryption/legacy/malformedCiphertext.json deleted file mode 100644 index c81330ce83..0000000000 --- a/testdata/client-side-encryption/legacy/malformedCiphertext.json +++ /dev/null @@ -1,321 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "00" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQ==", - "subType": "06" - } - } - }, - { - "_id": 3, - "encrypted_string": { - "$binary": { - "base64": "AQAAa2V2aW4gYWxiZXJ0c29uCg==", - "subType": "06" - } - } - } - ], - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Wrong subtype", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "00" - } - } - } - ] - } - ] - }, - { - "description": "Empty data", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "_id": 2 - } - }, - "result": { - "errorContains": "malformed ciphertext" - } - } - ] - }, - { - "description": "Malformed data", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "_id": 3 - } - }, - "result": { - "errorContains": "not all keys requested were satisfied" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/malformedCiphertext.yml b/testdata/client-side-encryption/legacy/malformedCiphertext.yml deleted file mode 100644 index e27c1dfdc2..0000000000 --- a/testdata/client-side-encryption/legacy/malformedCiphertext.yml +++ /dev/null @@ -1,69 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0 - _id: 1 - encrypted_string: - $binary: - base64: AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg== - subType: "00" - - _id: 2 - encrypted_string: - $binary: - base64: "AQ==" - subType: "06" - - _id: 3 - encrypted_string: - $binary: - base64: "AQAAa2V2aW4gYWxiZXJ0c29uCg==" - subType: "06" - -# Since test requires invalid data to be inserted, use a local schema. -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Wrong subtype" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: find - arguments: - filter: { _id: 1 } - result: - # gets returned without decryption - - *doc0 - - description: "Empty data" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: find - arguments: - filter: { _id: 2 } - result: - errorContains: "malformed ciphertext" - - description: "Malformed data" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: find - arguments: - filter: { _id: 3 } - result: - # ciphertext can only validate subtype (which is correct) - # but takes the 16 byte UUID to look up key. Fails to find. - errorContains: "not all keys requested were satisfied" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/maxWireVersion.json b/testdata/client-side-encryption/legacy/maxWireVersion.json deleted file mode 100644 index f04f58dffd..0000000000 --- a/testdata/client-side-encryption/legacy/maxWireVersion.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "runOn": [ - { - "maxServerVersion": "4.0.99" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "operation fails with maxWireVersion < 8", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - }, - "extraOptions": { - "mongocryptdBypassSpawn": true - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "encrypted_string": "string0" - } - }, - "result": { - "errorContains": "Auto-encryption requires a minimum MongoDB version of 4.2" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/maxWireVersion.yml b/testdata/client-side-encryption/legacy/maxWireVersion.yml deleted file mode 100644 index 87c4c993f9..0000000000 --- a/testdata/client-side-encryption/legacy/maxWireVersion.yml +++ /dev/null @@ -1,22 +0,0 @@ -runOn: - - maxServerVersion: "4.0.99" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "operation fails with maxWireVersion < 8" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - extraOptions: - mongocryptdBypassSpawn: true # mongocryptd probably won't be on the path - operations: - - name: insertOne - arguments: - document: { encrypted_string: "string0" } - result: - errorContains: "Auto-encryption requires a minimum MongoDB version of 4.2" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/missingKey.json b/testdata/client-side-encryption/legacy/missingKey.json deleted file mode 100644 index 275147bb72..0000000000 --- a/testdata/client-side-encryption/legacy/missingKey.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "Insert with encryption on a missing key", - "clientOptions": { - "autoEncryptOpts": { - "keyVaultNamespace": "keyvault.different", - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_string": "string0", - "random": "abc" - } - }, - "result": { - "errorContains": "not all keys requested were satisfied" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - }, - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "different", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/missingKey.yml b/testdata/client-side-encryption/legacy/missingKey.yml deleted file mode 100644 index 2be5395108..0000000000 --- a/testdata/client-side-encryption/legacy/missingKey.yml +++ /dev/null @@ -1,42 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "Insert with encryption on a missing key" - clientOptions: - autoEncryptOpts: - keyVaultNamespace: "keyvault.different" - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_string: "string0", random: "abc" } - result: - errorContains: "not all keys requested were satisfied" - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: [] - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: different - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/noSchema.json b/testdata/client-side-encryption/legacy/noSchema.json deleted file mode 100644 index 095434f886..0000000000 --- a/testdata/client-side-encryption/legacy/noSchema.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "unencrypted", - "tests": [ - { - "description": "Insert on an unencrypted collection", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1 - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "unencrypted" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "insert": "unencrypted", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true - }, - "command_name": "insert" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/noSchema.yml b/testdata/client-side-encryption/legacy/noSchema.yml deleted file mode 100644 index 5c6811688f..0000000000 --- a/testdata/client-side-encryption/legacy/noSchema.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Test auto encryption on a collection with no jsonSchema configured. -# This is a regression test for MONGOCRYPT-378/PYTHON-3188. -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "unencrypted" - -tests: - - description: "Insert on an unencrypted collection" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1 } - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - insert: *collection_name - documents: - - *doc0 - ordered: true - command_name: insert - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0 \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/replaceOne.json b/testdata/client-side-encryption/legacy/replaceOne.json deleted file mode 100644 index 9757686819..0000000000 --- a/testdata/client-side-encryption/legacy/replaceOne.json +++ /dev/null @@ -1,239 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "replaceOne with encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "replaceOne", - "arguments": { - "filter": { - "encrypted_string": "string0" - }, - "replacement": { - "encrypted_string": "string1", - "random": "abc" - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "update": "default", - "updates": [ - { - "q": { - "encrypted_string": { - "$eq": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - }, - "u": { - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - } - } - ], - "ordered": true - }, - "command_name": "update" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - } - ] - } - } - } - ] -} diff --git a/testdata/client-side-encryption/legacy/replaceOne.yml b/testdata/client-side-encryption/legacy/replaceOne.yml deleted file mode 100644 index e3b50a828b..0000000000 --- a/testdata/client-side-encryption/legacy/replaceOne.yml +++ /dev/null @@ -1,54 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "replaceOne with encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: replaceOne - arguments: - filter: { encrypted_string: "string0" } - replacement: { encrypted_string: "string1", random: "abc" } - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - update: *collection_name - updates: - - q: { encrypted_string: { $eq: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } } - u: { encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}}, random: { $$type: "binData" } } - ordered: true - command_name: update - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}}, random: { $$type: "binData" } } \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/types.json b/testdata/client-side-encryption/legacy/types.json deleted file mode 100644 index a6c6507e90..0000000000 --- a/testdata/client-side-encryption/legacy/types.json +++ /dev/null @@ -1,1646 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "json_schema": {}, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "type=objectId", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_objectId": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "objectId", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_objectId": { - "$oid": "AAAAAAAAAAAAAAAAAAAAAAAA" - } - } - } - }, - { - "name": "findOne", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "encrypted_objectId": { - "$oid": "AAAAAAAAAAAAAAAAAAAAAAAA" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_objectId": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAAHmkTPqvzfHMWpvS1mEsrjOxVQ2dyihEgIFWD5E0eNEsiMBQsC0GuvjdqYRL5DHLFI1vKuGek7EYYp0Qyii/tHqA==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_objectId": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAAHmkTPqvzfHMWpvS1mEsrjOxVQ2dyihEgIFWD5E0eNEsiMBQsC0GuvjdqYRL5DHLFI1vKuGek7EYYp0Qyii/tHqA==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "type=symbol", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_symbol": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "symbol", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_symbol": { - "$symbol": "test" - } - } - } - }, - { - "name": "findOne", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "encrypted_symbol": { - "$symbol": "test" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_symbol": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAAOOmvDmWjcuKsSCO7U/7t9HJ8eI73B6wduyMbdkvn7n7V4uTJes/j+BTtneSdyG2JHKHGkevWAJSIU2XoO66BSXw==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_symbol": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAAOOmvDmWjcuKsSCO7U/7t9HJ8eI73B6wduyMbdkvn7n7V4uTJes/j+BTtneSdyG2JHKHGkevWAJSIU2XoO66BSXw==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "type=int", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_int": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "int", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_int": { - "$numberInt": "123" - } - } - } - }, - { - "name": "findOne", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "encrypted_int": { - "$numberInt": "123" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_int": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAAQPNXJVXMEjGZnftMuf2INKufXCtQIRHdw5wTgn6QYt3ejcoAXyiwI4XIUizkpsob494qpt2in4tWeiO7b9zkA8Q==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_int": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAAQPNXJVXMEjGZnftMuf2INKufXCtQIRHdw5wTgn6QYt3ejcoAXyiwI4XIUizkpsob494qpt2in4tWeiO7b9zkA8Q==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "type=double", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_double": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "double", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_double": { - "$numberDouble": "1.23" - } - } - }, - "result": { - "errorContains": "element of type: double" - } - } - ] - }, - { - "description": "type=decimal", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_decimal": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "decimal", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_decimal": { - "$numberDecimal": "1.23" - } - } - }, - "result": { - "errorContains": "element of type: decimal" - } - } - ] - }, - { - "description": "type=binData", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_binData": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "binData", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_binData": { - "$binary": { - "base64": "AAAA", - "subType": "00" - } - } - } - } - }, - { - "name": "findOne", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "encrypted_binData": { - "$binary": { - "base64": "AAAA", - "subType": "00" - } - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_binData": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAAFB/KHZQHaHHo8fctcl7v6kR+sLkJoTRx2cPSSck9ya+nbGROSeFhdhDRHaCzhV78fDEqnMDSVPNi+ZkbaIh46GQ==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_binData": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAAFB/KHZQHaHHo8fctcl7v6kR+sLkJoTRx2cPSSck9ya+nbGROSeFhdhDRHaCzhV78fDEqnMDSVPNi+ZkbaIh46GQ==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "type=javascript", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_javascript": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "javascript", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_javascript": { - "$code": "var x = 1;" - } - } - } - }, - { - "name": "findOne", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "encrypted_javascript": { - "$code": "var x = 1;" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_javascript": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAANrvMgJkTKWGMc9wt3E2RBR2Hu5gL9p+vIIdHe9FcOm99t1W480/oX1Gnd87ON3B399DuFaxi/aaIiQSo7gTX6Lw==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_javascript": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAANrvMgJkTKWGMc9wt3E2RBR2Hu5gL9p+vIIdHe9FcOm99t1W480/oX1Gnd87ON3B399DuFaxi/aaIiQSo7gTX6Lw==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "type=javascriptWithScope", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_javascriptWithScope": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "javascriptWithScope", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_javascriptWithScope": { - "$code": "var x = 1;", - "$scope": {} - } - } - }, - "result": { - "errorContains": "element of type: javascriptWithScope" - } - } - ] - }, - { - "description": "type=object", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_object": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "object", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_object": {} - } - }, - "result": { - "errorContains": "element of type: object" - } - } - ] - }, - { - "description": "type=timestamp", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_timestamp": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "timestamp", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_timestamp": { - "$timestamp": { - "t": 123, - "i": 456 - } - } - } - } - }, - { - "name": "findOne", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "encrypted_timestamp": { - "$timestamp": { - "t": 123, - "i": 456 - } - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_timestamp": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAARJHaM4Gq3MpDTdBasBsEolQaOmxJQU1wsZVaSFAOLpEh1QihDglXI95xemePFMKhg+KNpFg7lw1ChCs2Wn/c26Q==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_timestamp": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAARJHaM4Gq3MpDTdBasBsEolQaOmxJQU1wsZVaSFAOLpEh1QihDglXI95xemePFMKhg+KNpFg7lw1ChCs2Wn/c26Q==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "type=regex", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_regex": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "regex", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_regex": { - "$regularExpression": { - "pattern": "test", - "options": "" - } - } - } - } - }, - { - "name": "findOne", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "encrypted_regex": { - "$regularExpression": { - "pattern": "test", - "options": "" - } - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_regex": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAALVnxM4UqGhqf5eXw6nsS08am3YJrTf1EvjKitT8tyyMAbHsICIU3GUjuC7EBofCHbusvgo7pDyaClGostFz44nA==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_regex": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAALVnxM4UqGhqf5eXw6nsS08am3YJrTf1EvjKitT8tyyMAbHsICIU3GUjuC7EBofCHbusvgo7pDyaClGostFz44nA==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "type=date", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_date": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "date", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_date": { - "$date": { - "$numberLong": "123" - } - } - } - } - }, - { - "name": "findOne", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "encrypted_date": { - "$date": { - "$numberLong": "123" - } - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "insert": "default", - "documents": [ - { - "_id": 1, - "encrypted_date": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAAJ5sN7u6l97+DswfKTqZAijSTSOo5htinGKQKUD7pHNJYlLXGOkB4glrCu7ibu0g3344RHQ5yUp4YxMEa8GD+Snw==", - "subType": "06" - } - } - } - ], - "ordered": true - }, - "command_name": "insert" - } - }, - { - "command_started_event": { - "command": { - "find": "default", - "filter": { - "_id": 1 - } - }, - "command_name": "find" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_date": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAAJ5sN7u6l97+DswfKTqZAijSTSOo5htinGKQKUD7pHNJYlLXGOkB4glrCu7ibu0g3344RHQ5yUp4YxMEa8GD+Snw==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "type=minKey", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_minKey": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "minKey", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_minKey": { - "$minKey": 1 - } - } - }, - "result": { - "errorContains": "Cannot encrypt element of type: minKey" - } - } - ] - }, - { - "description": "type=maxKey", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_maxKey": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "maxKey", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_maxKey": { - "$maxKey": 1 - } - } - }, - "result": { - "errorContains": "Cannot encrypt element of type: maxKey" - } - } - ] - }, - { - "description": "type=undefined", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_undefined": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "undefined", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_undefined": { - "$undefined": true - } - } - }, - "result": { - "errorContains": "Cannot encrypt element of type: undefined" - } - } - ] - }, - { - "description": "type=array", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_array": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "array", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_array": [] - } - }, - "result": { - "errorContains": "element of type: array" - } - } - ] - }, - { - "description": "type=bool", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_bool": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "bool", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_bool": true - } - }, - "result": { - "errorContains": "element of type: bool" - } - } - ] - }, - { - "description": "type=null", - "clientOptions": { - "autoEncryptOpts": { - "schemaMap": { - "default.default": { - "properties": { - "encrypted_null": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "null", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - }, - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "encrypted_null": true - } - }, - "result": { - "errorContains": "Cannot encrypt element of type: null" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/types.yml b/testdata/client-side-encryption/legacy/types.yml deleted file mode 100644 index 871bc115fa..0000000000 --- a/testdata/client-side-encryption/legacy/types.yml +++ /dev/null @@ -1,501 +0,0 @@ -# Attempt to round trip some BSON types. -# Note: db pointer is excluded since it is deprecated and numberlong is excluded due to different driver interpretations of { $numberLong: '123' } in relaxed JSON parsing. - -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: [] -json_schema: {} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "type=objectId" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_objectId': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'objectId', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc0 { _id: 1, encrypted_objectId: {"$oid": "AAAAAAAAAAAAAAAAAAAAAAAA"} } - - name: findOne - arguments: - filter: { _id: 1 } - result: *doc0 - expectations: - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc0_encrypted { _id: 1, encrypted_objectId: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAAHmkTPqvzfHMWpvS1mEsrjOxVQ2dyihEgIFWD5E0eNEsiMBQsC0GuvjdqYRL5DHLFI1vKuGek7EYYp0Qyii/tHqA==', 'subType': '06'}} } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: {_id: 1} - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc0_encrypted - - description: "type=symbol" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_symbol': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'symbol', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc1 { _id: 1, encrypted_symbol: {"$symbol": "test"} } - - name: findOne - arguments: - filter: { _id: 1 } - result: *doc1 - expectations: - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc1_encrypted { _id: 1, encrypted_symbol: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAAOOmvDmWjcuKsSCO7U/7t9HJ8eI73B6wduyMbdkvn7n7V4uTJes/j+BTtneSdyG2JHKHGkevWAJSIU2XoO66BSXw==', 'subType': '06'}} } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: {_id: 1} - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc1_encrypted - - description: "type=int" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_int': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'int', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc2 { _id: 1, encrypted_int: {"$numberInt": "123"} } - - name: findOne - arguments: - filter: { _id: 1 } - result: *doc2 - expectations: - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc2_encrypted { _id: 1, encrypted_int: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAAQPNXJVXMEjGZnftMuf2INKufXCtQIRHdw5wTgn6QYt3ejcoAXyiwI4XIUizkpsob494qpt2in4tWeiO7b9zkA8Q==', 'subType': '06'}} } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: {_id: 1} - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc2_encrypted - - description: "type=double" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_double': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'double', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc4 { _id: 1, encrypted_double: {"$numberDouble": "1.23"} } - result: - # DRIVERS-2272: The expected error message changed in mongocryptd 6.0. Before it was: - # "Cannot use deterministic encryption for element of type: double" - # After it is: - # "Cannot encrypt element of type: double" - # Only check for the common suffix. - errorContains: "element of type: double" - - description: "type=decimal" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_decimal': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'decimal', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc5 { _id: 1, encrypted_decimal: {"$numberDecimal": "1.23"} } - result: - # DRIVERS-2272: The expected error message changed in mongocryptd 6.0. Before it was: - # "Cannot use deterministic encryption for element of type: decimal" - # After it is: - # "Cannot encrypt element of type: decimal" - # Only check for the common suffix. - errorContains: "element of type: decimal" - - description: "type=binData" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_binData': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'binData', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc6 { _id: 1, encrypted_binData: {"$binary": { base64: "AAAA", subType: "00" } } } - - name: findOne - arguments: - filter: { _id: 1 } - result: *doc6 - expectations: - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc6_encrypted { _id: 1, encrypted_binData: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAAFB/KHZQHaHHo8fctcl7v6kR+sLkJoTRx2cPSSck9ya+nbGROSeFhdhDRHaCzhV78fDEqnMDSVPNi+ZkbaIh46GQ==', 'subType': '06'}} } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: {_id: 1} - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc6_encrypted - - description: "type=javascript" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_javascript': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'javascript', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc7 { _id: 1, encrypted_javascript: {"$code": "var x = 1;" } } - - name: findOne - arguments: - filter: { _id: 1 } - result: *doc7 - expectations: - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc7_encrypted { _id: 1, encrypted_javascript: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAANrvMgJkTKWGMc9wt3E2RBR2Hu5gL9p+vIIdHe9FcOm99t1W480/oX1Gnd87ON3B399DuFaxi/aaIiQSo7gTX6Lw==', 'subType': '06'}} } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: {_id: 1} - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc7_encrypted - - description: "type=javascriptWithScope" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_javascriptWithScope': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'javascriptWithScope', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc8 { _id: 1, encrypted_javascriptWithScope: {"$code": "var x = 1;", "$scope": {} } } - result: - # DRIVERS-2272: The expected error message changed in mongocryptd 6.0. Before it was: - # "Cannot use deterministic encryption for element of type: javascriptWithScope" - # After it is: - # "Cannot encrypt element of type: javascriptWithScope" - # Only check for the common suffix. - errorContains: "element of type: javascriptWithScope" - - description: "type=object" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_object': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'object', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc9 { _id: 1, encrypted_object: {} } - result: - # DRIVERS-2272: The expected error message changed in mongocryptd 6.0. Before it was: - # "Cannot use deterministic encryption for element of type: object" - # After it is: - # "Cannot encrypt element of type: object" - # Only check for the common suffix. - errorContains: "element of type: object" - - description: "type=timestamp" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_timestamp': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'timestamp', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc10 { _id: 1, encrypted_timestamp: {$timestamp: {t: 123, i: 456}} } - - name: findOne - arguments: - filter: { _id: 1 } - result: *doc10 - expectations: - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc10_encrypted { _id: 1, encrypted_timestamp: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAARJHaM4Gq3MpDTdBasBsEolQaOmxJQU1wsZVaSFAOLpEh1QihDglXI95xemePFMKhg+KNpFg7lw1ChCs2Wn/c26Q==', 'subType': '06'}} } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: {_id: 1} - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc10_encrypted - - description: "type=regex" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_regex': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'regex', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc11 { _id: 1, encrypted_regex: {$regularExpression: { pattern: "test", options: ""}} } - - name: findOne - arguments: - filter: { _id: 1 } - result: *doc11 - expectations: - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc11_encrypted { _id: 1, encrypted_regex: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAALVnxM4UqGhqf5eXw6nsS08am3YJrTf1EvjKitT8tyyMAbHsICIU3GUjuC7EBofCHbusvgo7pDyaClGostFz44nA==', 'subType': '06'}} } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: {_id: 1} - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc11_encrypted - - description: "type=date" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_date': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'date', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc13 { _id: 1, encrypted_date: {$date: { $numberLong: "123" }} } - - name: findOne - arguments: - filter: { _id: 1 } - result: *doc13 - expectations: - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - insert: *collection_name - documents: - - &doc13_encrypted { _id: 1, encrypted_date: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAAJ5sN7u6l97+DswfKTqZAijSTSOo5htinGKQKUD7pHNJYlLXGOkB4glrCu7ibu0g3344RHQ5yUp4YxMEa8GD+Snw==', 'subType': '06'}} } - ordered: true - command_name: insert - - command_started_event: - command: - find: *collection_name - filter: {_id: 1} - command_name: find - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - *doc13_encrypted - - description: "type=minKey" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_minKey': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'minKey', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc14 { _id: 1, encrypted_minKey: {$minKey: 1} } - result: - errorContains: "Cannot encrypt element of type: minKey" - - description: "type=maxKey" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_maxKey': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'maxKey', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc15 { _id: 1, encrypted_maxKey: {$maxKey: 1} } - result: - errorContains: "Cannot encrypt element of type: maxKey" - - description: "type=undefined" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_undefined': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'undefined', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc16 { _id: 1, encrypted_undefined: {$undefined: true} } - result: - errorContains: "Cannot encrypt element of type: undefined" - - description: "type=array" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_array': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'array', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc17 { _id: 1, encrypted_array: [] } - result: - # DRIVERS-2272: The expected error message changed in mongocryptd 6.0. Before it was: - # "Cannot use deterministic encryption for element of type: array" - # After it is: - # "Cannot encrypt element of type: array" - # Only check for the common suffix. - errorContains: "element of type: array" - - description: "type=bool" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_bool': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'bool', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc18 { _id: 1, encrypted_bool: true } - result: - # DRIVERS-2272: The expected error message changed in mongocryptd 6.0. Before it was: - # "Cannot use deterministic encryption for element of type: bool" - # After it is: - # "Cannot encrypt element of type: bool" - # Only check for the common suffix. - errorContains: "element of type: bool" - - description: "type=null" - clientOptions: - autoEncryptOpts: - schemaMap: - "default.default": {'properties': {'encrypted_null': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'null', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: insertOne - arguments: - document: &doc19 { _id: 1, encrypted_null: true } - result: - errorContains: "Cannot encrypt element of type: null" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/unsupportedCommand.json b/testdata/client-side-encryption/legacy/unsupportedCommand.json deleted file mode 100644 index 3188715115..0000000000 --- a/testdata/client-side-encryption/legacy/unsupportedCommand.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "x": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "x": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "mapReduce deterministic encryption (unsupported)", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "mapReduce", - "arguments": { - "map": { - "$code": "function inc() { return emit(0, this.x + 1) }" - }, - "reduce": { - "$code": "function sum(key, values) { return values.reduce((acc, x) => acc + x); }" - }, - "out": { - "inline": 1 - } - }, - "result": { - "errorContains": "command not supported for auto encryption: mapreduce" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/unsupportedCommand.yml b/testdata/client-side-encryption/legacy/unsupportedCommand.yml deleted file mode 100644 index e9edb0f58f..0000000000 --- a/testdata/client-side-encryption/legacy/unsupportedCommand.yml +++ /dev/null @@ -1,25 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, x: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - &doc1_encrypted { _id: 2, x: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "mapReduce deterministic encryption (unsupported)" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: mapReduce - arguments: - map: { $code: "function inc() { return emit(0, this.x + 1) }" } - reduce: { $code: "function sum(key, values) { return values.reduce((acc, x) => acc + x); }" } - out: { inline: 1 } - result: - errorContains: "command not supported for auto encryption: mapreduce" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/updateMany.json b/testdata/client-side-encryption/legacy/updateMany.json deleted file mode 100644 index 823909044b..0000000000 --- a/testdata/client-side-encryption/legacy/updateMany.json +++ /dev/null @@ -1,307 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "updateMany with deterministic encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateMany", - "arguments": { - "filter": { - "encrypted_string": { - "$in": [ - "string0", - "string1" - ] - } - }, - "update": { - "$set": { - "encrypted_string": "string2", - "random": "abc" - } - } - }, - "result": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "update": "default", - "updates": [ - { - "q": { - "encrypted_string": { - "$in": [ - { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - }, - { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - } - ] - } - }, - "u": { - "$set": { - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACQ76HWOut3DZtQuV90hp1aaCpZn95vZIaWmn+wrBehcEtcFwyJlBdlyzDzZTWPZCPgiFq72Wvh6Y7VbpU9NAp3A==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - } - }, - "multi": true, - "upsert": false - } - ], - "ordered": true - }, - "command_name": "update" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACQ76HWOut3DZtQuV90hp1aaCpZn95vZIaWmn+wrBehcEtcFwyJlBdlyzDzZTWPZCPgiFq72Wvh6Y7VbpU9NAp3A==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - }, - { - "_id": 2, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACQ76HWOut3DZtQuV90hp1aaCpZn95vZIaWmn+wrBehcEtcFwyJlBdlyzDzZTWPZCPgiFq72Wvh6Y7VbpU9NAp3A==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - } - ] - } - } - }, - { - "description": "updateMany fails when filtering on a random field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateMany", - "arguments": { - "filter": { - "random": "abc" - }, - "update": { - "$set": { - "encrypted_string": "string1" - } - } - }, - "result": { - "errorContains": "Cannot query on fields encrypted with the randomized encryption" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/updateMany.yml b/testdata/client-side-encryption/legacy/updateMany.yml deleted file mode 100644 index 6d8c7e9707..0000000000 --- a/testdata/client-side-encryption/legacy/updateMany.yml +++ /dev/null @@ -1,70 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - &doc1_encrypted { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "updateMany with deterministic encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateMany - arguments: - filter: { encrypted_string: { $in: [ "string0", "string1" ] } } - update: { $set: { encrypted_string: "string2", random: "abc" } } - result: - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - update: *collection_name - updates: - - q: { encrypted_string: { $in: [ {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}}, {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}} ] } } - u: { $set: { encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACQ76HWOut3DZtQuV90hp1aaCpZn95vZIaWmn+wrBehcEtcFwyJlBdlyzDzZTWPZCPgiFq72Wvh6Y7VbpU9NAp3A==', 'subType': '06'}}, random: { $$type: "binData" } } } - multi: true - upsert: false - ordered: true - command_name: update - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACQ76HWOut3DZtQuV90hp1aaCpZn95vZIaWmn+wrBehcEtcFwyJlBdlyzDzZTWPZCPgiFq72Wvh6Y7VbpU9NAp3A==', 'subType': '06'}}, random: { $$type: "binData" } } - - { _id: 2, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACQ76HWOut3DZtQuV90hp1aaCpZn95vZIaWmn+wrBehcEtcFwyJlBdlyzDzZTWPZCPgiFq72Wvh6Y7VbpU9NAp3A==', 'subType': '06'}}, random: { $$type: "binData" } } - - description: "updateMany fails when filtering on a random field" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateMany - arguments: - filter: { random: "abc" } - update: { $set: { encrypted_string: "string1" } } - result: - errorContains: "Cannot query on fields encrypted with the randomized encryption" \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/updateOne.json b/testdata/client-side-encryption/legacy/updateOne.json deleted file mode 100644 index 23bada964f..0000000000 --- a/testdata/client-side-encryption/legacy/updateOne.json +++ /dev/null @@ -1,465 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.10" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ], - "json_schema": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - }, - "key_vault_data": [ - { - "status": 1, - "_id": { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "keyAltNames": [ - "altname", - "another_altname" - ] - } - ], - "tests": [ - { - "description": "updateOne with deterministic encryption", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": { - "encrypted_string": "string0" - }, - "update": { - "$set": { - "encrypted_string": "string1", - "random": "abc" - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - }, - "command_name": "find" - } - }, - { - "command_started_event": { - "command": { - "update": "default", - "updates": [ - { - "q": { - "encrypted_string": { - "$eq": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - }, - "u": { - "$set": { - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - } - } - } - ], - "ordered": true - }, - "command_name": "update" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==", - "subType": "06" - } - }, - "random": { - "$$type": "binData" - } - } - ] - } - } - }, - { - "description": "updateOne fails when filtering on a random field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": { - "random": "abc" - }, - "update": { - "$set": { - "encrypted_string": "string1" - } - } - }, - "result": { - "errorContains": "Cannot query on fields encrypted with the randomized encryption" - } - } - ] - }, - { - "description": "$unset works with an encrypted field", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$unset": { - "encrypted_string": "" - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "update": "default", - "updates": [ - { - "q": {}, - "u": { - "$unset": { - "encrypted_string": "" - } - } - } - ], - "ordered": true - }, - "command_name": "update" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "$rename works if target value has same encryption options", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$rename": { - "encrypted_string": "encrypted_string_equivalent" - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1, - "filter": { - "name": "default" - } - }, - "command_name": "listCollections" - } - }, - { - "command_started_event": { - "command": { - "update": "default", - "updates": [ - { - "q": {}, - "u": { - "$rename": { - "encrypted_string": "encrypted_string_equivalent" - } - } - } - ], - "ordered": true - }, - "command_name": "update" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "encrypted_string_equivalent": { - "$binary": { - "base64": "AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==", - "subType": "06" - } - } - } - ] - } - } - }, - { - "description": "$rename fails if target value has different encryption options", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$rename": { - "encrypted_string": "random" - } - } - }, - "result": { - "errorContains": "$rename between two encrypted fields must have the same metadata or both be unencrypted" - } - } - ] - }, - { - "description": "an invalid update (no $ operators) is validated and errors", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "aws": {} - } - } - }, - "operations": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "encrypted_string": "random" - } - }, - "result": { - "errorContains": "" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/updateOne.yml b/testdata/client-side-encryption/legacy/updateOne.yml deleted file mode 100644 index aef3716fad..0000000000 --- a/testdata/client-side-encryption/legacy/updateOne.yml +++ /dev/null @@ -1,160 +0,0 @@ -runOn: - - minServerVersion: "4.1.10" -database_name: &database_name "default" -collection_name: &collection_name "default" - -data: - - &doc0_encrypted { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } -json_schema: {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} -key_vault_data: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}, 'masterKey': {'provider': 'aws', 'key': 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', 'region': 'us-east-1'}, 'updateDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyMaterial': {'$binary': {'base64': 'AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1552949630483'}}, 'keyAltNames': ['altname', 'another_altname']}] - -tests: - - description: "updateOne with deterministic encryption" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { encrypted_string: "string0" } - update: { $set: { encrypted_string: "string1", random: "abc" } } - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - # Then key is fetched from the key vault. - - command_started_event: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - command_name: find - - command_started_event: - command: - update: *collection_name - updates: - - q: { encrypted_string: { $eq: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } } - u: { $set: {encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}}, random: { $$type: "binData" } } } - ordered: true - command_name: update - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { _id: 1, encrypted_string: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACDdw4KFz3ZLquhsbt7RmDjD0N67n0uSXx7IGnQNCLeIKvot6s/ouI21Eo84IOtb6lhwUNPlSEBNY0/hbszWAKJg==', 'subType': '06'}}, random: { $$type: "binData"} } - - description: "updateOne fails when filtering on a random field" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { random: "abc" } - update: { $set: { encrypted_string: "string1" } } - result: - errorContains: "Cannot query on fields encrypted with the randomized encryption" - - description: "$unset works with an encrypted field" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $unset: { encrypted_string: "" } } - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - update: *collection_name - updates: - - q: { } - u: { $unset: {encrypted_string: "" } } - ordered: true - command_name: update - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { _id: 1 } - - description: "$rename works if target value has same encryption options" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $rename: { encrypted_string: "encrypted_string_equivalent" } } - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectations: - # Auto encryption will request the collection info. - - command_started_event: - command: - listCollections: 1 - filter: - name: *collection_name - command_name: listCollections - - command_started_event: - command: - update: *collection_name - updates: - - q: { } - u: { $rename: {encrypted_string: "encrypted_string_equivalent" } } - ordered: true - command_name: update - outcome: - collection: - # Outcome is checked using a separate MongoClient without auto encryption. - data: - - { _id: 1, encrypted_string_equivalent: {'$binary': {'base64': 'AQAAAAAAAAAAAAAAAAAAAAACwj+3zkv2VM+aTfk60RqhXq6a/77WlLwu/BxXFkL7EppGsju/m8f0x5kBDD3EZTtGALGXlym5jnpZAoSIkswHoA==', 'subType': '06'}} } - - description: "$rename fails if target value has different encryption options" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { $rename: { encrypted_string: "random" } } - result: - errorContains: "$rename between two encrypted fields must have the same metadata or both be unencrypted" - - description: "an invalid update (no $ operators) is validated and errors" - clientOptions: - autoEncryptOpts: - kmsProviders: - aws: {} # Credentials filled in from environment. - operations: - - name: updateOne - arguments: - filter: { } - update: { encrypted_string: "random" } - result: - errorContains: "" # Note, drivers differ in the error message. Just ensure an error is thrown. \ No newline at end of file diff --git a/testdata/client-side-encryption/legacy/validatorAndPartialFieldExpression.json b/testdata/client-side-encryption/legacy/validatorAndPartialFieldExpression.json deleted file mode 100644 index e07137ce15..0000000000 --- a/testdata/client-side-encryption/legacy/validatorAndPartialFieldExpression.json +++ /dev/null @@ -1,642 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "6.0.0" - } - ], - "database_name": "default", - "collection_name": "default", - "data": [], - "tests": [ - { - "description": "create with a validator on an unencrypted field is OK", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "schemaMap": { - "default.encryptedCollection": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection", - "validator": { - "unencrypted_string": "foo" - } - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection" - } - } - ] - }, - { - "description": "create with a validator on an encrypted field is an error", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "schemaMap": { - "default.encryptedCollection": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection", - "validator": { - "encrypted_string": "foo" - } - }, - "result": { - "errorContains": "Comparison to encrypted fields not supported" - } - } - ] - }, - { - "description": "collMod with a validator on an unencrypted field is OK", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "schemaMap": { - "default.encryptedCollection": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "collMod": "encryptedCollection", - "validator": { - "unencrypted_string": "foo" - } - } - } - } - ] - }, - { - "description": "collMod with a validator on an encrypted field is an error", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "schemaMap": { - "default.encryptedCollection": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "collMod": "encryptedCollection", - "validator": { - "encrypted_string": "foo" - } - } - }, - "result": { - "errorContains": "Comparison to encrypted fields not supported" - } - } - ] - }, - { - "description": "createIndexes with a partialFilterExpression on an unencrypted field is OK", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "schemaMap": { - "default.encryptedCollection": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "createIndexes": "encryptedCollection", - "indexes": [ - { - "name": "name", - "key": { - "name": 1 - }, - "partialFilterExpression": { - "unencrypted_string": "foo" - } - } - ] - } - } - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "database": "default", - "collection": "encryptedCollection", - "index": "name" - } - } - ] - }, - { - "description": "createIndexes with a partialFilterExpression on an encrypted field is an error", - "clientOptions": { - "autoEncryptOpts": { - "kmsProviders": { - "local": { - "key": { - "$binary": { - "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", - "subType": "00" - } - } - } - }, - "schemaMap": { - "default.encryptedCollection": { - "properties": { - "encrypted_w_altname": { - "encrypt": { - "keyId": "/altname", - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "random": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "encrypted_string_equivalent": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AAAAAAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - } - } - }, - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "collection": "encryptedCollection" - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "createIndexes": "encryptedCollection", - "indexes": [ - { - "name": "name", - "key": { - "name": 1 - }, - "partialFilterExpression": { - "encrypted_string": "foo" - } - } - ] - } - }, - "result": { - "errorContains": "Comparison to encrypted fields not supported" - } - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/legacy/validatorAndPartialFieldExpression.yml b/testdata/client-side-encryption/legacy/validatorAndPartialFieldExpression.yml deleted file mode 100644 index d2b7ffaee6..0000000000 --- a/testdata/client-side-encryption/legacy/validatorAndPartialFieldExpression.yml +++ /dev/null @@ -1,166 +0,0 @@ -# This test requires libmongocrypt 1.5.0-alpha2. -runOn: - # Require server version 6.0.0 to get behavior added in SERVER-64911. - - minServerVersion: "6.0.0" - -database_name: &database_name "default" -collection_name: &collection_name "default" -data: [] -tests: - - description: "create with a validator on an unencrypted field is OK" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - schemaMap: - "default.encryptedCollection": {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - validator: - unencrypted_string: "foo" - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: "encryptedCollection" - - description: "create with a validator on an encrypted field is an error" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - schemaMap: - "default.encryptedCollection": {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - validator: - encrypted_string: "foo" - result: - errorContains: "Comparison to encrypted fields not supported" - - description: "collMod with a validator on an unencrypted field is OK" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - schemaMap: - "default.encryptedCollection": {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - - name: runCommand - object: database - arguments: - command: - collMod: "encryptedCollection" - validator: - unencrypted_string: "foo" - - description: "collMod with a validator on an encrypted field is an error" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - schemaMap: - "default.encryptedCollection": {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - - name: runCommand - object: database - arguments: - command: - collMod: "encryptedCollection" - validator: - encrypted_string: "foo" - result: - errorContains: "Comparison to encrypted fields not supported" - - description: "createIndexes with a partialFilterExpression on an unencrypted field is OK" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - schemaMap: - "default.encryptedCollection": {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - - name: runCommand - object: database - arguments: - command: - createIndexes: "encryptedCollection" - indexes: - - name: "name" - key: { name: 1 } - partialFilterExpression: - unencrypted_string: "foo" - - name: assertIndexExists - object: testRunner - arguments: - database: *database_name - collection: "encryptedCollection" - index: name - - description: "createIndexes with a partialFilterExpression on an encrypted field is an error" - clientOptions: - autoEncryptOpts: - kmsProviders: - local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} - schemaMap: - "default.encryptedCollection": {'properties': {'encrypted_w_altname': {'encrypt': {'keyId': '/altname', 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}, 'random': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'encrypted_string_equivalent': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}, 'bsonType': 'object'} - operations: - # Drop to remove a collection that may exist from previous test runs. - - name: dropCollection - object: database - arguments: - collection: "encryptedCollection" - - name: createCollection - object: database - arguments: - collection: "encryptedCollection" - - name: runCommand - object: database - arguments: - command: - createIndexes: "encryptedCollection" - indexes: - - name: "name" - key: { name: 1 } - partialFilterExpression: - encrypted_string: "foo" - result: - errorContains: "Comparison to encrypted fields not supported" \ No newline at end of file diff --git a/testdata/client-side-encryption/unified/addKeyAltName.json b/testdata/client-side-encryption/unified/addKeyAltName.json deleted file mode 100644 index f70bc572a8..0000000000 --- a/testdata/client-side-encryption/unified/addKeyAltName.json +++ /dev/null @@ -1,609 +0,0 @@ -{ - "description": "addKeyAltName", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "local": { - "key": { - "$$placeholder": 1 - } - } - } - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "keyvault" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "datakeys" - } - } - ], - "initialData": [ - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [ - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ], - "tests": [ - { - "description": "add keyAltName to non-existent data key", - "operations": [ - { - "name": "addKeyAltName", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "AAAjYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltName": "new_key_alt_name" - }, - "expectResult": { - "$$unsetOrMatches": null - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "findAndModify": "datakeys", - "query": { - "_id": { - "$binary": { - "base64": "AAAjYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "update": { - "$addToSet": { - "keyAltNames": "new_key_alt_name" - } - }, - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "datakeys", - "databaseName": "keyvault", - "documents": [ - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ] - }, - { - "description": "add new keyAltName to data key with no keyAltNames", - "operations": [ - { - "name": "addKeyAltName", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltName": "local_key" - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {}, - "projection": { - "_id": 0, - "keyAltNames": 1 - } - }, - "expectResult": [ - { - "keyAltNames": [ - "local_key" - ] - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "findAndModify": "datakeys", - "query": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "update": { - "$addToSet": { - "keyAltNames": "local_key" - } - }, - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - } - ] - } - ] - }, - { - "description": "add existing keyAltName to existing data key", - "operations": [ - { - "name": "addKeyAltName", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltName": "local_key" - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - }, - { - "name": "addKeyAltName", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltName": "local_key" - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {}, - "projection": { - "_id": 0, - "keyAltNames": 1 - } - }, - "expectResult": [ - { - "keyAltNames": [ - "local_key" - ] - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "findAndModify": "datakeys", - "query": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "update": { - "$addToSet": { - "keyAltNames": "local_key" - } - }, - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "findAndModify": "datakeys", - "query": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "update": { - "$addToSet": { - "keyAltNames": "local_key" - } - }, - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - } - ] - } - ] - }, - { - "description": "add new keyAltName to data key with keyAltNames", - "operations": [ - { - "name": "addKeyAltName", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltName": "local_key" - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - }, - { - "name": "addKeyAltName", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltName": "another_name" - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - }, - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 0, - "keyAltNames": "$keyAltNames" - } - }, - { - "$unwind": "$keyAltNames" - }, - { - "$sort": { - "keyAltNames": 1 - } - } - ] - }, - "expectResult": [ - { - "keyAltNames": "another_name" - }, - { - "keyAltNames": "local_key" - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "findAndModify": "datakeys", - "query": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "update": { - "$addToSet": { - "keyAltNames": "local_key" - } - }, - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "findAndModify": "datakeys", - "query": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "update": { - "$addToSet": { - "keyAltNames": "another_name" - } - }, - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/unified/addKeyAltName.yml b/testdata/client-side-encryption/unified/addKeyAltName.yml deleted file mode 100644 index 7d52fd1a31..0000000000 --- a/testdata/client-side-encryption/unified/addKeyAltName.yml +++ /dev/null @@ -1,194 +0,0 @@ -description: addKeyAltName - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - local: { key: { $$placeholder: 1 } } - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name keyvault - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name datakeys - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - &local_key_doc - _id: &local_key_id { $binary: { base64: bG9jYWxrZXlsb2NhbGtleQ==, subType: "04" } } - keyMaterial: { $binary: { base64: ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: - provider: local - -tests: - - description: add keyAltName to non-existent data key - operations: - - name: addKeyAltName - object: *clientEncryption0 - arguments: - # First 3 letters of local_key_id replaced with 'A' (value: "#alkeylocalkey"). - id: &non_existent_id { $binary: { base64: AAAjYWxrZXlsb2NhbGtleQ==, subType: "04" } } - keyAltName: new_key_alt_name - expectResult: { $$unsetOrMatches: null } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - findAndModify: *collection0Name - query: { _id: *non_existent_id } - update: { $addToSet: { keyAltNames: new_key_alt_name } } - writeConcern: { w: majority } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *local_key_doc - - - description: add new keyAltName to data key with no keyAltNames - operations: - - name: addKeyAltName - object: *clientEncryption0 - arguments: - id: *local_key_id - keyAltName: local_key - expectResult: *local_key_doc - - name: find - object: *collection0 - arguments: - filter: {} - projection: { _id: 0, keyAltNames: 1 } - expectResult: - - keyAltNames: [local_key] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - findAndModify: *collection0Name - query: { _id: *local_key_id } - update: { $addToSet: { keyAltNames: local_key } } - writeConcern: { w: majority } - - commandStartedEvent: { commandName: find } - - - description: add existing keyAltName to existing data key - operations: - - name: addKeyAltName - object: *clientEncryption0 - arguments: - id: *local_key_id - keyAltName: local_key - expectResult: *local_key_doc - - name: addKeyAltName - # Attempting to add a duplicate keyAltName to the data key should not be an error. - object: *clientEncryption0 - arguments: - id: *local_key_id - keyAltName: local_key - expectResult: - _id: *local_key_id - keyAltNames: [local_key] - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: 1 - masterKey: - provider: local - - name: find - object: *collection0 - arguments: - filter: {} - projection: { _id: 0, keyAltNames: 1 } - expectResult: - - keyAltNames: [local_key] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - findAndModify: *collection0Name - query: { _id: *local_key_id } - update: { $addToSet: { keyAltNames: local_key } } - writeConcern: { w: majority } - - commandStartedEvent: - databaseName: *database0Name - command: - findAndModify: *collection0Name - query: { _id: *local_key_id } - update: { $addToSet: { keyAltNames: local_key } } - writeConcern: { w: majority } - - commandStartedEvent: { commandName: find } - - - description: add new keyAltName to data key with keyAltNames - operations: - - name: addKeyAltName - object: *clientEncryption0 - arguments: - id: *local_key_id - keyAltName: local_key - expectResult: *local_key_doc - - name: addKeyAltName - object: *clientEncryption0 - arguments: - id: *local_key_id - keyAltName: another_name - expectResult: - _id: *local_key_id - keyAltNames: [local_key] - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: 1 - masterKey: - provider: local - - name: aggregate - object: *collection0 - arguments: - pipeline: - # Ensure keyAltNames are in deterministically sorted order. - - $project: { _id: 0, keyAltNames: $keyAltNames } - - $unwind: $keyAltNames - - $sort: { keyAltNames: 1 } - expectResult: - - keyAltNames: another_name - - keyAltNames: local_key - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - findAndModify: *collection0Name - query: { _id: *local_key_id } - update: { $addToSet: { keyAltNames: local_key } } - writeConcern: { w: majority } - - commandStartedEvent: - databaseName: *database0Name - command: - findAndModify: *collection0Name - query: { _id: *local_key_id } - update: { $addToSet: { keyAltNames: another_name } } - writeConcern: { w: majority } - - commandStartedEvent: { commandName: aggregate } diff --git a/testdata/client-side-encryption/unified/createDataKey-kms_providers-invalid.json b/testdata/client-side-encryption/unified/createDataKey-kms_providers-invalid.json deleted file mode 100644 index 2344a61a95..0000000000 --- a/testdata/client-side-encryption/unified/createDataKey-kms_providers-invalid.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "description": "createDataKey-kms_providers-invalid", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "aws": { - "accessKeyId": { - "$$placeholder": 1 - }, - "secretAccessKey": { - "$$placeholder": 1 - } - } - } - } - } - } - ], - "tests": [ - { - "description": "create data key without required master key fields", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "aws", - "opts": { - "masterKey": {} - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ] - }, - { - "description": "create data key with invalid master key field", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "local", - "opts": { - "masterKey": { - "invalid": 1 - } - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ] - }, - { - "description": "create data key with invalid master key", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "aws", - "opts": { - "masterKey": { - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "invalid" - } - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/unified/createDataKey-kms_providers-invalid.yml b/testdata/client-side-encryption/unified/createDataKey-kms_providers-invalid.yml deleted file mode 100644 index f692a09075..0000000000 --- a/testdata/client-side-encryption/unified/createDataKey-kms_providers-invalid.yml +++ /dev/null @@ -1,67 +0,0 @@ -description: createDataKey-kms_providers-invalid - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - aws: { accessKeyId: { $$placeholder: 1 }, secretAccessKey: { $$placeholder: 1 } } - -tests: - - description: create data key without required master key fields - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: aws - opts: - masterKey: {} - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] - - - description: create data key with invalid master key field - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: local - opts: - masterKey: - invalid: 1 - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] - - - description: create data key with invalid master key - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: aws - opts: - masterKey: - key: arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0 - region: invalid - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] diff --git a/testdata/client-side-encryption/unified/createDataKey.json b/testdata/client-side-encryption/unified/createDataKey.json deleted file mode 100644 index 110c726f9a..0000000000 --- a/testdata/client-side-encryption/unified/createDataKey.json +++ /dev/null @@ -1,711 +0,0 @@ -{ - "description": "createDataKey", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "aws": { - "accessKeyId": { - "$$placeholder": 1 - }, - "secretAccessKey": { - "$$placeholder": 1 - } - }, - "azure": { - "tenantId": { - "$$placeholder": 1 - }, - "clientId": { - "$$placeholder": 1 - }, - "clientSecret": { - "$$placeholder": 1 - } - }, - "gcp": { - "email": { - "$$placeholder": 1 - }, - "privateKey": { - "$$placeholder": 1 - } - }, - "kmip": { - "endpoint": { - "$$placeholder": 1 - } - }, - "local": { - "key": { - "$$placeholder": 1 - } - } - } - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "keyvault" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "datakeys" - } - } - ], - "initialData": [ - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [] - } - ], - "tests": [ - { - "description": "create data key with AWS KMS provider", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "aws", - "opts": { - "masterKey": { - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - } - } - }, - "expectResult": { - "$$type": "binData" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "insert": "datakeys", - "documents": [ - { - "_id": { - "$$type": "binData" - }, - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": { - "$$exists": true - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "create datakey with Azure KMS provider", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "azure", - "opts": { - "masterKey": { - "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", - "keyName": "key-name-csfle" - } - } - }, - "expectResult": { - "$$type": "binData" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "insert": "datakeys", - "documents": [ - { - "_id": { - "$$type": "binData" - }, - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": { - "$$exists": true - }, - "masterKey": { - "provider": "azure", - "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", - "keyName": "key-name-csfle" - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "create datakey with GCP KMS provider", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "gcp", - "opts": { - "masterKey": { - "projectId": "devprod-drivers", - "location": "global", - "keyRing": "key-ring-csfle", - "keyName": "key-name-csfle" - } - } - }, - "expectResult": { - "$$type": "binData" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "insert": "datakeys", - "documents": [ - { - "_id": { - "$$type": "binData" - }, - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": { - "$$exists": true - }, - "masterKey": { - "provider": "gcp", - "projectId": "devprod-drivers", - "location": "global", - "keyRing": "key-ring-csfle", - "keyName": "key-name-csfle" - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "create datakey with KMIP KMS provider", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "kmip" - }, - "expectResult": { - "$$type": "binData" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "insert": "datakeys", - "documents": [ - { - "_id": { - "$$type": "binData" - }, - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": { - "$$exists": true - }, - "masterKey": { - "provider": "kmip", - "keyId": { - "$$type": "string" - } - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "create datakey with local KMS provider", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "local" - }, - "expectResult": { - "$$type": "binData" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "insert": "datakeys", - "documents": [ - { - "_id": { - "$$type": "binData" - }, - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": { - "$$exists": true - }, - "masterKey": { - "provider": "local" - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "create datakey with no keyAltName", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "local", - "opts": { - "keyAltNames": [] - } - }, - "expectResult": { - "$$type": "binData" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "insert": "datakeys", - "documents": [ - { - "_id": { - "$$type": "binData" - }, - "keyAltNames": { - "$$exists": false - }, - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": { - "$$type": "int" - }, - "masterKey": { - "$$type": "object" - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "create datakey with single keyAltName", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "local", - "opts": { - "keyAltNames": [ - "local_key" - ] - } - }, - "expectResult": { - "$$type": "binData" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "insert": "datakeys", - "documents": [ - { - "_id": { - "$$type": "binData" - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": { - "$$type": "int" - }, - "masterKey": { - "$$type": "object" - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "create datakey with multiple keyAltNames", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "local", - "opts": { - "keyAltNames": [ - "abc", - "def" - ] - } - }, - "expectResult": { - "$$type": "binData" - } - }, - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 0, - "keyAltNames": 1 - } - }, - { - "$unwind": "$keyAltNames" - }, - { - "$sort": { - "keyAltNames": 1 - } - } - ] - }, - "expectResult": [ - { - "keyAltNames": "abc" - }, - { - "keyAltNames": "def" - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "insert": "datakeys", - "documents": [ - { - "_id": { - "$$type": "binData" - }, - "keyAltNames": { - "$$type": "array" - }, - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": { - "$$type": "int" - }, - "masterKey": { - "$$type": "object" - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate" - } - } - ] - } - ] - }, - { - "description": "create datakey with custom key material", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "local", - "opts": { - "keyMaterial": { - "$binary": { - "base64": "a2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFs", - "subType": "00" - } - } - } - }, - "expectResult": { - "$$type": "binData" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "insert": "datakeys", - "documents": [ - { - "_id": { - "$$type": "binData" - }, - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": { - "$$type": "int" - }, - "masterKey": { - "$$type": "object" - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "create datakey with invalid custom key material (too short)", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "local", - "opts": { - "keyMaterial": { - "$binary": { - "base64": "a2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFs", - "subType": "00" - } - } - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/unified/createDataKey.yml b/testdata/client-side-encryption/unified/createDataKey.yml deleted file mode 100644 index dd14638637..0000000000 --- a/testdata/client-side-encryption/unified/createDataKey.yml +++ /dev/null @@ -1,309 +0,0 @@ -description: createDataKey - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - aws: { accessKeyId: { $$placeholder: 1 }, secretAccessKey: { $$placeholder: 1 } } - azure: { tenantId: { $$placeholder: 1 }, clientId: { $$placeholder: 1 }, clientSecret: { $$placeholder: 1 } } - gcp: { email: { $$placeholder: 1 }, privateKey: { $$placeholder: 1 } } - kmip: { endpoint: { $$placeholder: 1 } } - local: { key: { $$placeholder: 1 } } - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name keyvault - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name datakeys - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: [] - -tests: - - description: create data key with AWS KMS provider - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: aws - opts: - masterKey: &new_aws_masterkey - key: arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0 - region: us-east-1 - expectResult: { $$type: binData } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - insert: *collection0Name - documents: - - _id: { $$type: binData } - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: { $$exists: true } - masterKey: - provider: aws - <<: *new_aws_masterkey - writeConcern: { w: majority } - - - description: create datakey with Azure KMS provider - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: azure - opts: - masterKey: &new_azure_masterkey - keyVaultEndpoint: key-vault-csfle.vault.azure.net - keyName: key-name-csfle - expectResult: { $$type: binData } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - insert: *collection0Name - documents: - - _id: { $$type: binData } - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: { $$exists: true } - masterKey: - provider: azure - <<: *new_azure_masterkey - writeConcern: { w: majority } - - - description: create datakey with GCP KMS provider - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: gcp - opts: - masterKey: &new_gcp_masterkey - projectId: devprod-drivers - location: global - keyRing: key-ring-csfle - keyName: key-name-csfle - expectResult: { $$type: binData } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - insert: *collection0Name - documents: - - _id: { $$type: binData } - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: { $$exists: true } - masterKey: - provider: gcp - <<: *new_gcp_masterkey - writeConcern: { w: majority } - - - description: create datakey with KMIP KMS provider - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: kmip - expectResult: { $$type: binData } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - insert: *collection0Name - documents: - - _id: { $$type: binData } - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: { $$exists: true } - masterKey: - provider: kmip - keyId: { $$type: string } - writeConcern: { w: majority } - - - description: create datakey with local KMS provider - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: local - expectResult: { $$type: binData } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - insert: *collection0Name - documents: - - _id: { $$type: binData } - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: { $$exists: true } - masterKey: - provider: local - writeConcern: { w: majority } - - - description: create datakey with no keyAltName - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: local - opts: - keyAltNames: [] - expectResult: { $$type: binData } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - insert: *collection0Name - documents: - - _id: { $$type: binData } - # keyAltNames field should not exist if no keyAltNames are given. - keyAltNames: { $$exists: false } - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: { $$type: int } - masterKey: { $$type: object } - writeConcern: { w: majority } - - - description: create datakey with single keyAltName - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: local - opts: - keyAltNames: ["local_key"] - expectResult: { $$type: binData } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - insert: *collection0Name - documents: - - _id: { $$type: binData } - keyAltNames: [local_key] - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: { $$type: int } - masterKey: { $$type: object } - writeConcern: { w: majority } - - - description: create datakey with multiple keyAltNames - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: local - opts: - keyAltNames: ["abc", "def"] - expectResult: { $$type: binData } - - name: aggregate - object: *collection0 - arguments: - # Need to use pipeline to sort keyAltNames for deterministic matching - # because keyAltNames is not required to be sorted. - pipeline: - - $project: { _id: 0, keyAltNames: 1 } - - $unwind: $keyAltNames - - $sort: { keyAltNames: 1 } - expectResult: - - keyAltNames: abc - - keyAltNames: def - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - insert: *collection0Name - documents: - - _id: { $$type: binData } - keyAltNames: { $$type: array } - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: { $$type: int } - masterKey: { $$type: object } - writeConcern: { w: majority } - - commandStartedEvent: { commandName: aggregate } - - - description: create datakey with custom key material - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: local - opts: - # "key_material" repeated 8 times. - keyMaterial: &custom_key_material { $binary: { base64: a2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFs, subType: "00" } } - expectResult: { $$type: binData } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - insert: *collection0Name - documents: - - _id: { $$type: binData } - # Cannot match exact value of encrypted key material. - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: { $$type: int } - masterKey: { $$type: object } - writeConcern: { w: majority } - - - description: create datakey with invalid custom key material (too short) - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: local - opts: - # "key_material" repeated only 7 times (key material length == 84). - keyMaterial: { $binary: { base64: a2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFsa2V5X21hdGVyaWFs, subType: "00" } } - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] diff --git a/testdata/client-side-encryption/unified/deleteKey.json b/testdata/client-side-encryption/unified/deleteKey.json deleted file mode 100644 index 3a10fb082f..0000000000 --- a/testdata/client-side-encryption/unified/deleteKey.json +++ /dev/null @@ -1,557 +0,0 @@ -{ - "description": "deleteKey", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "local": { - "key": { - "$$placeholder": 1 - } - } - } - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "keyvault" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "datakeys" - } - } - ], - "initialData": [ - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [ - { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "aws_key" - ], - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - } - }, - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ], - "tests": [ - { - "description": "delete non-existent data key", - "operations": [ - { - "name": "deleteKey", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "AAAzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - } - }, - "expectResult": { - "deletedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "delete": "datakeys", - "deletes": [ - { - "q": { - "_id": { - "$binary": { - "base64": "AAAzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - } - }, - "limit": 1 - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "datakeys", - "databaseName": "keyvault", - "documents": [ - { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "aws_key" - ], - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - } - }, - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ] - }, - { - "description": "delete existing AWS data key", - "operations": [ - { - "name": "deleteKey", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - } - }, - "expectResult": { - "deletedCount": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "delete": "datakeys", - "deletes": [ - { - "q": { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - } - }, - "limit": 1 - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "datakeys", - "databaseName": "keyvault", - "documents": [ - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ] - }, - { - "description": "delete existing local data key", - "operations": [ - { - "name": "deleteKey", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "expectResult": { - "deletedCount": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "delete": "datakeys", - "deletes": [ - { - "q": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "limit": 1 - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "datakeys", - "databaseName": "keyvault", - "documents": [ - { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "aws_key" - ], - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - } - } - ] - } - ] - }, - { - "description": "delete existing data key twice", - "operations": [ - { - "name": "deleteKey", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - } - }, - "expectResult": { - "deletedCount": 1 - } - }, - { - "name": "deleteKey", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - } - }, - "expectResult": { - "deletedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "delete": "datakeys", - "deletes": [ - { - "q": { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - } - }, - "limit": 1 - } - ], - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "delete": "datakeys", - "deletes": [ - { - "q": { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - } - }, - "limit": 1 - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "datakeys", - "databaseName": "keyvault", - "documents": [ - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/unified/deleteKey.yml b/testdata/client-side-encryption/unified/deleteKey.yml deleted file mode 100644 index c598e94698..0000000000 --- a/testdata/client-side-encryption/unified/deleteKey.yml +++ /dev/null @@ -1,159 +0,0 @@ -description: deleteKey - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - local: { key: { $$placeholder: 1 } } - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name keyvault - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name datakeys - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - &aws_key_doc - _id: &aws_key_id { $binary: { base64: YXdzYXdzYXdzYXdzYXdzYQ==, subType: "04" } } - keyAltNames: ["aws_key"] - keyMaterial: { $binary: { base64: AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: - provider: aws - key: arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0 - region: us-east-1 - - &local_key_doc - _id: &local_key_id { $binary: { base64: bG9jYWxrZXlsb2NhbGtleQ==, subType: "04" } } - keyAltNames: ["local_key"] - keyMaterial: { $binary: { base64: ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: - provider: local - -tests: - - description: delete non-existent data key - operations: - - name: deleteKey - object: *clientEncryption0 - arguments: - # *aws_key_id with first three letters replaced with 'A' (value: "3awsawsawsawsa"). - id: &non_existent_id { $binary: { base64: AAAzYXdzYXdzYXdzYXdzYQ==, subType: "04" } } - expectResult: - deletedCount: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - delete: *collection0Name - deletes: [{ q: { _id: *non_existent_id }, limit: 1 }] - writeConcern: { w: majority } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *aws_key_doc - - *local_key_doc - - - description: delete existing AWS data key - operations: - - name: deleteKey - object: *clientEncryption0 - arguments: - id: *aws_key_id - expectResult: - deletedCount: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - delete: *collection0Name - deletes: [{ q: { _id: *aws_key_id }, limit: 1 }] - writeConcern: { w: majority } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *local_key_doc - - - description: delete existing local data key - operations: - - name: deleteKey - object: *clientEncryption0 - arguments: - id: *local_key_id - expectResult: - deletedCount: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - delete: *collection0Name - deletes: [{ q: { _id: *local_key_id }, limit: 1 }] - writeConcern: { w: majority } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *aws_key_doc - - - description: delete existing data key twice - operations: - - name: deleteKey - object: *clientEncryption0 - arguments: - id: *aws_key_id - expectResult: - deletedCount: 1 - - name: deleteKey - object: *clientEncryption0 - arguments: - id: *aws_key_id - expectResult: - deletedCount: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - delete: *collection0Name - deletes: [{ q: { _id: *aws_key_id }, limit: 1 }] - writeConcern: { w: majority } - - commandStartedEvent: - databaseName: *database0Name - command: - delete: *collection0Name - deletes: [{ q: { _id: *aws_key_id }, limit: 1 }] - writeConcern: { w: majority } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *local_key_doc diff --git a/testdata/client-side-encryption/unified/getKey.json b/testdata/client-side-encryption/unified/getKey.json deleted file mode 100644 index 2ea3fe7358..0000000000 --- a/testdata/client-side-encryption/unified/getKey.json +++ /dev/null @@ -1,319 +0,0 @@ -{ - "description": "getKey", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "local": { - "key": { - "$$placeholder": 1 - } - } - } - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "keyvault" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "datakeys" - } - } - ], - "initialData": [ - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [ - { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "aws_key" - ], - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - } - }, - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ], - "tests": [ - { - "description": "get non-existent data key", - "operations": [ - { - "name": "getKey", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "AAAzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - } - }, - "expectResult": { - "$$unsetOrMatches": null - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": { - "_id": { - "$binary": { - "base64": "AAAzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - } - }, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "get existing AWS data key", - "operations": [ - { - "name": "getKey", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - } - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "aws_key" - ], - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - } - }, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "get existing local data key", - "operations": [ - { - "name": "getKey", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/unified/getKey.yml b/testdata/client-side-encryption/unified/getKey.yml deleted file mode 100644 index 1499227615..0000000000 --- a/testdata/client-side-encryption/unified/getKey.yml +++ /dev/null @@ -1,105 +0,0 @@ -description: getKey - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - local: { key: { $$placeholder: 1 } } - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name keyvault - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name datakeys - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - &aws_key_doc - _id: &aws_key_id { $binary: { base64: YXdzYXdzYXdzYXdzYXdzYQ==, subType: "04" } } - keyAltNames: ["aws_key"] - keyMaterial: { $binary: { base64: AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: - provider: aws - key: arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0 - region: us-east-1 - - &local_key_doc - _id: &local_key_id { $binary: { base64: bG9jYWxrZXlsb2NhbGtleQ==, subType: "04" } } - keyAltNames: ["local_key"] - keyMaterial: { $binary: { base64: ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: - provider: local - -tests: - - description: get non-existent data key - operations: - - name: getKey - object: *clientEncryption0 - arguments: - # *aws_key_id with first three letters replaced with 'A' (value: "3awsawsawsawsa"). - id: &non_existent_id { $binary: { base64: AAAzYXdzYXdzYXdzYXdzYQ==, subType: "04" } } - expectResult: { $$unsetOrMatches: null } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: { _id: *non_existent_id } - readConcern: { level: majority } - - - description: get existing AWS data key - operations: - - name: getKey - object: *clientEncryption0 - arguments: - id: *aws_key_id - expectResult: *aws_key_doc - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: { _id: *aws_key_id } - readConcern: { level: majority } - - - description: get existing local data key - operations: - - name: getKey - object: *clientEncryption0 - arguments: - id: *local_key_id - expectResult: *local_key_doc - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: { _id: *local_key_id } - readConcern: { level: majority } diff --git a/testdata/client-side-encryption/unified/getKeyByAltName.json b/testdata/client-side-encryption/unified/getKeyByAltName.json deleted file mode 100644 index 2505abc16e..0000000000 --- a/testdata/client-side-encryption/unified/getKeyByAltName.json +++ /dev/null @@ -1,289 +0,0 @@ -{ - "description": "getKeyByAltName", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "local": { - "key": { - "$$placeholder": 1 - } - } - } - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "keyvault" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "datakeys" - } - } - ], - "initialData": [ - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [ - { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "aws_key" - ], - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - } - }, - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ], - "tests": [ - { - "description": "get non-existent data key", - "operations": [ - { - "name": "getKeyByAltName", - "object": "clientEncryption0", - "arguments": { - "keyAltName": "does_not_exist" - }, - "expectResult": { - "$$unsetOrMatches": null - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": { - "keyAltNames": "does_not_exist" - }, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "get existing AWS data key", - "operations": [ - { - "name": "getKeyByAltName", - "object": "clientEncryption0", - "arguments": { - "keyAltName": "aws_key" - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "aws_key" - ], - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": { - "keyAltNames": "aws_key" - }, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "get existing local data key", - "operations": [ - { - "name": "getKeyByAltName", - "object": "clientEncryption0", - "arguments": { - "keyAltName": "local_key" - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": { - "keyAltNames": "local_key" - }, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/unified/getKeyByAltName.yml b/testdata/client-side-encryption/unified/getKeyByAltName.yml deleted file mode 100644 index b0cada879a..0000000000 --- a/testdata/client-side-encryption/unified/getKeyByAltName.yml +++ /dev/null @@ -1,104 +0,0 @@ -description: getKeyByAltName - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - local: { key: { $$placeholder: 1 } } - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name keyvault - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name datakeys - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - &aws_key_doc - _id: { $binary: { base64: YXdzYXdzYXdzYXdzYXdzYQ==, subType: "04" } } - keyAltNames: ["aws_key"] - keyMaterial: { $binary: { base64: AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: - provider: aws - key: arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0 - region: us-east-1 - - &local_key_doc - _id: { $binary: { base64: bG9jYWxrZXlsb2NhbGtleQ==, subType: "04" } } - keyAltNames: ["local_key"] - keyMaterial: { $binary: { base64: ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: - provider: local - -tests: - - description: get non-existent data key - operations: - - name: getKeyByAltName - object: *clientEncryption0 - arguments: - keyAltName: does_not_exist - expectResult: { $$unsetOrMatches: null } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: { keyAltNames: does_not_exist } - readConcern: { level: majority } - - - description: get existing AWS data key - operations: - - name: getKeyByAltName - object: *clientEncryption0 - arguments: - keyAltName: aws_key - expectResult: *aws_key_doc - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: { keyAltNames: aws_key } - readConcern: { level: majority } - - - description: get existing local data key - operations: - - name: getKeyByAltName - object: *clientEncryption0 - arguments: - keyAltName: local_key - expectResult: *local_key_doc - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: { keyAltNames: local_key } - readConcern: { level: majority } diff --git a/testdata/client-side-encryption/unified/getKeys.json b/testdata/client-side-encryption/unified/getKeys.json deleted file mode 100644 index d944712357..0000000000 --- a/testdata/client-side-encryption/unified/getKeys.json +++ /dev/null @@ -1,260 +0,0 @@ -{ - "description": "getKeys", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "local": { - "key": { - "$$placeholder": 1 - } - } - } - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "keyvault" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "datakeys" - } - } - ], - "initialData": [ - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [] - } - ], - "tests": [ - { - "description": "getKeys with zero key documents", - "operations": [ - { - "name": "getKeys", - "object": "clientEncryption0", - "expectResult": [] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": {}, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "getKeys with single key documents", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "local", - "opts": { - "keyAltNames": [ - "abc" - ] - } - }, - "expectResult": { - "$$type": "binData" - } - }, - { - "name": "getKeys", - "object": "clientEncryption0", - "expectResult": [ - { - "_id": { - "$$type": "binData" - }, - "keyAltNames": [ - "abc" - ], - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": { - "$$type": "int" - }, - "masterKey": { - "$$type": "object" - } - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": {}, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "getKeys with many key documents", - "operations": [ - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "local" - }, - "expectResult": { - "$$type": "binData" - } - }, - { - "name": "createDataKey", - "object": "clientEncryption0", - "arguments": { - "kmsProvider": "local" - }, - "expectResult": { - "$$type": "binData" - } - }, - { - "name": "getKeys", - "object": "clientEncryption0", - "expectResult": [ - { - "_id": { - "$$type": "binData" - }, - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": { - "$$type": "int" - }, - "masterKey": { - "$$type": "object" - } - }, - { - "_id": { - "$$type": "binData" - }, - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": { - "$$type": "int" - }, - "masterKey": { - "$$type": "object" - } - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": {}, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/unified/getKeys.yml b/testdata/client-side-encryption/unified/getKeys.yml deleted file mode 100644 index f396439431..0000000000 --- a/testdata/client-side-encryption/unified/getKeys.yml +++ /dev/null @@ -1,122 +0,0 @@ -description: getKeys - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - local: { key: { $$placeholder: 1 } } - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name keyvault - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name datakeys - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: [] - -tests: - - description: getKeys with zero key documents - operations: - - name: getKeys - object: *clientEncryption0 - expectResult: [] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: {} - readConcern: { level: majority } - - - description: getKeys with single key documents - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: local - opts: - keyAltNames: ["abc"] - expectResult: { $$type: binData } - - name: getKeys - object: *clientEncryption0 - expectResult: - - _id: { $$type: binData } - keyAltNames: ["abc"] - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: { $$type: int } - masterKey: { $$type: object } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: insert - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: {} - readConcern: { level: majority } - - - description: getKeys with many key documents - operations: - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: local - expectResult: { $$type: binData } - - name: createDataKey - object: *clientEncryption0 - arguments: - kmsProvider: local - expectResult: { $$type: binData } - - name: getKeys - object: *clientEncryption0 - expectResult: - # Cannot expect deterministic order of results, so only assert that - # exactly two key documents are returned. - - _id: { $$type: binData } - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: { $$type: int } - masterKey: { $$type: object } - - _id: { $$type: binData } - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: { $$type: int } - masterKey: { $$type: object } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: insert - - commandStartedEvent: - commandName: insert - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: {} - readConcern: { level: majority } diff --git a/testdata/client-side-encryption/unified/keyCache.json b/testdata/client-side-encryption/unified/keyCache.json deleted file mode 100644 index a39701e286..0000000000 --- a/testdata/client-side-encryption/unified/keyCache.json +++ /dev/null @@ -1,198 +0,0 @@ -{ - "description": "keyCache-explicit", - "schemaVersion": "1.22", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "local": { - "key": "OCTP9uKPPmvuqpHlqq83gPk4U6rUPxKVRRyVtrjFmVjdoa4Xzm1SzUbr7aIhNI42czkUBmrCtZKF31eaaJnxEBkqf0RFukA9Mo3NEHQWgAQ2cn9duOcRbaFUQo2z0/rB" - } - }, - "keyExpirationMS": 1 - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "keyvault" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "datakeys" - } - } - ], - "initialData": [ - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [ - { - "_id": { - "$binary": { - "base64": "a+YWzdygTAG62/cNUkqZiQ==", - "subType": "04" - } - }, - "keyAltNames": [], - "keyMaterial": { - "$binary": { - "base64": "iocBkhO3YBokiJ+FtxDTS71/qKXQ7tSWhWbcnFTXBcMjarsepvALeJ5li+SdUd9ePuatjidxAdMo7vh1V2ZESLMkQWdpPJ9PaJjA67gKQKbbbB4Ik5F2uKjULvrMBnFNVRMup4JNUwWFQJpqbfMveXnUVcD06+pUpAkml/f+DSXrV3e5rxciiNVtz03dAG8wJrsKsFXWj6vTjFhsfknyBA==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "local" - } - } - ] - } - ], - "tests": [ - { - "description": "decrypt, wait, and decrypt again", - "operations": [ - { - "name": "decrypt", - "object": "clientEncryption0", - "arguments": { - "value": { - "$binary": { - "base64": "AWvmFs3coEwButv3DVJKmYkCJ6lUzRX9R28WNlw5uyndb+8gurA+p8q14s7GZ04K2ZvghieRlAr5UwZbow3PMq27u5EIhDDczwBFcbdP1amllw==", - "subType": "06" - } - } - }, - "expectResult": "foobar" - }, - { - "name": "wait", - "object": "testRunner", - "arguments": { - "ms": 50 - } - }, - { - "name": "decrypt", - "object": "clientEncryption0", - "arguments": { - "value": { - "$binary": { - "base64": "AWvmFs3coEwButv3DVJKmYkCJ6lUzRX9R28WNlw5uyndb+8gurA+p8q14s7GZ04K2ZvghieRlAr5UwZbow3PMq27u5EIhDDczwBFcbdP1amllw==", - "subType": "06" - } - } - }, - "expectResult": "foobar" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "a+YWzdygTAG62/cNUkqZiQ==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "find": "datakeys", - "filter": { - "$or": [ - { - "_id": { - "$in": [ - { - "$binary": { - "base64": "a+YWzdygTAG62/cNUkqZiQ==", - "subType": "04" - } - } - ] - } - }, - { - "keyAltNames": { - "$in": [] - } - } - ] - }, - "$db": "keyvault", - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/unified/keyCache.yml b/testdata/client-side-encryption/unified/keyCache.yml deleted file mode 100644 index d6e747ba09..0000000000 --- a/testdata/client-side-encryption/unified/keyCache.yml +++ /dev/null @@ -1,85 +0,0 @@ -description: keyCache-explicit - -schemaVersion: "1.22" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - "local" : { key: "OCTP9uKPPmvuqpHlqq83gPk4U6rUPxKVRRyVtrjFmVjdoa4Xzm1SzUbr7aIhNI42czkUBmrCtZKF31eaaJnxEBkqf0RFukA9Mo3NEHQWgAQ2cn9duOcRbaFUQo2z0/rB" } - keyExpirationMS: 1 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name keyvault - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name datakeys - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - { - "_id": { - "$binary": { - "base64": "a+YWzdygTAG62/cNUkqZiQ==", - "subType": "04" - } - }, - "keyAltNames": [], - "keyMaterial": { - "$binary": { - "base64": "iocBkhO3YBokiJ+FtxDTS71/qKXQ7tSWhWbcnFTXBcMjarsepvALeJ5li+SdUd9ePuatjidxAdMo7vh1V2ZESLMkQWdpPJ9PaJjA67gKQKbbbB4Ik5F2uKjULvrMBnFNVRMup4JNUwWFQJpqbfMveXnUVcD06+pUpAkml/f+DSXrV3e5rxciiNVtz03dAG8wJrsKsFXWj6vTjFhsfknyBA==", - "subType": "00" - } - }, - "creationDate": {"$date": {"$numberLong": "1552949630483"}}, - "updateDate": {"$date": {"$numberLong": "1552949630483"}}, - "status": {"$numberInt": "0"}, - "masterKey": {"provider": "local"} - } - -tests: - - description: decrypt, wait, and decrypt again - operations: - - name: decrypt - object: *clientEncryption0 - arguments: - value: { "$binary" : { "base64" : "AWvmFs3coEwButv3DVJKmYkCJ6lUzRX9R28WNlw5uyndb+8gurA+p8q14s7GZ04K2ZvghieRlAr5UwZbow3PMq27u5EIhDDczwBFcbdP1amllw==", "subType" : "06" } } - expectResult: "foobar" - - name: wait - object: testRunner - arguments: - ms: 50 # Wait long enough to account for coarse time resolution on Windows (CDRIVER-4526). - - name: decrypt - object: *clientEncryption0 - arguments: - value: { "$binary" : { "base64" : "AWvmFs3coEwButv3DVJKmYkCJ6lUzRX9R28WNlw5uyndb+8gurA+p8q14s7GZ04K2ZvghieRlAr5UwZbow3PMq27u5EIhDDczwBFcbdP1amllw==", "subType" : "06" } } - expectResult: "foobar" - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'a+YWzdygTAG62/cNUkqZiQ==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } - - commandStartedEvent: - command: - find: datakeys - filter: {"$or": [{"_id": {"$in": [ {'$binary': {'base64': 'a+YWzdygTAG62/cNUkqZiQ==', 'subType': '04'}} ] }}, {"keyAltNames": {"$in": []}}]} - $db: keyvault - readConcern: { level: "majority" } diff --git a/testdata/client-side-encryption/unified/removeKeyAltName.json b/testdata/client-side-encryption/unified/removeKeyAltName.json deleted file mode 100644 index 1b7077077a..0000000000 --- a/testdata/client-side-encryption/unified/removeKeyAltName.json +++ /dev/null @@ -1,672 +0,0 @@ -{ - "description": "removeKeyAltName", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "local": { - "key": { - "$$placeholder": 1 - } - } - } - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "keyvault" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "datakeys" - } - } - ], - "initialData": [ - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [ - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "alternate_name", - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ], - "tests": [ - { - "description": "remove keyAltName from non-existent data key", - "operations": [ - { - "name": "removeKeyAltName", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "AAAjYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltName": "does_not_exist" - }, - "expectResult": { - "$$unsetOrMatches": null - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "findAndModify": "datakeys", - "query": { - "_id": { - "$binary": { - "base64": "AAAjYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "update": [ - { - "$set": { - "keyAltNames": { - "$cond": [ - { - "$eq": [ - "$keyAltNames", - [ - "does_not_exist" - ] - ] - }, - "$$REMOVE", - { - "$filter": { - "input": "$keyAltNames", - "cond": { - "$ne": [ - "$$this", - "does_not_exist" - ] - } - } - } - ] - } - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "datakeys", - "databaseName": "keyvault", - "documents": [ - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "alternate_name", - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ] - }, - { - "description": "remove non-existent keyAltName from existing data key", - "operations": [ - { - "name": "removeKeyAltName", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltName": "does_not_exist" - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "alternate_name", - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "findAndModify": "datakeys", - "query": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "update": [ - { - "$set": { - "keyAltNames": { - "$cond": [ - { - "$eq": [ - "$keyAltNames", - [ - "does_not_exist" - ] - ] - }, - "$$REMOVE", - { - "$filter": { - "input": "$keyAltNames", - "cond": { - "$ne": [ - "$$this", - "does_not_exist" - ] - } - } - } - ] - } - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "datakeys", - "databaseName": "keyvault", - "documents": [ - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "alternate_name", - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ] - }, - { - "description": "remove an existing keyAltName from an existing data key", - "operations": [ - { - "name": "removeKeyAltName", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltName": "alternate_name" - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "alternate_name", - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {}, - "projection": { - "_id": 0, - "keyAltNames": 1 - } - }, - "expectResult": [ - { - "keyAltNames": [ - "local_key" - ] - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "findAndModify": "datakeys", - "query": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "update": [ - { - "$set": { - "keyAltNames": { - "$cond": [ - { - "$eq": [ - "$keyAltNames", - [ - "alternate_name" - ] - ] - }, - "$$REMOVE", - { - "$filter": { - "input": "$keyAltNames", - "cond": { - "$ne": [ - "$$this", - "alternate_name" - ] - } - } - } - ] - } - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - } - ] - } - ] - }, - { - "description": "remove the last keyAltName from an existing data key", - "operations": [ - { - "name": "removeKeyAltName", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltName": "alternate_name" - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "alternate_name", - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - }, - { - "name": "removeKeyAltName", - "object": "clientEncryption0", - "arguments": { - "id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltName": "local_key" - }, - "expectResult": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$$type": "binData" - }, - "creationDate": { - "$$type": "date" - }, - "updateDate": { - "$$type": "date" - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "findAndModify": "datakeys", - "query": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "update": [ - { - "$set": { - "keyAltNames": { - "$cond": [ - { - "$eq": [ - "$keyAltNames", - [ - "alternate_name" - ] - ] - }, - "$$REMOVE", - { - "$filter": { - "input": "$keyAltNames", - "cond": { - "$ne": [ - "$$this", - "alternate_name" - ] - } - } - } - ] - } - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "findAndModify": "datakeys", - "query": { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - } - }, - "update": [ - { - "$set": { - "keyAltNames": { - "$cond": [ - { - "$eq": [ - "$keyAltNames", - [ - "local_key" - ] - ] - }, - "$$REMOVE", - { - "$filter": { - "input": "$keyAltNames", - "cond": { - "$ne": [ - "$$this", - "local_key" - ] - } - } - } - ] - } - } - } - ] - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/unified/removeKeyAltName.yml b/testdata/client-side-encryption/unified/removeKeyAltName.yml deleted file mode 100644 index 02394609b1..0000000000 --- a/testdata/client-side-encryption/unified/removeKeyAltName.yml +++ /dev/null @@ -1,157 +0,0 @@ -description: removeKeyAltName - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - local: { key: { $$placeholder: 1 } } - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name keyvault - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name datakeys - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - &local_key_doc - _id: &local_key_id { $binary: { base64: bG9jYWxrZXlsb2NhbGtleQ==, subType: "04" } } - keyAltNames: [alternate_name, local_key] - keyMaterial: { $binary: { base64: ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: - provider: local - -tests: - - description: remove keyAltName from non-existent data key - operations: - - name: removeKeyAltName - object: *clientEncryption0 - arguments: - # First 3 letters of local_key_id replaced with 'A' (value: "#alkeylocalkey"). - id: &non_existent_id { $binary: { base64: AAAjYWxrZXlsb2NhbGtleQ==, subType: "04" } } - keyAltName: does_not_exist - expectResult: { $$unsetOrMatches: null } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - findAndModify: *collection0Name - query: { _id: *non_existent_id } - update: [{ $set: { keyAltNames: { $cond: [{ $eq: [$keyAltNames, [does_not_exist]] }, $$REMOVE, { $filter: { input: $keyAltNames, cond: { $ne: [$$this, does_not_exist] } } }] } } }] - writeConcern: { w: majority } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *local_key_doc - - - description: remove non-existent keyAltName from existing data key - operations: - - name: removeKeyAltName - object: *clientEncryption0 - arguments: - id: *local_key_id - keyAltName: does_not_exist - expectResult: *local_key_doc - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - findAndModify: *collection0Name - query: { _id: *local_key_id } - update: [{ $set: { keyAltNames: { $cond: [{ $eq: [$keyAltNames, [does_not_exist]] }, $$REMOVE, { $filter: { input: $keyAltNames, cond: { $ne: [$$this, does_not_exist] } } }] } } }] - writeConcern: { w: majority } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *local_key_doc - - - description: remove an existing keyAltName from an existing data key - operations: - - name: removeKeyAltName - object: *clientEncryption0 - arguments: - id: *local_key_id - keyAltName: alternate_name - expectResult: *local_key_doc - - name: find - object: *collection0 - arguments: - filter: {} - projection: { _id: 0, keyAltNames: 1 } - expectResult: - - keyAltNames: [local_key] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - findAndModify: *collection0Name - query: { _id: *local_key_id } - update: [{ $set: { keyAltNames: { $cond: [{ $eq: [$keyAltNames, [alternate_name]] }, $$REMOVE, { $filter: { input: $keyAltNames, cond: { $ne: [$$this, alternate_name] } } }] } } }] - writeConcern: { w: majority } - - commandStartedEvent: { commandName: find } - - - description: remove the last keyAltName from an existing data key - operations: - - name: removeKeyAltName - object: *clientEncryption0 - arguments: - id: *local_key_id - keyAltName: alternate_name - expectResult: *local_key_doc - - name: removeKeyAltName - object: *clientEncryption0 - arguments: - id: *local_key_id - keyAltName: local_key - expectResult: - _id: *local_key_id - keyAltNames: [local_key] - keyMaterial: { $$type: binData } - creationDate: { $$type: date } - updateDate: { $$type: date } - status: 1 - masterKey: - provider: local - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - findAndModify: *collection0Name - query: { _id: *local_key_id } - update: [{ $set: { keyAltNames: { $cond: [{ $eq: [$keyAltNames, [alternate_name]] }, $$REMOVE, { $filter: { input: $keyAltNames, cond: { $ne: [$$this, alternate_name] } } }] } } }] - writeConcern: { w: majority } - - commandStartedEvent: - databaseName: *database0Name - command: - findAndModify: *collection0Name - query: { _id: *local_key_id } - update: [{ $set: { keyAltNames: { $cond: [{ $eq: [$keyAltNames, [local_key]] }, $$REMOVE, { $filter: { input: $keyAltNames, cond: { $ne: [$$this, local_key] } } }] } } }] diff --git a/testdata/client-side-encryption/unified/rewrapManyDataKey-decrypt_failure.json b/testdata/client-side-encryption/unified/rewrapManyDataKey-decrypt_failure.json deleted file mode 100644 index 4c7d4e8048..0000000000 --- a/testdata/client-side-encryption/unified/rewrapManyDataKey-decrypt_failure.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "description": "rewrapManyDataKey-decrypt_failure", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "aws": { - "accessKeyId": { - "$$placeholder": 1 - }, - "secretAccessKey": { - "$$placeholder": 1 - } - }, - "azure": { - "tenantId": { - "$$placeholder": 1 - }, - "clientId": { - "$$placeholder": 1 - }, - "clientSecret": { - "$$placeholder": 1 - } - }, - "gcp": { - "email": { - "$$placeholder": 1 - }, - "privateKey": { - "$$placeholder": 1 - } - }, - "kmip": { - "endpoint": { - "$$placeholder": 1 - } - }, - "local": { - "key": { - "$$placeholder": 1 - } - } - } - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "keyvault" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "datakeys" - } - } - ], - "initialData": [ - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [ - { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "aws_key" - ], - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-2:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-2" - } - } - ] - } - ], - "tests": [ - { - "description": "rewrap data key that fails during decryption due to invalid masterKey", - "operations": [ - { - "name": "rewrapManyDataKey", - "object": "clientEncryption0", - "arguments": { - "filter": {}, - "opts": { - "provider": "local" - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": {}, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/unified/rewrapManyDataKey-decrypt_failure.yml b/testdata/client-side-encryption/unified/rewrapManyDataKey-decrypt_failure.yml deleted file mode 100644 index 3a6e521881..0000000000 --- a/testdata/client-side-encryption/unified/rewrapManyDataKey-decrypt_failure.yml +++ /dev/null @@ -1,69 +0,0 @@ -description: rewrapManyDataKey-decrypt_failure - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - aws: { accessKeyId: { $$placeholder: 1 }, secretAccessKey: { $$placeholder: 1 } } - azure: { tenantId: { $$placeholder: 1 }, clientId: { $$placeholder: 1 }, clientSecret: { $$placeholder: 1 } } - gcp: { email: { $$placeholder: 1 }, privateKey: { $$placeholder: 1 } } - kmip: { endpoint: { $$placeholder: 1 } } - local: { key: { $$placeholder: 1 } } - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name keyvault - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name datakeys - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - _id: { $binary: { base64: YXdzYXdzYXdzYXdzYXdzYQ==, subType: "04" } } - keyAltNames: ["aws_key"] - keyMaterial: { $binary: { base64: AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: - provider: aws - # "us-east-1" changed to "us-east-2" in both key and region. - key: arn:aws:kms:us-east-2:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0 - region: us-east-2 - -tests: - - description: "rewrap data key that fails during decryption due to invalid masterKey" - operations: - - name: rewrapManyDataKey - object: *clientEncryption0 - arguments: - filter: {} - opts: - provider: local - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: find - databaseName: *database0Name - command: - find: *collection0Name - filter: {} - readConcern: { level: majority } diff --git a/testdata/client-side-encryption/unified/rewrapManyDataKey-encrypt_failure.json b/testdata/client-side-encryption/unified/rewrapManyDataKey-encrypt_failure.json deleted file mode 100644 index cd2d20c255..0000000000 --- a/testdata/client-side-encryption/unified/rewrapManyDataKey-encrypt_failure.json +++ /dev/null @@ -1,250 +0,0 @@ -{ - "description": "rewrapManyDataKey-encrypt_failure", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "aws": { - "accessKeyId": { - "$$placeholder": 1 - }, - "secretAccessKey": { - "$$placeholder": 1 - } - }, - "azure": { - "tenantId": { - "$$placeholder": 1 - }, - "clientId": { - "$$placeholder": 1 - }, - "clientSecret": { - "$$placeholder": 1 - } - }, - "gcp": { - "email": { - "$$placeholder": 1 - }, - "privateKey": { - "$$placeholder": 1 - } - }, - "kmip": { - "endpoint": { - "$$placeholder": 1 - } - }, - "local": { - "key": { - "$$placeholder": 1 - } - } - } - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "keyvault" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "datakeys" - } - } - ], - "initialData": [ - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [ - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ], - "tests": [ - { - "description": "rewrap with invalid masterKey for AWS KMS provider", - "operations": [ - { - "name": "rewrapManyDataKey", - "object": "clientEncryption0", - "arguments": { - "filter": {}, - "opts": { - "provider": "aws", - "masterKey": { - "key": "arn:aws:kms:us-east-2:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-2" - } - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": {}, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "rewrap with invalid masterKey for Azure KMS provider", - "operations": [ - { - "name": "rewrapManyDataKey", - "object": "clientEncryption0", - "arguments": { - "filter": {}, - "opts": { - "provider": "azure", - "masterKey": { - "keyVaultEndpoint": "invalid-vault-csfle.vault.azure.net", - "keyName": "invalid-name-csfle" - } - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": {}, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "rewrap with invalid masterKey for GCP KMS provider", - "operations": [ - { - "name": "rewrapManyDataKey", - "object": "clientEncryption0", - "arguments": { - "filter": {}, - "opts": { - "provider": "gcp", - "masterKey": { - "projectId": "devprod-drivers", - "location": "global", - "keyRing": "invalid-ring-csfle", - "keyName": "invalid-name-csfle" - } - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": {}, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/unified/rewrapManyDataKey-encrypt_failure.yml b/testdata/client-side-encryption/unified/rewrapManyDataKey-encrypt_failure.yml deleted file mode 100644 index b947c8ce7f..0000000000 --- a/testdata/client-side-encryption/unified/rewrapManyDataKey-encrypt_failure.yml +++ /dev/null @@ -1,122 +0,0 @@ -description: rewrapManyDataKey-encrypt_failure - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - aws: { accessKeyId: { $$placeholder: 1 }, secretAccessKey: { $$placeholder: 1 } } - azure: { tenantId: { $$placeholder: 1 }, clientId: { $$placeholder: 1 }, clientSecret: { $$placeholder: 1 } } - gcp: { email: { $$placeholder: 1 }, privateKey: { $$placeholder: 1 } } - kmip: { endpoint: { $$placeholder: 1 } } - local: { key: { $$placeholder: 1 } } - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name keyvault - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name datakeys - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - _id: { $binary: { base64: bG9jYWxrZXlsb2NhbGtleQ==, subType: "04" } } - keyAltNames: ["local_key"] - keyMaterial: { $binary: { base64: ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: - provider: local - -tests: - - description: "rewrap with invalid masterKey for AWS KMS provider" - operations: - - name: rewrapManyDataKey - object: *clientEncryption0 - arguments: - filter: {} - opts: - provider: aws - masterKey: - # "us-east-1" changed to "us-east-2" in both key and region. - key: arn:aws:kms:us-east-2:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0 - region: us-east-2 - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: find - databaseName: *database0Name - command: - find: *collection0Name - filter: {} - readConcern: { level: majority } - - - description: "rewrap with invalid masterKey for Azure KMS provider" - operations: - - name: rewrapManyDataKey - object: *clientEncryption0 - arguments: - filter: {} - opts: - provider: azure - masterKey: - # "key" changed to "invalid" in both keyVaultEndpoint and keyName. - keyVaultEndpoint: invalid-vault-csfle.vault.azure.net - keyName: invalid-name-csfle - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: find - databaseName: *database0Name - command: - find: *collection0Name - filter: {} - readConcern: { level: majority } - - - description: "rewrap with invalid masterKey for GCP KMS provider" - operations: - - name: rewrapManyDataKey - object: *clientEncryption0 - arguments: - filter: {} - opts: - provider: gcp - masterKey: - # "key" changed to "invalid" in both keyRing and keyName. - projectId: devprod-drivers - location: global - keyRing: invalid-ring-csfle - keyName: invalid-name-csfle - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: find - databaseName: *database0Name - command: - find: *collection0Name - filter: {} - readConcern: { level: majority } diff --git a/testdata/client-side-encryption/unified/rewrapManyDataKey.json b/testdata/client-side-encryption/unified/rewrapManyDataKey.json deleted file mode 100644 index 6b3c9664a9..0000000000 --- a/testdata/client-side-encryption/unified/rewrapManyDataKey.json +++ /dev/null @@ -1,1493 +0,0 @@ -{ - "description": "rewrapManyDataKey", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "aws": { - "accessKeyId": { - "$$placeholder": 1 - }, - "secretAccessKey": { - "$$placeholder": 1 - } - }, - "azure": { - "tenantId": { - "$$placeholder": 1 - }, - "clientId": { - "$$placeholder": 1 - }, - "clientSecret": { - "$$placeholder": 1 - } - }, - "gcp": { - "email": { - "$$placeholder": 1 - }, - "privateKey": { - "$$placeholder": 1 - } - }, - "kmip": { - "endpoint": { - "$$placeholder": 1 - } - }, - "local": { - "key": { - "$$placeholder": 1 - } - } - } - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "keyvault" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "datakeys" - } - } - ], - "initialData": [ - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [ - { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "aws_key" - ], - "keyMaterial": { - "$binary": { - "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - } - }, - { - "_id": { - "$binary": { - "base64": "YXp1cmVhenVyZWF6dXJlYQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "azure_key" - ], - "keyMaterial": { - "$binary": { - "base64": "pr01l7qDygUkFE/0peFwpnNlv3iIy8zrQK38Q9i12UCN2jwZHDmfyx8wokiIKMb9kAleeY+vnt3Cf1MKu9kcDmI+KxbNDd+V3ytAAGzOVLDJr77CiWjF9f8ntkXRHrAY9WwnVDANYkDwXlyU0Y2GQFTiW65jiQhUtYLYH63Tk48SsJuQvnWw1Q+PzY8ga+QeVec8wbcThwtm+r2IHsCFnc72Gv73qq7weISw+O4mN08z3wOp5FOS2ZM3MK7tBGmPdBcktW7F8ODGsOQ1FU53OrWUnyX2aTi2ftFFFMWVHqQo7EYuBZHru8RRODNKMyQk0BFfKovAeTAVRv9WH9QU7g==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "azure", - "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", - "keyName": "key-name-csfle" - } - }, - { - "_id": { - "$binary": { - "base64": "Z2NwZ2NwZ2NwZ2NwZ2NwZw==", - "subType": "04" - } - }, - "keyAltNames": [ - "gcp_key" - ], - "keyMaterial": { - "$binary": { - "base64": "CiQAIgLj0USbQtof/pYRLQO96yg/JEtZbD1UxKueaC37yzT5tTkSiQEAhClWB5ZCSgzHgxv8raWjNB4r7e8ePGdsmSuYTYmLC5oHHS/BdQisConzNKFaobEQZHamTCjyhy5NotKF8MWoo+dyfQApwI29+vAGyrUIQCXzKwRnNdNQ+lb3vJtS5bqvLTvSxKHpVca2kqyC9nhonV+u4qru5Q2bAqUgVFc8fL4pBuvlowZFTQ==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "gcp", - "projectId": "devprod-drivers", - "location": "global", - "keyRing": "key-ring-csfle", - "keyName": "key-name-csfle" - } - }, - { - "_id": { - "$binary": { - "base64": "a21pcGttaXBrbWlwa21pcA==", - "subType": "04" - } - }, - "keyAltNames": [ - "kmip_key" - ], - "keyMaterial": { - "$binary": { - "base64": "CklVctHzke4mcytd0TxGqvepkdkQN8NUF4+jV7aZQITAKdz6WjdDpq3lMt9nSzWGG2vAEfvRb3mFEVjV57qqGqxjq2751gmiMRHXz0btStbIK3mQ5xbY9kdye4tsixlCryEwQONr96gwlwKKI9Nubl9/8+uRF6tgYjje7Q7OjauEf1SrJwKcoQ3WwnjZmEqAug0kImCpJ/irhdqPzivRiA==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "kmip", - "keyId": "1" - } - }, - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "keyAltNames": [ - "local_key" - ], - "keyMaterial": { - "$binary": { - "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1641024000000" - } - }, - "status": 1, - "masterKey": { - "provider": "local" - } - } - ] - } - ], - "tests": [ - { - "description": "no keys to rewrap due to no filter matches", - "operations": [ - { - "name": "rewrapManyDataKey", - "object": "clientEncryption0", - "arguments": { - "filter": { - "keyAltNames": "no_matching_keys" - }, - "opts": { - "provider": "local" - } - }, - "expectResult": { - "bulkWriteResult": { - "$$exists": false - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": { - "keyAltNames": "no_matching_keys" - }, - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "rewrap with new AWS KMS provider", - "operations": [ - { - "name": "rewrapManyDataKey", - "object": "clientEncryption0", - "arguments": { - "filter": { - "keyAltNames": { - "$ne": "aws_key" - } - }, - "opts": { - "provider": "aws", - "masterKey": { - "key": "arn:aws:kms:us-east-1:579766882180:key/061334ae-07a8-4ceb-a813-8135540e837d", - "region": "us-east-1" - } - } - }, - "expectResult": { - "bulkWriteResult": { - "insertedCount": 0, - "matchedCount": 4, - "modifiedCount": 4, - "deletedCount": 0, - "upsertedCount": 0, - "upsertedIds": {}, - "insertedIds": { - "$$unsetOrMatches": {} - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": { - "keyAltNames": { - "$ne": "aws_key" - } - }, - "readConcern": { - "level": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "update": "datakeys", - "ordered": true, - "updates": [ - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/061334ae-07a8-4ceb-a813-8135540e837d", - "region": "us-east-1" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/061334ae-07a8-4ceb-a813-8135540e837d", - "region": "us-east-1" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/061334ae-07a8-4ceb-a813-8135540e837d", - "region": "us-east-1" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/061334ae-07a8-4ceb-a813-8135540e837d", - "region": "us-east-1" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "rewrap with new Azure KMS provider", - "operations": [ - { - "name": "rewrapManyDataKey", - "object": "clientEncryption0", - "arguments": { - "filter": { - "keyAltNames": { - "$ne": "azure_key" - } - }, - "opts": { - "provider": "azure", - "masterKey": { - "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", - "keyName": "key-name-csfle" - } - } - }, - "expectResult": { - "bulkWriteResult": { - "insertedCount": 0, - "matchedCount": 4, - "modifiedCount": 4, - "deletedCount": 0, - "upsertedCount": 0, - "upsertedIds": {}, - "insertedIds": { - "$$unsetOrMatches": {} - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": { - "keyAltNames": { - "$ne": "azure_key" - } - }, - "readConcern": { - "level": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "update": "datakeys", - "ordered": true, - "updates": [ - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "azure", - "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", - "keyName": "key-name-csfle" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "azure", - "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", - "keyName": "key-name-csfle" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "azure", - "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", - "keyName": "key-name-csfle" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "azure", - "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", - "keyName": "key-name-csfle" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "rewrap with new GCP KMS provider", - "operations": [ - { - "name": "rewrapManyDataKey", - "object": "clientEncryption0", - "arguments": { - "filter": { - "keyAltNames": { - "$ne": "gcp_key" - } - }, - "opts": { - "provider": "gcp", - "masterKey": { - "projectId": "devprod-drivers", - "location": "global", - "keyRing": "key-ring-csfle", - "keyName": "key-name-csfle" - } - } - }, - "expectResult": { - "bulkWriteResult": { - "insertedCount": 0, - "matchedCount": 4, - "modifiedCount": 4, - "deletedCount": 0, - "upsertedCount": 0, - "upsertedIds": {}, - "insertedIds": { - "$$unsetOrMatches": {} - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": { - "keyAltNames": { - "$ne": "gcp_key" - } - }, - "readConcern": { - "level": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "update": "datakeys", - "ordered": true, - "updates": [ - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "gcp", - "projectId": "devprod-drivers", - "location": "global", - "keyRing": "key-ring-csfle", - "keyName": "key-name-csfle" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "gcp", - "projectId": "devprod-drivers", - "location": "global", - "keyRing": "key-ring-csfle", - "keyName": "key-name-csfle" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "gcp", - "projectId": "devprod-drivers", - "location": "global", - "keyRing": "key-ring-csfle", - "keyName": "key-name-csfle" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "gcp", - "projectId": "devprod-drivers", - "location": "global", - "keyRing": "key-ring-csfle", - "keyName": "key-name-csfle" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "rewrap with new KMIP KMS provider", - "operations": [ - { - "name": "rewrapManyDataKey", - "object": "clientEncryption0", - "arguments": { - "filter": { - "keyAltNames": { - "$ne": "kmip_key" - } - }, - "opts": { - "provider": "kmip" - } - }, - "expectResult": { - "bulkWriteResult": { - "insertedCount": 0, - "matchedCount": 4, - "modifiedCount": 4, - "deletedCount": 0, - "upsertedCount": 0, - "upsertedIds": {}, - "insertedIds": { - "$$unsetOrMatches": {} - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": { - "keyAltNames": { - "$ne": "kmip_key" - } - }, - "readConcern": { - "level": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "update": "datakeys", - "ordered": true, - "updates": [ - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "kmip", - "keyId": { - "$$type": "string" - } - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "kmip", - "keyId": { - "$$type": "string" - } - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "kmip", - "keyId": { - "$$type": "string" - } - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "kmip", - "keyId": { - "$$type": "string" - } - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "rewrap with new local KMS provider", - "operations": [ - { - "name": "rewrapManyDataKey", - "object": "clientEncryption0", - "arguments": { - "filter": { - "keyAltNames": { - "$ne": "local_key" - } - }, - "opts": { - "provider": "local" - } - }, - "expectResult": { - "bulkWriteResult": { - "insertedCount": 0, - "matchedCount": 4, - "modifiedCount": 4, - "deletedCount": 0, - "upsertedCount": 0, - "upsertedIds": {}, - "insertedIds": { - "$$unsetOrMatches": {} - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": { - "keyAltNames": { - "$ne": "local_key" - } - }, - "readConcern": { - "level": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "update": "datakeys", - "ordered": true, - "updates": [ - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "local" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "local" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "local" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "provider": "local" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - } - ] - } - ] - }, - { - "description": "rewrap with current KMS provider", - "operations": [ - { - "name": "rewrapManyDataKey", - "object": "clientEncryption0", - "arguments": { - "filter": {} - }, - "expectResult": { - "bulkWriteResult": { - "insertedCount": 0, - "matchedCount": 5, - "modifiedCount": 5, - "deletedCount": 0, - "upsertedCount": 0, - "upsertedIds": {}, - "insertedIds": { - "$$unsetOrMatches": {} - } - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {}, - "projection": { - "masterKey": 1 - }, - "sort": { - "keyAltNames": 1 - } - }, - "expectResult": [ - { - "_id": { - "$binary": { - "base64": "YXdzYXdzYXdzYXdzYXdzYQ==", - "subType": "04" - } - }, - "masterKey": { - "provider": "aws", - "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", - "region": "us-east-1" - } - }, - { - "_id": { - "$binary": { - "base64": "YXp1cmVhenVyZWF6dXJlYQ==", - "subType": "04" - } - }, - "masterKey": { - "provider": "azure", - "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", - "keyName": "key-name-csfle" - } - }, - { - "_id": { - "$binary": { - "base64": "Z2NwZ2NwZ2NwZ2NwZ2NwZw==", - "subType": "04" - } - }, - "masterKey": { - "provider": "gcp", - "projectId": "devprod-drivers", - "location": "global", - "keyRing": "key-ring-csfle", - "keyName": "key-name-csfle" - } - }, - { - "_id": { - "$binary": { - "base64": "a21pcGttaXBrbWlwa21pcA==", - "subType": "04" - } - }, - "masterKey": { - "provider": "kmip", - "keyId": "1" - } - }, - { - "_id": { - "$binary": { - "base64": "bG9jYWxrZXlsb2NhbGtleQ==", - "subType": "04" - } - }, - "masterKey": { - "provider": "local" - } - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "find": "datakeys", - "filter": {}, - "readConcern": { - "level": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "databaseName": "keyvault", - "command": { - "update": "datakeys", - "ordered": true, - "updates": [ - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "$$type": "object" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "$$type": "object" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "$$type": "object" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "$$type": "object" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$$type": "binData" - } - }, - "u": { - "$set": { - "masterKey": { - "$$type": "object" - }, - "keyMaterial": { - "$$type": "binData" - } - }, - "$currentDate": { - "updateDate": true - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-encryption/unified/rewrapManyDataKey.yml b/testdata/client-side-encryption/unified/rewrapManyDataKey.yml deleted file mode 100644 index cc20e1b171..0000000000 --- a/testdata/client-side-encryption/unified/rewrapManyDataKey.yml +++ /dev/null @@ -1,438 +0,0 @@ -# To ensure consistent ordering for expectResult matching purposes, find -# commands sort the resulting documents in ascending order by the single-element -# keyAltNames array to ensure alphabetic order by original KMS provider as -# defined in initialData. -description: rewrapManyDataKey - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - aws: { accessKeyId: { $$placeholder: 1 }, secretAccessKey: { $$placeholder: 1 } } - azure: { tenantId: { $$placeholder: 1 }, clientId: { $$placeholder: 1 }, clientSecret: { $$placeholder: 1 } } - gcp: { email: { $$placeholder: 1 }, privateKey: { $$placeholder: 1 } } - kmip: { endpoint: { $$placeholder: 1 } } - local: { key: { $$placeholder: 1 } } - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name keyvault - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name datakeys - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - _id: &aws_key_id { $binary: { base64: YXdzYXdzYXdzYXdzYXdzYQ==, subType: "04" } } - keyAltNames: ["aws_key"] - keyMaterial: { $binary: { base64: AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: &aws_masterkey - provider: aws - key: arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0 - region: us-east-1 - - _id: &azure_key_id { $binary: { base64: YXp1cmVhenVyZWF6dXJlYQ==, subType: "04" } } - keyAltNames: ["azure_key"] - keyMaterial: { $binary: { base64: pr01l7qDygUkFE/0peFwpnNlv3iIy8zrQK38Q9i12UCN2jwZHDmfyx8wokiIKMb9kAleeY+vnt3Cf1MKu9kcDmI+KxbNDd+V3ytAAGzOVLDJr77CiWjF9f8ntkXRHrAY9WwnVDANYkDwXlyU0Y2GQFTiW65jiQhUtYLYH63Tk48SsJuQvnWw1Q+PzY8ga+QeVec8wbcThwtm+r2IHsCFnc72Gv73qq7weISw+O4mN08z3wOp5FOS2ZM3MK7tBGmPdBcktW7F8ODGsOQ1FU53OrWUnyX2aTi2ftFFFMWVHqQo7EYuBZHru8RRODNKMyQk0BFfKovAeTAVRv9WH9QU7g==, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: &azure_masterkey - provider: azure - keyVaultEndpoint: key-vault-csfle.vault.azure.net - keyName: key-name-csfle - - _id: &gcp_key_id { $binary: { base64: Z2NwZ2NwZ2NwZ2NwZ2NwZw==, subType: "04" } } - keyAltNames: ["gcp_key"] - keyMaterial: { $binary: { base64: CiQAIgLj0USbQtof/pYRLQO96yg/JEtZbD1UxKueaC37yzT5tTkSiQEAhClWB5ZCSgzHgxv8raWjNB4r7e8ePGdsmSuYTYmLC5oHHS/BdQisConzNKFaobEQZHamTCjyhy5NotKF8MWoo+dyfQApwI29+vAGyrUIQCXzKwRnNdNQ+lb3vJtS5bqvLTvSxKHpVca2kqyC9nhonV+u4qru5Q2bAqUgVFc8fL4pBuvlowZFTQ==, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: &gcp_masterkey - provider: gcp - projectId: devprod-drivers - location: global - keyRing: key-ring-csfle - keyName: key-name-csfle - - _id: &kmip_key_id { $binary: { base64: a21pcGttaXBrbWlwa21pcA==, subType: "04" } } - keyAltNames: ["kmip_key"] - keyMaterial: { $binary: { base64: CklVctHzke4mcytd0TxGqvepkdkQN8NUF4+jV7aZQITAKdz6WjdDpq3lMt9nSzWGG2vAEfvRb3mFEVjV57qqGqxjq2751gmiMRHXz0btStbIK3mQ5xbY9kdye4tsixlCryEwQONr96gwlwKKI9Nubl9/8+uRF6tgYjje7Q7OjauEf1SrJwKcoQ3WwnjZmEqAug0kImCpJ/irhdqPzivRiA==, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: &kmip_masterkey - provider: kmip - keyId: "1" - - _id: &local_key_id { $binary: { base64: bG9jYWxrZXlsb2NhbGtleQ==, subType: "04" } } - keyAltNames: ["local_key"] - keyMaterial: { $binary: { base64: ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==, subType: "00" } } - creationDate: { $date: { $numberLong: "1641024000000" } } - updateDate: { $date: { $numberLong: "1641024000000" } } - status: 1 - masterKey: &local_masterkey - provider: local - -tests: - - description: "no keys to rewrap due to no filter matches" - operations: - - name: rewrapManyDataKey - object: *clientEncryption0 - arguments: - filter: { keyAltNames: no_matching_keys } - opts: - provider: local - expectResult: - # If no bulk write operation, then no bulk write result. - bulkWriteResult: { $$exists: false } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: { keyAltNames: no_matching_keys } - readConcern: { level: majority } - - - description: "rewrap with new AWS KMS provider" - operations: - - name: rewrapManyDataKey - object: *clientEncryption0 - arguments: - filter: { keyAltNames: { $ne: aws_key } } - opts: - provider: aws - # Different key: 89fcc2c4-08b0-4bd9-9f25-e30687b580d0 -> 061334ae-07a8-4ceb-a813-8135540e837d. - masterKey: &new_aws_masterkey - key: arn:aws:kms:us-east-1:579766882180:key/061334ae-07a8-4ceb-a813-8135540e837d - region: us-east-1 - expectResult: - bulkWriteResult: - insertedCount: 0 - matchedCount: 4 - modifiedCount: 4 - deletedCount: 0 - upsertedCount: 0 - upsertedIds: {} - insertedIds: { $$unsetOrMatches: {} } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: { keyAltNames: { $ne: aws_key } } - readConcern: { level: majority } - - commandStartedEvent: - databaseName: *database0Name - command: - update: *collection0Name - ordered: true - updates: - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: aws, <<: *new_aws_masterkey }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: aws, <<: *new_aws_masterkey }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: aws, <<: *new_aws_masterkey }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: aws, <<: *new_aws_masterkey }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - writeConcern: { w: majority } - - - description: "rewrap with new Azure KMS provider" - operations: - - name: rewrapManyDataKey - object: *clientEncryption0 - arguments: - filter: { keyAltNames: { $ne: azure_key } } - opts: - provider: azure - masterKey: &new_azure_masterkey - keyVaultEndpoint: key-vault-csfle.vault.azure.net - keyName: key-name-csfle - expectResult: - bulkWriteResult: - insertedCount: 0 - matchedCount: 4 - modifiedCount: 4 - deletedCount: 0 - upsertedCount: 0 - upsertedIds: {} - insertedIds: { $$unsetOrMatches: {} } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: { keyAltNames: { $ne: azure_key } } - readConcern: { level: majority } - - commandStartedEvent: - databaseName: *database0Name - command: - update: *collection0Name - ordered: true - updates: - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: azure, <<: *new_azure_masterkey }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: azure, <<: *new_azure_masterkey }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: azure, <<: *new_azure_masterkey }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: azure, <<: *new_azure_masterkey }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - writeConcern: { w: majority } - - - description: "rewrap with new GCP KMS provider" - operations: - - name: rewrapManyDataKey - object: *clientEncryption0 - arguments: - filter: { keyAltNames: { $ne: gcp_key } } - opts: - provider: gcp - masterKey: &new_gcp_masterkey - projectId: devprod-drivers - location: global - keyRing: key-ring-csfle - keyName: key-name-csfle - expectResult: - bulkWriteResult: - insertedCount: 0 - matchedCount: 4 - modifiedCount: 4 - deletedCount: 0 - upsertedCount: 0 - upsertedIds: {} - insertedIds: { $$unsetOrMatches: {} } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: { keyAltNames: { $ne: gcp_key } } - readConcern: { level: majority } - - commandStartedEvent: - databaseName: *database0Name - command: - update: *collection0Name - ordered: true - updates: - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: gcp, <<: *new_gcp_masterkey }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: gcp, <<: *new_gcp_masterkey }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: gcp, <<: *new_gcp_masterkey }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: gcp, <<: *new_gcp_masterkey }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - writeConcern: { w: majority } - - - description: "rewrap with new KMIP KMS provider" - operations: - - name: rewrapManyDataKey - object: *clientEncryption0 - arguments: - filter: { keyAltNames: { $ne: kmip_key } } - opts: - provider: kmip - expectResult: - bulkWriteResult: - insertedCount: 0 - matchedCount: 4 - modifiedCount: 4 - deletedCount: 0 - upsertedCount: 0 - upsertedIds: {} - insertedIds: { $$unsetOrMatches: {} } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: { keyAltNames: { $ne: kmip_key } } - readConcern: { level: majority } - - commandStartedEvent: - databaseName: *database0Name - command: - update: *collection0Name - ordered: true - updates: - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: kmip, keyId: { $$type: string } }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: kmip, keyId: { $$type: string } }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: kmip, keyId: { $$type: string } }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: kmip, keyId: { $$type: string } }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - writeConcern: { w: majority } - - - description: "rewrap with new local KMS provider" - operations: - - name: rewrapManyDataKey - object: *clientEncryption0 - arguments: - filter: { keyAltNames: { $ne: local_key } } - opts: - provider: local - expectResult: - bulkWriteResult: - insertedCount: 0 - matchedCount: 4 - modifiedCount: 4 - deletedCount: 0 - upsertedCount: 0 - upsertedIds: {} - insertedIds: { $$unsetOrMatches: {} } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: { keyAltNames: { $ne: local_key } } - readConcern: { level: majority } - - commandStartedEvent: - databaseName: *database0Name - command: - update: *collection0Name - ordered: true - updates: - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: local }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: local }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: local }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { provider: local }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - writeConcern: { w: majority } - - - description: "rewrap with current KMS provider" - operations: - - name: rewrapManyDataKey - object: *clientEncryption0 - arguments: - filter: {} - expectResult: - bulkWriteResult: - insertedCount: 0 - matchedCount: 5 - modifiedCount: 5 - deletedCount: 0 - upsertedCount: 0 - upsertedIds: {} - insertedIds: { $$unsetOrMatches: {} } - - name: find - object: *collection0 - arguments: - filter: {} - projection: { masterKey: 1 } - sort: { keyAltNames: 1 } - expectResult: - - { _id: *aws_key_id, masterKey: *aws_masterkey } - - { _id: *azure_key_id, masterKey: *azure_masterkey } - - { _id: *gcp_key_id, masterKey: *gcp_masterkey } - - { _id: *kmip_key_id, masterKey: *kmip_masterkey } - - { _id: *local_key_id, masterKey: *local_masterkey } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - databaseName: *database0Name - command: - find: *collection0Name - filter: {} - readConcern: { level: majority } - - commandStartedEvent: - databaseName: *database0Name - command: - update: *collection0Name - ordered: true - updates: - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { $$type: object }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { $$type: object }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { $$type: object }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { $$type: object }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: { _id: { $$type: binData } } - u: { $set: { masterKey: { $$type: object }, keyMaterial: { $$type: binData } }, $currentDate: { updateDate: true } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - writeConcern: { w: majority } - - commandStartedEvent: { commandName: find } diff --git a/testdata/client-side-operations-timeout/bulkWrite.json b/testdata/client-side-operations-timeout/bulkWrite.json deleted file mode 100644 index 14d5b654f6..0000000000 --- a/testdata/client-side-operations-timeout/bulkWrite.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "description": "timeoutMS behaves correctly for bulkWrite operations", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "createEntities": [ - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ], - "initialData": [ - { - "collectionName": "coll", - "databaseName": "test", - "documents": [] - } - ], - "tests": [ - { - "description": "timeoutMS applied to entire bulkWrite, not individual commands", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert", - "update" - ], - "blockConnection": true, - "blockTimeMS": 120 - } - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - }, - { - "replaceOne": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 1 - } - } - } - ], - "timeoutMS": 200 - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-operations-timeout/bulkWrite.yml b/testdata/client-side-operations-timeout/bulkWrite.yml deleted file mode 100644 index b50799c2b0..0000000000 --- a/testdata/client-side-operations-timeout/bulkWrite.yml +++ /dev/null @@ -1,84 +0,0 @@ -description: "timeoutMS behaves correctly for bulkWrite operations" - -schemaVersion: "1.9" - -runOnRequirements: - - minServerVersion: "4.4" - -createEntities: - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName test - - collection: - id: &collection collection - database: *database - collectionName: &collectionName coll - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: [] - -tests: - # Test that drivers do not refresh timeoutMS between commands. This is done by running a bulkWrite that will require - # two commands with timeoutMS=200 and blocking each command for 120ms. The server should take over 200ms total, so the - # bulkWrite should fail with a timeout error. - - description: "timeoutMS applied to entire bulkWrite, not individual commands" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert", "update"] - blockConnection: true - blockTimeMS: 120 - # Do an operation without a timeout to ensure the servers are discovered. - - name: find - object: *collection - arguments: - filter: { _id : 1 } - - name: bulkWrite - object: *collection - arguments: - requests: - - insertOne: - document: { _id: 1 } - - replaceOne: - filter: { _id: 1 } - replacement: { x: 1 } - timeoutMS: 200 - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } diff --git a/testdata/client-side-operations-timeout/command-execution.json b/testdata/client-side-operations-timeout/command-execution.json deleted file mode 100644 index d4f9bb1bdc..0000000000 --- a/testdata/client-side-operations-timeout/command-execution.json +++ /dev/null @@ -1,393 +0,0 @@ -{ - "description": "timeoutMS behaves correctly during command execution", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "4.9", - "topologies": [ - "single", - "replicaset", - "sharded" - ], - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "coll", - "databaseName": "test", - "documents": [] - }, - { - "collectionName": "timeoutColl", - "databaseName": "test", - "documents": [] - } - ], - "tests": [ - { - "description": "maxTimeMS value in the command is less than timeoutMS", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "reduceMaxTimeMSTest", - "blockConnection": true, - "blockTimeMS": 50 - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "uriOptions": { - "appName": "reduceMaxTimeMSTest", - "w": 1, - "timeoutMS": 500, - "heartbeatFrequencyMS": 500 - }, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "timeoutCollection", - "database": "database", - "collectionName": "timeoutColl" - } - } - ] - } - }, - { - "name": "insertOne", - "object": "timeoutCollection", - "arguments": { - "document": { - "_id": 1 - }, - "timeoutMS": 100000 - } - }, - { - "name": "wait", - "object": "testRunner", - "arguments": { - "ms": 1000 - } - }, - { - "name": "insertOne", - "object": "timeoutCollection", - "arguments": { - "document": { - "_id": 2 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "timeoutColl" - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "timeoutColl", - "maxTimeMS": { - "$$lte": 451 - } - } - } - } - ] - } - ] - }, - { - "description": "command is not sent if RTT is greater than timeoutMS", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "rttTooHighTest", - "blockConnection": true, - "blockTimeMS": 50 - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "uriOptions": { - "appName": "rttTooHighTest", - "w": 1, - "timeoutMS": 10, - "heartbeatFrequencyMS": 500 - }, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "timeoutCollection", - "database": "database", - "collectionName": "timeoutColl" - } - } - ] - } - }, - { - "name": "insertOne", - "object": "timeoutCollection", - "arguments": { - "document": { - "_id": 1 - }, - "timeoutMS": 100000 - } - }, - { - "name": "wait", - "object": "testRunner", - "arguments": { - "ms": 1000 - } - }, - { - "name": "insertOne", - "object": "timeoutCollection", - "arguments": { - "document": { - "_id": 2 - } - }, - "expectError": { - "isTimeoutError": true - } - }, - { - "name": "insertOne", - "object": "timeoutCollection", - "arguments": { - "document": { - "_id": 3 - } - }, - "expectError": { - "isTimeoutError": true - } - }, - { - "name": "insertOne", - "object": "timeoutCollection", - "arguments": { - "document": { - "_id": 4 - } - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "timeoutColl" - } - } - } - ] - } - ] - }, - { - "description": "short-circuit is not enabled with only 1 RTT measurement", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "reduceMaxTimeMSTest", - "blockConnection": true, - "blockTimeMS": 100 - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "uriOptions": { - "appName": "reduceMaxTimeMSTest", - "w": 1, - "timeoutMS": 90, - "heartbeatFrequencyMS": 100000 - }, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "timeoutCollection", - "database": "database", - "collectionName": "timeoutColl" - } - } - ] - } - }, - { - "name": "insertOne", - "object": "timeoutCollection", - "arguments": { - "document": { - "_id": 1 - }, - "timeoutMS": 100000 - } - }, - { - "name": "insertOne", - "object": "timeoutCollection", - "arguments": { - "document": { - "_id": 2 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "timeoutColl" - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "timeoutColl", - "maxTimeMS": { - "$$lte": 450 - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-operations-timeout/command-execution.yml b/testdata/client-side-operations-timeout/command-execution.yml deleted file mode 100644 index 4b05071fe5..0000000000 --- a/testdata/client-side-operations-timeout/command-execution.yml +++ /dev/null @@ -1,251 +0,0 @@ -description: "timeoutMS behaves correctly during command execution" - -schemaVersion: "1.9" - -runOnRequirements: - # The appName filter cannot be used to set a fail point on connection handshakes until server version 4.9 due to - # SERVER-49220/SERVER-49336. - - minServerVersion: "4.9" - # Skip load-balanced and serverless which do not support RTT measurements. - topologies: [ single, replicaset, sharded ] - serverless: forbid - -createEntities: - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - -initialData: - # The corresponding entities for the collections defined here are created in test-level createEntities operations. - # This is done so that tests can set fail points that will affect all of the handshakes and heartbeats done by a - # client. The collection and database names are listed here so that the collections will be dropped and re-created at - # the beginning of each test. - - collectionName: ®ularCollectionName coll - databaseName: &databaseName test - documents: [] - - collectionName: &timeoutCollectionName timeoutColl - databaseName: &databaseName test - documents: [] - -tests: - - description: "maxTimeMS value in the command is less than timeoutMS" - operations: - # Artificially increase the server RTT to ~50ms. - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: "alwaysOn" - data: - failCommands: ["hello", "isMaster"] - appName: &appName reduceMaxTimeMSTest - blockConnection: true - blockTimeMS: 50 - # Create a client with the app name specified in the fail point and timeoutMS higher than blockTimeMS. - # Also create database and collection entities derived from the new client. - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - uriOptions: - appName: *appName - w: 1 # Override server's w:majority default to speed up the test. - timeoutMS: 500 - heartbeatFrequencyMS: 500 - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &timeoutCollection timeoutCollection - database: *database - collectionName: *timeoutCollectionName - # Do an operation with a large timeout to ensure the servers are discovered. - - name: insertOne - object: *timeoutCollection - arguments: - document: { _id: 1 } - timeoutMS: 100000 - # Wait until short-circuiting has been enabled (at least 2 RTT measurements). - - name: wait - object: testRunner - arguments: - ms: 1000 - # Do an operation with timeoutCollection so the event will include a maxTimeMS field. - - name: insertOne - object: *timeoutCollection - arguments: - document: { _id: 2 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *timeoutCollectionName - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *timeoutCollectionName - # GODRIVER-3106: Add a 1 millisecond buffer on the expected 450ms. - maxTimeMS: { $$lte: 451 } - - - description: "command is not sent if RTT is greater than timeoutMS" - operations: - # Artificially increase the server RTT to ~50ms. - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: "alwaysOn" - data: - failCommands: ["hello", "isMaster"] - appName: &appName rttTooHighTest - blockConnection: true - blockTimeMS: 50 - # Create a client with the app name specified in the fail point. Also create database and collection entities - # derived from the new client. There is one collection entity with no timeoutMS and another with a timeoutMS - # that's lower than the fail point's blockTimeMS value. - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - uriOptions: - appName: *appName - w: 1 # Override server's w:majority default to speed up the test. - timeoutMS: 10 - heartbeatFrequencyMS: 500 - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &timeoutCollection timeoutCollection - database: *database - collectionName: *timeoutCollectionName - # Do an operation with a large timeout to ensure the servers are discovered. - - name: insertOne - object: *timeoutCollection - arguments: - document: { _id: 1 } - timeoutMS: 100000 - # Wait until short-circuiting has been enabled (at least 2 RTT measurements). - - name: wait - object: testRunner - arguments: - ms: 1000 - # Do an operation with timeoutCollection which will error. - - name: insertOne - object: *timeoutCollection - arguments: - document: { _id: 2 } - expectError: - isTimeoutError: true - # Do an operation with timeoutCollection which will error. - - name: insertOne - object: *timeoutCollection - arguments: - document: { _id: 3 } - expectError: - isTimeoutError: true - # Do an operation with timeoutCollection which will error. - - name: insertOne - object: *timeoutCollection - arguments: - document: { _id: 4 } - expectError: - isTimeoutError: true - expectEvents: - # There should only be one event, which corresponds to the first - # insertOne call. For the subsequent insertOne calls, drivers should - # fail client-side. - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *timeoutCollectionName - - - description: "short-circuit is not enabled with only 1 RTT measurement" - operations: - # Artificially increase the server RTT to ~300ms. - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: "alwaysOn" - data: - failCommands: ["hello", "isMaster"] - appName: &appName reduceMaxTimeMSTest - blockConnection: true - blockTimeMS: 100 - # Create a client with the app name specified in the fail point and timeoutMS lower than blockTimeMS. - # Also create database and collection entities derived from the new client. - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - uriOptions: - appName: *appName - w: 1 # Override server's w:majority default to speed up the test. - timeoutMS: 90 - heartbeatFrequencyMS: 100000 # Override heartbeatFrequencyMS to ensure only 1 RTT is recorded. - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &timeoutCollection timeoutCollection - database: *database - collectionName: *timeoutCollectionName - # Do an operation with a large timeout to ensure the servers are discovered. - - name: insertOne - object: *timeoutCollection - arguments: - document: { _id: 1 } - timeoutMS: 100000 - # Do an operation with timeoutCollection which will succeed. If this - # fails it indicates the driver mistakenly used the min RTT even though - # there has only been one sample. - - name: insertOne - object: *timeoutCollection - arguments: - document: { _id: 2 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *timeoutCollectionName - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *timeoutCollectionName - maxTimeMS: { $$lte: 450 } diff --git a/testdata/client-side-operations-timeout/error-transformations.json b/testdata/client-side-operations-timeout/error-transformations.json deleted file mode 100644 index 4889e39583..0000000000 --- a/testdata/client-side-operations-timeout/error-transformations.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "description": "MaxTimeMSExpired server errors are transformed into a custom timeout error", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.2", - "topologies": [ - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ], - "initialData": [ - { - "collectionName": "coll", - "databaseName": "test", - "documents": [] - } - ], - "tests": [ - { - "description": "basic MaxTimeMSExpired error is transformed", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 50 - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 1 - } - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "write concern error MaxTimeMSExpired is transformed", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 50, - "errmsg": "maxTimeMS expired" - } - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 1 - } - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-operations-timeout/error-transformations.yml b/testdata/client-side-operations-timeout/error-transformations.yml deleted file mode 100644 index 7bff4776a8..0000000000 --- a/testdata/client-side-operations-timeout/error-transformations.yml +++ /dev/null @@ -1,96 +0,0 @@ -description: "MaxTimeMSExpired server errors are transformed into a custom timeout error" - -schemaVersion: "1.9" - -# failCommand is available on 4.0 for replica sets and 4.2 for sharded clusters. -runOnRequirements: - - minServerVersion: "4.0" - topologies: ["replicaset"] - - minServerVersion: "4.2" - topologies: ["sharded"] - -createEntities: - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName test - - collection: - id: &collection collection - database: *database - collectionName: &collectionName coll - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: [] - -tests: - # A server response like {ok: 0, code: 50, ...} is transformed. - - description: "basic MaxTimeMSExpired error is transformed" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 50 - - name: insertOne - object: *collection - arguments: - document: { _id: 1 } - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - # A server response like {ok: 1, writeConcernError: {code: 50, ...}} is transformed. - - description: "write concern error MaxTimeMSExpired is transformed" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - writeConcernError: - code: 50 - errmsg: "maxTimeMS expired" - - name: insertOne - object: *collection - arguments: - document: { _id: 1 } - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } diff --git a/testdata/client-side-operations-timeout/global-timeoutMS.json b/testdata/client-side-operations-timeout/global-timeoutMS.json deleted file mode 100644 index 740bbad2e2..0000000000 --- a/testdata/client-side-operations-timeout/global-timeoutMS.json +++ /dev/null @@ -1,5830 +0,0 @@ -{ - "description": "timeoutMS can be configured on a MongoClient", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "coll", - "databaseName": "test", - "documents": [] - } - ], - "tests": [ - { - "description": "timeoutMS can be configured on a MongoClient - listDatabases on client", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "listDatabases", - "object": "client", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - listDatabases on client", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listDatabases", - "object": "client", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - listDatabaseNames on client", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "listDatabaseNames", - "object": "client", - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - listDatabaseNames on client", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - createChangeStream on client", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "createChangeStream", - "object": "client", - "arguments": { - "pipeline": [] - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - createChangeStream on client", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "createChangeStream", - "object": "client", - "arguments": { - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - aggregate on database", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "aggregate", - "object": "database", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ] - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - aggregate on database", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "aggregate", - "object": "database", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - listCollections on database", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "listCollections", - "object": "database", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - listCollections on database", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listCollections", - "object": "database", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - listCollectionNames on database", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "listCollectionNames", - "object": "database", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - listCollectionNames on database", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listCollectionNames", - "object": "database", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - runCommand on database", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "ping" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "ping": 1 - }, - "commandName": "ping" - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "ping", - "databaseName": "test", - "command": { - "ping": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - runCommand on database", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "ping" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "ping": 1 - }, - "commandName": "ping" - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "ping", - "databaseName": "test", - "command": { - "ping": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - createChangeStream on database", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "createChangeStream", - "object": "database", - "arguments": { - "pipeline": [] - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - createChangeStream on database", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "createChangeStream", - "object": "database", - "arguments": { - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - aggregate on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [] - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - aggregate on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - count on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - count on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - countDocuments on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - countDocuments on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - estimatedDocumentCount on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "estimatedDocumentCount", - "object": "collection", - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - estimatedDocumentCount on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "estimatedDocumentCount", - "object": "collection" - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - distinct on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "distinct" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - distinct on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - find on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - find on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - findOne on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - findOne on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - listIndexes on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "listIndexes", - "object": "collection", - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - listIndexes on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - listIndexNames on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "listIndexNames", - "object": "collection", - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - listIndexNames on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - createChangeStream on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection", - "arguments": { - "pipeline": [] - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - createChangeStream on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection", - "arguments": { - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - insertOne on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - insertOne on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - insertMany on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "x": 1 - } - ] - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - insertMany on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "x": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - deleteOne on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - deleteOne on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - deleteMany on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "deleteMany", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - deleteMany on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "deleteMany", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - replaceOne on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "replaceOne", - "object": "collection", - "arguments": { - "filter": {}, - "replacement": { - "x": 1 - } - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - replaceOne on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "replaceOne", - "object": "collection", - "arguments": { - "filter": {}, - "replacement": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - updateOne on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - updateOne on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - updateMany on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "updateMany", - "object": "collection", - "arguments": { - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - updateMany on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "updateMany", - "object": "collection", - "arguments": { - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - findOneAndDelete on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - findOneAndDelete on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - findOneAndReplace on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "filter": {}, - "replacement": { - "x": 1 - } - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - findOneAndReplace on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "filter": {}, - "replacement": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - findOneAndUpdate on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - findOneAndUpdate on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - bulkWrite on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - bulkWrite on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - createIndex on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "createIndexes" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "createIndex", - "object": "collection", - "arguments": { - "keys": { - "x": 1 - }, - "name": "x_1" - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "createIndexes", - "databaseName": "test", - "command": { - "createIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - createIndex on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "createIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "createIndex", - "object": "collection", - "arguments": { - "keys": { - "x": 1 - }, - "name": "x_1" - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "createIndexes", - "databaseName": "test", - "command": { - "createIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - dropIndex on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "dropIndexes" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "dropIndex", - "object": "collection", - "arguments": { - "name": "x_1" - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "dropIndexes", - "databaseName": "test", - "command": { - "dropIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - dropIndex on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "dropIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "dropIndex", - "object": "collection", - "arguments": { - "name": "x_1" - }, - "expectError": { - "isClientError": false, - "isTimeoutError": false - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "dropIndexes", - "databaseName": "test", - "command": { - "dropIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured on a MongoClient - dropIndexes on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 250 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "dropIndexes" - ], - "blockConnection": true, - "blockTimeMS": 350 - } - } - } - }, - { - "name": "dropIndexes", - "object": "collection", - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "dropIndexes", - "databaseName": "test", - "command": { - "dropIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 on a MongoClient - dropIndexes on collection", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 0 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "dropIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "dropIndexes", - "object": "collection" - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "dropIndexes", - "databaseName": "test", - "command": { - "dropIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-operations-timeout/global-timeoutMS.yml b/testdata/client-side-operations-timeout/global-timeoutMS.yml deleted file mode 100644 index 989a63f086..0000000000 --- a/testdata/client-side-operations-timeout/global-timeoutMS.yml +++ /dev/null @@ -1,3235 +0,0 @@ -# Tests in this file are generated from global-timeoutMS.yml.template. - -description: "timeoutMS can be configured on a MongoClient" - -schemaVersion: "1.9" - -runOnRequirements: - - minServerVersion: "4.4" - topologies: ["replicaset", "sharded"] - -createEntities: - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - -initialData: - - collectionName: &collectionName coll - databaseName: &databaseName test - documents: [] - -tests: - # For each operation, we execute two tests: - # - # 1. timeoutMS can be configured to a non-zero value on a MongoClient and is inherited by the operation. Each test - # constructs a client entity with timeoutMS=250 and configures a fail point to block the operation for 350ms so - # execution results in a timeout error. - # - # 2. timeoutMS can be set to 0 for a MongoClient. Each test constructs a client entity with timeoutMS=0 and - # configures a fail point to block the operation for 15ms. The tests expect the operation to succeed and the command - # sent to not contain a maxTimeMS field. - - - description: "timeoutMS can be configured on a MongoClient - listDatabases on client" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 350 - - name: listDatabases - object: *client - arguments: - filter: {} - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - listDatabases on client" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 15 - - name: listDatabases - object: *client - arguments: - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - listDatabaseNames on client" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 350 - - name: listDatabaseNames - object: *client - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - listDatabaseNames on client" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 15 - - name: listDatabaseNames - object: *client - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - createChangeStream on client" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 350 - - name: createChangeStream - object: *client - arguments: - pipeline: [] - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - createChangeStream on client" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: createChangeStream - object: *client - arguments: - pipeline: [] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - aggregate on database" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 350 - - name: aggregate - object: *database - arguments: - pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ] - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - aggregate on database" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: aggregate - object: *database - arguments: - pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - listCollections on database" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 350 - - name: listCollections - object: *database - arguments: - filter: {} - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - listCollections on database" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 15 - - name: listCollections - object: *database - arguments: - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - listCollectionNames on database" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 350 - - name: listCollectionNames - object: *database - arguments: - filter: {} - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - listCollectionNames on database" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 15 - - name: listCollectionNames - object: *database - arguments: - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - runCommand on database" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["ping"] - blockConnection: true - blockTimeMS: 350 - - name: runCommand - object: *database - arguments: - command: { ping: 1 } - commandName: ping - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: ping - databaseName: *databaseName - command: - ping: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - runCommand on database" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["ping"] - blockConnection: true - blockTimeMS: 15 - - name: runCommand - object: *database - arguments: - command: { ping: 1 } - commandName: ping - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: ping - databaseName: *databaseName - command: - ping: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - createChangeStream on database" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 350 - - name: createChangeStream - object: *database - arguments: - pipeline: [] - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - createChangeStream on database" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: createChangeStream - object: *database - arguments: - pipeline: [] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - aggregate on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 350 - - name: aggregate - object: *collection - arguments: - pipeline: [] - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - aggregate on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: aggregate - object: *collection - arguments: - pipeline: [] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - count on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 350 - - name: count - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - count on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 15 - - name: count - object: *collection - arguments: - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - countDocuments on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 350 - - name: countDocuments - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - countDocuments on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: countDocuments - object: *collection - arguments: - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - estimatedDocumentCount on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 350 - - name: estimatedDocumentCount - object: *collection - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - estimatedDocumentCount on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 15 - - name: estimatedDocumentCount - object: *collection - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - distinct on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["distinct"] - blockConnection: true - blockTimeMS: 350 - - name: distinct - object: *collection - arguments: - fieldName: x - filter: {} - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - distinct on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["distinct"] - blockConnection: true - blockTimeMS: 15 - - name: distinct - object: *collection - arguments: - fieldName: x - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - find on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 350 - - name: find - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - find on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 15 - - name: find - object: *collection - arguments: - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - findOne on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 350 - - name: findOne - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - findOne on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 15 - - name: findOne - object: *collection - arguments: - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - listIndexes on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["listIndexes"] - blockConnection: true - blockTimeMS: 350 - - name: listIndexes - object: *collection - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - listIndexes on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: listIndexes - object: *collection - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - listIndexNames on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["listIndexes"] - blockConnection: true - blockTimeMS: 350 - - name: listIndexNames - object: *collection - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - listIndexNames on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: listIndexNames - object: *collection - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - createChangeStream on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 350 - - name: createChangeStream - object: *collection - arguments: - pipeline: [] - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - createChangeStream on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: createChangeStream - object: *collection - arguments: - pipeline: [] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - insertOne on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 350 - - name: insertOne - object: *collection - arguments: - document: { x: 1 } - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - insertOne on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 15 - - name: insertOne - object: *collection - arguments: - document: { x: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - insertMany on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 350 - - name: insertMany - object: *collection - arguments: - documents: - - { x: 1 } - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - insertMany on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 15 - - name: insertMany - object: *collection - arguments: - documents: - - { x: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - deleteOne on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 350 - - name: deleteOne - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - deleteOne on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 15 - - name: deleteOne - object: *collection - arguments: - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - deleteMany on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 350 - - name: deleteMany - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - deleteMany on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 15 - - name: deleteMany - object: *collection - arguments: - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - replaceOne on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 350 - - name: replaceOne - object: *collection - arguments: - filter: {} - replacement: { x: 1 } - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - replaceOne on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 15 - - name: replaceOne - object: *collection - arguments: - filter: {} - replacement: { x: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - updateOne on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 350 - - name: updateOne - object: *collection - arguments: - filter: {} - update: { $set: { x: 1 } } - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - updateOne on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 15 - - name: updateOne - object: *collection - arguments: - filter: {} - update: { $set: { x: 1 } } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - updateMany on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 350 - - name: updateMany - object: *collection - arguments: - filter: {} - update: { $set: { x: 1 } } - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - updateMany on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 15 - - name: updateMany - object: *collection - arguments: - filter: {} - update: { $set: { x: 1 } } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - findOneAndDelete on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 350 - - name: findOneAndDelete - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - findOneAndDelete on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 15 - - name: findOneAndDelete - object: *collection - arguments: - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - findOneAndReplace on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 350 - - name: findOneAndReplace - object: *collection - arguments: - filter: {} - replacement: { x: 1 } - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - findOneAndReplace on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 15 - - name: findOneAndReplace - object: *collection - arguments: - filter: {} - replacement: { x: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - findOneAndUpdate on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 350 - - name: findOneAndUpdate - object: *collection - arguments: - filter: {} - update: { $set: { x: 1 } } - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - findOneAndUpdate on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 15 - - name: findOneAndUpdate - object: *collection - arguments: - filter: {} - update: { $set: { x: 1 } } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - bulkWrite on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 350 - - name: bulkWrite - object: *collection - arguments: - requests: - - insertOne: - document: { _id: 1 } - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - bulkWrite on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 15 - - name: bulkWrite - object: *collection - arguments: - requests: - - insertOne: - document: { _id: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - createIndex on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["createIndexes"] - blockConnection: true - blockTimeMS: 350 - - name: createIndex - object: *collection - arguments: - keys: { x: 1 } - name: "x_1" - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: createIndexes - databaseName: *databaseName - command: - createIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - createIndex on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["createIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: createIndex - object: *collection - arguments: - keys: { x: 1 } - name: "x_1" - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: createIndexes - databaseName: *databaseName - command: - createIndexes: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - dropIndex on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["dropIndexes"] - blockConnection: true - blockTimeMS: 350 - - name: dropIndex - object: *collection - arguments: - name: "x_1" - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: dropIndexes - databaseName: *databaseName - command: - dropIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - dropIndex on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["dropIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: dropIndex - object: *collection - arguments: - name: "x_1" - - expectError: - isClientError: false - isTimeoutError: false - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: dropIndexes - databaseName: *databaseName - command: - dropIndexes: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured on a MongoClient - dropIndexes on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 250 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - # Use "times: 2" to workaround a quirk in Python on Windows where - # socket I/O can timeout ~20ms earlier than expected. With - # "times: 1" the retry would succeed within the remaining ~20ms. - mode: { times: 2 } - data: - failCommands: ["dropIndexes"] - blockConnection: true - blockTimeMS: 350 - - name: dropIndexes - object: *collection - - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: dropIndexes - databaseName: *databaseName - command: - dropIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 on a MongoClient - dropIndexes on collection" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - timeoutMS: 0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["dropIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: dropIndexes - object: *collection - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: dropIndexes - databaseName: *databaseName - command: - dropIndexes: *collectionName - maxTimeMS: { $$exists: false } diff --git a/testdata/client-side-operations-timeout/gridfs-advanced.json b/testdata/client-side-operations-timeout/gridfs-advanced.json deleted file mode 100644 index c6c0944d2f..0000000000 --- a/testdata/client-side-operations-timeout/gridfs-advanced.json +++ /dev/null @@ -1,385 +0,0 @@ -{ - "description": "timeoutMS behaves correctly for advanced GridFS API operations", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 75 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "bucket": { - "id": "bucket", - "database": "database" - } - }, - { - "collection": { - "id": "filesCollection", - "database": "database", - "collectionName": "fs.files" - } - }, - { - "collection": { - "id": "chunksCollection", - "database": "database", - "collectionName": "fs.chunks" - } - } - ], - "initialData": [ - { - "collectionName": "fs.files", - "databaseName": "test", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000005" - }, - "length": 8, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "filename": "length-8", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - } - ] - }, - { - "collectionName": "fs.chunks", - "databaseName": "test", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000005" - }, - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000006" - }, - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 1, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - } - ] - } - ], - "tests": [ - { - "description": "timeoutMS can be overridden for a rename", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 100 - } - } - } - }, - { - "name": "rename", - "object": "bucket", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - }, - "newFilename": "foo", - "timeoutMS": 2000 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "fs.files", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applied to update during a rename", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 100 - } - } - } - }, - { - "name": "rename", - "object": "bucket", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - }, - "newFilename": "foo" - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "fs.files", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be overridden for drop", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "drop" - ], - "blockConnection": true, - "blockTimeMS": 100 - } - } - } - }, - { - "name": "drop", - "object": "bucket", - "arguments": { - "timeoutMS": 2000 - } - } - ] - }, - { - "description": "timeoutMS applied to files collection drop", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "drop" - ], - "blockConnection": true, - "blockTimeMS": 100 - } - } - } - }, - { - "name": "drop", - "object": "bucket", - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "drop", - "databaseName": "test", - "command": { - "drop": "fs.files", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applied to chunks collection drop", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "skip": 1 - }, - "data": { - "failCommands": [ - "drop" - ], - "blockConnection": true, - "blockTimeMS": 100 - } - } - } - }, - { - "name": "drop", - "object": "bucket", - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "timeoutMS applied to drop as a whole, not individual parts", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "drop" - ], - "blockConnection": true, - "blockTimeMS": 50 - } - } - } - }, - { - "name": "drop", - "object": "bucket", - "expectError": { - "isTimeoutError": true - } - } - ] - } - ] -} diff --git a/testdata/client-side-operations-timeout/gridfs-advanced.yml b/testdata/client-side-operations-timeout/gridfs-advanced.yml deleted file mode 100644 index bc788bacc3..0000000000 --- a/testdata/client-side-operations-timeout/gridfs-advanced.yml +++ /dev/null @@ -1,206 +0,0 @@ -description: "timeoutMS behaves correctly for advanced GridFS API operations" - -schemaVersion: "1.9" - -runOnRequirements: - - minServerVersion: "4.4" - serverless: forbid # GridFS ops can be slow on serverless. - -createEntities: - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - - client: - id: &client client - uriOptions: - timeoutMS: 75 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName test - - bucket: - id: &bucket bucket - database: *database - - collection: - id: &filesCollection filesCollection - database: *database - collectionName: &filesCollectionName fs.files - - collection: - id: &chunksCollection chunksCollection - database: *database - collectionName: &chunksCollectionName fs.chunks - -initialData: - - collectionName: *filesCollectionName - databaseName: *databaseName - documents: - - _id: &fileDocumentId { $oid: "000000000000000000000005" } - length: 8 - chunkSize: 4 - uploadDate: { $date: "1970-01-01T00:00:00.000Z" } - filename: "length-8" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - collectionName: *chunksCollectionName - databaseName: *databaseName - documents: - - _id: { $oid: "000000000000000000000005" } - files_id: *fileDocumentId - n: 0 - data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex: 11223344 - - _id: { $oid: "000000000000000000000006" } - files_id: *fileDocumentId - n: 1 - data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex: 11223344 - -tests: - # Tests for the "rename" operation. - - - description: "timeoutMS can be overridden for a rename" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 100 - - name: rename - object: *bucket - arguments: - id: *fileDocumentId - newFilename: "foo" - timeoutMS: 2000 # The client timeoutMS is 75ms and the operation blocks for 100ms, so 2000ms should let it succeed. - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *filesCollectionName - maxTimeMS: { $$type: ["int", "long"] } - - - description: "timeoutMS applied to update during a rename" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 100 - - name: rename - object: *bucket - arguments: - id: *fileDocumentId - newFilename: "foo" - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *filesCollectionName - maxTimeMS: { $$type: ["int", "long"] } - - # Tests for the "drop" opration. Any tests that might result in multiple commands being sent do not have expectEvents - # assertions as these assertions reduce test robustness and can cause flaky failures. - - - description: "timeoutMS can be overridden for drop" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["drop"] - blockConnection: true - blockTimeMS: 100 - - name: drop - object: *bucket - arguments: - timeoutMS: 2000 # The client timeoutMS is 75ms and the operation blocks for 100ms, so 2000ms should let it succeed. - - - description: "timeoutMS applied to files collection drop" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["drop"] - blockConnection: true - blockTimeMS: 100 - - name: drop - object: *bucket - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: drop - databaseName: *databaseName - command: - drop: *filesCollectionName - maxTimeMS: { $$type: ["int", "long"] } - - - description: "timeoutMS applied to chunks collection drop" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: - # Skip the drop for the files collection. - skip: 1 - data: - failCommands: ["drop"] - blockConnection: true - blockTimeMS: 100 - - name: drop - object: *bucket - expectError: - isTimeoutError: true - - - description: "timeoutMS applied to drop as a whole, not individual parts" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["drop"] - blockConnection: true - blockTimeMS: 50 - - name: drop - object: *bucket - expectError: - isTimeoutError: true diff --git a/testdata/client-side-operations-timeout/gridfs-delete.json b/testdata/client-side-operations-timeout/gridfs-delete.json deleted file mode 100644 index 9f4980114b..0000000000 --- a/testdata/client-side-operations-timeout/gridfs-delete.json +++ /dev/null @@ -1,285 +0,0 @@ -{ - "description": "timeoutMS behaves correctly for GridFS delete operations", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 75 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "bucket": { - "id": "bucket", - "database": "database" - } - }, - { - "collection": { - "id": "filesCollection", - "database": "database", - "collectionName": "fs.files" - } - }, - { - "collection": { - "id": "chunksCollection", - "database": "database", - "collectionName": "fs.chunks" - } - } - ], - "initialData": [ - { - "collectionName": "fs.files", - "databaseName": "test", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000005" - }, - "length": 8, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "filename": "length-8", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - } - ] - }, - { - "collectionName": "fs.chunks", - "databaseName": "test", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000005" - }, - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000006" - }, - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 1, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - } - ] - } - ], - "tests": [ - { - "description": "timeoutMS can be overridden for delete", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 100 - } - } - } - }, - { - "name": "delete", - "object": "bucket", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - }, - "timeoutMS": 1000 - } - } - ] - }, - { - "description": "timeoutMS applied to delete against the files collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 100 - } - } - } - }, - { - "name": "delete", - "object": "bucket", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - } - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "fs.files", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applied to delete against the chunks collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "skip": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 100 - } - } - } - }, - { - "name": "delete", - "object": "bucket", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - } - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "timeoutMS applied to entire delete, not individual parts", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 50 - } - } - } - }, - { - "name": "delete", - "object": "bucket", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - } - }, - "expectError": { - "isTimeoutError": true - } - } - ] - } - ] -} diff --git a/testdata/client-side-operations-timeout/gridfs-delete.yml b/testdata/client-side-operations-timeout/gridfs-delete.yml deleted file mode 100644 index 9c72537c38..0000000000 --- a/testdata/client-side-operations-timeout/gridfs-delete.yml +++ /dev/null @@ -1,152 +0,0 @@ -description: "timeoutMS behaves correctly for GridFS delete operations" - -schemaVersion: "1.9" - -runOnRequirements: - - minServerVersion: "4.4" - serverless: forbid # GridFS ops can be slow on serverless. - -createEntities: - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - - client: - id: &client client - uriOptions: - timeoutMS: 75 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName test - - bucket: - id: &bucket bucket - database: *database - - collection: - id: &filesCollection filesCollection - database: *database - collectionName: &filesCollectionName fs.files - - collection: - id: &chunksCollection chunksCollection - database: *database - collectionName: &chunksCollectionName fs.chunks - -initialData: - - collectionName: *filesCollectionName - databaseName: *databaseName - documents: - - _id: &fileDocumentId { $oid: "000000000000000000000005" } - length: 8 - chunkSize: 4 - uploadDate: { $date: "1970-01-01T00:00:00.000Z" } - filename: "length-8" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - collectionName: *chunksCollectionName - databaseName: *databaseName - documents: - - _id: { $oid: "000000000000000000000005" } - files_id: *fileDocumentId - n: 0 - data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex: 11223344 - - _id: { $oid: "000000000000000000000006" } - files_id: *fileDocumentId - n: 1 - data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex: 11223344 - -tests: - - description: "timeoutMS can be overridden for delete" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 100 - - name: delete - object: *bucket - arguments: - id: *fileDocumentId - timeoutMS: 1000 # The client timeoutMS is 75ms and the operation blocks for 100ms, so 1000ms should let it succeed. - - - description: "timeoutMS applied to delete against the files collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 100 - - name: delete - object: *bucket - arguments: - id: *fileDocumentId - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *filesCollectionName - maxTimeMS: { $$type: ["int", "long"] } - - - description: "timeoutMS applied to delete against the chunks collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: - # The first "delete" will be against the files collection, so we skip it. - skip: 1 - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 100 - - name: delete - object: *bucket - arguments: - id: *fileDocumentId - expectError: - isTimeoutError: true - - # Test that drivers are not refreshing the timeout between commands. We test this by blocking both "delete" commands - # for 50ms each. The delete should inherit timeoutMS=75 from the client/database and the server takes over 75ms - # total, so the operation should fail. - - description: "timeoutMS applied to entire delete, not individual parts" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 50 - - name: delete - object: *bucket - arguments: - id: *fileDocumentId - expectError: - isTimeoutError: true diff --git a/testdata/client-side-operations-timeout/gridfs-find.json b/testdata/client-side-operations-timeout/gridfs-find.json deleted file mode 100644 index 7409036284..0000000000 --- a/testdata/client-side-operations-timeout/gridfs-find.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "description": "timeoutMS behaves correctly for GridFS find operations", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 75 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "bucket": { - "id": "bucket", - "database": "database" - } - }, - { - "collection": { - "id": "filesCollection", - "database": "database", - "collectionName": "fs.files" - } - }, - { - "collection": { - "id": "chunksCollection", - "database": "database", - "collectionName": "fs.chunks" - } - } - ], - "initialData": [ - { - "collectionName": "fs.files", - "databaseName": "test", - "documents": [] - }, - { - "collectionName": "fs.chunks", - "databaseName": "test", - "documents": [] - } - ], - "tests": [ - { - "description": "timeoutMS can be overridden for a find", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 100 - } - } - } - }, - { - "name": "find", - "object": "bucket", - "arguments": { - "filter": {}, - "timeoutMS": 1000 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "fs.files", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applied to find command", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 100 - } - } - } - }, - { - "name": "find", - "object": "bucket", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "fs.files", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-operations-timeout/gridfs-find.yml b/testdata/client-side-operations-timeout/gridfs-find.yml deleted file mode 100644 index 000150ae67..0000000000 --- a/testdata/client-side-operations-timeout/gridfs-find.yml +++ /dev/null @@ -1,100 +0,0 @@ -description: "timeoutMS behaves correctly for GridFS find operations" - -schemaVersion: "1.9" - -runOnRequirements: - - minServerVersion: "4.4" - serverless: forbid # GridFS ops can be slow on serverless. - -createEntities: - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - - client: - id: &client client - uriOptions: - timeoutMS: 75 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName test - - bucket: - id: &bucket bucket - database: *database - - collection: - id: &filesCollection filesCollection - database: *database - collectionName: &filesCollectionName fs.files - - collection: - id: &chunksCollection chunksCollection - database: *database - collectionName: &chunksCollectionName fs.chunks - -initialData: - - collectionName: *filesCollectionName - databaseName: *databaseName - documents: [] - - collectionName: *chunksCollectionName - databaseName: *databaseName - documents: [] - -tests: - - description: "timeoutMS can be overridden for a find" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 100 - - name: find - object: *bucket - arguments: - filter: {} - timeoutMS: 1000 # The client timeoutMS is 75ms and the operation blocks for 100ms, so 1000ms should let it succeed. - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *filesCollectionName - maxTimeMS: { $$type: ["int", "long"] } - - - description: "timeoutMS applied to find command" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 100 - - name: find - object: *bucket - arguments: - filter: {} - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *filesCollectionName - maxTimeMS: { $$type: ["int", "long"] } diff --git a/testdata/client-side-operations-timeout/override-operation-timeoutMS.json b/testdata/client-side-operations-timeout/override-operation-timeoutMS.json deleted file mode 100644 index 6fa0bd802a..0000000000 --- a/testdata/client-side-operations-timeout/override-operation-timeoutMS.json +++ /dev/null @@ -1,3577 +0,0 @@ -{ - "description": "timeoutMS can be overridden for an operation", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 10 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ], - "initialData": [ - { - "collectionName": "coll", - "databaseName": "test", - "documents": [] - } - ], - "tests": [ - { - "description": "timeoutMS can be configured for an operation - listDatabases on client", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listDatabases", - "object": "client", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - listDatabases on client", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listDatabases", - "object": "client", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - listDatabaseNames on client", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listDatabaseNames", - "object": "client", - "arguments": { - "timeoutMS": 1000 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - listDatabaseNames on client", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listDatabaseNames", - "object": "client", - "arguments": { - "timeoutMS": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - createChangeStream on client", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "createChangeStream", - "object": "client", - "arguments": { - "timeoutMS": 1000, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - createChangeStream on client", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "createChangeStream", - "object": "client", - "arguments": { - "timeoutMS": 0, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - aggregate on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "aggregate", - "object": "database", - "arguments": { - "timeoutMS": 1000, - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - aggregate on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "aggregate", - "object": "database", - "arguments": { - "timeoutMS": 0, - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - listCollections on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listCollections", - "object": "database", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - listCollections on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listCollections", - "object": "database", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - listCollectionNames on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listCollectionNames", - "object": "database", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - listCollectionNames on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listCollectionNames", - "object": "database", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - runCommand on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "ping" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "timeoutMS": 1000, - "command": { - "ping": 1 - }, - "commandName": "ping" - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "ping", - "databaseName": "test", - "command": { - "ping": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - runCommand on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "ping" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "timeoutMS": 0, - "command": { - "ping": 1 - }, - "commandName": "ping" - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "ping", - "databaseName": "test", - "command": { - "ping": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - createChangeStream on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "createChangeStream", - "object": "database", - "arguments": { - "timeoutMS": 1000, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - createChangeStream on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "createChangeStream", - "object": "database", - "arguments": { - "timeoutMS": 0, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - aggregate on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - aggregate on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - count on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "count", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - count on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "count", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - countDocuments on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - countDocuments on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - estimatedDocumentCount on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "estimatedDocumentCount", - "object": "collection", - "arguments": { - "timeoutMS": 1000 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - estimatedDocumentCount on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "estimatedDocumentCount", - "object": "collection", - "arguments": { - "timeoutMS": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - distinct on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "fieldName": "x", - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - distinct on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "fieldName": "x", - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - find on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - find on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - findOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "findOne", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - findOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "findOne", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - listIndexes on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listIndexes", - "object": "collection", - "arguments": { - "timeoutMS": 1000 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - listIndexes on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listIndexes", - "object": "collection", - "arguments": { - "timeoutMS": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - listIndexNames on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listIndexNames", - "object": "collection", - "arguments": { - "timeoutMS": 1000 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - listIndexNames on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "listIndexNames", - "object": "collection", - "arguments": { - "timeoutMS": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - createChangeStream on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - createChangeStream on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - insertOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "document": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - insertOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "document": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - insertMany on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "documents": [ - { - "x": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - insertMany on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "documents": [ - { - "x": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - deleteOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - deleteOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - deleteMany on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "deleteMany", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - deleteMany on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "deleteMany", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - replaceOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "replaceOne", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {}, - "replacement": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - replaceOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "replaceOne", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {}, - "replacement": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - updateOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - updateOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - updateMany on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "updateMany", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - updateMany on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "updateMany", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - findOneAndDelete on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - findOneAndDelete on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - findOneAndReplace on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {}, - "replacement": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - findOneAndReplace on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {}, - "replacement": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - findOneAndUpdate on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - findOneAndUpdate on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - bulkWrite on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - bulkWrite on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - createIndex on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "createIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "createIndex", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "keys": { - "x": 1 - }, - "name": "x_1" - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "createIndexes", - "databaseName": "test", - "command": { - "createIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - createIndex on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "createIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "createIndex", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "keys": { - "x": 1 - }, - "name": "x_1" - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "createIndexes", - "databaseName": "test", - "command": { - "createIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - dropIndex on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "dropIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "dropIndex", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "name": "x_1" - }, - "expectError": { - "isTimeoutError": false - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "dropIndexes", - "databaseName": "test", - "command": { - "dropIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - dropIndex on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "dropIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "dropIndex", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "name": "x_1" - }, - "expectError": { - "isTimeoutError": false - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "dropIndexes", - "databaseName": "test", - "command": { - "dropIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be configured for an operation - dropIndexes on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "dropIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "dropIndexes", - "object": "collection", - "arguments": { - "timeoutMS": 1000 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "dropIndexes", - "databaseName": "test", - "command": { - "dropIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS can be set to 0 for an operation - dropIndexes on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "dropIndexes" - ], - "blockConnection": true, - "blockTimeMS": 15 - } - } - } - }, - { - "name": "dropIndexes", - "object": "collection", - "arguments": { - "timeoutMS": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "dropIndexes", - "databaseName": "test", - "command": { - "dropIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-operations-timeout/override-operation-timeoutMS.yml b/testdata/client-side-operations-timeout/override-operation-timeoutMS.yml deleted file mode 100644 index 1091ec7cd5..0000000000 --- a/testdata/client-side-operations-timeout/override-operation-timeoutMS.yml +++ /dev/null @@ -1,1917 +0,0 @@ -# Tests in this file are generated from override-operation-timeoutMS.yml.template. - -description: "timeoutMS can be overridden for an operation" - -schemaVersion: "1.9" - -runOnRequirements: - - minServerVersion: "4.4" - topologies: ["replicaset", "sharded"] - -createEntities: - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - - client: - id: &client client - uriOptions: - timeoutMS: 10 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: &databaseName test - - collection: - id: &collection collection - database: *database - collectionName: &collectionName coll - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: [] - -tests: - # For each level operation, we execute two tests: - # - # 1. timeoutMS can be overridden to a non-zero value for an operation. Each test executes an operation using one of - # the entities defined above with an overridden timeoutMS=1000 and configures a fail point to block the operation for - # 15ms so the operation succeeds. - # - # 2. timeoutMS can be overridden to 0 for an operation. Each test executes an operation using the entities defined - # above with an overridden timeoutMS=0 so the operation succeeds. - - - description: "timeoutMS can be configured for an operation - listDatabases on client" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 15 - - name: listDatabases - object: *client - arguments: - timeoutMS: 1000 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - listDatabases on client" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 15 - - name: listDatabases - object: *client - arguments: - timeoutMS: 0 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - listDatabaseNames on client" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 15 - - name: listDatabaseNames - object: *client - arguments: - timeoutMS: 1000 - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - listDatabaseNames on client" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 15 - - name: listDatabaseNames - object: *client - arguments: - timeoutMS: 0 - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - createChangeStream on client" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: createChangeStream - object: *client - arguments: - timeoutMS: 1000 - pipeline: [] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - createChangeStream on client" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: createChangeStream - object: *client - arguments: - timeoutMS: 0 - pipeline: [] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - aggregate on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: aggregate - object: *database - arguments: - timeoutMS: 1000 - pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - aggregate on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: aggregate - object: *database - arguments: - timeoutMS: 0 - pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - listCollections on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 15 - - name: listCollections - object: *database - arguments: - timeoutMS: 1000 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - listCollections on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 15 - - name: listCollections - object: *database - arguments: - timeoutMS: 0 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - listCollectionNames on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 15 - - name: listCollectionNames - object: *database - arguments: - timeoutMS: 1000 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - listCollectionNames on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 15 - - name: listCollectionNames - object: *database - arguments: - timeoutMS: 0 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - runCommand on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["ping"] - blockConnection: true - blockTimeMS: 15 - - name: runCommand - object: *database - arguments: - timeoutMS: 1000 - command: { ping: 1 } - commandName: ping - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: ping - databaseName: *databaseName - command: - ping: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - runCommand on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["ping"] - blockConnection: true - blockTimeMS: 15 - - name: runCommand - object: *database - arguments: - timeoutMS: 0 - command: { ping: 1 } - commandName: ping - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: ping - databaseName: *databaseName - command: - ping: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - createChangeStream on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: createChangeStream - object: *database - arguments: - timeoutMS: 1000 - pipeline: [] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - createChangeStream on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: createChangeStream - object: *database - arguments: - timeoutMS: 0 - pipeline: [] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - aggregate on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: aggregate - object: *collection - arguments: - timeoutMS: 1000 - pipeline: [] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - aggregate on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: aggregate - object: *collection - arguments: - timeoutMS: 0 - pipeline: [] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - count on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 15 - - name: count - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - count on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 15 - - name: count - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - countDocuments on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: countDocuments - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - countDocuments on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: countDocuments - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - estimatedDocumentCount on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 15 - - name: estimatedDocumentCount - object: *collection - arguments: - timeoutMS: 1000 - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - estimatedDocumentCount on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 15 - - name: estimatedDocumentCount - object: *collection - arguments: - timeoutMS: 0 - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - distinct on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["distinct"] - blockConnection: true - blockTimeMS: 15 - - name: distinct - object: *collection - arguments: - timeoutMS: 1000 - fieldName: x - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - distinct on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["distinct"] - blockConnection: true - blockTimeMS: 15 - - name: distinct - object: *collection - arguments: - timeoutMS: 0 - fieldName: x - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - find on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 15 - - name: find - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - find on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 15 - - name: find - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - findOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 15 - - name: findOne - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - findOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 15 - - name: findOne - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - listIndexes on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: listIndexes - object: *collection - arguments: - timeoutMS: 1000 - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - listIndexes on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: listIndexes - object: *collection - arguments: - timeoutMS: 0 - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - listIndexNames on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: listIndexNames - object: *collection - arguments: - timeoutMS: 1000 - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - listIndexNames on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: listIndexNames - object: *collection - arguments: - timeoutMS: 0 - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - createChangeStream on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: createChangeStream - object: *collection - arguments: - timeoutMS: 1000 - pipeline: [] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - createChangeStream on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 15 - - name: createChangeStream - object: *collection - arguments: - timeoutMS: 0 - pipeline: [] - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - insertOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 15 - - name: insertOne - object: *collection - arguments: - timeoutMS: 1000 - document: { x: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - insertOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 15 - - name: insertOne - object: *collection - arguments: - timeoutMS: 0 - document: { x: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - insertMany on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 15 - - name: insertMany - object: *collection - arguments: - timeoutMS: 1000 - documents: - - { x: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - insertMany on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 15 - - name: insertMany - object: *collection - arguments: - timeoutMS: 0 - documents: - - { x: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - deleteOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 15 - - name: deleteOne - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - deleteOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 15 - - name: deleteOne - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - deleteMany on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 15 - - name: deleteMany - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - deleteMany on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 15 - - name: deleteMany - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - replaceOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 15 - - name: replaceOne - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - replacement: { x: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - replaceOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 15 - - name: replaceOne - object: *collection - arguments: - timeoutMS: 0 - filter: {} - replacement: { x: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - updateOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 15 - - name: updateOne - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - update: { $set: { x: 1 } } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - updateOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 15 - - name: updateOne - object: *collection - arguments: - timeoutMS: 0 - filter: {} - update: { $set: { x: 1 } } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - updateMany on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 15 - - name: updateMany - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - update: { $set: { x: 1 } } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - updateMany on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 15 - - name: updateMany - object: *collection - arguments: - timeoutMS: 0 - filter: {} - update: { $set: { x: 1 } } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - findOneAndDelete on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 15 - - name: findOneAndDelete - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - findOneAndDelete on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 15 - - name: findOneAndDelete - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - findOneAndReplace on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 15 - - name: findOneAndReplace - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - replacement: { x: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - findOneAndReplace on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 15 - - name: findOneAndReplace - object: *collection - arguments: - timeoutMS: 0 - filter: {} - replacement: { x: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - findOneAndUpdate on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 15 - - name: findOneAndUpdate - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - update: { $set: { x: 1 } } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - findOneAndUpdate on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 15 - - name: findOneAndUpdate - object: *collection - arguments: - timeoutMS: 0 - filter: {} - update: { $set: { x: 1 } } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - bulkWrite on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 15 - - name: bulkWrite - object: *collection - arguments: - timeoutMS: 1000 - requests: - - insertOne: - document: { _id: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - bulkWrite on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 15 - - name: bulkWrite - object: *collection - arguments: - timeoutMS: 0 - requests: - - insertOne: - document: { _id: 1 } - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - createIndex on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["createIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: createIndex - object: *collection - arguments: - timeoutMS: 1000 - keys: { x: 1 } - name: "x_1" - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: createIndexes - databaseName: *databaseName - command: - createIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - createIndex on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["createIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: createIndex - object: *collection - arguments: - timeoutMS: 0 - keys: { x: 1 } - name: "x_1" - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: createIndexes - databaseName: *databaseName - command: - createIndexes: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - dropIndex on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["dropIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: dropIndex - object: *collection - arguments: - timeoutMS: 1000 - name: "x_1" - - expectError: - isTimeoutError: false # IndexNotFound - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: dropIndexes - databaseName: *databaseName - command: - dropIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - dropIndex on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["dropIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: dropIndex - object: *collection - arguments: - timeoutMS: 0 - name: "x_1" - - expectError: - isTimeoutError: false # IndexNotFound - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: dropIndexes - databaseName: *databaseName - command: - dropIndexes: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS can be configured for an operation - dropIndexes on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["dropIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: dropIndexes - object: *collection - arguments: - timeoutMS: 1000 - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: dropIndexes - databaseName: *databaseName - command: - dropIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "timeoutMS can be set to 0 for an operation - dropIndexes on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["dropIndexes"] - blockConnection: true - blockTimeMS: 15 - - name: dropIndexes - object: *collection - arguments: - timeoutMS: 0 - - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: dropIndexes - databaseName: *databaseName - command: - dropIndexes: *collectionName - maxTimeMS: { $$exists: false } diff --git a/testdata/client-side-operations-timeout/retryability-legacy-timeouts.json b/testdata/client-side-operations-timeout/retryability-legacy-timeouts.json deleted file mode 100644 index aded781aee..0000000000 --- a/testdata/client-side-operations-timeout/retryability-legacy-timeouts.json +++ /dev/null @@ -1,3042 +0,0 @@ -{ - "description": "legacy timeouts behave correctly for retryable operations", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "client", - "uriOptions": { - "socketTimeoutMS": 100 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ], - "initialData": [ - { - "collectionName": "coll", - "databaseName": "test", - "documents": [] - } - ], - "tests": [ - { - "description": "operation succeeds after one socket timeout - insertOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - insertOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - insertMany on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "x": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - insertMany on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "x": 1 - } - ] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - deleteOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - deleteOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - replaceOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "replaceOne", - "object": "collection", - "arguments": { - "filter": {}, - "replacement": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - replaceOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "replaceOne", - "object": "collection", - "arguments": { - "filter": {}, - "replacement": { - "x": 1 - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - updateOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - updateOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - findOneAndDelete on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - findOneAndDelete on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - findOneAndReplace on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "filter": {}, - "replacement": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - findOneAndReplace on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "filter": {}, - "replacement": { - "x": 1 - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - findOneAndUpdate on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - findOneAndUpdate on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - bulkWrite on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - bulkWrite on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - listDatabases on client", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "listDatabases", - "object": "client", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - listDatabases on client", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "listDatabases", - "object": "client", - "arguments": { - "filter": {} - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - listDatabaseNames on client", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - listDatabaseNames on client", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "listDatabaseNames", - "object": "client", - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - createChangeStream on client", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "createChangeStream", - "object": "client", - "arguments": { - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - createChangeStream on client", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "createChangeStream", - "object": "client", - "arguments": { - "pipeline": [] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - aggregate on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "aggregate", - "object": "database", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - aggregate on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "aggregate", - "object": "database", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - listCollections on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "listCollections", - "object": "database", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - listCollections on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "listCollections", - "object": "database", - "arguments": { - "filter": {} - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - listCollectionNames on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "listCollectionNames", - "object": "database", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - listCollectionNames on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "listCollectionNames", - "object": "database", - "arguments": { - "filter": {} - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - createChangeStream on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "createChangeStream", - "object": "database", - "arguments": { - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - createChangeStream on database", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "createChangeStream", - "object": "database", - "arguments": { - "pipeline": [] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1 - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1 - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - aggregate on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - aggregate on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - count on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - count on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - countDocuments on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - countDocuments on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - estimatedDocumentCount on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "estimatedDocumentCount", - "object": "collection" - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - estimatedDocumentCount on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "estimatedDocumentCount", - "object": "collection", - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - distinct on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - distinct on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "distinct" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": {} - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - find on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - find on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - findOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - findOne on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - listIndexes on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - listIndexes on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "listIndexes", - "object": "collection", - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation succeeds after one socket timeout - createChangeStream on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection", - "arguments": { - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll" - } - } - } - ] - } - ] - }, - { - "description": "operation fails after two consecutive socket timeouts - createChangeStream on collection", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 125 - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection", - "arguments": { - "pipeline": [] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll" - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll" - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-operations-timeout/retryability-legacy-timeouts.yml b/testdata/client-side-operations-timeout/retryability-legacy-timeouts.yml deleted file mode 100644 index 8ada5fb791..0000000000 --- a/testdata/client-side-operations-timeout/retryability-legacy-timeouts.yml +++ /dev/null @@ -1,1676 +0,0 @@ -# Tests in this file are generated from retryability-legacy-timeouts.yml.template. - -description: "legacy timeouts behave correctly for retryable operations" - -schemaVersion: "1.9" - -runOnRequirements: - - minServerVersion: "4.4" - topologies: ["replicaset", "sharded"] - -createEntities: - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - - client: - id: &client client - uriOptions: - socketTimeoutMS: 100 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: &databaseName test - - collection: - id: &collection collection - database: *database - collectionName: &collectionName coll - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: [] - -tests: - # For each retryable operation, run two tests: - # - # 1. Socket timeouts are retried once - Each test constructs a client entity with socketTimeoutMS=100, configures a - # fail point to block the operation once for 125ms, and expects the operation to succeed. - # - # 2. Operations fail after two consecutive socket timeouts - Same as (1) but the fail point is configured to block - # the operation twice and the test expects the operation to fail. - - - description: "operation succeeds after one socket timeout - insertOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 125 - - name: insertOne - object: *collection - arguments: - document: { x: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - - description: "operation fails after two consecutive socket timeouts - insertOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 125 - - name: insertOne - object: *collection - arguments: - document: { x: 1 } - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - - description: "operation succeeds after one socket timeout - insertMany on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 125 - - name: insertMany - object: *collection - arguments: - documents: - - { x: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - - description: "operation fails after two consecutive socket timeouts - insertMany on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 125 - - name: insertMany - object: *collection - arguments: - documents: - - { x: 1 } - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - - description: "operation succeeds after one socket timeout - deleteOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 125 - - name: deleteOne - object: *collection - arguments: - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - - description: "operation fails after two consecutive socket timeouts - deleteOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 125 - - name: deleteOne - object: *collection - arguments: - filter: {} - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - - description: "operation succeeds after one socket timeout - replaceOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 125 - - name: replaceOne - object: *collection - arguments: - filter: {} - replacement: { x: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - - description: "operation fails after two consecutive socket timeouts - replaceOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 125 - - name: replaceOne - object: *collection - arguments: - filter: {} - replacement: { x: 1 } - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - - description: "operation succeeds after one socket timeout - updateOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 125 - - name: updateOne - object: *collection - arguments: - filter: {} - update: { $set: { x: 1 } } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - - description: "operation fails after two consecutive socket timeouts - updateOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 125 - - name: updateOne - object: *collection - arguments: - filter: {} - update: { $set: { x: 1 } } - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - - description: "operation succeeds after one socket timeout - findOneAndDelete on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 125 - - name: findOneAndDelete - object: *collection - arguments: - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - - description: "operation fails after two consecutive socket timeouts - findOneAndDelete on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 125 - - name: findOneAndDelete - object: *collection - arguments: - filter: {} - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - - description: "operation succeeds after one socket timeout - findOneAndReplace on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 125 - - name: findOneAndReplace - object: *collection - arguments: - filter: {} - replacement: { x: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - - description: "operation fails after two consecutive socket timeouts - findOneAndReplace on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 125 - - name: findOneAndReplace - object: *collection - arguments: - filter: {} - replacement: { x: 1 } - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - - description: "operation succeeds after one socket timeout - findOneAndUpdate on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 125 - - name: findOneAndUpdate - object: *collection - arguments: - filter: {} - update: { $set: { x: 1 } } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - - description: "operation fails after two consecutive socket timeouts - findOneAndUpdate on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 125 - - name: findOneAndUpdate - object: *collection - arguments: - filter: {} - update: { $set: { x: 1 } } - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - - description: "operation succeeds after one socket timeout - bulkWrite on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 125 - - name: bulkWrite - object: *collection - arguments: - requests: - - insertOne: - document: { _id: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - - description: "operation fails after two consecutive socket timeouts - bulkWrite on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 125 - - name: bulkWrite - object: *collection - arguments: - requests: - - insertOne: - document: { _id: 1 } - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - - description: "operation succeeds after one socket timeout - listDatabases on client" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 125 - - name: listDatabases - object: *client - arguments: - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - - description: "operation fails after two consecutive socket timeouts - listDatabases on client" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 125 - - name: listDatabases - object: *client - arguments: - filter: {} - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - - description: "operation succeeds after one socket timeout - listDatabaseNames on client" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 125 - - name: listDatabaseNames - object: *client - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - - description: "operation fails after two consecutive socket timeouts - listDatabaseNames on client" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 125 - - name: listDatabaseNames - object: *client - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - - description: "operation succeeds after one socket timeout - createChangeStream on client" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 125 - - name: createChangeStream - object: *client - arguments: - pipeline: [] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - - description: "operation fails after two consecutive socket timeouts - createChangeStream on client" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 125 - - name: createChangeStream - object: *client - arguments: - pipeline: [] - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - - description: "operation succeeds after one socket timeout - aggregate on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 125 - - name: aggregate - object: *database - arguments: - pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - - description: "operation fails after two consecutive socket timeouts - aggregate on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 125 - - name: aggregate - object: *database - arguments: - pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ] - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - - description: "operation succeeds after one socket timeout - listCollections on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 125 - - name: listCollections - object: *database - arguments: - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - - description: "operation fails after two consecutive socket timeouts - listCollections on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 125 - - name: listCollections - object: *database - arguments: - filter: {} - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - - description: "operation succeeds after one socket timeout - listCollectionNames on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 125 - - name: listCollectionNames - object: *database - arguments: - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - - description: "operation fails after two consecutive socket timeouts - listCollectionNames on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 125 - - name: listCollectionNames - object: *database - arguments: - filter: {} - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - - description: "operation succeeds after one socket timeout - createChangeStream on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 125 - - name: createChangeStream - object: *database - arguments: - pipeline: [] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - - description: "operation fails after two consecutive socket timeouts - createChangeStream on database" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 125 - - name: createChangeStream - object: *database - arguments: - pipeline: [] - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - - description: "operation succeeds after one socket timeout - aggregate on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 125 - - name: aggregate - object: *collection - arguments: - pipeline: [] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - - description: "operation fails after two consecutive socket timeouts - aggregate on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 125 - - name: aggregate - object: *collection - arguments: - pipeline: [] - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - - description: "operation succeeds after one socket timeout - count on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 125 - - name: count - object: *collection - arguments: - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - - description: "operation fails after two consecutive socket timeouts - count on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 125 - - name: count - object: *collection - arguments: - filter: {} - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - - description: "operation succeeds after one socket timeout - countDocuments on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 125 - - name: countDocuments - object: *collection - arguments: - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - - description: "operation fails after two consecutive socket timeouts - countDocuments on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 125 - - name: countDocuments - object: *collection - arguments: - filter: {} - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - - description: "operation succeeds after one socket timeout - estimatedDocumentCount on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 125 - - name: estimatedDocumentCount - object: *collection - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - - description: "operation fails after two consecutive socket timeouts - estimatedDocumentCount on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 125 - - name: estimatedDocumentCount - object: *collection - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - - description: "operation succeeds after one socket timeout - distinct on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["distinct"] - blockConnection: true - blockTimeMS: 125 - - name: distinct - object: *collection - arguments: - fieldName: x - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - - description: "operation fails after two consecutive socket timeouts - distinct on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["distinct"] - blockConnection: true - blockTimeMS: 125 - - name: distinct - object: *collection - arguments: - fieldName: x - filter: {} - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - - description: "operation succeeds after one socket timeout - find on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 125 - - name: find - object: *collection - arguments: - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - - description: "operation fails after two consecutive socket timeouts - find on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 125 - - name: find - object: *collection - arguments: - filter: {} - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - - description: "operation succeeds after one socket timeout - findOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 125 - - name: findOne - object: *collection - arguments: - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - - description: "operation fails after two consecutive socket timeouts - findOne on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 125 - - name: findOne - object: *collection - arguments: - filter: {} - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - - description: "operation succeeds after one socket timeout - listIndexes on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["listIndexes"] - blockConnection: true - blockTimeMS: 125 - - name: listIndexes - object: *collection - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - - description: "operation fails after two consecutive socket timeouts - listIndexes on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listIndexes"] - blockConnection: true - blockTimeMS: 125 - - name: listIndexes - object: *collection - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - - description: "operation succeeds after one socket timeout - createChangeStream on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 125 - - name: createChangeStream - object: *collection - arguments: - pipeline: [] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - - description: "operation fails after two consecutive socket timeouts - createChangeStream on collection" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 125 - - name: createChangeStream - object: *collection - arguments: - pipeline: [] - - expectError: - # Network errors are considered client errors by the unified test format spec. - isClientError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - diff --git a/testdata/client-side-operations-timeout/retryability-timeoutMS.json b/testdata/client-side-operations-timeout/retryability-timeoutMS.json deleted file mode 100644 index 9daad260ef..0000000000 --- a/testdata/client-side-operations-timeout/retryability-timeoutMS.json +++ /dev/null @@ -1,5688 +0,0 @@ -{ - "description": "timeoutMS behaves correctly for retryable operations", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.2", - "topologies": [ - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "client", - "uriOptions": { - "timeoutMS": 100 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ], - "initialData": [ - { - "collectionName": "coll", - "databaseName": "test", - "documents": [] - } - ], - "tests": [ - { - "description": "timeoutMS applies to whole operation, not individual attempts - insertOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - insertOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "document": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - insertOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "document": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - insertMany on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "x": 1 - } - ] - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - insertMany on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "documents": [ - { - "x": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - insertMany on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "documents": [ - { - "x": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - deleteOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "delete" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - deleteOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "delete" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - deleteOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "delete" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "delete", - "databaseName": "test", - "command": { - "delete": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - replaceOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "replaceOne", - "object": "collection", - "arguments": { - "filter": {}, - "replacement": { - "x": 1 - } - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - replaceOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "replaceOne", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {}, - "replacement": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - replaceOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "replaceOne", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {}, - "replacement": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - updateOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "update" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - updateOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - updateOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "update", - "databaseName": "test", - "command": { - "update": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - findOneAndDelete on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - findOneAndDelete on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - findOneAndDelete on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - findOneAndReplace on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "filter": {}, - "replacement": { - "x": 1 - } - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - findOneAndReplace on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {}, - "replacement": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - findOneAndReplace on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {}, - "replacement": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - findOneAndUpdate on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - findOneAndUpdate on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - findOneAndUpdate on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {}, - "update": { - "$set": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "findAndModify", - "databaseName": "test", - "command": { - "findAndModify": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - bulkWrite on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - bulkWrite on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - bulkWrite on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "insert", - "databaseName": "test", - "command": { - "insert": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - listDatabases on client", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listDatabases", - "object": "client", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - listDatabases on client", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listDatabases", - "object": "client", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - listDatabases on client", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listDatabases", - "object": "client", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - listDatabaseNames on client", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listDatabaseNames", - "object": "client", - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - listDatabaseNames on client", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listDatabaseNames", - "object": "client", - "arguments": { - "timeoutMS": 1000 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - listDatabaseNames on client", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listDatabaseNames", - "object": "client", - "arguments": { - "timeoutMS": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listDatabases", - "databaseName": "admin", - "command": { - "listDatabases": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - createChangeStream on client", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "createChangeStream", - "object": "client", - "arguments": { - "pipeline": [] - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - createChangeStream on client", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "createChangeStream", - "object": "client", - "arguments": { - "timeoutMS": 1000, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - createChangeStream on client", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "createChangeStream", - "object": "client", - "arguments": { - "timeoutMS": 0, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "admin", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - aggregate on database", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "aggregate", - "object": "database", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ] - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - aggregate on database", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "aggregate", - "object": "database", - "arguments": { - "timeoutMS": 1000, - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - aggregate on database", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "aggregate", - "object": "database", - "arguments": { - "timeoutMS": 0, - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - listCollections on database", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listCollections", - "object": "database", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - listCollections on database", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listCollections", - "object": "database", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - listCollections on database", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listCollections", - "object": "database", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - listCollectionNames on database", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listCollectionNames", - "object": "database", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - listCollectionNames on database", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listCollectionNames", - "object": "database", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - listCollectionNames on database", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listCollectionNames", - "object": "database", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listCollections", - "databaseName": "test", - "command": { - "listCollections": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - createChangeStream on database", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "createChangeStream", - "object": "database", - "arguments": { - "pipeline": [] - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - createChangeStream on database", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "createChangeStream", - "object": "database", - "arguments": { - "timeoutMS": 1000, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - createChangeStream on database", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "createChangeStream", - "object": "database", - "arguments": { - "timeoutMS": 0, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": 1, - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - aggregate on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [] - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - aggregate on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - aggregate on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - count on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - count on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "count", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - count on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "count", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - countDocuments on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - countDocuments on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - countDocuments on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - estimatedDocumentCount on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "count" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "estimatedDocumentCount", - "object": "collection", - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - estimatedDocumentCount on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "estimatedDocumentCount", - "object": "collection", - "arguments": { - "timeoutMS": 1000 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - estimatedDocumentCount on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "estimatedDocumentCount", - "object": "collection", - "arguments": { - "timeoutMS": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "count", - "databaseName": "test", - "command": { - "count": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - distinct on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "distinct" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - distinct on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "fieldName": "x", - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - distinct on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "fieldName": "x", - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "distinct", - "databaseName": "test", - "command": { - "distinct": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - find on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - find on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - find on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - findOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": {} - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - findOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "findOne", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - findOne on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "findOne", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "test", - "command": { - "find": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - listIndexes on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listIndexes", - "object": "collection", - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - listIndexes on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listIndexes", - "object": "collection", - "arguments": { - "timeoutMS": 1000 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - listIndexes on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "listIndexes", - "object": "collection", - "arguments": { - "timeoutMS": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "listIndexes", - "databaseName": "test", - "command": { - "listIndexes": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "timeoutMS applies to whole operation, not individual attempts - createChangeStream on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "blockConnection": true, - "blockTimeMS": 60, - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection", - "arguments": { - "pipeline": [] - }, - "expectError": { - "isTimeoutError": true - } - } - ] - }, - { - "description": "operation is retried multiple times for non-zero timeoutMS - createChangeStream on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection", - "arguments": { - "timeoutMS": 1000, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ] - }, - { - "description": "operation is retried multiple times if timeoutMS is zero - createChangeStream on collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7, - "closeConnection": false, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection", - "arguments": { - "timeoutMS": 0, - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "aggregate", - "databaseName": "test", - "command": { - "aggregate": "coll", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-operations-timeout/retryability-timeoutMS.yml b/testdata/client-side-operations-timeout/retryability-timeoutMS.yml deleted file mode 100644 index b15d22a4ba..0000000000 --- a/testdata/client-side-operations-timeout/retryability-timeoutMS.yml +++ /dev/null @@ -1,2823 +0,0 @@ -# Tests in this file are generated from retryability-timeoutMS.yml.template. - -description: "timeoutMS behaves correctly for retryable operations" - -schemaVersion: "1.9" - -# failCommand is available on 4.0+ replica sets and 4.2+ sharded clusters. -runOnRequirements: - - minServerVersion: "4.0" - topologies: ["replicaset"] - - minServerVersion: "4.2" - topologies: ["sharded"] - -createEntities: - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - - client: - id: &client client - uriOptions: - timeoutMS: 100 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - ignoreCommandMonitoringEvents: - - killCursors - - database: - id: &database database - client: *client - databaseName: &databaseName test - - collection: - id: &collection collection - database: *database - collectionName: &collectionName coll - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: [] - -tests: - # For each retryable operation, run three tests: - # - # 1. timeoutMS applies to the whole operation, not to individual attempts - Client timeoutMS=100 and the operation is - # fails with a retryable error after being blocked server-side for 60ms. The operation should fail with a timeout error - # because the second attempt should take it over the 100ms limit. This test only runs on 4.4+ because it uses the - # blockConnection option in failCommand. - # - # 2. operation is retried multiple times if timeoutMS is set to a non-zero value - Client timeoutMS=100 and the - # operation fails with a retryable error twice. Drivers should send the original operation and two retries, the - # second of which should succeed. - # - # 3. operation is retried multiple times if timeoutMS is set to a zero - Override timeoutMS to zero for the operation - # and set a fail point to force a retryable error twice. Drivers should send the original operation and two retries, - # the second of which should succeed. - # - # The fail points in these tests use error code 7 (HostNotFound) because it is a retryable error but does not trigger - # an SDAM state change so we don't lose any time to server rediscovery. The tests also explicitly specify an - # errorLabels array in the fail point to avoid behavioral differences among server types and ensure that the error - # will be considered retryable. - - - description: "timeoutMS applies to whole operation, not individual attempts - insertOne on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: insertOne - object: *collection - arguments: - document: { x: 1 } - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - insertOne on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: insertOne - object: *collection - arguments: - timeoutMS: 1000 - document: { x: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - insertOne on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: insertOne - object: *collection - arguments: - timeoutMS: 0 - document: { x: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - insertMany on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: insertMany - object: *collection - arguments: - documents: - - { x: 1 } - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - insertMany on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: insertMany - object: *collection - arguments: - timeoutMS: 1000 - documents: - - { x: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - insertMany on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: insertMany - object: *collection - arguments: - timeoutMS: 0 - documents: - - { x: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - deleteOne on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["delete"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: deleteOne - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - deleteOne on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["delete"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: deleteOne - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - deleteOne on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["delete"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: deleteOne - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: delete - databaseName: *databaseName - command: - delete: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - replaceOne on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: replaceOne - object: *collection - arguments: - filter: {} - replacement: { x: 1 } - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - replaceOne on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["update"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: replaceOne - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - replacement: { x: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - replaceOne on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["update"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: replaceOne - object: *collection - arguments: - timeoutMS: 0 - filter: {} - replacement: { x: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - updateOne on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["update"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: updateOne - object: *collection - arguments: - filter: {} - update: { $set: { x: 1 } } - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - updateOne on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["update"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: updateOne - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - update: { $set: { x: 1 } } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - updateOne on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["update"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: updateOne - object: *collection - arguments: - timeoutMS: 0 - filter: {} - update: { $set: { x: 1 } } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: update - databaseName: *databaseName - command: - update: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - findOneAndDelete on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: findOneAndDelete - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - findOneAndDelete on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: findOneAndDelete - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - findOneAndDelete on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: findOneAndDelete - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - findOneAndReplace on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: findOneAndReplace - object: *collection - arguments: - filter: {} - replacement: { x: 1 } - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - findOneAndReplace on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: findOneAndReplace - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - replacement: { x: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - findOneAndReplace on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: findOneAndReplace - object: *collection - arguments: - timeoutMS: 0 - filter: {} - replacement: { x: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - findOneAndUpdate on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["findAndModify"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: findOneAndUpdate - object: *collection - arguments: - filter: {} - update: { $set: { x: 1 } } - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - findOneAndUpdate on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: findOneAndUpdate - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - update: { $set: { x: 1 } } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - findOneAndUpdate on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: findOneAndUpdate - object: *collection - arguments: - timeoutMS: 0 - filter: {} - update: { $set: { x: 1 } } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: findAndModify - databaseName: *databaseName - command: - findAndModify: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - bulkWrite on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["insert"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: bulkWrite - object: *collection - arguments: - requests: - - insertOne: - document: { _id: 1 } - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - bulkWrite on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: bulkWrite - object: *collection - arguments: - timeoutMS: 1000 - requests: - - insertOne: - document: { _id: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - bulkWrite on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: bulkWrite - object: *collection - arguments: - timeoutMS: 0 - requests: - - insertOne: - document: { _id: 1 } - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: insert - databaseName: *databaseName - command: - insert: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - listDatabases on client" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: listDatabases - object: *client - arguments: - filter: {} - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - listDatabases on client" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listDatabases"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: listDatabases - object: *client - arguments: - timeoutMS: 1000 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - listDatabases on client" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listDatabases"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: listDatabases - object: *client - arguments: - timeoutMS: 0 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - listDatabaseNames on client" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["listDatabases"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: listDatabaseNames - object: *client - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - listDatabaseNames on client" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listDatabases"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: listDatabaseNames - object: *client - arguments: - timeoutMS: 1000 - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - listDatabaseNames on client" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listDatabases"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: listDatabaseNames - object: *client - arguments: - timeoutMS: 0 - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: listDatabases - databaseName: admin - command: - listDatabases: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - createChangeStream on client" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: createChangeStream - object: *client - arguments: - pipeline: [] - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - createChangeStream on client" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: createChangeStream - object: *client - arguments: - timeoutMS: 1000 - pipeline: [] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - createChangeStream on client" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: createChangeStream - object: *client - arguments: - timeoutMS: 0 - pipeline: [] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: aggregate - databaseName: admin - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - aggregate on database" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: aggregate - object: *database - arguments: - pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ] - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - aggregate on database" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: aggregate - object: *database - arguments: - timeoutMS: 1000 - pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - aggregate on database" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: aggregate - object: *database - arguments: - timeoutMS: 0 - pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - listCollections on database" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: listCollections - object: *database - arguments: - filter: {} - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - listCollections on database" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listCollections"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: listCollections - object: *database - arguments: - timeoutMS: 1000 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - listCollections on database" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listCollections"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: listCollections - object: *database - arguments: - timeoutMS: 0 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - listCollectionNames on database" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["listCollections"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: listCollectionNames - object: *database - arguments: - filter: {} - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - listCollectionNames on database" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listCollections"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: listCollectionNames - object: *database - arguments: - timeoutMS: 1000 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - listCollectionNames on database" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listCollections"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: listCollectionNames - object: *database - arguments: - timeoutMS: 0 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: listCollections - databaseName: *databaseName - command: - listCollections: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - createChangeStream on database" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: createChangeStream - object: *database - arguments: - pipeline: [] - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - createChangeStream on database" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: createChangeStream - object: *database - arguments: - timeoutMS: 1000 - pipeline: [] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - createChangeStream on database" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: createChangeStream - object: *database - arguments: - timeoutMS: 0 - pipeline: [] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: 1 - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - aggregate on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: aggregate - object: *collection - arguments: - pipeline: [] - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - aggregate on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: aggregate - object: *collection - arguments: - timeoutMS: 1000 - pipeline: [] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - aggregate on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: aggregate - object: *collection - arguments: - timeoutMS: 0 - pipeline: [] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - count on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: count - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - count on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["count"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: count - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - count on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["count"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: count - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - countDocuments on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: countDocuments - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - countDocuments on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: countDocuments - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - countDocuments on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: countDocuments - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - estimatedDocumentCount on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["count"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: estimatedDocumentCount - object: *collection - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - estimatedDocumentCount on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["count"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: estimatedDocumentCount - object: *collection - arguments: - timeoutMS: 1000 - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - estimatedDocumentCount on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["count"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: estimatedDocumentCount - object: *collection - arguments: - timeoutMS: 0 - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: count - databaseName: *databaseName - command: - count: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - distinct on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["distinct"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: distinct - object: *collection - arguments: - fieldName: x - filter: {} - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - distinct on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["distinct"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: distinct - object: *collection - arguments: - timeoutMS: 1000 - fieldName: x - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - distinct on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["distinct"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: distinct - object: *collection - arguments: - timeoutMS: 0 - fieldName: x - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: distinct - databaseName: *databaseName - command: - distinct: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - find on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: find - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - find on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["find"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: find - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - find on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["find"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: find - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - findOne on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["find"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: findOne - object: *collection - arguments: - filter: {} - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - findOne on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["find"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: findOne - object: *collection - arguments: - timeoutMS: 1000 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - findOne on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["find"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: findOne - object: *collection - arguments: - timeoutMS: 0 - filter: {} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: find - databaseName: *databaseName - command: - find: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - listIndexes on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["listIndexes"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: listIndexes - object: *collection - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - listIndexes on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listIndexes"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: listIndexes - object: *collection - arguments: - timeoutMS: 1000 - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - listIndexes on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["listIndexes"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: listIndexes - object: *collection - arguments: - timeoutMS: 0 - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: listIndexes - databaseName: *databaseName - command: - listIndexes: *collectionName - maxTimeMS: { $$exists: false } - - description: "timeoutMS applies to whole operation, not individual attempts - createChangeStream on collection" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["aggregate"] - blockConnection: true - blockTimeMS: 60 - errorCode: 7 - errorLabels: ["RetryableWriteError"] - - name: createChangeStream - object: *collection - arguments: - pipeline: [] - - expectError: - isTimeoutError: true - - description: "operation is retried multiple times for non-zero timeoutMS - createChangeStream on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: createChangeStream - object: *collection - arguments: - timeoutMS: 1000 - pipeline: [] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$type: ["int", "long"] } - - description: "operation is retried multiple times if timeoutMS is zero - createChangeStream on collection" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["aggregate"] - errorCode: 7 - closeConnection: false - errorLabels: ["RetryableWriteError"] - - name: createChangeStream - object: *collection - arguments: - timeoutMS: 0 - pipeline: [] - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: aggregate - databaseName: *databaseName - command: - aggregate: *collectionName - maxTimeMS: { $$exists: false } diff --git a/testdata/client-side-operations-timeout/runCursorCommand.json b/testdata/client-side-operations-timeout/runCursorCommand.json deleted file mode 100644 index 5fc0be3399..0000000000 --- a/testdata/client-side-operations-timeout/runCursorCommand.json +++ /dev/null @@ -1,583 +0,0 @@ -{ - "description": "runCursorCommand", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "createEntities": [ - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "commandClient", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent" - ] - } - }, - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "killCursors" - ] - } - }, - { - "database": { - "id": "commandDb", - "client": "commandClient", - "databaseName": "commandDb" - } - }, - { - "database": { - "id": "db", - "client": "client", - "databaseName": "db" - } - }, - { - "collection": { - "id": "collection", - "database": "db", - "collectionName": "collection" - } - } - ], - "initialData": [ - { - "collectionName": "collection", - "databaseName": "db", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "tests": [ - { - "description": "errors if timeoutMode is set without timeoutMS", - "operations": [ - { - "name": "runCursorCommand", - "object": "db", - "arguments": { - "commandName": "find", - "command": { - "find": "collection" - }, - "timeoutMode": "cursorLifetime" - }, - "expectError": { - "isClientError": true - } - } - ] - }, - { - "description": "error if timeoutMode is cursorLifetime and cursorType is tailableAwait", - "operations": [ - { - "name": "runCursorCommand", - "object": "db", - "arguments": { - "commandName": "find", - "command": { - "find": "collection" - }, - "timeoutMode": "cursorLifetime", - "cursorType": "tailableAwait" - }, - "expectError": { - "isClientError": true - } - } - ] - }, - { - "description": "Non-tailable cursor lifetime remaining timeoutMS applied to getMore if timeoutMode is unset", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find", - "getMore" - ], - "blockConnection": true, - "blockTimeMS": 60 - } - } - } - }, - { - "name": "runCursorCommand", - "object": "db", - "arguments": { - "commandName": "find", - "timeoutMS": 100, - "command": { - "find": "collection", - "batchSize": 2 - } - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "command": { - "find": "collection", - "maxTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "getMore", - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection", - "maxTimeMS": { - "$$exists": true - } - } - } - } - ] - } - ] - }, - { - "description": "Non=tailable cursor iteration timeoutMS is refreshed for getMore if timeoutMode is iteration - failure", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "blockConnection": true, - "blockTimeMS": 60 - } - } - } - }, - { - "name": "runCursorCommand", - "object": "db", - "arguments": { - "commandName": "find", - "command": { - "find": "collection", - "batchSize": 2 - }, - "timeoutMode": "iteration", - "timeoutMS": 100, - "batchSize": 2 - }, - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "db", - "command": { - "find": "collection", - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "getMore", - "databaseName": "db", - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "Tailable cursor iteration timeoutMS is refreshed for getMore - failure", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "blockConnection": true, - "blockTimeMS": 60 - } - } - } - }, - { - "name": "dropCollection", - "object": "db", - "arguments": { - "collection": "cappedCollection" - } - }, - { - "name": "createCollection", - "object": "db", - "arguments": { - "collection": "cappedCollection", - "capped": true, - "size": 4096, - "max": 3 - }, - "saveResultAsEntity": "cappedCollection" - }, - { - "name": "insertMany", - "object": "cappedCollection", - "arguments": { - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - }, - { - "name": "createCommandCursor", - "object": "db", - "arguments": { - "commandName": "find", - "command": { - "find": "cappedCollection", - "batchSize": 1, - "tailable": true - }, - "timeoutMode": "iteration", - "timeoutMS": 100, - "batchSize": 1, - "cursorType": "tailable" - }, - "saveResultAsEntity": "tailableCursor" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "tailableCursor" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "tailableCursor", - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "drop" - } - }, - { - "commandStartedEvent": { - "commandName": "create" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "db", - "command": { - "find": "cappedCollection", - "tailable": true, - "awaitData": { - "$$exists": false - }, - "maxTimeMS": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "getMore", - "databaseName": "db", - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "cappedCollection", - "maxTimeMS": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "Tailable cursor awaitData iteration timeoutMS is refreshed for getMore - failure", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "blockConnection": true, - "blockTimeMS": 60 - } - } - } - }, - { - "name": "dropCollection", - "object": "db", - "arguments": { - "collection": "cappedCollection" - } - }, - { - "name": "createCollection", - "object": "db", - "arguments": { - "collection": "cappedCollection", - "capped": true, - "size": 4096, - "max": 3 - }, - "saveResultAsEntity": "cappedCollection" - }, - { - "name": "insertMany", - "object": "cappedCollection", - "arguments": { - "documents": [ - { - "foo": "bar" - }, - { - "fizz": "buzz" - } - ] - } - }, - { - "name": "createCommandCursor", - "object": "db", - "arguments": { - "command": { - "find": "cappedCollection", - "tailable": true, - "awaitData": true - }, - "cursorType": "tailableAwait", - "batchSize": 1 - }, - "saveResultAsEntity": "tailableCursor" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "tailableCursor" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "tailableCursor", - "expectError": { - "isTimeoutError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "drop" - } - }, - { - "commandStartedEvent": { - "commandName": "create" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "databaseName": "db", - "command": { - "find": "cappedCollection", - "tailable": true, - "awaitData": true, - "maxTimeMS": { - "$$exists": true - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "getMore", - "databaseName": "db", - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "cappedCollection" - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/client-side-operations-timeout/runCursorCommand.yml b/testdata/client-side-operations-timeout/runCursorCommand.yml deleted file mode 100644 index 16a648e028..0000000000 --- a/testdata/client-side-operations-timeout/runCursorCommand.yml +++ /dev/null @@ -1,304 +0,0 @@ -description: runCursorCommand - -schemaVersion: '1.9' - -runOnRequirements: - - minServerVersion: "4.4" - -createEntities: - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - - client: - id: &commandClient commandClient - useMultipleMongoses: false - observeEvents: [commandStartedEvent, commandSucceededEvent] - - client: - id: &client client - useMultipleMongoses: false - observeEvents: [commandStartedEvent] - ignoreCommandMonitoringEvents: [killCursors] - - database: # For tests that need success event assertions - id: &commandDb commandDb - client: *commandClient - databaseName: *commandDb - - database: - id: &db db - client: *client - databaseName: *db - - collection: - id: &collection collection - database: *db - collectionName: *collection - -initialData: - - collectionName: *collection - databaseName: *db - documents: &documents - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - -tests: - - description: errors if timeoutMode is set without timeoutMS - operations: - - name: runCursorCommand - object: *db - arguments: - commandName: find - command: { find: *collection } - timeoutMode: cursorLifetime - expectError: - isClientError: true - - - description: error if timeoutMode is cursorLifetime and cursorType is tailableAwait - operations: - - name: runCursorCommand - object: *db - arguments: - commandName: find - command: { find: *collection } - timeoutMode: cursorLifetime - cursorType: tailableAwait - expectError: - isClientError: true - - # If timeoutMode is unset, it should default to CURSOR_LIFETIME and the time remaining after the find succeeds should be applied to the getMore - - description: Non-tailable cursor lifetime remaining timeoutMS applied to getMore if timeoutMode is unset - runOnRequirements: - - serverless: forbid - operations: - # Block find/getMore for 15ms. - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: [find, getMore] - blockConnection: true - blockTimeMS: 60 - # Run a find with timeoutMS less than double our failPoint blockTimeMS and - # batchSize less than the total document count will cause a find and a getMore to be sent. - # Both will block for 60ms so together they will go over the timeout. - - name: runCursorCommand - object: *db - arguments: - commandName: find - timeoutMS: 100 - command: { find: *collection, batchSize: 2 } - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - command: - find: *collection - maxTimeMS: { $$type: [int, long] } - - commandStartedEvent: - commandName: getMore - command: - getMore: { $$type: [int, long] } - collection: *collection - maxTimeMS: { $$exists: true } - - # If timeoutMode=ITERATION, timeoutMS applies separately to the initial find and the getMore on the cursor. Neither - # command should have a maxTimeMS field. This is a failure test. The "find" inherits timeoutMS=100 and "getMore" - # commands are blocked for 60ms, causing iteration to fail with a timeout error. - - description: Non=tailable cursor iteration timeoutMS is refreshed for getMore if timeoutMode is iteration - failure - runOnRequirements: - - serverless: forbid - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["getMore"] - blockConnection: true - blockTimeMS: 60 - - name: runCursorCommand - object: *db - arguments: - commandName: find - command: { find: *collection, batchSize: 2 } - timeoutMode: iteration - timeoutMS: 100 - batchSize: 2 - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: find - databaseName: *db - command: - find: *collection - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: getMore - databaseName: *db - command: - getMore: { $$type: ["int", "long"] } - collection: *collection - maxTimeMS: { $$exists: false } - - # The timeoutMS option should apply separately to the initial "find" and each getMore. This is a failure test. The - # find inherits timeoutMS=100 from the collection and the getMore command blocks for 60ms, causing iteration to fail - # with a timeout error. - - description: Tailable cursor iteration timeoutMS is refreshed for getMore - failure - runOnRequirements: - - serverless: forbid - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["getMore"] - blockConnection: true - blockTimeMS: 60 - - name: dropCollection - object: *db - arguments: - collection: &cappedCollection cappedCollection - - name: createCollection - object: *db - arguments: - collection: *cappedCollection - capped: true - size: 4096 - max: 3 - saveResultAsEntity: *cappedCollection - - name: insertMany - object: *cappedCollection - arguments: - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - name: createCommandCursor - object: *db - arguments: - commandName: find - command: { find: *cappedCollection, batchSize: 1, tailable: true } - timeoutMode: iteration - timeoutMS: 100 - batchSize: 1 - cursorType: tailable - saveResultAsEntity: &tailableCursor tailableCursor - # Iterate the cursor twice: the first iteration will return the document from the batch in the find and the - # second will do a getMore. - - name: iterateUntilDocumentOrError - object: *tailableCursor - - name: iterateUntilDocumentOrError - object: *tailableCursor - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: drop - - commandStartedEvent: - commandName: create - - commandStartedEvent: - commandName: insert - - commandStartedEvent: - commandName: find - databaseName: *db - command: - find: *cappedCollection - tailable: true - awaitData: { $$exists: false } - maxTimeMS: { $$exists: false } - - commandStartedEvent: - commandName: getMore - databaseName: *db - command: - getMore: { $$type: ["int", "long"] } - collection: *cappedCollection - maxTimeMS: { $$exists: false } - - # The timeoutMS value should be refreshed for getMore's. This is a failure test. The find inherits timeoutMS=10 from - # the collection and the getMore blocks for 15ms, causing iteration to fail with a timeout error. - - description: Tailable cursor awaitData iteration timeoutMS is refreshed for getMore - failure - runOnRequirements: - - serverless: forbid - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["getMore"] - blockConnection: true - blockTimeMS: 60 - - name: dropCollection - object: *db - arguments: - collection: &cappedCollection cappedCollection - - name: createCollection - object: *db - arguments: - collection: *cappedCollection - capped: true - size: 4096 - max: 3 - saveResultAsEntity: *cappedCollection - - name: insertMany - object: *cappedCollection - arguments: - documents: [ { foo: bar }, { fizz: buzz } ] - - name: createCommandCursor - object: *db - arguments: - command: { find: *cappedCollection, tailable: true, awaitData: true } - cursorType: tailableAwait - batchSize: 1 - saveResultAsEntity: &tailableCursor tailableCursor - # Iterate twice to force a getMore. - - name: iterateUntilDocumentOrError - object: *tailableCursor - - name: iterateUntilDocumentOrError - object: *tailableCursor - expectError: - isTimeoutError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: drop - - commandStartedEvent: - commandName: create - - commandStartedEvent: - commandName: insert - - commandStartedEvent: - commandName: find - databaseName: *db - command: - find: *cappedCollection - tailable: true - awaitData: true - maxTimeMS: { $$exists: true } - - commandStartedEvent: - commandName: getMore - databaseName: *db - command: - getMore: { $$type: ["int", "long"] } - collection: *cappedCollection diff --git a/testdata/collection-management/clustered-indexes.json b/testdata/collection-management/clustered-indexes.json deleted file mode 100644 index cfe9714162..0000000000 --- a/testdata/collection-management/clustered-indexes.json +++ /dev/null @@ -1,291 +0,0 @@ -{ - "description": "clustered-indexes", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "5.3", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "ci-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "ci-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "createCollection with clusteredIndex", - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "test" - } - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "collection": "test", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true, - "name": "test index" - } - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "databaseName": "ci-tests", - "collectionName": "test" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "drop": "test" - }, - "databaseName": "ci-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "create": "test", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true, - "name": "test index" - } - }, - "databaseName": "ci-tests" - } - } - ] - } - ] - }, - { - "description": "listCollections includes clusteredIndex", - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "test" - } - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "collection": "test", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true, - "name": "test index" - } - } - }, - { - "name": "listCollections", - "object": "database0", - "arguments": { - "filter": { - "name": { - "$eq": "test" - } - } - }, - "expectResult": [ - { - "name": "test", - "options": { - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true, - "name": "test index", - "v": { - "$$type": [ - "int", - "long" - ] - } - } - } - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "drop": "test" - }, - "databaseName": "ci-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "create": "test", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true, - "name": "test index" - } - }, - "databaseName": "ci-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "listCollections": 1, - "filter": { - "name": { - "$eq": "test" - } - } - }, - "databaseName": "ci-tests" - } - } - ] - } - ] - }, - { - "description": "listIndexes returns the index", - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "test" - } - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "collection": "test", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true, - "name": "test index" - } - } - }, - { - "name": "listIndexes", - "object": "collection0", - "expectResult": [ - { - "key": { - "_id": 1 - }, - "name": "test index", - "clustered": true, - "unique": true, - "v": { - "$$type": [ - "int", - "long" - ] - } - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "drop": "test" - }, - "databaseName": "ci-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "create": "test", - "clusteredIndex": { - "key": { - "_id": 1 - }, - "unique": true, - "name": "test index" - } - }, - "databaseName": "ci-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "listIndexes": "test" - }, - "databaseName": "ci-tests" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/testdata/collection-management/clustered-indexes.yml b/testdata/collection-management/clustered-indexes.yml deleted file mode 100644 index 965bb22e26..0000000000 --- a/testdata/collection-management/clustered-indexes.yml +++ /dev/null @@ -1,135 +0,0 @@ -description: "clustered-indexes" - -schemaVersion: "1.4" - -runOnRequirements: - - minServerVersion: "5.3" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name ci-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: "createCollection with clusteredIndex" - operations: - - name: dropCollection - object: *database0 - arguments: - collection: *collection0Name - - name: createCollection - object: *database0 - arguments: - collection: *collection0Name - clusteredIndex: &clusteredIndex - key: { _id: 1 } - unique: true - name: &index0Name "test index" - - name: assertCollectionExists - object: testRunner - arguments: - databaseName: *database0Name - collectionName: *collection0Name - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - drop: *collection0Name - databaseName: *database0Name - - commandStartedEvent: - command: - create: *collection0Name - clusteredIndex: *clusteredIndex - databaseName: *database0Name - - - description: "listCollections includes clusteredIndex" - operations: - - name: dropCollection - object: *database0 - arguments: - collection: *collection0Name - - name: createCollection - object: *database0 - arguments: - collection: *collection0Name - clusteredIndex: *clusteredIndex - - name: listCollections - object: *database0 - arguments: - filter: &filter { name: { $eq: *collection0Name } } - expectResult: - - name: *collection0Name - options: - clusteredIndex: - key: { _id: 1 } - unique: true - name: *index0Name - v: { $$type: [ int, long ] } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - drop: *collection0Name - databaseName: *database0Name - - commandStartedEvent: - command: - create: *collection0Name - clusteredIndex: *clusteredIndex - databaseName: *database0Name - - commandStartedEvent: - command: - listCollections: 1 - filter: *filter - databaseName: *database0Name - - - description: "listIndexes returns the index" - operations: - - name: dropCollection - object: *database0 - arguments: - collection: *collection0Name - - name: createCollection - object: *database0 - arguments: - collection: *collection0Name - clusteredIndex: *clusteredIndex - - name: listIndexes - object: *collection0 - expectResult: - - key: { _id: 1 } - name: *index0Name - clustered: true - unique: true - v: { $$type: [ int, long ] } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - drop: *collection0Name - databaseName: *database0Name - - commandStartedEvent: - command: - create: *collection0Name - clusteredIndex: *clusteredIndex - databaseName: *database0Name - - commandStartedEvent: - command: - listIndexes: *collection0Name - databaseName: *database0Name \ No newline at end of file diff --git a/testdata/collection-management/createCollection-pre_and_post_images.json b/testdata/collection-management/createCollection-pre_and_post_images.json deleted file mode 100644 index f488deacd8..0000000000 --- a/testdata/collection-management/createCollection-pre_and_post_images.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "description": "createCollection-pre_and_post_images", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "6.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "papi-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "tests": [ - { - "description": "createCollection with changeStreamPreAndPostImages enabled", - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "test" - } - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "collection": "test", - "changeStreamPreAndPostImages": { - "enabled": true - } - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "databaseName": "papi-tests", - "collectionName": "test" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "drop": "test" - }, - "databaseName": "papi-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "create": "test", - "changeStreamPreAndPostImages": { - "enabled": true - } - }, - "databaseName": "papi-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/collection-management/createCollection-pre_and_post_images.yml b/testdata/collection-management/createCollection-pre_and_post_images.yml deleted file mode 100644 index 100e9a1d7c..0000000000 --- a/testdata/collection-management/createCollection-pre_and_post_images.yml +++ /dev/null @@ -1,50 +0,0 @@ -description: "createCollection-pre_and_post_images" - -schemaVersion: "1.4" - -runOnRequirements: - - minServerVersion: "6.0" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name papi-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -tests: - - description: "createCollection with changeStreamPreAndPostImages enabled" - operations: - - name: dropCollection - object: *database0 - arguments: - collection: *collection0Name - - name: createCollection - object: *database0 - arguments: - collection: *collection0Name - changeStreamPreAndPostImages: { enabled: true } - - name: assertCollectionExists - object: testRunner - arguments: - databaseName: *database0Name - collectionName: *collection0Name - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - drop: *collection0Name - databaseName: *database0Name - - commandStartedEvent: - command: - create: *collection0Name - changeStreamPreAndPostImages: { enabled: true } - databaseName: *database0Name diff --git a/testdata/collection-management/modifyCollection-errorResponse.json b/testdata/collection-management/modifyCollection-errorResponse.json deleted file mode 100644 index adbd3167d7..0000000000 --- a/testdata/collection-management/modifyCollection-errorResponse.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "description": "modifyCollection-errorResponse", - "schemaVersion": "1.12", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "collMod-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "collMod-tests", - "documents": [ - { - "_id": 1, - "x": 1 - }, - { - "_id": 2, - "x": 1 - } - ] - } - ], - "tests": [ - { - "description": "modifyCollection prepareUnique violations are accessible", - "runOnRequirements": [ - { - "minServerVersion": "5.2" - } - ], - "operations": [ - { - "name": "createIndex", - "object": "collection0", - "arguments": { - "keys": { - "x": 1 - } - } - }, - { - "name": "modifyCollection", - "object": "database0", - "arguments": { - "collection": "test", - "index": { - "keyPattern": { - "x": 1 - }, - "prepareUnique": true - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 3, - "x": 1 - } - }, - "expectError": { - "errorCode": 11000 - } - }, - { - "name": "modifyCollection", - "object": "database0", - "arguments": { - "collection": "test", - "index": { - "keyPattern": { - "x": 1 - }, - "unique": true - } - }, - "expectError": { - "isClientError": false, - "errorCode": 359, - "errorResponse": { - "violations": [ - { - "ids": [ - 1, - 2 - ] - } - ] - } - } - } - ] - } - ] - } \ No newline at end of file diff --git a/testdata/collection-management/modifyCollection-errorResponse.yml b/testdata/collection-management/modifyCollection-errorResponse.yml deleted file mode 100644 index edff573295..0000000000 --- a/testdata/collection-management/modifyCollection-errorResponse.yml +++ /dev/null @@ -1,59 +0,0 @@ -description: "modifyCollection-errorResponse" - -schemaVersion: "1.12" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name collMod-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 1 } - - { _id: 2, x: 1 } - -tests: - - description: "modifyCollection prepareUnique violations are accessible" - runOnRequirements: - - minServerVersion: "5.2" # SERVER-61158 - operations: - - name: createIndex - object: *collection0 - arguments: - keys: { x: 1 } - - name: modifyCollection - object: *database0 - arguments: - collection: *collection0Name - index: - keyPattern: { x: 1 } - prepareUnique: true - - name: insertOne - object: *collection0 - arguments: - document: { _id: 3, x: 1 } - expectError: - errorCode: 11000 # DuplicateKey - - name: modifyCollection - object: *database0 - arguments: - collection: *collection0Name - index: - keyPattern: { x: 1 } - unique: true - expectError: - isClientError: false - errorCode: 359 # CannotConvertIndexToUnique - errorResponse: - violations: - - { ids: [ 1, 2 ] } \ No newline at end of file diff --git a/testdata/collection-management/modifyCollection-pre_and_post_images.json b/testdata/collection-management/modifyCollection-pre_and_post_images.json deleted file mode 100644 index 8026faeb17..0000000000 --- a/testdata/collection-management/modifyCollection-pre_and_post_images.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "description": "modifyCollection-pre_and_post_images", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "6.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "papi-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "tests": [ - { - "description": "modifyCollection to changeStreamPreAndPostImages enabled", - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "test" - } - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "collection": "test", - "changeStreamPreAndPostImages": { - "enabled": false - } - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "databaseName": "papi-tests", - "collectionName": "test" - } - }, - { - "name": "modifyCollection", - "object": "database0", - "arguments": { - "collection": "test", - "changeStreamPreAndPostImages": { - "enabled": true - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "drop": "test" - }, - "databaseName": "papi-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "create": "test", - "changeStreamPreAndPostImages": { - "enabled": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "collMod": "test", - "changeStreamPreAndPostImages": { - "enabled": true - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/collection-management/modifyCollection-pre_and_post_images.yml b/testdata/collection-management/modifyCollection-pre_and_post_images.yml deleted file mode 100644 index 75675bf2c7..0000000000 --- a/testdata/collection-management/modifyCollection-pre_and_post_images.yml +++ /dev/null @@ -1,58 +0,0 @@ -description: "modifyCollection-pre_and_post_images" - -schemaVersion: "1.4" - -runOnRequirements: - - minServerVersion: "6.0" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name papi-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -tests: - - description: "modifyCollection to changeStreamPreAndPostImages enabled" - operations: - - name: dropCollection - object: *database0 - arguments: - collection: *collection0Name - - name: createCollection - object: *database0 - arguments: - collection: *collection0Name - changeStreamPreAndPostImages: { enabled: false } - - name: assertCollectionExists - object: testRunner - arguments: - databaseName: *database0Name - collectionName: *collection0Name - - name: modifyCollection - object: *database0 - arguments: - collection: *collection0Name - changeStreamPreAndPostImages: { enabled: true } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - drop: *collection0Name - databaseName: *database0Name - - commandStartedEvent: - command: - create: *collection0Name - changeStreamPreAndPostImages: { enabled: false } - - commandStartedEvent: - command: - collMod: *collection0Name - changeStreamPreAndPostImages: { enabled: true } diff --git a/testdata/collection-management/timeseries-collection.json b/testdata/collection-management/timeseries-collection.json deleted file mode 100644 index 8525056fd1..0000000000 --- a/testdata/collection-management/timeseries-collection.json +++ /dev/null @@ -1,320 +0,0 @@ -{ - "description": "timeseries-collection", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "ts-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "ts-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "createCollection with all options", - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "test" - } - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "collection": "test", - "expireAfterSeconds": 604800, - "timeseries": { - "timeField": "time", - "metaField": "meta", - "granularity": "minutes" - } - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "databaseName": "ts-tests", - "collectionName": "test" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "drop": "test" - }, - "databaseName": "ts-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "create": "test", - "expireAfterSeconds": 604800, - "timeseries": { - "timeField": "time", - "metaField": "meta", - "granularity": "minutes" - } - }, - "databaseName": "ts-tests" - } - } - ] - } - ] - }, - { - "description": "insertMany with duplicate ids", - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "test" - } - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "collection": "test", - "expireAfterSeconds": 604800, - "timeseries": { - "timeField": "time", - "metaField": "meta", - "granularity": "minutes" - } - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "databaseName": "ts-tests", - "collectionName": "test" - } - }, - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "documents": [ - { - "_id": 1, - "time": { - "$date": { - "$numberLong": "1552949630482" - } - } - }, - { - "_id": 1, - "time": { - "$date": { - "$numberLong": "1552949630483" - } - } - } - ] - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {}, - "sort": { - "time": 1 - } - }, - "expectResult": [ - { - "_id": 1, - "time": { - "$date": { - "$numberLong": "1552949630482" - } - } - }, - { - "_id": 1, - "time": { - "$date": { - "$numberLong": "1552949630483" - } - } - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "drop": "test" - }, - "databaseName": "ts-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "create": "test", - "expireAfterSeconds": 604800, - "timeseries": { - "timeField": "time", - "metaField": "meta", - "granularity": "minutes" - } - }, - "databaseName": "ts-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1, - "time": { - "$date": { - "$numberLong": "1552949630482" - } - } - }, - { - "_id": 1, - "time": { - "$date": { - "$numberLong": "1552949630483" - } - } - } - ] - } - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": {}, - "sort": { - "time": 1 - } - }, - "databaseName": "ts-tests" - } - } - ] - } - ] - }, - { - "description": "createCollection with bucketing options", - "runOnRequirements": [ - { - "minServerVersion": "7.0" - } - ], - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "test" - } - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "collection": "test", - "timeseries": { - "timeField": "time", - "bucketMaxSpanSeconds": 3600, - "bucketRoundingSeconds": 3600 - } - } - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "databaseName": "ts-tests", - "collectionName": "test" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "drop": "test" - }, - "databaseName": "ts-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "create": "test", - "timeseries": { - "timeField": "time", - "bucketMaxSpanSeconds": 3600, - "bucketRoundingSeconds": 3600 - } - }, - "databaseName": "ts-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/collection-management/timeseries-collection.yml b/testdata/collection-management/timeseries-collection.yml deleted file mode 100644 index 992b939131..0000000000 --- a/testdata/collection-management/timeseries-collection.yml +++ /dev/null @@ -1,163 +0,0 @@ -description: "timeseries-collection" - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "5.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name ts-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: "createCollection with all options" - operations: - - name: dropCollection - object: *database0 - arguments: - collection: *collection0Name - - name: createCollection - object: *database0 - arguments: - collection: *collection0Name - # expireAfterSeconds should be an int64 (as it is stored on the server). - expireAfterSeconds: 604800 - timeseries: ×eries0 - timeField: "time" - metaField: "meta" - granularity: "minutes" - - name: assertCollectionExists - object: testRunner - arguments: - databaseName: *database0Name - collectionName: *collection0Name - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - drop: *collection0Name - databaseName: *database0Name - - commandStartedEvent: - command: - create: *collection0Name - expireAfterSeconds: 604800 - timeseries: *timeseries0 - databaseName: *database0Name - - # Unlike regular collections, time-series collections allow duplicate ids. - - description: "insertMany with duplicate ids" - operations: - - name: dropCollection - object: *database0 - arguments: - collection: *collection0Name - - name: createCollection - object: *database0 - arguments: - collection: *collection0Name - # expireAfterSeconds should be an int64 (as it is stored on the server). - expireAfterSeconds: 604800 - timeseries: *timeseries0 - - name: assertCollectionExists - object: testRunner - arguments: - databaseName: *database0Name - collectionName: *collection0Name - - name: insertMany - object: *collection0 - arguments: - documents: &docs - - { - _id: 1, - time: { - $date: { - $numberLong: "1552949630482" - } - } - } - - { - _id: 1, - time: { - $date: { - $numberLong: "1552949630483" - } - } - } - - name: find - object: *collection0 - arguments: - filter: {} - sort: { time: 1 } - expectResult: *docs - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - drop: *collection0Name - databaseName: *database0Name - - commandStartedEvent: - command: - create: *collection0Name - expireAfterSeconds: 604800 - timeseries: *timeseries0 - databaseName: *database0Name - - commandStartedEvent: - command: - insert: *collection0Name - documents: *docs - - commandStartedEvent: - command: - find: *collection0Name - filter: {} - sort: { time: 1 } - databaseName: *database0Name - - - description: "createCollection with bucketing options" - runOnRequirements: - - minServerVersion: "7.0" - operations: - - name: dropCollection - object: *database0 - arguments: - collection: *collection0Name - - name: createCollection - object: *database0 - arguments: - collection: *collection0Name - timeseries: ×eries1 - timeField: "time" - bucketMaxSpanSeconds: 3600 - bucketRoundingSeconds: 3600 - - name: assertCollectionExists - object: testRunner - arguments: - databaseName: *database0Name - collectionName: *collection0Name - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - drop: *collection0Name - databaseName: *database0Name - - commandStartedEvent: - command: - create: *collection0Name - timeseries: *timeseries1 - databaseName: *database0Name diff --git a/testdata/command-monitoring/bulkWrite.json b/testdata/command-monitoring/bulkWrite.json deleted file mode 100644 index 49c728442e..0000000000 --- a/testdata/command-monitoring/bulkWrite.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "description": "bulkWrite", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "command-monitoring-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "command-monitoring-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "A successful mixed bulk write", - "operations": [ - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 4, - "x": 44 - } - } - }, - { - "updateOne": { - "filter": { - "_id": 3 - }, - "update": { - "$set": { - "x": 333 - } - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 4, - "x": 44 - } - ], - "ordered": true - }, - "commandName": "insert", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 1 - }, - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 3 - }, - "u": { - "$set": { - "x": 333 - } - }, - "upsert": { - "$$unsetOrMatches": false - }, - "multi": { - "$$unsetOrMatches": false - } - } - ], - "ordered": true - }, - "commandName": "update", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 1 - }, - "commandName": "update" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/bulkWrite.yml b/testdata/command-monitoring/bulkWrite.yml deleted file mode 100644 index 607b2d1ca7..0000000000 --- a/testdata/command-monitoring/bulkWrite.yml +++ /dev/null @@ -1,68 +0,0 @@ -description: "bulkWrite" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName command-monitoring-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "A successful mixed bulk write" - operations: - - name: bulkWrite - object: *collection - arguments: - requests: - - insertOne: - document: { _id: 4, x: 44 } - - updateOne: - filter: { _id: 3 } - update: { $set: { x: 333 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: - - { _id: 4, x: 44 } - ordered: true - commandName: insert - databaseName: *databaseName - - commandSucceededEvent: - reply: { ok: 1, n: 1 } - commandName: insert - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: {_id: 3 } - u: { $set: { x: 333 } } - upsert: { $$unsetOrMatches: false } - multi: { $$unsetOrMatches: false } - ordered: true - commandName: update - databaseName: *databaseName - - commandSucceededEvent: - reply: { ok: 1, n: 1 } - commandName: update diff --git a/testdata/command-monitoring/command.json b/testdata/command-monitoring/command.json deleted file mode 100644 index c28af95fed..0000000000 --- a/testdata/command-monitoring/command.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "description": "command", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "command-monitoring-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "command-monitoring-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "A successful command", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "ping": 1 - }, - "commandName": "ping" - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "ping": 1 - }, - "commandName": "ping", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1 - }, - "commandName": "ping" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/command.yml b/testdata/command-monitoring/command.yml deleted file mode 100644 index f8c3363606..0000000000 --- a/testdata/command-monitoring/command.yml +++ /dev/null @@ -1,50 +0,0 @@ -description: "command" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName command-monitoring-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - -tests: - - description: "A successful command" - operations: - - name: runCommand - object: *database - arguments: - command: { ping: 1 } - commandName: ping - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - ping: 1 - commandName: ping - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - commandName: ping - -# The legacy "A failed command event" test was removed in the test conversion, as the -# behavior when a command fails is already covered by the test "A failed find event" -# in find.yml. diff --git a/testdata/command-monitoring/deleteMany.json b/testdata/command-monitoring/deleteMany.json deleted file mode 100644 index 78ebad1f98..0000000000 --- a/testdata/command-monitoring/deleteMany.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "description": "deleteMany", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "command-monitoring-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "command-monitoring-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "A successful deleteMany", - "operations": [ - { - "name": "deleteMany", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "limit": 0 - } - ], - "ordered": true - }, - "commandName": "delete", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 2 - }, - "commandName": "delete" - } - } - ] - } - ] - }, - { - "description": "A successful deleteMany with write errors", - "operations": [ - { - "name": "deleteMany", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$unsupported": 1 - } - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": { - "$unsupported": 1 - } - }, - "limit": 0 - } - ], - "ordered": true - }, - "commandName": "delete", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 0, - "writeErrors": { - "$$type": "array" - } - }, - "commandName": "delete" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/deleteMany.yml b/testdata/command-monitoring/deleteMany.yml deleted file mode 100644 index 2804b26613..0000000000 --- a/testdata/command-monitoring/deleteMany.yml +++ /dev/null @@ -1,79 +0,0 @@ -description: "deleteMany" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName command-monitoring-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "A successful deleteMany" - operations: - - name: deleteMany - object: *collection - arguments: - filter: { _id: { $gt: 1 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - { q: { _id: { $gt: 1 }}, limit: 0 } - ordered: true - commandName: delete - databaseName: *databaseName - - commandSucceededEvent: - reply: { ok: 1, n: 2 } - commandName: delete - - - description: "A successful deleteMany with write errors" - operations: - - name: deleteMany - object: *collection - arguments: - filter: { _id: { $unsupported: 1 } } - expectError: - isClientError: false - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - { q: { _id: { $unsupported: 1 }}, limit: 0 } - ordered: true - commandName: delete - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - n: 0 - # The legacy version of this test included an assertion that writeErrors contained a single document - # with index=0, a "code" value, and a non-empty "errmsg". However, writeErrors can contain extra fields - # beyond these, and the unified format currently does not permit allowing extra fields in sub-documents, - # so those assertions are not present here. - writeErrors: { $$type: array } - commandName: delete diff --git a/testdata/command-monitoring/deleteOne.json b/testdata/command-monitoring/deleteOne.json deleted file mode 100644 index 2420794fe5..0000000000 --- a/testdata/command-monitoring/deleteOne.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "description": "deleteOne", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "command-monitoring-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "command-monitoring-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "A successful deleteOne", - "operations": [ - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "limit": 1 - } - ], - "ordered": true - }, - "commandName": "delete", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 1 - }, - "commandName": "delete" - } - } - ] - } - ] - }, - { - "description": "A successful deleteOne with write errors", - "operations": [ - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$unsupported": 1 - } - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": { - "$unsupported": 1 - } - }, - "limit": 1 - } - ], - "ordered": true - }, - "commandName": "delete", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 0, - "writeErrors": { - "$$type": "array" - } - }, - "commandName": "delete" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/deleteOne.yml b/testdata/command-monitoring/deleteOne.yml deleted file mode 100644 index 4081567d5b..0000000000 --- a/testdata/command-monitoring/deleteOne.yml +++ /dev/null @@ -1,79 +0,0 @@ -description: "deleteOne" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName command-monitoring-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "A successful deleteOne" - operations: - - name: deleteOne - object: *collection - arguments: - filter: { _id: { $gt: 1 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - { q: { _id: { $gt: 1 }}, limit: 1 } - ordered: true - commandName: delete - databaseName: *databaseName - - commandSucceededEvent: - reply: { ok: 1, n: 1 } - commandName: delete - - - description: "A successful deleteOne with write errors" - operations: - - name: deleteOne - object: *collection - arguments: - filter: { _id: { $unsupported: 1 } } - expectError: - isClientError: false - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - { q: { _id: { $unsupported: 1 }}, limit: 1 } - ordered: true - commandName: delete - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - n: 0 - # The legacy version of this test included an assertion that writeErrors contained a single document - # with index=0, a "code" value, and a non-empty "errmsg". However, writeErrors can contain extra fields - # beyond these, and the unified format currently does not permit allowing extra fields in sub-documents, - # so those assertions are not present here. - writeErrors: { $$type: array } - commandName: delete diff --git a/testdata/command-monitoring/find.json b/testdata/command-monitoring/find.json deleted file mode 100644 index bc9668499b..0000000000 --- a/testdata/command-monitoring/find.json +++ /dev/null @@ -1,558 +0,0 @@ -{ - "description": "find", - "schemaVersion": "1.15", - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "command-monitoring-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "_yamlAnchors": { - "namespace": "command-monitoring-tests.test" - }, - "initialData": [ - { - "collectionName": "test", - "databaseName": "command-monitoring-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "tests": [ - { - "description": "A successful find with no options", - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": 1 - } - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "cursor": { - "id": 0, - "ns": "command-monitoring-tests.test", - "firstBatch": [ - { - "_id": 1, - "x": 11 - } - ] - } - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - } - ] - } - ] - }, - { - "description": "A successful find with options", - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "sort": { - "x": -1 - }, - "projection": { - "_id": 0, - "x": 1 - }, - "skip": 2, - "comment": "test", - "hint": { - "_id": 1 - }, - "max": { - "_id": 6 - }, - "maxTimeMS": 6000, - "min": { - "_id": 0 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": { - "$gt": 1 - } - }, - "sort": { - "x": -1 - }, - "projection": { - "_id": 0, - "x": 1 - }, - "skip": 2, - "comment": "test", - "hint": { - "_id": 1 - }, - "max": { - "_id": 6 - }, - "maxTimeMS": 6000, - "min": { - "_id": 0 - } - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "cursor": { - "id": 0, - "ns": "command-monitoring-tests.test", - "firstBatch": [ - { - "x": 33 - }, - { - "x": 22 - } - ] - } - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - } - ] - } - ] - }, - { - "description": "A successful find with showRecordId and returnKey", - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "showRecordId": true, - "returnKey": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test", - "showRecordId": true, - "returnKey": true - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "cursor": { - "id": 0, - "ns": "command-monitoring-tests.test", - "firstBatch": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - }, - { - "_id": 5 - } - ] - } - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - } - ] - } - ] - }, - { - "description": "A successful find with a getMore", - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$gte": 1 - } - }, - "sort": { - "_id": 1 - }, - "batchSize": 3 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": { - "$gte": 1 - } - }, - "sort": { - "_id": 1 - }, - "batchSize": 3 - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "cursor": { - "id": { - "$$type": [ - "int", - "long" - ] - }, - "ns": "command-monitoring-tests.test", - "firstBatch": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "test", - "batchSize": 3 - }, - "commandName": "getMore", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "cursor": { - "id": 0, - "ns": "command-monitoring-tests.test", - "nextBatch": [ - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - }, - "commandName": "getMore", - "databaseName": "command-monitoring-tests" - } - } - ] - } - ] - }, - { - "description": "A successful find event with a getmore and the server kills the cursor (<= 4.4)", - "runOnRequirements": [ - { - "minServerVersion": "3.1", - "maxServerVersion": "4.4.99", - "topologies": [ - "single", - "replicaset" - ] - } - ], - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$gte": 1 - } - }, - "sort": { - "_id": 1 - }, - "batchSize": 3, - "limit": 4 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": { - "$gte": 1 - } - }, - "sort": { - "_id": 1 - }, - "batchSize": 3, - "limit": 4 - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "cursor": { - "id": { - "$$type": [ - "int", - "long" - ] - }, - "ns": "command-monitoring-tests.test", - "firstBatch": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "test", - "batchSize": 1 - }, - "commandName": "getMore", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "cursor": { - "id": 0, - "ns": "command-monitoring-tests.test", - "nextBatch": [ - { - "_id": 4, - "x": 44 - } - ] - } - }, - "commandName": "getMore", - "databaseName": "command-monitoring-tests" - } - } - ] - } - ] - }, - { - "description": "A failed find event", - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "$or": true - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "$or": true - } - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandFailedEvent": { - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/find.yml b/testdata/command-monitoring/find.yml deleted file mode 100644 index 479e4a460c..0000000000 --- a/testdata/command-monitoring/find.yml +++ /dev/null @@ -1,262 +0,0 @@ -description: "find" - -schemaVersion: "1.15" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName command-monitoring-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -_yamlAnchors: - namespace: &namespace "command-monitoring-tests.test" - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - -tests: - - description: "A successful find with no options" - operations: - - name: find - object: *collection - arguments: - filter: { _id: 1 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - find: *collectionName - filter: { _id: 1 } - commandName: find - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - cursor: - id: 0 - ns: *namespace - firstBatch: - - { _id: 1, x: 11 } - commandName: find - databaseName: *databaseName - - - description: "A successful find with options" - operations: - - name: find - object: *collection - arguments: - filter: { _id: { $gt: 1 } } - sort: { x: -1 } - projection: { _id: 0, x: 1 } - skip: 2 - comment: "test" - hint: { _id: 1 } - max: { _id: 6 } - maxTimeMS: 6000 - min: { _id: 0 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - find: *collectionName - filter: { _id: { $gt: 1 } } - sort: { x: -1 } - projection: { _id: 0, x: 1 } - skip: 2 - comment: "test" - hint: { _id: 1 } - max: { _id: 6 } - maxTimeMS: 6000 - min: { _id: 0 } - commandName: find - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - cursor: - id: 0 - ns: *namespace - firstBatch: - - { x: 33 } - - { x: 22 } - commandName: find - databaseName: *databaseName - - - description: "A successful find with showRecordId and returnKey" - operations: - - name: find - object: *collection - arguments: - filter: { } - sort: { _id: 1 } - showRecordId: true - returnKey: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - find: *collectionName - showRecordId: true - returnKey: true - commandName: find - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - cursor: - id: 0 - ns: *namespace - firstBatch: - - { _id: 1 } - - { _id: 2 } - - { _id: 3 } - - { _id: 4 } - - { _id: 5 } - commandName: find - databaseName: *databaseName - - - description: "A successful find with a getMore" - operations: - - name: find - object: *collection - arguments: - filter: { _id: { $gte: 1 }} - sort: { _id: 1 } - batchSize: 3 - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - find: *collectionName - filter: { _id: { $gte: 1 }} - sort: { _id: 1 } - batchSize: 3 - commandName: find - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - cursor: - id: { $$type: [ int, long ] } - ns: *namespace - firstBatch: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - commandName: find - databaseName: *databaseName - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collectionName - batchSize: 3 - commandName: getMore - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - cursor: - id: 0 - ns: *namespace - nextBatch: - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - commandName: getMore - databaseName: *databaseName - - - description: "A successful find event with a getmore and the server kills the cursor (<= 4.4)" - runOnRequirements: - - minServerVersion: "3.1" - maxServerVersion: "4.4.99" - topologies: [ single, replicaset ] - operations: - - name: find - object: *collection - arguments: - filter: { _id: { $gte: 1 } } - sort: { _id: 1 } - batchSize: 3 - limit: 4 - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - find: *collectionName - filter: { _id: { $gte: 1 } } - sort: { _id: 1 } - batchSize: 3 - limit: 4 - commandName: find - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - cursor: - id: { $$type: [ int, long ] } - ns: *namespace - firstBatch: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - commandName: find - databaseName: *databaseName - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collectionName - batchSize: 1 - commandName: getMore - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - cursor: - id: 0 - ns: *namespace - nextBatch: - - { _id: 4, x: 44 } - commandName: getMore - databaseName: *databaseName - - - description: "A failed find event" - operations: - - name: find - object: *collection - arguments: - filter: { $or: true } - expectError: - isClientError: false - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - find: *collectionName - filter: { $or: true } - commandName: find - databaseName: *databaseName - - commandFailedEvent: - commandName: find - databaseName: *databaseName diff --git a/testdata/command-monitoring/insertMany.json b/testdata/command-monitoring/insertMany.json deleted file mode 100644 index a80a218c67..0000000000 --- a/testdata/command-monitoring/insertMany.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "description": "insertMany", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "command-monitoring-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "command-monitoring-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "A successful insertMany", - "operations": [ - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2, - "x": 22 - } - ], - "ordered": true - }, - "commandName": "insert", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 1 - }, - "commandName": "insert" - } - } - ] - } - ] - }, - { - "description": "A successful insertMany with write errors", - "operations": [ - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1, - "x": 11 - } - ], - "ordered": true - }, - "commandName": "insert", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 0, - "writeErrors": { - "$$type": "array" - } - }, - "commandName": "insert" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/insertMany.yml b/testdata/command-monitoring/insertMany.yml deleted file mode 100644 index 88c7e14900..0000000000 --- a/testdata/command-monitoring/insertMany.yml +++ /dev/null @@ -1,79 +0,0 @@ -description: "insertMany" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName command-monitoring-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - -tests: - - description: "A successful insertMany" - operations: - - name: insertMany - object: *collection - arguments: - documents: - - { _id: 2, x: 22 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: - - { _id: 2, x: 22 } - ordered: true - commandName: insert - databaseName: *databaseName - - commandSucceededEvent: - reply: { ok: 1, n: 1 } - commandName: insert - - - description: "A successful insertMany with write errors" - operations: - - name: insertMany - object: *collection - arguments: - documents: - - { _id: 1, x: 11 } - expectError: - isClientError: false - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: - - { _id: 1, x: 11 } - ordered: true - commandName: insert - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - n: 0 - # The legacy version of this test included an assertion that writeErrors contained a single document - # with index=0, a "code" value, and a non-empty "errmsg". However, writeErrors can contain extra fields - # beyond these, and the unified format currently does not permit allowing extra fields in sub-documents, - # so those assertions are not present here. - writeErrors: { $$type: array } - commandName: insert diff --git a/testdata/command-monitoring/insertOne.json b/testdata/command-monitoring/insertOne.json deleted file mode 100644 index 6ff732e41b..0000000000 --- a/testdata/command-monitoring/insertOne.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "description": "insertOne", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "command-monitoring-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "command-monitoring-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "A successful insertOne", - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2, - "x": 22 - } - ], - "ordered": true - }, - "commandName": "insert", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 1 - }, - "commandName": "insert" - } - } - ] - } - ] - }, - { - "description": "A successful insertOne with write errors", - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 1, - "x": 11 - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1, - "x": 11 - } - ], - "ordered": true - }, - "commandName": "insert", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 0, - "writeErrors": { - "$$type": "array" - } - }, - "commandName": "insert" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/insertOne.yml b/testdata/command-monitoring/insertOne.yml deleted file mode 100644 index cd4431295b..0000000000 --- a/testdata/command-monitoring/insertOne.yml +++ /dev/null @@ -1,77 +0,0 @@ -description: "insertOne" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName command-monitoring-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - -tests: - - description: "A successful insertOne" - operations: - - name: insertOne - object: *collection - arguments: - document: { _id: 2, x: 22 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: - - { _id: 2, x: 22 } - ordered: true - commandName: insert - databaseName: *databaseName - - commandSucceededEvent: - reply: { ok: 1, n: 1 } - commandName: insert - - - description: "A successful insertOne with write errors" - operations: - - name: insertOne - object: *collection - arguments: - document: { _id: 1, x: 11 } - expectError: - isClientError: false - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: - - { _id: 1, x: 11 } - ordered: true - commandName: insert - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - n: 0 - # The legacy version of this test included an assertion that writeErrors contained a single document - # with index=0, a "code" value, and a non-empty "errmsg". However, writeErrors can contain extra fields - # beyond these, and the unified format currently does not permit allowing extra fields in sub-documents, - # so those assertions are not present here. - writeErrors: { $$type: array } - commandName: insert diff --git a/testdata/command-monitoring/logging/command.json b/testdata/command-monitoring/logging/command.json deleted file mode 100644 index d2970df692..0000000000 --- a/testdata/command-monitoring/logging/command.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "description": "command-logging", - "schemaVersion": "1.13", - "createEntities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "command": "debug" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "logging-tests-collection" - } - } - ], - "initialData": [ - { - "collectionName": "logging-tests-collection", - "databaseName": "logging-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "A successful command", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "ping": 1 - }, - "commandName": "ping" - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-tests", - "commandName": "ping", - "command": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "ping": 1, - "$db": "logging-tests" - } - } - }, - "requestId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "databaseName": "logging-tests", - "commandName": "ping", - "reply": { - "$$type": "string" - }, - "requestId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "durationMS": { - "$$type": [ - "double", - "int", - "long" - ] - } - } - } - ] - } - ] - }, - { - "description": "A failed command", - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "$or": true - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-tests", - "commandName": "find", - "command": { - "$$type": "string" - }, - "requestId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command failed", - "databaseName": "logging-tests", - "commandName": "find", - "failure": { - "$$exists": true - }, - "requestId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "durationMS": { - "$$type": [ - "double", - "int", - "long" - ] - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/logging/command.yml b/testdata/command-monitoring/logging/command.yml deleted file mode 100644 index 3e3410b06d..0000000000 --- a/testdata/command-monitoring/logging/command.yml +++ /dev/null @@ -1,95 +0,0 @@ -description: "command-logging" - -schemaVersion: "1.13" - -createEntities: - - client: - id: &client client - observeLogMessages: - command: debug - - database: - id: &database database - client: *client - databaseName: &databaseName logging-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName logging-tests-collection - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - -tests: - - description: "A successful command" - operations: - - name: runCommand - object: *database - arguments: - command: { ping: 1 } - commandName: &commandName ping - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: *commandName - command: - $$matchAsDocument: - $$matchAsRoot: - ping: 1 - $db: *databaseName - requestId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: command - data: - message: "Command succeeded" - databaseName: *databaseName - commandName: *commandName - reply: { $$type: string } - requestId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - durationMS: { $$type: [double, int, long] } - - - description: "A failed command" - operations: - - name: &commandName find - object: *collection - arguments: - filter: { $or: true } - expectError: - isClientError: false - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: *commandName - command: { $$type: string } - requestId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: command - data: - message: "Command failed" - databaseName: *databaseName - commandName: *commandName - failure: { $$exists: true } - requestId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - durationMS: { $$type: [double, int, long] } diff --git a/testdata/command-monitoring/logging/driver-connection-id.json b/testdata/command-monitoring/logging/driver-connection-id.json deleted file mode 100644 index 40db98d6fa..0000000000 --- a/testdata/command-monitoring/logging/driver-connection-id.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "description": "driver-connection-id", - "schemaVersion": "1.13", - "createEntities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "command": "debug" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "logging-tests-collection" - } - } - ], - "initialData": [ - { - "collectionName": "logging-tests-collection", - "databaseName": "logging-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "A successful command", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "ping": 1 - }, - "commandName": "ping" - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-tests", - "commandName": "ping", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "ping", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - }, - { - "description": "A failed command", - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "$or": true - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-tests", - "commandName": "find", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command failed", - "commandName": "find", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/logging/driver-connection-id.yml b/testdata/command-monitoring/logging/driver-connection-id.yml deleted file mode 100644 index b6b3235ee0..0000000000 --- a/testdata/command-monitoring/logging/driver-connection-id.yml +++ /dev/null @@ -1,76 +0,0 @@ -# This is a separate test so that drivers that do not implement CMAP can easily skip it. -description: "driver-connection-id" - -schemaVersion: "1.13" - -createEntities: - - client: - id: &client client - observeLogMessages: - command: debug - - database: - id: &database database - client: *client - databaseName: &databaseName logging-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName logging-tests-collection - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - -tests: - - description: "A successful command" - operations: - - name: runCommand - object: *database - arguments: - command: { ping: 1 } - commandName: &commandName ping - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: *commandName - driverConnectionId: { $$type: [int, long] } - - - level: debug - component: command - data: - message: "Command succeeded" - commandName: *commandName - driverConnectionId: { $$type: [int, long] } - - - description: "A failed command" - operations: - - name: &commandName find - object: *collection - arguments: - filter: { $or: true } - expectError: - isClientError: false - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: *commandName - driverConnectionId: { $$type: [int, long] } - - - level: debug - component: command - data: - message: "Command failed" - commandName: *commandName - driverConnectionId: { $$type: [int, long] } diff --git a/testdata/command-monitoring/logging/no-handshake-messages.json b/testdata/command-monitoring/logging/no-handshake-messages.json deleted file mode 100644 index a61e208798..0000000000 --- a/testdata/command-monitoring/logging/no-handshake-messages.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "description": "no-handshake-command-logs", - "schemaVersion": "1.13", - "tests": [ - { - "description": "Handshake commands should not generate log messages", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "command": "debug" - }, - "observeEvents": [ - "connectionCreatedEvent", - "connectionReadyEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-tests" - } - } - ] - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "ping": 1 - }, - "commandName": "ping" - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "connectionCreatedEvent": {} - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "connectionReadyEvent": {} - }, - "count": 1 - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-tests", - "commandName": "ping" - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "ping" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/logging/no-handshake-messages.yml b/testdata/command-monitoring/logging/no-handshake-messages.yml deleted file mode 100644 index bb7dd18e09..0000000000 --- a/testdata/command-monitoring/logging/no-handshake-messages.yml +++ /dev/null @@ -1,58 +0,0 @@ -description: "no-handshake-command-logs" - -schemaVersion: "1.13" - -tests: - - description: "Handshake commands should not generate log messages" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeLogMessages: - command: debug - observeEvents: - - connectionCreatedEvent - - connectionReadyEvent - - database: - id: &database database - client: *client - databaseName: &databaseName logging-tests - - name: runCommand - object: *database - arguments: - command: { ping: 1 } - commandName: &commandName ping - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - connectionCreatedEvent: {} - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - connectionReadyEvent: {} - count: 1 - expectLogMessages: - # since the ping happens after the handshake, seeing events for only the ping - # implies the driver did not emit any log messages for the handshake. - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: *commandName - - - level: debug - component: command - data: - message: "Command succeeded" - commandName: *commandName diff --git a/testdata/command-monitoring/logging/no-heartbeat-messages.json b/testdata/command-monitoring/logging/no-heartbeat-messages.json deleted file mode 100644 index 525be9171d..0000000000 --- a/testdata/command-monitoring/logging/no-heartbeat-messages.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "description": "no-heartbeat-command-logs", - "schemaVersion": "1.13", - "runOnRequirements": [ - { - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "tests": [ - { - "description": "Heartbeat commands should not generate log messages", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "command": "debug" - }, - "observeEvents": [ - "serverDescriptionChangedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-tests" - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": {} - }, - "count": 1 - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "ping": 1 - }, - "commandName": "ping" - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-tests", - "commandName": "ping" - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "ping" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/logging/no-heartbeat-messages.yml b/testdata/command-monitoring/logging/no-heartbeat-messages.yml deleted file mode 100644 index 7d35fbe003..0000000000 --- a/testdata/command-monitoring/logging/no-heartbeat-messages.yml +++ /dev/null @@ -1,58 +0,0 @@ -description: "no-heartbeat-command-logs" - -schemaVersion: "1.13" - -# no heartbeats in load balanced mode. -runOnRequirements: - - topologies: - - single - - replicaset - - sharded - -tests: - - description: "Heartbeat commands should not generate log messages" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeLogMessages: - command: debug - observeEvents: - - serverDescriptionChangedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName logging-tests - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - # a server description change implies that a heartbeat has happened. - serverDescriptionChangedEvent: {} - count: 1 - - name: runCommand - object: *database - arguments: - command: { ping: 1 } - commandName: &commandName ping - expectLogMessages: - # since the ping happens after the heartbeat, seeing events for only the ping - # implies the driver did not emit a log message for the heartbeat. - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: *commandName - - - level: debug - component: command - data: - message: "Command succeeded" - commandName: *commandName diff --git a/testdata/command-monitoring/logging/operation-id.json b/testdata/command-monitoring/logging/operation-id.json deleted file mode 100644 index b1a3cec3d9..0000000000 --- a/testdata/command-monitoring/logging/operation-id.json +++ /dev/null @@ -1,198 +0,0 @@ -{ - "description": "operation-id", - "schemaVersion": "1.13", - "createEntities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "command": "debug" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "logging-tests-collection" - } - } - ], - "initialData": [ - { - "collectionName": "logging-tests-collection", - "databaseName": "logging-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "Successful bulk write command log messages include operationIds", - "operations": [ - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "x": 1 - } - } - }, - { - "deleteOne": { - "filter": { - "x": 1 - } - } - } - ] - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-tests", - "commandName": "insert", - "operationId": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "insert", - "operationId": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-tests", - "commandName": "delete", - "operationId": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "delete", - "operationId": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - }, - { - "description": "Failed bulk write command log message includes operationId", - "operations": [ - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "x": 1 - }, - "update": [ - { - "$invalidOperator": true - } - ] - } - } - ] - }, - "expectError": { - "isClientError": false - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-tests", - "commandName": "update", - "operationId": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command failed", - "commandName": "update", - "operationId": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/logging/operation-id.yml b/testdata/command-monitoring/logging/operation-id.yml deleted file mode 100644 index 9456faa9c7..0000000000 --- a/testdata/command-monitoring/logging/operation-id.yml +++ /dev/null @@ -1,99 +0,0 @@ -# This test only applies to drivers that generate operationIds to enable users to link -# together bulk writes. -description: "operation-id" - -schemaVersion: "1.13" - -createEntities: - - client: - id: &client client - observeLogMessages: - command: debug - - database: - id: &database database - client: *client - databaseName: &databaseName logging-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName logging-tests-collection - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - -tests: - - description: "Successful bulk write command log messages include operationIds" - operations: - - name: bulkWrite - object: *collection - arguments: - requests: - - insertOne: - document: { x: 1 } - - deleteOne: - filter: { x: 1 } - - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: insert - operationId: { $$type: [int, long] } - - - level: debug - component: command - data: - message: "Command succeeded" - commandName: insert - operationId: { $$type: [int, long] } - - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: delete - operationId: { $$type: [int, long] } - - - level: debug - component: command - data: - message: "Command succeeded" - commandName: delete - operationId: { $$type: [int, long] } - - - description: "Failed bulk write command log message includes operationId" - operations: - - name: bulkWrite - object: *collection - arguments: - requests: - - updateOne: - filter: { x: 1 } - update: [{ $invalidOperator: true }] - expectError: - isClientError: false - - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: update - operationId: { $$type: [int, long] } - - level: debug - component: command - data: - message: "Command failed" - commandName: update - operationId: { $$type: [int, long] } diff --git a/testdata/command-monitoring/logging/pre-42-server-connection-id.json b/testdata/command-monitoring/logging/pre-42-server-connection-id.json deleted file mode 100644 index d5ebd86590..0000000000 --- a/testdata/command-monitoring/logging/pre-42-server-connection-id.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "description": "pre-42-server-connection-id", - "schemaVersion": "1.13", - "runOnRequirements": [ - { - "maxServerVersion": "4.0.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "command": "debug" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-server-connection-id-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "logging-tests-collection" - } - } - ], - "initialData": [ - { - "databaseName": "logging-server-connection-id-tests", - "collectionName": "logging-tests-collection", - "documents": [] - } - ], - "tests": [ - { - "description": "command log messages do not include server connection id", - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "$or": true - } - }, - "expectError": { - "isError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "commandName": "insert", - "serverConnectionId": { - "$$exists": false - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "insert", - "serverConnectionId": { - "$$exists": false - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "commandName": "find", - "serverConnectionId": { - "$$exists": false - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command failed", - "commandName": "find", - "serverConnectionId": { - "$$exists": false - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/logging/pre-42-server-connection-id.yml b/testdata/command-monitoring/logging/pre-42-server-connection-id.yml deleted file mode 100644 index 7dc80eea07..0000000000 --- a/testdata/command-monitoring/logging/pre-42-server-connection-id.yml +++ /dev/null @@ -1,66 +0,0 @@ -description: "pre-42-server-connection-id" - -schemaVersion: "1.13" - -runOnRequirements: - - maxServerVersion: "4.0.99" - -createEntities: - - client: - id: &client client - observeLogMessages: - command: debug - - database: - id: &database database - client: *client - databaseName: &databaseName logging-server-connection-id-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName logging-tests-collection - -initialData: - - databaseName: *databaseName - collectionName: *collectionName - documents: [] - -tests: - - description: "command log messages do not include server connection id" - operations: - - name: insertOne - object: *collection - arguments: - document: { x: 1 } - - name: find - object: *collection - arguments: - filter: { $or: true } - expectError: - isError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - commandName: insert - serverConnectionId: { $$exists: false } - - level: debug - component: command - data: - message: "Command succeeded" - commandName: insert - serverConnectionId: { $$exists: false } - - level: debug - component: command - data: - message: "Command started" - commandName: find - serverConnectionId: { $$exists: false } - - level: debug - component: command - data: - message: "Command failed" - commandName: find - serverConnectionId: { $$exists: false } diff --git a/testdata/command-monitoring/logging/redacted-commands.json b/testdata/command-monitoring/logging/redacted-commands.json deleted file mode 100644 index 43b9ff74f2..0000000000 --- a/testdata/command-monitoring/logging/redacted-commands.json +++ /dev/null @@ -1,1438 +0,0 @@ -{ - "description": "redacted-commands", - "schemaVersion": "1.13", - "runOnRequirements": [ - { - "minServerVersion": "5.0", - "auth": false - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeLogMessages": { - "command": "debug" - } - } - }, - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-redaction-tests" - } - } - ], - "tests": [ - { - "description": "authenticate command and resulting server-generated error are redacted", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "authenticate", - "command": { - "authenticate": 1, - "mechanism": "MONGODB-X509", - "user": "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry", - "db": "$external" - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "authenticate", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": true, - "data": { - "message": "Command failed", - "commandName": "authenticate", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "network error in response to authenticate is not redacted", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "authenticate" - ], - "closeConnection": true - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "authenticate", - "command": { - "authenticate": 1, - "mechanism": "MONGODB-X509", - "user": "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry" - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "authenticate", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": false, - "data": { - "message": "Command failed", - "commandName": "authenticate", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "saslStart command and resulting server-generated error are redacted", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "saslStart", - "command": { - "saslStart": 1, - "payload": "definitely-invalid-payload", - "db": "admin" - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "saslStart", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": true, - "data": { - "message": "Command failed", - "commandName": "saslStart", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "network error in response to saslStart is not redacted", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "saslStart" - ], - "closeConnection": true - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "saslStart", - "command": { - "saslStart": 1, - "payload": "ZmFrZXNhc2xwYXlsb2Fk", - "mechanism": "MONGODB-X509" - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "saslStart", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": false, - "data": { - "message": "Command failed", - "commandName": "saslStart", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "saslContinue command and resulting server-generated error are redacted", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "saslContinue", - "command": { - "saslContinue": 1, - "conversationId": 0, - "payload": "definitely-invalid-payload" - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "saslContinue", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": true, - "data": { - "message": "Command failed", - "commandName": "saslContinue", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "network error in response to saslContinue is not redacted", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "saslContinue" - ], - "closeConnection": true - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "saslContinue", - "command": { - "saslContinue": 1, - "conversationId": 0, - "payload": "ZmFrZXNhc2xwYXlsb2Fk" - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "saslContinue", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": false, - "data": { - "message": "Command failed", - "commandName": "saslContinue", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "getnonce command and server reply are redacted", - "runOnRequirements": [ - { - "maxServerVersion": "6.1.99" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "getnonce", - "command": { - "getnonce": 1 - } - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "getnonce", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "getnonce", - "reply": { - "$$matchAsDocument": {} - } - } - } - ] - } - ] - }, - { - "description": "network error in response to getnonce is not redacted", - "runOnRequirements": [ - { - "maxServerVersion": "6.1.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getnonce" - ], - "closeConnection": true - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "getnonce", - "command": { - "getnonce": 1 - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "getnonce", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": false, - "data": { - "message": "Command failed", - "commandName": "getnonce", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "createUser command and resulting server-generated error are redacted", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "createUser", - "command": { - "createUser": "private", - "pwd": {}, - "roles": [] - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "createUser", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": true, - "data": { - "message": "Command failed", - "commandName": "createUser", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "network error in response to createUser is not redacted", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "createUser" - ], - "closeConnection": true - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "createUser", - "command": { - "createUser": "private", - "pwd": "pwd", - "roles": [] - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "createUser", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": false, - "data": { - "message": "Command failed", - "commandName": "createUser", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "updateUser command and resulting server-generated error are redacted", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "updateUser", - "command": { - "updateUser": "private", - "pwd": {}, - "roles": [] - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "updateUser", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": true, - "data": { - "message": "Command failed", - "commandName": "updateUser", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "network error in response to updateUser is not redacted", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "updateUser" - ], - "closeConnection": true - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "updateUser", - "command": { - "updateUser": "private", - "pwd": "pwd", - "roles": [] - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "updateUser", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": false, - "data": { - "message": "Command failed", - "commandName": "updateUser", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "copydbgetnonce command and resulting server-generated error are redacted", - "runOnRequirements": [ - { - "maxServerVersion": "3.6.99" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "copydbgetnonce", - "command": { - "copydbgetnonce": "private" - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "copydbgetnonce", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": true, - "data": { - "message": "Command failed", - "commandName": "copydbgetnonce", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "network error in response to copydbgetnonce is not redacted", - "runOnRequirements": [ - { - "maxServerVersion": "3.6.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "copydbgetnonce" - ], - "closeConnection": true - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "copydbgetnonce", - "command": { - "copydbgetnonce": "private" - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "copydbgetnonce", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": false, - "data": { - "message": "Command failed", - "commandName": "copydbgetnonce", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "copydbsaslstart command and resulting server-generated error are redacted", - "runOnRequirements": [ - { - "maxServerVersion": "4.0.99" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "copydbsaslstart", - "command": { - "copydbsaslstart": "private" - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "copydbsaslstart", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": true, - "data": { - "message": "Command failed", - "commandName": "copydbsaslstart", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "network error in response to copydbsaslstart is not redacted", - "runOnRequirements": [ - { - "maxServerVersion": "4.0.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "copydbsaslstart" - ], - "closeConnection": true - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "copydbsaslstart", - "command": { - "copydbsaslstart": "private" - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "copydbgetnonce", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": false, - "data": { - "message": "Command failed", - "commandName": "copydbgetnonce", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "copydb command and resulting server-generated error are redacted", - "runOnRequirements": [ - { - "maxServerVersion": "4.0.99" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "copydb", - "command": { - "copydb": "private" - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "copydb", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": true, - "data": { - "message": "Command failed", - "commandName": "copydb", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "network error in response to copydb is not redacted", - "runOnRequirements": [ - { - "maxServerVersion": "4.0.99" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "copydb" - ], - "closeConnection": true - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "copydb", - "command": { - "copydb": "private" - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "copydb", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "failureIsRedacted": false, - "data": { - "message": "Command failed", - "commandName": "copydb", - "failure": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "hello with speculative authenticate command and server reply are redacted", - "runOnRequirements": [ - { - "minServerVersion": "4.9" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "hello", - "command": { - "hello": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "hello", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "hello", - "reply": { - "$$matchAsDocument": {} - } - } - } - ] - } - ] - }, - { - "description": "legacy hello with speculative authenticate command and server reply are redacted", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "ismaster", - "command": { - "ismaster": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "isMaster", - "command": { - "isMaster": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "ismaster", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "ismaster", - "reply": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "isMaster", - "command": { - "$$matchAsDocument": {} - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "isMaster", - "reply": { - "$$matchAsDocument": {} - } - } - } - ] - } - ] - }, - { - "description": "hello without speculative authenticate command and server reply are not redacted", - "runOnRequirements": [ - { - "minServerVersion": "4.9" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "hello", - "command": { - "hello": 1 - } - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "hello", - "command": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "hello": 1 - } - } - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "hello", - "reply": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "ok": 1, - "isWritablePrimary": true - } - } - } - } - } - ] - } - ] - }, - { - "description": "legacy hello without speculative authenticate command and server reply are not redacted", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "ismaster", - "command": { - "ismaster": 1 - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "isMaster", - "command": { - "isMaster": 1 - } - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "ismaster", - "command": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "ismaster": 1 - } - } - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "ismaster", - "reply": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "ok": 1, - "ismaster": true - } - } - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-redaction-tests", - "commandName": "isMaster", - "command": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "isMaster": 1 - } - } - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "isMaster", - "reply": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "ok": 1, - "ismaster": true - } - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/logging/redacted-commands.yml b/testdata/command-monitoring/logging/redacted-commands.yml deleted file mode 100644 index e1485571bd..0000000000 --- a/testdata/command-monitoring/logging/redacted-commands.yml +++ /dev/null @@ -1,850 +0,0 @@ -description: "redacted-commands" - -schemaVersion: "1.13" - -runOnRequirements: - - minServerVersion: "5.0" - auth: false - -createEntities: - - client: - id: &client client - useMultipleMongoses: false - observeLogMessages: - command: debug - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - - database: - id: &database database - client: *client - databaseName: &databaseName logging-redaction-tests - -tests: - - description: "authenticate command and resulting server-generated error are redacted" - operations: - - name: runCommand - object: *database - arguments: - commandName: authenticate - command: - authenticate: 1 - mechanism: "MONGODB-X509" - user: "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry" - db: "$external" - # An authentication error is expected, but we want to check that the - # CommandStartedEvent is redacted - expectError: - isClientError: false - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: authenticate - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: true - data: - message: "Command failed" - commandName: authenticate - failure: { $$exists: true } - - - description: "network error in response to authenticate is not redacted" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["authenticate"] - closeConnection: true - - name: runCommand - object: *database - arguments: - commandName: authenticate - command: - authenticate: 1 - mechanism: "MONGODB-X509" - user: "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry" - expectError: - isClientError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: authenticate - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: false - data: - message: "Command failed" - commandName: authenticate - failure: { $$exists: true } - - - description: "saslStart command and resulting server-generated error are redacted" - operations: - - name: runCommand - object: *database - arguments: - commandName: saslStart - command: - saslStart: 1 - payload: "definitely-invalid-payload" - db: "admin" - expectError: - isClientError: false - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: saslStart - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: true - data: - message: "Command failed" - commandName: saslStart - failure: { $$exists: true } - - - description: "network error in response to saslStart is not redacted" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["saslStart"] - closeConnection: true - - name: runCommand - object: *database - arguments: - commandName: saslStart - command: - saslStart: 1 - payload: ZmFrZXNhc2xwYXlsb2Fk - mechanism: MONGODB-X509 - expectError: - isClientError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: saslStart - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: false - data: - message: "Command failed" - commandName: saslStart - failure: { $$exists: true } - - - description: "saslContinue command and resulting server-generated error are redacted" - operations: - - name: runCommand - object: *database - arguments: - commandName: saslContinue - command: - saslContinue: 1 - conversationId: 0 - payload: "definitely-invalid-payload" - expectError: - isClientError: false - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: saslContinue - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: true - data: - message: "Command failed" - commandName: saslContinue - failure: { $$exists: true } - - - description: "network error in response to saslContinue is not redacted" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["saslContinue"] - closeConnection: true - - name: runCommand - object: *database - arguments: - commandName: saslContinue - command: - saslContinue: 1 - conversationId: 0 - payload: ZmFrZXNhc2xwYXlsb2Fk - expectError: - isClientError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: saslContinue - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: false - data: - message: "Command failed" - commandName: saslContinue - failure: { $$exists: true } - - - description: "getnonce command and server reply are redacted" - runOnRequirements: - - maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007 - operations: - - name: runCommand - object: *database - arguments: - commandName: getnonce - command: - getnonce: 1 - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: getnonce - command: - $$matchAsDocument: {} - - level: debug - component: command - data: - message: "Command succeeded" - commandName: getnonce - reply: - $$matchAsDocument: {} - - - description: "network error in response to getnonce is not redacted" - runOnRequirements: - - maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007 - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["getnonce"] - closeConnection: true - - name: runCommand - object: *database - arguments: - commandName: getnonce - command: - getnonce: 1 - expectError: - isClientError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: getnonce - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: false - data: - message: "Command failed" - commandName: getnonce - failure: { $$exists: true } - - - description: "createUser command and resulting server-generated error are redacted" - operations: - - name: runCommand - object: *database - arguments: - commandName: createUser - command: - createUser: "private" - # Passing an object is prohibited and we want to trigger a command - # failure - pwd: {} - roles: [] - expectError: - isClientError: false - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: createUser - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: true - data: - message: "Command failed" - commandName: createUser - failure: { $$exists: true } - - - description: "network error in response to createUser is not redacted" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["createUser"] - closeConnection: true - - name: runCommand - object: *database - arguments: - commandName: createUser - command: - createUser: "private" - pwd: "pwd" - roles: [] - expectError: - isClientError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: createUser - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: false - data: - message: "Command failed" - commandName: createUser - failure: { $$exists: true } - - - description: "updateUser command and resulting server-generated error are redacted" - operations: - - name: runCommand - object: *database - arguments: - commandName: updateUser - command: - updateUser: "private" - pwd: {} - roles: [] - expectError: - isClientError: false - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: updateUser - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: true - data: - message: "Command failed" - commandName: updateUser - failure: { $$exists: true } - - - description: "network error in response to updateUser is not redacted" - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["updateUser"] - closeConnection: true - - name: runCommand - object: *database - arguments: - commandName: updateUser - command: - updateUser: "private" - pwd: "pwd" - roles: [] - expectError: - isClientError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: updateUser - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: false - data: - message: "Command failed" - commandName: updateUser - failure: { $$exists: true } - - - description: "copydbgetnonce command and resulting server-generated error are redacted" - runOnRequirements: - - maxServerVersion: 3.6.99 # copydbgetnonce was removed as of 4.0 via SERVER-32276 - operations: - - name: runCommand - object: *database - arguments: - commandName: copydbgetnonce - command: - copydbgetnonce: "private" - expectError: - isClientError: false - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: copydbgetnonce - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: true - data: - message: "Command failed" - commandName: copydbgetnonce - failure: { $$exists: true } - - - description: "network error in response to copydbgetnonce is not redacted" - runOnRequirements: - - maxServerVersion: 3.6.99 # copydbgetnonce was removed as of 4.0 via SERVER-32276 - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["copydbgetnonce"] - closeConnection: true - - name: runCommand - object: *database - arguments: - commandName: copydbgetnonce - command: - copydbgetnonce: "private" - expectError: - isClientError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: copydbgetnonce - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: false - data: - message: "Command failed" - commandName: copydbgetnonce - failure: { $$exists: true } - - - description: "copydbsaslstart command and resulting server-generated error are redacted" - runOnRequirements: - - maxServerVersion: 4.0.99 # copydbsaslstart was removed as of 4.2 via SERVER-36211 - operations: - - name: runCommand - object: *database - arguments: - commandName: copydbsaslstart - command: - copydbsaslstart: "private" - expectError: - isClientError: false - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: copydbsaslstart - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: true - data: - message: "Command failed" - commandName: copydbsaslstart - failure: { $$exists: true } - - - description: "network error in response to copydbsaslstart is not redacted" - runOnRequirements: - - maxServerVersion: 4.0.99 # copydbsaslstart was removed as of 4.2 via SERVER-36211 - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["copydbsaslstart"] - closeConnection: true - - name: runCommand - object: *database - arguments: - commandName: copydbsaslstart - command: - copydbsaslstart: "private" - expectError: - isClientError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: copydbgetnonce - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: false - data: - message: "Command failed" - commandName: copydbgetnonce - failure: { $$exists: true } - - - description: "copydb command and resulting server-generated error are redacted" - runOnRequirements: - - maxServerVersion: 4.0.99 # copydb was removed as of 4.2 via SERVER-36257 - operations: - - name: runCommand - object: *database - arguments: - commandName: copydb - command: - copydb: "private" - expectError: - isClientError: false - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: copydb - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: true - data: - message: "Command failed" - commandName: copydb - failure: { $$exists: true } - - - description: "network error in response to copydb is not redacted" - runOnRequirements: - - maxServerVersion: 4.0.99 # copydb was removed as of 4.2 via SERVER-36257 - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["copydb"] - closeConnection: true - - name: runCommand - object: *database - arguments: - commandName: copydb - command: - copydb: "private" - expectError: - isClientError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: copydb - command: - $$matchAsDocument: {} - - level: debug - component: command - failureIsRedacted: false - data: - message: "Command failed" - commandName: copydb - failure: { $$exists: true } - - - description: "hello with speculative authenticate command and server reply are redacted" - runOnRequirements: - - minServerVersion: "4.9" - operations: - - name: runCommand - object: *database - arguments: - commandName: hello - command: - hello: 1 - speculativeAuthenticate: - saslStart: 1 - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: hello - command: - $$matchAsDocument: {} - - level: debug - component: command - data: - message: "Command succeeded" - commandName: hello - reply: - $$matchAsDocument: {} - - - - description: "legacy hello with speculative authenticate command and server reply are redacted" - operations: - - name: runCommand - object: *database - arguments: - commandName: ismaster - command: - ismaster: 1 - speculativeAuthenticate: - saslStart: 1 - - name: runCommand - object: *database - arguments: - commandName: isMaster - command: - isMaster: 1 - speculativeAuthenticate: - saslStart: 1 - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: ismaster - command: - $$matchAsDocument: {} - - level: debug - component: command - data: - message: "Command succeeded" - commandName: ismaster - reply: - $$matchAsDocument: {} - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: isMaster - command: - $$matchAsDocument: {} - - level: debug - component: command - data: - message: "Command succeeded" - commandName: isMaster - reply: - $$matchAsDocument: {} - - - description: "hello without speculative authenticate command and server reply are not redacted" - runOnRequirements: - - minServerVersion: "4.9" - operations: - - name: runCommand - object: *database - arguments: - commandName: hello - command: - hello: 1 - - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: hello - command: - $$matchAsDocument: - $$matchAsRoot: - hello: 1 - - level: debug - component: command - data: - message: "Command succeeded" - commandName: hello - reply: - $$matchAsDocument: - $$matchAsRoot: - ok: 1 - isWritablePrimary: true - - - description: "legacy hello without speculative authenticate command and server reply are not redacted" - operations: - - name: runCommand - object: *database - arguments: - commandName: ismaster - command: - ismaster: 1 - - name: runCommand - object: *database - arguments: - commandName: isMaster - command: - isMaster: 1 - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: ismaster - command: - $$matchAsDocument: - $$matchAsRoot: - ismaster: 1 - - level: debug - component: command - data: - message: "Command succeeded" - commandName: ismaster - reply: - $$matchAsDocument: - $$matchAsRoot: - ok: 1 - ismaster: true - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: isMaster - command: - $$matchAsDocument: - $$matchAsRoot: - isMaster: 1 - - level: debug - component: command - data: - message: "Command succeeded" - commandName: isMaster - reply: - $$matchAsDocument: - $$matchAsRoot: - ok: 1 - ismaster: true diff --git a/testdata/command-monitoring/logging/server-connection-id.json b/testdata/command-monitoring/logging/server-connection-id.json deleted file mode 100644 index abbbbc7442..0000000000 --- a/testdata/command-monitoring/logging/server-connection-id.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "description": "server-connection-id", - "schemaVersion": "1.13", - "runOnRequirements": [ - { - "minServerVersion": "4.2" - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "command": "debug" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-server-connection-id-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "logging-tests-collection" - } - } - ], - "initialData": [ - { - "databaseName": "logging-server-connection-id-tests", - "collectionName": "logging-tests-collection", - "documents": [] - } - ], - "tests": [ - { - "description": "command log messages include server connection id", - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "$or": true - } - }, - "expectError": { - "isError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "commandName": "insert", - "serverConnectionId": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "insert", - "serverConnectionId": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "commandName": "find", - "serverConnectionId": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command failed", - "commandName": "find", - "serverConnectionId": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/logging/server-connection-id.yml b/testdata/command-monitoring/logging/server-connection-id.yml deleted file mode 100644 index 4f54d1207e..0000000000 --- a/testdata/command-monitoring/logging/server-connection-id.yml +++ /dev/null @@ -1,66 +0,0 @@ -description: "server-connection-id" - -schemaVersion: "1.13" - -runOnRequirements: - - minServerVersion: "4.2" - -createEntities: - - client: - id: &client client - observeLogMessages: - command: debug - - database: - id: &database database - client: *client - databaseName: &databaseName logging-server-connection-id-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName logging-tests-collection - -initialData: - - databaseName: *databaseName - collectionName: *collectionName - documents: [] - -tests: - - description: "command log messages include server connection id" - operations: - - name: insertOne - object: *collection - arguments: - document: { x: 1 } - - name: find - object: *collection - arguments: - filter: { $or: true } - expectError: - isError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - commandName: insert - serverConnectionId: { $$type: [int, long] } - - level: debug - component: command - data: - message: "Command succeeded" - commandName: insert - serverConnectionId: { $$type: [int, long] } - - level: debug - component: command - data: - message: "Command started" - commandName: find - serverConnectionId: { $$type: [int, long] } - - level: debug - component: command - data: - message: "Command failed" - commandName: find - serverConnectionId: { $$type: [int, long] } diff --git a/testdata/command-monitoring/logging/service-id.json b/testdata/command-monitoring/logging/service-id.json deleted file mode 100644 index ea39d61231..0000000000 --- a/testdata/command-monitoring/logging/service-id.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "description": "service-id", - "schemaVersion": "1.13", - "createEntities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "command": "debug" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-server-connection-id-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "logging-tests-collection" - } - } - ], - "initialData": [ - { - "databaseName": "logging-server-connection-id-tests", - "collectionName": "logging-tests-collection", - "documents": [] - } - ], - "tests": [ - { - "description": "command log messages include serviceId when in LB mode", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ] - } - ], - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "$or": true - } - }, - "expectError": { - "isError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "commandName": "insert", - "serviceId": { - "$$type": "string" - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "insert", - "serviceId": { - "$$type": "string" - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "commandName": "find", - "serviceId": { - "$$type": "string" - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command failed", - "commandName": "find", - "serviceId": { - "$$type": "string" - } - } - } - ] - } - ] - }, - { - "description": "command log messages omit serviceId when not in LB mode", - "runOnRequirements": [ - { - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "$or": true - } - }, - "expectError": { - "isError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "commandName": "insert", - "serviceId": { - "$$exists": false - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "insert", - "serviceId": { - "$$exists": false - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "commandName": "find", - "serviceId": { - "$$exists": false - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command failed", - "commandName": "find", - "serviceId": { - "$$exists": false - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/logging/service-id.yml b/testdata/command-monitoring/logging/service-id.yml deleted file mode 100644 index 0c0f444e23..0000000000 --- a/testdata/command-monitoring/logging/service-id.yml +++ /dev/null @@ -1,111 +0,0 @@ -description: "service-id" - -schemaVersion: "1.13" - -createEntities: - - client: - id: &client client - observeLogMessages: - command: debug - - database: - id: &database database - client: *client - databaseName: &databaseName logging-server-connection-id-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName logging-tests-collection - -initialData: - - databaseName: *databaseName - collectionName: *collectionName - documents: [] - -tests: - - description: "command log messages include serviceId when in LB mode" - runOnRequirements: - - topologies: - - load-balanced - operations: - - name: insertOne - object: *collection - arguments: - document: { x: 1 } - - name: find - object: *collection - arguments: - filter: { $or: true } - expectError: - isError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - commandName: insert - serviceId: { $$type: string } - - level: debug - component: command - data: - message: "Command succeeded" - commandName: insert - serviceId: { $$type: string } - - level: debug - component: command - data: - message: "Command started" - commandName: find - serviceId: { $$type: string } - - level: debug - component: command - data: - message: "Command failed" - commandName: find - serviceId: { $$type: string } - - - description: "command log messages omit serviceId when not in LB mode" - runOnRequirements: - - topologies: - - single - - replicaset - - sharded - operations: - - name: insertOne - object: *collection - arguments: - document: { x: 1 } - - name: find - object: *collection - arguments: - filter: { $or: true } - expectError: - isError: true - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - commandName: insert - serviceId: { $$exists: false } - - level: debug - component: command - data: - message: "Command succeeded" - commandName: insert - serviceId: { $$exists: false } - - level: debug - component: command - data: - message: "Command started" - commandName: find - serviceId: { $$exists: false } - - level: debug - component: command - data: - message: "Command failed" - commandName: find - serviceId: { $$exists: false } diff --git a/testdata/command-monitoring/logging/unacknowledged-write.json b/testdata/command-monitoring/logging/unacknowledged-write.json deleted file mode 100644 index 21e247df66..0000000000 --- a/testdata/command-monitoring/logging/unacknowledged-write.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "description": "unacknowledged-write", - "schemaVersion": "1.13", - "createEntities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "command": "debug" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "logging-tests-collection", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "logging-tests-collection", - "databaseName": "logging-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ], - "tests": [ - { - "description": "An unacknowledged write generates a succeeded log message with ok: 1 reply", - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 2 - } - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "command", - "data": { - "message": "Command started", - "databaseName": "logging-tests", - "commandName": "insert", - "command": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "insert": "logging-tests-collection", - "$db": "logging-tests" - } - } - }, - "requestId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "command", - "data": { - "message": "Command succeeded", - "commandName": "insert", - "reply": { - "$$matchAsDocument": { - "ok": 1 - } - }, - "requestId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "durationMS": { - "$$type": [ - "double", - "int", - "long" - ] - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/logging/unacknowledged-write.yml b/testdata/command-monitoring/logging/unacknowledged-write.yml deleted file mode 100644 index e567788851..0000000000 --- a/testdata/command-monitoring/logging/unacknowledged-write.yml +++ /dev/null @@ -1,63 +0,0 @@ -description: "unacknowledged-write" - -schemaVersion: "1.13" - -createEntities: - - client: - id: &client client - observeLogMessages: - command: debug - - database: - id: &database database - client: *client - databaseName: &databaseName logging-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName logging-tests-collection - collectionOptions: - writeConcern: { w: 0 } - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1 } - -tests: - - description: "An unacknowledged write generates a succeeded log message with ok: 1 reply" - operations: - - name: insertOne - object: *collection - arguments: - document: { _id: 2 } - expectLogMessages: - - client: *client - messages: - - level: debug - component: command - data: - message: "Command started" - databaseName: *databaseName - commandName: insert - command: - $$matchAsDocument: - $$matchAsRoot: - insert: *collectionName - $db: *databaseName - requestId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: command - data: - message: "Command succeeded" - commandName: insert - reply: - $$matchAsDocument: - ok: 1 - requestId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - durationMS: { $$type: [double, int, long] } diff --git a/testdata/command-monitoring/pre-42-server-connection-id.json b/testdata/command-monitoring/pre-42-server-connection-id.json deleted file mode 100644 index 141fbe584f..0000000000 --- a/testdata/command-monitoring/pre-42-server-connection-id.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "description": "pre-42-server-connection-id", - "schemaVersion": "1.6", - "runOnRequirements": [ - { - "maxServerVersion": "4.0.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "server-connection-id-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ], - "initialData": [ - { - "databaseName": "server-connection-id-tests", - "collectionName": "coll", - "documents": [] - } - ], - "tests": [ - { - "description": "command events do not include server connection id", - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "$or": true - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "hasServerConnectionId": false - } - }, - { - "commandSucceededEvent": { - "commandName": "insert", - "hasServerConnectionId": false - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "hasServerConnectionId": false - } - }, - { - "commandFailedEvent": { - "commandName": "find", - "hasServerConnectionId": false - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/pre-42-server-connection-id.yml b/testdata/command-monitoring/pre-42-server-connection-id.yml deleted file mode 100644 index 483a8a3c19..0000000000 --- a/testdata/command-monitoring/pre-42-server-connection-id.yml +++ /dev/null @@ -1,56 +0,0 @@ -description: "pre-42-server-connection-id" - -schemaVersion: "1.6" - -runOnRequirements: - - maxServerVersion: "4.0.99" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName server-connection-id-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName coll - -initialData: - - databaseName: *databaseName - collectionName: *collectionName - documents: [] - -tests: - - description: "command events do not include server connection id" - operations: - - name: insertOne - object: *collection - arguments: - document: { x: 1 } - - name: find - object: *collection - arguments: - filter: { $or: true } - expectError: - isError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - hasServerConnectionId: false - - commandSucceededEvent: - commandName: insert - hasServerConnectionId: false - - commandStartedEvent: - commandName: find - hasServerConnectionId: false - - commandFailedEvent: - commandName: find - hasServerConnectionId: false diff --git a/testdata/command-monitoring/redacted-commands.json b/testdata/command-monitoring/redacted-commands.json deleted file mode 100644 index 4302ba8900..0000000000 --- a/testdata/command-monitoring/redacted-commands.json +++ /dev/null @@ -1,679 +0,0 @@ -{ - "description": "redacted-commands", - "schemaVersion": "1.5", - "runOnRequirements": [ - { - "minServerVersion": "5.0", - "auth": false - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent" - ], - "observeSensitiveCommands": true - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "command-monitoring-tests" - } - } - ], - "tests": [ - { - "description": "authenticate", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "authenticate", - "command": { - "authenticate": 1, - "mechanism": "MONGODB-X509", - "user": "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry", - "db": "$external" - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "authenticate", - "command": { - "authenticate": { - "$$exists": false - }, - "mechanism": { - "$$exists": false - }, - "user": { - "$$exists": false - }, - "db": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "saslStart", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "saslStart", - "command": { - "saslStart": 1, - "payload": "definitely-invalid-payload", - "db": "admin" - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "saslStart", - "command": { - "saslStart": { - "$$exists": false - }, - "payload": { - "$$exists": false - }, - "db": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "saslContinue", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "saslContinue", - "command": { - "saslContinue": 1, - "conversationId": 0, - "payload": "definitely-invalid-payload" - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "saslContinue", - "command": { - "saslContinue": { - "$$exists": false - }, - "conversationId": { - "$$exists": false - }, - "payload": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "getnonce", - "runOnRequirements": [ - { - "maxServerVersion": "6.1.99" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "getnonce", - "command": { - "getnonce": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "getnonce", - "command": { - "getnonce": { - "$$exists": false - } - } - } - }, - { - "commandSucceededEvent": { - "commandName": "getnonce", - "reply": { - "ok": { - "$$exists": false - }, - "nonce": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "createUser", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "createUser", - "command": { - "createUser": "private", - "pwd": {}, - "roles": [] - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "createUser", - "command": { - "createUser": { - "$$exists": false - }, - "pwd": { - "$$exists": false - }, - "roles": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "updateUser", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "updateUser", - "command": { - "updateUser": "private", - "pwd": {}, - "roles": [] - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "updateUser", - "command": { - "updateUser": { - "$$exists": false - }, - "pwd": { - "$$exists": false - }, - "roles": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "copydbgetnonce", - "runOnRequirements": [ - { - "maxServerVersion": "3.6.99" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "copydbgetnonce", - "command": { - "copydbgetnonce": "private" - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "copydbgetnonce", - "command": { - "copydbgetnonce": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "copydbsaslstart", - "runOnRequirements": [ - { - "maxServerVersion": "4.0.99" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "copydbsaslstart", - "command": { - "copydbsaslstart": "private" - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "copydbsaslstart", - "command": { - "copydbsaslstart": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "copydb", - "runOnRequirements": [ - { - "maxServerVersion": "4.0.99" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "copydb", - "command": { - "copydb": "private" - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "copydb", - "command": { - "copydb": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "hello with speculative authenticate", - "runOnRequirements": [ - { - "minServerVersion": "4.9" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "hello", - "command": { - "hello": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "hello", - "command": { - "hello": { - "$$exists": false - }, - "speculativeAuthenticate": { - "$$exists": false - } - } - } - }, - { - "commandSucceededEvent": { - "commandName": "hello", - "reply": { - "isWritablePrimary": { - "$$exists": false - }, - "speculativeAuthenticate": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "legacy hello with speculative authenticate", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "ismaster", - "command": { - "ismaster": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "isMaster", - "command": { - "isMaster": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "ismaster", - "command": { - "ismaster": { - "$$exists": false - }, - "speculativeAuthenticate": { - "$$exists": false - } - } - } - }, - { - "commandSucceededEvent": { - "commandName": "ismaster", - "reply": { - "ismaster": { - "$$exists": false - }, - "speculativeAuthenticate": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "isMaster", - "command": { - "isMaster": { - "$$exists": false - }, - "speculativeAuthenticate": { - "$$exists": false - } - } - } - }, - { - "commandSucceededEvent": { - "commandName": "isMaster", - "reply": { - "ismaster": { - "$$exists": false - }, - "speculativeAuthenticate": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "hello without speculative authenticate is not redacted", - "runOnRequirements": [ - { - "minServerVersion": "4.9" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "hello", - "command": { - "hello": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "hello", - "command": { - "hello": 1 - } - } - }, - { - "commandSucceededEvent": { - "commandName": "hello", - "reply": { - "isWritablePrimary": { - "$$exists": true - } - } - } - } - ] - } - ] - }, - { - "description": "legacy hello without speculative authenticate is not redacted", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "ismaster", - "command": { - "ismaster": 1 - } - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "isMaster", - "command": { - "isMaster": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "ismaster", - "command": { - "ismaster": 1 - } - } - }, - { - "commandSucceededEvent": { - "commandName": "ismaster", - "reply": { - "ismaster": { - "$$exists": true - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "isMaster", - "command": { - "isMaster": 1 - } - } - }, - { - "commandSucceededEvent": { - "commandName": "isMaster", - "reply": { - "ismaster": { - "$$exists": true - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/redacted-commands.yml b/testdata/command-monitoring/redacted-commands.yml deleted file mode 100644 index adeab99b18..0000000000 --- a/testdata/command-monitoring/redacted-commands.yml +++ /dev/null @@ -1,348 +0,0 @@ -description: "redacted-commands" - -schemaVersion: "1.5" - -runOnRequirements: - - minServerVersion: "5.0" - auth: false - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - commandSucceededEvent - observeSensitiveCommands: true - - database: - id: &database database - client: *client - databaseName: &databaseName command-monitoring-tests - -tests: - - description: "authenticate" - operations: - - name: runCommand - object: *database - arguments: - commandName: authenticate - command: - authenticate: 1 - mechanism: "MONGODB-X509" - user: "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry" - db: "$external" - # An authentication error is expected, but we want to check that the - # CommandStartedEvent is redacted - expectError: - isError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: authenticate - # We cannot simply assert that command is an empty document - # because it's at root-level, so we make a best effort to make - # sure sensitive fields are redacted. - command: - authenticate: { $$exists: false } - mechanism: { $$exists: false } - user: { $$exists: false } - db: { $$exists: false } - - - description: "saslStart" - operations: - - name: runCommand - object: *database - arguments: - commandName: saslStart - command: - saslStart: 1 - payload: "definitely-invalid-payload" - db: "admin" - expectError: - isError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: saslStart - command: - saslStart: { $$exists: false } - payload: { $$exists: false } - db: { $$exists: false } - - - description: "saslContinue" - operations: - - name: runCommand - object: *database - arguments: - commandName: saslContinue - command: - saslContinue: 1 - conversationId: 0 - payload: "definitely-invalid-payload" - expectError: - isError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: saslContinue - command: - saslContinue: { $$exists: false } - conversationId: { $$exists: false } - payload: { $$exists: false } - - - description: "getnonce" - runOnRequirements: - - maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007 - operations: - - name: runCommand - object: *database - arguments: - commandName: getnonce - command: - getnonce: 1 - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: getnonce - command: { getnonce: { $$exists: false } } - - commandSucceededEvent: - commandName: getnonce - reply: - ok: { $$exists: false } - nonce: { $$exists: false } - - - description: "createUser" - operations: - - name: runCommand - object: *database - arguments: - commandName: createUser - command: - createUser: "private" - # Passing an object is prohibited and we want to trigger a command - # failure - pwd: {} - roles: [] - expectError: - isError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: createUser - command: - createUser: { $$exists: false } - pwd: { $$exists: false } - roles: { $$exists: false } - - - description: "updateUser" - operations: - - name: runCommand - object: *database - arguments: - commandName: updateUser - command: - updateUser: "private" - pwd: {} - roles: [] - expectError: - isError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: updateUser - command: - updateUser: { $$exists: false } - pwd: { $$exists: false } - roles: { $$exists: false } - - - description: "copydbgetnonce" - runOnRequirements: - - maxServerVersion: 3.6.99 # copydbgetnonce was removed as of 4.0 via SERVER-32276 - operations: - - name: runCommand - object: *database - arguments: - commandName: copydbgetnonce - command: - copydbgetnonce: "private" - expectError: - isError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: copydbgetnonce - command: { copydbgetnonce: { $$exists: false } } - - - description: "copydbsaslstart" - runOnRequirements: - - maxServerVersion: 4.0.99 # copydbsaslstart was removed as of 4.2 via SERVER-36211 - operations: - - name: runCommand - object: *database - arguments: - commandName: copydbsaslstart - command: - copydbsaslstart: "private" - expectError: - isError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: copydbsaslstart - command: { copydbsaslstart: { $$exists: false } } - - - description: "copydb" - runOnRequirements: - - maxServerVersion: 4.0.99 # copydb was removed as of 4.2 via SERVER-36257 - operations: - - name: runCommand - object: *database - arguments: - commandName: copydb - command: - copydb: "private" - expectError: - isError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: copydb - command: { copydb: { $$exists: false } } - - - description: "hello with speculative authenticate" - runOnRequirements: - - minServerVersion: "4.9" - operations: - - name: runCommand - object: *database - arguments: - commandName: hello - command: - hello: 1 - speculativeAuthenticate: - saslStart: 1 - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: hello - command: - hello: { $$exists: false } - speculativeAuthenticate: { $$exists: false } - - commandSucceededEvent: - commandName: hello - reply: - # Even though authentication above fails and the reply does not - # contain sensitive information, we're expecting the reply to be - # redacted as well. - isWritablePrimary: { $$exists: false } - # This assertion will currently always hold true since we're - # not expecting successful authentication, in which case this - # field is missing anyways. - speculativeAuthenticate: { $$exists: false } - - - description: "legacy hello with speculative authenticate" - operations: - - name: runCommand - object: *database - arguments: - commandName: ismaster - command: - ismaster: 1 - speculativeAuthenticate: - saslStart: 1 - - name: runCommand - object: *database - arguments: - commandName: isMaster - command: - isMaster: 1 - speculativeAuthenticate: - saslStart: 1 - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: ismaster - command: - ismaster: { $$exists: false } - speculativeAuthenticate: { $$exists: false } - - commandSucceededEvent: - commandName: ismaster - reply: - ismaster: { $$exists: false } - speculativeAuthenticate: { $$exists: false } - - commandStartedEvent: - commandName: isMaster - command: - isMaster: { $$exists: false } - speculativeAuthenticate: { $$exists: false } - - commandSucceededEvent: - commandName: isMaster - reply: - ismaster: { $$exists: false } - speculativeAuthenticate: { $$exists: false } - - - description: "hello without speculative authenticate is not redacted" - runOnRequirements: - - minServerVersion: "4.9" - operations: - - name: runCommand - object: *database - arguments: - commandName: hello - command: - hello: 1 - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: hello - command: - hello: 1 - - commandSucceededEvent: - commandName: hello - reply: - isWritablePrimary: { $$exists: true } - - - description: "legacy hello without speculative authenticate is not redacted" - operations: - - name: runCommand - object: *database - arguments: - commandName: ismaster - command: - ismaster: 1 - - name: runCommand - object: *database - arguments: - commandName: isMaster - command: - isMaster: 1 - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: ismaster - command: - ismaster: 1 - - commandSucceededEvent: - commandName: ismaster - reply: - ismaster: { $$exists: true } - - commandStartedEvent: - commandName: isMaster - command: - isMaster: 1 - - commandSucceededEvent: - commandName: isMaster - reply: - ismaster: { $$exists: true } diff --git a/testdata/command-monitoring/server-connection-id.json b/testdata/command-monitoring/server-connection-id.json deleted file mode 100644 index a8f27637fc..0000000000 --- a/testdata/command-monitoring/server-connection-id.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "description": "server-connection-id", - "schemaVersion": "1.6", - "runOnRequirements": [ - { - "minServerVersion": "4.2" - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "server-connection-id-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "coll" - } - } - ], - "initialData": [ - { - "databaseName": "server-connection-id-tests", - "collectionName": "coll", - "documents": [] - } - ], - "tests": [ - { - "description": "command events include server connection id", - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "$or": true - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "hasServerConnectionId": true - } - }, - { - "commandSucceededEvent": { - "commandName": "insert", - "hasServerConnectionId": true - } - }, - { - "commandStartedEvent": { - "commandName": "find", - "hasServerConnectionId": true - } - }, - { - "commandFailedEvent": { - "commandName": "find", - "hasServerConnectionId": true - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/server-connection-id.yml b/testdata/command-monitoring/server-connection-id.yml deleted file mode 100644 index abd34dad6e..0000000000 --- a/testdata/command-monitoring/server-connection-id.yml +++ /dev/null @@ -1,56 +0,0 @@ -description: "server-connection-id" - -schemaVersion: "1.6" - -runOnRequirements: - - minServerVersion: "4.2" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName server-connection-id-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName coll - -initialData: - - databaseName: *databaseName - collectionName: *collectionName - documents: [] - -tests: - - description: "command events include server connection id" - operations: - - name: insertOne - object: *collection - arguments: - document: { x: 1 } - - name: find - object: *collection - arguments: - filter: { $or: true } - expectError: - isError: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: insert - hasServerConnectionId: true - - commandSucceededEvent: - commandName: insert - hasServerConnectionId: true - - commandStartedEvent: - commandName: find - hasServerConnectionId: true - - commandFailedEvent: - commandName: find - hasServerConnectionId: true diff --git a/testdata/command-monitoring/unacknowledged-client-bulkWrite.json b/testdata/command-monitoring/unacknowledged-client-bulkWrite.json deleted file mode 100644 index 61bb00726c..0000000000 --- a/testdata/command-monitoring/unacknowledged-client-bulkWrite.json +++ /dev/null @@ -1,220 +0,0 @@ -{ - "description": "unacknowledged-client-bulkWrite", - "schemaVersion": "1.7", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ], - "uriOptions": { - "w": 0 - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "command-monitoring-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "command-monitoring-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "command-monitoring-tests.test" - }, - "tests": [ - { - "description": "A successful mixed client bulkWrite", - "operations": [ - { - "object": "client", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "command-monitoring-tests.test", - "document": { - "_id": 4, - "x": 44 - } - } - }, - { - "updateOne": { - "namespace": "command-monitoring-tests.test", - "filter": { - "_id": 3 - }, - "update": { - "$set": { - "x": 333 - } - } - } - } - ], - "ordered": false - }, - "expectResult": { - "insertedCount": { - "$$unsetOrMatches": 0 - }, - "upsertedCount": { - "$$unsetOrMatches": 0 - }, - "matchedCount": { - "$$unsetOrMatches": 0 - }, - "modifiedCount": { - "$$unsetOrMatches": 0 - }, - "deletedCount": { - "$$unsetOrMatches": 0 - }, - "insertResults": { - "$$unsetOrMatches": {} - }, - "updateResults": { - "$$unsetOrMatches": {} - }, - "deleteResults": { - "$$unsetOrMatches": {} - } - } - }, - { - "object": "collection", - "name": "find", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 333 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectEvents": [ - { - "client": "client", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": true, - "ordered": false, - "ops": [ - { - "insert": 0, - "document": { - "_id": 4, - "x": 44 - } - }, - { - "update": 0, - "filter": { - "_id": 3 - }, - "updateMods": { - "$set": { - "x": 333 - } - }, - "multi": false - } - ], - "nsInfo": [ - { - "ns": "command-monitoring-tests.test" - } - ] - } - } - }, - { - "commandSucceededEvent": { - "commandName": "bulkWrite", - "reply": { - "ok": 1, - "nInserted": { - "$$exists": false - }, - "nMatched": { - "$$exists": false - }, - "nModified": { - "$$exists": false - }, - "nUpserted": { - "$$exists": false - }, - "nDeleted": { - "$$exists": false - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/unacknowledged-client-bulkWrite.yml b/testdata/command-monitoring/unacknowledged-client-bulkWrite.yml deleted file mode 100644 index 2d54525953..0000000000 --- a/testdata/command-monitoring/unacknowledged-client-bulkWrite.yml +++ /dev/null @@ -1,111 +0,0 @@ -description: "unacknowledged-client-bulkWrite" - -schemaVersion: "1.7" - -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid - -createEntities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - uriOptions: - w: 0 - - database: - id: &database database - client: *client - databaseName: &databaseName command-monitoring-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -_yamlAnchors: - namespace: &namespace "command-monitoring-tests.test" - -tests: - - description: 'A successful mixed client bulkWrite' - operations: - - object: *client - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 4, x: 44 } - - updateOne: - namespace: *namespace - filter: { _id: 3 } - update: { $set: { x: 333 } } - ordered: false - expectResult: - insertedCount: - $$unsetOrMatches: 0 - upsertedCount: - $$unsetOrMatches: 0 - matchedCount: - $$unsetOrMatches: 0 - modifiedCount: - $$unsetOrMatches: 0 - deletedCount: - $$unsetOrMatches: 0 - insertResults: - $$unsetOrMatches: {} - updateResults: - $$unsetOrMatches: {} - deleteResults: - $$unsetOrMatches: {} - # Force completion of the w:0 write by executing a find on the same connection - - object: *collection - name: find - arguments: - filter: {} - expectResult: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 333 } - - { _id: 4, x: 44 } - - expectEvents: - - - client: *client - ignoreExtraEvents: true - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: true - ordered: false - ops: - - insert: 0 - document: { _id: 4, x: 44 } - - update: 0 - filter: { _id: 3 } - updateMods: { $set: { x: 333 } } - multi: false - nsInfo: - - ns: *namespace - - commandSucceededEvent: - commandName: bulkWrite - reply: - ok: 1 - nInserted: { $$exists: false } - nMatched: { $$exists: false } - nModified: { $$exists: false } - nUpserted: { $$exists: false } - nDeleted: { $$exists: false } diff --git a/testdata/command-monitoring/unacknowledgedBulkWrite.json b/testdata/command-monitoring/unacknowledgedBulkWrite.json deleted file mode 100644 index 61bb00726c..0000000000 --- a/testdata/command-monitoring/unacknowledgedBulkWrite.json +++ /dev/null @@ -1,220 +0,0 @@ -{ - "description": "unacknowledged-client-bulkWrite", - "schemaVersion": "1.7", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ], - "uriOptions": { - "w": 0 - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "command-monitoring-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "command-monitoring-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "command-monitoring-tests.test" - }, - "tests": [ - { - "description": "A successful mixed client bulkWrite", - "operations": [ - { - "object": "client", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "command-monitoring-tests.test", - "document": { - "_id": 4, - "x": 44 - } - } - }, - { - "updateOne": { - "namespace": "command-monitoring-tests.test", - "filter": { - "_id": 3 - }, - "update": { - "$set": { - "x": 333 - } - } - } - } - ], - "ordered": false - }, - "expectResult": { - "insertedCount": { - "$$unsetOrMatches": 0 - }, - "upsertedCount": { - "$$unsetOrMatches": 0 - }, - "matchedCount": { - "$$unsetOrMatches": 0 - }, - "modifiedCount": { - "$$unsetOrMatches": 0 - }, - "deletedCount": { - "$$unsetOrMatches": 0 - }, - "insertResults": { - "$$unsetOrMatches": {} - }, - "updateResults": { - "$$unsetOrMatches": {} - }, - "deleteResults": { - "$$unsetOrMatches": {} - } - } - }, - { - "object": "collection", - "name": "find", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 333 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectEvents": [ - { - "client": "client", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": true, - "ordered": false, - "ops": [ - { - "insert": 0, - "document": { - "_id": 4, - "x": 44 - } - }, - { - "update": 0, - "filter": { - "_id": 3 - }, - "updateMods": { - "$set": { - "x": 333 - } - }, - "multi": false - } - ], - "nsInfo": [ - { - "ns": "command-monitoring-tests.test" - } - ] - } - } - }, - { - "commandSucceededEvent": { - "commandName": "bulkWrite", - "reply": { - "ok": 1, - "nInserted": { - "$$exists": false - }, - "nMatched": { - "$$exists": false - }, - "nModified": { - "$$exists": false - }, - "nUpserted": { - "$$exists": false - }, - "nDeleted": { - "$$exists": false - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/unacknowledgedBulkWrite.yml b/testdata/command-monitoring/unacknowledgedBulkWrite.yml deleted file mode 100644 index 2d54525953..0000000000 --- a/testdata/command-monitoring/unacknowledgedBulkWrite.yml +++ /dev/null @@ -1,111 +0,0 @@ -description: "unacknowledged-client-bulkWrite" - -schemaVersion: "1.7" - -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid - -createEntities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - uriOptions: - w: 0 - - database: - id: &database database - client: *client - databaseName: &databaseName command-monitoring-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -_yamlAnchors: - namespace: &namespace "command-monitoring-tests.test" - -tests: - - description: 'A successful mixed client bulkWrite' - operations: - - object: *client - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 4, x: 44 } - - updateOne: - namespace: *namespace - filter: { _id: 3 } - update: { $set: { x: 333 } } - ordered: false - expectResult: - insertedCount: - $$unsetOrMatches: 0 - upsertedCount: - $$unsetOrMatches: 0 - matchedCount: - $$unsetOrMatches: 0 - modifiedCount: - $$unsetOrMatches: 0 - deletedCount: - $$unsetOrMatches: 0 - insertResults: - $$unsetOrMatches: {} - updateResults: - $$unsetOrMatches: {} - deleteResults: - $$unsetOrMatches: {} - # Force completion of the w:0 write by executing a find on the same connection - - object: *collection - name: find - arguments: - filter: {} - expectResult: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 333 } - - { _id: 4, x: 44 } - - expectEvents: - - - client: *client - ignoreExtraEvents: true - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: true - ordered: false - ops: - - insert: 0 - document: { _id: 4, x: 44 } - - update: 0 - filter: { _id: 3 } - updateMods: { $set: { x: 333 } } - multi: false - nsInfo: - - ns: *namespace - - commandSucceededEvent: - commandName: bulkWrite - reply: - ok: 1 - nInserted: { $$exists: false } - nMatched: { $$exists: false } - nModified: { $$exists: false } - nUpserted: { $$exists: false } - nDeleted: { $$exists: false } diff --git a/testdata/command-monitoring/updateMany.json b/testdata/command-monitoring/updateMany.json deleted file mode 100644 index b15434226c..0000000000 --- a/testdata/command-monitoring/updateMany.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "description": "updateMany", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "command-monitoring-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "command-monitoring-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "A successful updateMany", - "operations": [ - { - "name": "updateMany", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "upsert": { - "$$unsetOrMatches": false - }, - "multi": true - } - ], - "ordered": true - }, - "commandName": "update", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 2 - }, - "commandName": "update" - } - } - ] - } - ] - }, - { - "description": "A successful updateMany with write errors", - "operations": [ - { - "name": "updateMany", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$unsupported": { - "x": 1 - } - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$unsupported": { - "x": 1 - } - }, - "upsert": { - "$$unsetOrMatches": false - }, - "multi": true - } - ], - "ordered": true - }, - "commandName": "update", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 0, - "writeErrors": { - "$$type": "array" - } - }, - "commandName": "update" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/updateMany.yml b/testdata/command-monitoring/updateMany.yml deleted file mode 100644 index 244bad94f6..0000000000 --- a/testdata/command-monitoring/updateMany.yml +++ /dev/null @@ -1,87 +0,0 @@ -description: "updateMany" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName command-monitoring-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "A successful updateMany" - operations: - - name: updateMany - object: *collection - arguments: - filter: { _id: { $gt: 1 } } - update: { $inc: { x: 1 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: { $gt: 1 } } - u: { $inc: { x: 1 } } - upsert: { $$unsetOrMatches: false } - multi: true - ordered: true - commandName: update - databaseName: *databaseName - - commandSucceededEvent: - reply: { ok: 1, n: 2 } - commandName: update - - - description: "A successful updateMany with write errors" - operations: - - name: updateMany - object: *collection - arguments: - filter: { _id: { $gt: 1 } } - update: { $unsupported: { x: 1 } } - expectError: - isClientError: false - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: { $gt: 1 } } - u: { $unsupported: { x: 1 } } - upsert: { $$unsetOrMatches: false } - multi: true - ordered: true - commandName: update - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - n: 0 - # The legacy version of this test included an assertion that writeErrors contained a single document - # with index=0, a "code" value, and a non-empty "errmsg". However, writeErrors can contain extra fields - # beyond these, and the unified format currently does not permit allowing extra fields in sub-documents, - # so those assertions are not present here. - writeErrors: { $$type: array } - commandName: update diff --git a/testdata/command-monitoring/updateOne.json b/testdata/command-monitoring/updateOne.json deleted file mode 100644 index a0ae99e88d..0000000000 --- a/testdata/command-monitoring/updateOne.json +++ /dev/null @@ -1,260 +0,0 @@ -{ - "description": "updateOne", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "command-monitoring-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "command-monitoring-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "A successful updateOne", - "operations": [ - { - "name": "updateOne", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "upsert": { - "$$unsetOrMatches": false - }, - "multi": { - "$$unsetOrMatches": false - } - } - ], - "ordered": true - }, - "commandName": "update", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 1 - }, - "commandName": "update" - } - } - ] - } - ] - }, - { - "description": "A successful updateOne with upsert where the upserted id is not an ObjectId", - "operations": [ - { - "name": "updateOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "upsert": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 4 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "upsert": true, - "multi": { - "$$unsetOrMatches": false - } - } - ], - "ordered": true - }, - "commandName": "update", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 1, - "upserted": [ - { - "index": 0, - "_id": 4 - } - ] - }, - "commandName": "update" - } - } - ] - } - ] - }, - { - "description": "A successful updateOne with write errors", - "operations": [ - { - "name": "updateOne", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$unsupported": { - "x": 1 - } - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$unsupported": { - "x": 1 - } - }, - "upsert": { - "$$unsetOrMatches": false - }, - "multi": { - "$$unsetOrMatches": false - } - } - ], - "ordered": true - }, - "commandName": "update", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 0, - "writeErrors": { - "$$type": "array" - } - }, - "commandName": "update" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/command-monitoring/updateOne.yml b/testdata/command-monitoring/updateOne.yml deleted file mode 100644 index 7abc7bae00..0000000000 --- a/testdata/command-monitoring/updateOne.yml +++ /dev/null @@ -1,118 +0,0 @@ -description: "updateOne" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName command-monitoring-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "A successful updateOne" - operations: - - name: updateOne - object: *collection - arguments: - filter: { _id: { $gt: 1 } } - update: { $inc: { x: 1 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: { $gt: 1 } } - u: { $inc: { x: 1 } } - upsert: { $$unsetOrMatches: false } - multi: { $$unsetOrMatches: false } - ordered: true - commandName: update - databaseName: *databaseName - - commandSucceededEvent: - reply: { ok: 1, n: 1 } - commandName: update - - - description: "A successful updateOne with upsert where the upserted id is not an ObjectId" - operations: - - name: updateOne - object: *collection - arguments: - filter: { _id: 4 } - update: { $inc: { x: 1 } } - upsert: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: 4 } - u: { $inc: { x: 1 } } - upsert: true - multi: { $$unsetOrMatches: false } - ordered: true - commandName: update - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - n: 1 - upserted: - - index: 0 - _id: 4 - commandName: update - - - description: "A successful updateOne with write errors" - operations: - - name: updateOne - object: *collection - arguments: - filter: { _id: { $gt: 1 } } - update: { $unsupported: { x: 1 } } - expectError: - isClientError: false - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: { $gt: 1 } } - u: { $unsupported: { x: 1 } } - upsert: { $$unsetOrMatches: false } - multi: { $$unsetOrMatches: false } - ordered: true - commandName: update - databaseName: *databaseName - - commandSucceededEvent: - reply: - ok: 1 - n: 0 - # The legacy version of this test included an assertion that writeErrors contained a single document - # with index=0, a "code" value, and a non-empty "errmsg". However, writeErrors can contain extra fields - # beyond these, and the unified format currently does not permit allowing extra fields in sub-documents, - # so those assertions are not present here. - writeErrors: { $$type: array } - commandName: update diff --git a/testdata/connection-monitoring-and-pooling/connection-must-have-id.json b/testdata/connection-monitoring-and-pooling/connection-must-have-id.json deleted file mode 100644 index f2d6fb95e9..0000000000 --- a/testdata/connection-monitoring-and-pooling/connection-must-have-id.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must have an ID number associated with it", - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut" - }, - { - "name": "checkOut" - } - ], - "events": [ - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCreated", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCreated", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolCreated", - "ConnectionPoolReady", - "ConnectionPoolClosed", - "ConnectionReady" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/connection-must-have-id.yml b/testdata/connection-monitoring-and-pooling/connection-must-have-id.yml deleted file mode 100644 index b4a2cd3440..0000000000 --- a/testdata/connection-monitoring-and-pooling/connection-must-have-id.yml +++ /dev/null @@ -1,29 +0,0 @@ -version: 1 -style: unit -description: must have an ID number associated with it -operations: - - name: ready - - name: checkOut - - name: checkOut -events: - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCreated - connectionId: 42 - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCreated - connectionId: 42 - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 -ignore: - - ConnectionPoolCreated - - ConnectionPoolReady - - ConnectionPoolClosed - - ConnectionReady diff --git a/testdata/connection-monitoring-and-pooling/connection-must-order-ids.json b/testdata/connection-monitoring-and-pooling/connection-must-order-ids.json deleted file mode 100644 index b7c2751dd7..0000000000 --- a/testdata/connection-monitoring-and-pooling/connection-must-order-ids.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must have IDs assigned in order of creation", - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut" - }, - { - "name": "checkOut" - } - ], - "events": [ - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCreated", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCreated", - "connectionId": 2, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 2, - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolCreated", - "ConnectionPoolReady", - "ConnectionPoolClosed", - "ConnectionReady" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/connection-must-order-ids.yml b/testdata/connection-monitoring-and-pooling/connection-must-order-ids.yml deleted file mode 100644 index 3e352e7160..0000000000 --- a/testdata/connection-monitoring-and-pooling/connection-must-order-ids.yml +++ /dev/null @@ -1,29 +0,0 @@ -version: 1 -style: unit -description: must have IDs assigned in order of creation -operations: - - name: ready - - name: checkOut - - name: checkOut -events: - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCreated - connectionId: 1 - address: 42 - - type: ConnectionCheckedOut - connectionId: 1 - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCreated - connectionId: 2 - address: 42 - - type: ConnectionCheckedOut - connectionId: 2 - address: 42 -ignore: - - ConnectionPoolCreated - - ConnectionPoolReady - - ConnectionPoolClosed - - ConnectionReady diff --git a/testdata/connection-monitoring-and-pooling/logging/connection-logging.json b/testdata/connection-monitoring-and-pooling/logging/connection-logging.json deleted file mode 100644 index 3186f2be98..0000000000 --- a/testdata/connection-monitoring-and-pooling/logging/connection-logging.json +++ /dev/null @@ -1,525 +0,0 @@ -{ - "description": "connection-logging", - "schemaVersion": "1.13", - "runOnRequirements": [ - { - "topologies": [ - "single" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "failPointClient" - } - } - ], - "tests": [ - { - "description": "Create a client, run a command, and close the client", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "connection": "debug" - } - } - } - ] - } - }, - { - "name": "listDatabases", - "object": "client", - "arguments": { - "filter": {} - } - }, - { - "name": "close", - "object": "client" - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool created", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool ready", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection checkout started", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection created", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection ready", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "durationMS": { - "$$type": [ - "double", - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection checked out", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "durationMS": { - "$$type": [ - "double", - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection checked in", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection checkout started", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection checked out", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "durationMS": { - "$$type": [ - "double", - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection checked in", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection closed", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "reason": "Connection pool was closed" - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool closed", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - }, - { - "description": "Connection checkout fails due to error establishing connection", - "runOnRequirements": [ - { - "auth": true, - "minServerVersion": "4.0" - } - ], - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "retryReads": false, - "appname": "clientAppName", - "heartbeatFrequencyMS": 10000 - }, - "observeLogMessages": { - "connection": "debug" - } - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "saslContinue" - ], - "closeConnection": true, - "appName": "clientAppName" - } - } - } - }, - { - "name": "listDatabases", - "object": "client", - "arguments": { - "filter": {} - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool created", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool ready", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection checkout started", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection created", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool cleared", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "unordered": true, - "data": { - "message": "Connection closed", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "reason": "An error occurred while using the connection", - "error": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "connection", - "unordered": true, - "data": { - "message": "Connection checkout failed", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "reason": "An error occurred while trying to establish a new connection", - "error": { - "$$exists": true - }, - "durationMS": { - "$$type": [ - "double", - "int", - "long" - ] - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/connection-monitoring-and-pooling/logging/connection-logging.yml b/testdata/connection-monitoring-and-pooling/logging/connection-logging.yml deleted file mode 100644 index 61d9ed3297..0000000000 --- a/testdata/connection-monitoring-and-pooling/logging/connection-logging.yml +++ /dev/null @@ -1,226 +0,0 @@ -description: "connection-logging" - -schemaVersion: "1.13" - -runOnRequirements: - - topologies: - - single # The number of log messages is different for each topology since there is a connection pool per host. - -createEntities: - - client: - id: &failPointClient failPointClient - -tests: - - description: "Create a client, run a command, and close the client" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeLogMessages: - connection: debug - - name: listDatabases - object: *client - arguments: - filter: {} - - name: close - object: *client - expectLogMessages: - - client: *client - messages: - - level: debug - component: connection - data: - message: "Connection pool created" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection pool ready" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection checkout started" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection created" - driverConnectionId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection ready" - driverConnectionId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - durationMS: { $$type: [double, int, long] } - - - level: debug - component: connection - data: - message: "Connection checked out" - driverConnectionId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - durationMS: { $$type: [double, int, long] } - - - level: debug - component: connection - data: - message: "Connection checked in" - driverConnectionId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - # The next three expected logs are for ending a session. - - level: debug - component: connection - data: - message: "Connection checkout started" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection checked out" - driverConnectionId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - durationMS: { $$type: [double, int, long] } - - - level: debug - component: connection - data: - message: "Connection checked in" - driverConnectionId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection closed" - driverConnectionId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - reason: "Connection pool was closed" - - - level: debug - component: connection - data: - message: "Connection pool closed" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - # This test exists to provide coverage of checkout failed and pool cleared events. - - description: "Connection checkout fails due to error establishing connection" - runOnRequirements: - - auth: true - minServerVersion: "4.0" # failCommand was added to mongod in 4.0 - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - uriOptions: - retryReads: false - appname: &clientAppName clientAppName - # use a high heartbeatFrequencyMS to avoid a successful monitor check marking the pool as - # ready (and emitting another event) during the course of test execution. - heartbeatFrequencyMS: 10000 - observeLogMessages: - connection: debug - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["saslContinue"] - closeConnection: true - appName: *clientAppName - - name: listDatabases - object: *client - arguments: - filter: {} - expectError: - isClientError: true - - expectLogMessages: - - client: *client - messages: - - level: debug - component: connection - data: - message: "Connection pool created" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection pool ready" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection checkout started" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection created" - driverConnectionId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection pool cleared" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection closed" - driverConnectionId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - reason: "An error occurred while using the connection" - error: { $$exists: true } - unordered: true - - - level: debug - component: connection - data: - message: "Connection checkout failed" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - reason: "An error occurred while trying to establish a new connection" - error: { $$exists: true } - durationMS: { $$type: [double, int, long] } - unordered: true diff --git a/testdata/connection-monitoring-and-pooling/logging/connection-pool-options.json b/testdata/connection-monitoring-and-pooling/logging/connection-pool-options.json deleted file mode 100644 index 7055a54869..0000000000 --- a/testdata/connection-monitoring-and-pooling/logging/connection-pool-options.json +++ /dev/null @@ -1,458 +0,0 @@ -{ - "description": "connection-pool-options", - "schemaVersion": "1.13", - "runOnRequirements": [ - { - "topologies": [ - "single" - ] - } - ], - "tests": [ - { - "description": "Options should be included in connection pool created message when specified", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "connectionReadyEvent" - ], - "observeLogMessages": { - "connection": "debug" - }, - "uriOptions": { - "minPoolSize": 1, - "maxPoolSize": 5, - "maxIdleTimeMS": 10000 - } - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "connectionReadyEvent": {} - }, - "count": 1 - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool created", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "minPoolSize": 1, - "maxPoolSize": 5, - "maxIdleTimeMS": 10000 - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool ready", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection created", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection ready", - "driverConnectionId": { - "$$type": [ - "int", - "long" - ] - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "durationMS": { - "$$type": [ - "double", - "int", - "long" - ] - } - } - } - ] - } - ] - }, - { - "description": "maxConnecting should be included in connection pool created message when specified", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "poolReadyEvent" - ], - "observeLogMessages": { - "connection": "debug" - }, - "uriOptions": { - "maxConnecting": 5 - } - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolReadyEvent": {} - }, - "count": 1 - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool created", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "maxConnecting": 5 - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool ready", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - }, - { - "description": "waitQueueTimeoutMS should be included in connection pool created message when specified", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "poolReadyEvent" - ], - "observeLogMessages": { - "connection": "debug" - }, - "uriOptions": { - "waitQueueTimeoutMS": 10000 - } - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolReadyEvent": {} - }, - "count": 1 - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool created", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "waitQueueTimeoutMS": 10000 - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool ready", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - }, - { - "description": "waitQueueSize should be included in connection pool created message when specified", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "poolReadyEvent" - ], - "observeLogMessages": { - "connection": "debug" - }, - "uriOptions": { - "waitQueueSize": 100 - } - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolReadyEvent": {} - }, - "count": 1 - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool created", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "waitQueueSize": 100 - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool ready", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - }, - { - "description": "waitQueueMultiple should be included in connection pool created message when specified", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "poolReadyEvent" - ], - "observeLogMessages": { - "connection": "debug" - }, - "uriOptions": { - "waitQueueSize": 5 - } - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolReadyEvent": {} - }, - "count": 1 - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool created", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "waitQueueMultiple": 5 - } - }, - { - "level": "debug", - "component": "connection", - "data": { - "message": "Connection pool ready", - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/connection-monitoring-and-pooling/logging/connection-pool-options.yml b/testdata/connection-monitoring-and-pooling/logging/connection-pool-options.yml deleted file mode 100644 index 790dab6fed..0000000000 --- a/testdata/connection-monitoring-and-pooling/logging/connection-pool-options.yml +++ /dev/null @@ -1,254 +0,0 @@ -description: "connection-pool-options" - -schemaVersion: "1.13" - -runOnRequirements: - - topologies: - - single # The number of log messages is different for each topology since there is a connection pool per host. - -tests: - - description: "Options should be included in connection pool created message when specified" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - # Observe and wait on a connection ready event for the connection created in the background. - # This is to avoid raciness around whether the background thread has created the connection - # (and whether corresponding log messages have been generated) by the time log message assertions - # are made. - observeEvents: - - connectionReadyEvent - observeLogMessages: - connection: debug - uriOptions: - minPoolSize: 1 - maxPoolSize: 5 - maxIdleTimeMS: 10000 - - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - connectionReadyEvent: {} - count: 1 - - expectLogMessages: - - client: *client - messages: - - level: debug - component: connection - data: - message: "Connection pool created" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - minPoolSize: 1 - maxPoolSize: 5 - maxIdleTimeMS: 10000 - - - level: debug - component: connection - data: - message: "Connection pool ready" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection created" - driverConnectionId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - level: debug - component: connection - data: - message: "Connection ready" - driverConnectionId: { $$type: [int, long] } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - durationMS: { $$type: [double, int, long] } - - # Drivers who have not done DRIVERS-1943 will need to skip this test. - - description: "maxConnecting should be included in connection pool created message when specified" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - # Observe and wait for a poolReadyEvent so we can ensure the pool has been created and is - # ready by the time we assert on log messages, in order to avoid raciness around which messages - # are emitted. - observeEvents: - - poolReadyEvent - observeLogMessages: - connection: debug - uriOptions: - maxConnecting: 5 - - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolReadyEvent: {} - count: 1 - - expectLogMessages: - - client: *client - messages: - - level: debug - component: connection - data: - message: "Connection pool created" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - maxConnecting: 5 - - - level: debug - component: connection - data: - message: "Connection pool ready" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - # Drivers that do not support waitQueueTimeoutMS will need to skip this test. - - description: "waitQueueTimeoutMS should be included in connection pool created message when specified" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - # Observe and wait for a poolReadyEvent so we can ensure the pool has been created and is - # ready by the time we assert on log messages, in order to avoid raciness around which messages - # are emitted. - observeEvents: - - poolReadyEvent - observeLogMessages: - connection: debug - uriOptions: - waitQueueTimeoutMS: 10000 - - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolReadyEvent: {} - count: 1 - - expectLogMessages: - - client: *client - messages: - - level: debug - component: connection - data: - message: "Connection pool created" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - waitQueueTimeoutMS: 10000 - - - level: debug - component: connection - data: - message: "Connection pool ready" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - # Drivers that do not support waitQueueSize will need to skip this test. - - description: "waitQueueSize should be included in connection pool created message when specified" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - # Observe and wait for a poolReadyEvent so we can ensure the pool has been created and is - # ready by the time we assert on log messages, in order to avoid raciness around which messages - # are emitted. - observeEvents: - - poolReadyEvent - observeLogMessages: - connection: debug - uriOptions: - waitQueueSize: 100 - - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolReadyEvent: {} - count: 1 - - expectLogMessages: - - client: *client - messages: - - level: debug - component: connection - data: - message: "Connection pool created" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - waitQueueSize: 100 - - - level: debug - component: connection - data: - message: "Connection pool ready" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - # Drivers that do not support waitQueueMultiple will need to skip this test. - - description: "waitQueueMultiple should be included in connection pool created message when specified" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - # Observe and wait for a poolReadyEvent so we can ensure the pool has been created and is - # ready by the time we assert on log messages, in order to avoid raciness around which messages - # are emitted. - observeEvents: - - poolReadyEvent - observeLogMessages: - connection: debug - uriOptions: - waitQueueSize: 5 - - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolReadyEvent: {} - count: 1 - - expectLogMessages: - - client: *client - messages: - - level: debug - component: connection - data: - message: "Connection pool created" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - waitQueueMultiple: 5 - - - level: debug - component: connection - data: - message: "Connection pool ready" - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } diff --git a/testdata/connection-monitoring-and-pooling/pool-checkin-destroy-closed.json b/testdata/connection-monitoring-and-pooling/pool-checkin-destroy-closed.json deleted file mode 100644 index 55d0c03752..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkin-destroy-closed.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must destroy checked in connection if pool has been closed", - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut", - "label": "conn" - }, - { - "name": "close" - }, - { - "name": "checkIn", - "connection": "conn" - } - ], - "events": [ - { - "type": "ConnectionCheckedOut", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionPoolClosed", - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionClosed", - "connectionId": 1, - "reason": "poolClosed", - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolCreated", - "ConnectionPoolReady", - "ConnectionCreated", - "ConnectionReady", - "ConnectionCheckOutStarted" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkin-destroy-closed.yml b/testdata/connection-monitoring-and-pooling/pool-checkin-destroy-closed.yml deleted file mode 100644 index cd6f6bb27c..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkin-destroy-closed.yml +++ /dev/null @@ -1,29 +0,0 @@ -version: 1 -style: unit -description: must destroy checked in connection if pool has been closed -operations: - - name: ready - - name: checkOut - label: conn - - name: close - - name: checkIn - connection: conn -events: - - type: ConnectionCheckedOut - connectionId: 1 - address: 42 - - type: ConnectionPoolClosed - address: 42 - - type: ConnectionCheckedIn - connectionId: 1 - address: 42 - - type: ConnectionClosed - connectionId: 1 - reason: poolClosed - address: 42 -ignore: - - ConnectionPoolCreated - - ConnectionPoolReady - - ConnectionCreated - - ConnectionReady - - ConnectionCheckOutStarted diff --git a/testdata/connection-monitoring-and-pooling/pool-checkin-destroy-stale.json b/testdata/connection-monitoring-and-pooling/pool-checkin-destroy-stale.json deleted file mode 100644 index 6ffb8f53d1..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkin-destroy-stale.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must destroy checked in connection if it is stale", - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut", - "label": "conn" - }, - { - "name": "clear" - }, - { - "name": "checkIn", - "connection": "conn" - } - ], - "events": [ - { - "type": "ConnectionCheckedOut", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionPoolCleared", - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionClosed", - "connectionId": 1, - "reason": "stale", - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolCreated", - "ConnectionPoolReady", - "ConnectionCreated", - "ConnectionReady", - "ConnectionCheckOutStarted" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkin-destroy-stale.yml b/testdata/connection-monitoring-and-pooling/pool-checkin-destroy-stale.yml deleted file mode 100644 index f54ae7675d..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkin-destroy-stale.yml +++ /dev/null @@ -1,29 +0,0 @@ -version: 1 -style: unit -description: must destroy checked in connection if it is stale -operations: - - name: ready - - name: checkOut - label: conn - - name: clear - - name: checkIn - connection: conn -events: - - type: ConnectionCheckedOut - connectionId: 1 - address: 42 - - type: ConnectionPoolCleared - address: 42 - - type: ConnectionCheckedIn - connectionId: 1 - address: 42 - - type: ConnectionClosed - connectionId: 1 - reason: stale - address: 42 -ignore: - - ConnectionPoolCreated - - ConnectionPoolReady - - ConnectionCreated - - ConnectionReady - - ConnectionCheckOutStarted diff --git a/testdata/connection-monitoring-and-pooling/pool-checkin-make-available.json b/testdata/connection-monitoring-and-pooling/pool-checkin-make-available.json deleted file mode 100644 index 41c522ae67..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkin-make-available.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must make valid checked in connection available", - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut", - "label": "conn" - }, - { - "name": "checkIn", - "connection": "conn" - }, - { - "name": "checkOut" - } - ], - "events": [ - { - "type": "ConnectionCheckedOut", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 1, - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolCreated", - "ConnectionPoolReady", - "ConnectionCreated", - "ConnectionReady", - "ConnectionCheckOutStarted" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkin-make-available.yml b/testdata/connection-monitoring-and-pooling/pool-checkin-make-available.yml deleted file mode 100644 index 5179432788..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkin-make-available.yml +++ /dev/null @@ -1,26 +0,0 @@ -version: 1 -style: unit -description: must make valid checked in connection available -operations: - - name: ready - - name: checkOut - label: conn - - name: checkIn - connection: conn - - name: checkOut -events: - - type: ConnectionCheckedOut - connectionId: 1 - address: 42 - - type: ConnectionCheckedIn - connectionId: 1 - address: 42 - - type: ConnectionCheckedOut - connectionId: 1 - address: 42 -ignore: - - ConnectionPoolCreated - - ConnectionPoolReady - - ConnectionCreated - - ConnectionReady - - ConnectionCheckOutStarted diff --git a/testdata/connection-monitoring-and-pooling/pool-checkin.json b/testdata/connection-monitoring-and-pooling/pool-checkin.json deleted file mode 100644 index 3b40cec6f4..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkin.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must have a method of allowing the driver to check in a connection", - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut", - "label": "conn" - }, - { - "name": "checkIn", - "connection": "conn" - } - ], - "events": [ - { - "type": "ConnectionCheckedIn", - "connectionId": 42, - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolCreated", - "ConnectionPoolReady", - "ConnectionCreated", - "ConnectionReady", - "ConnectionClosed", - "ConnectionCheckOutStarted", - "ConnectionCheckedOut" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkin.yml b/testdata/connection-monitoring-and-pooling/pool-checkin.yml deleted file mode 100644 index b6a4320376..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkin.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: 1 -style: unit -description: must have a method of allowing the driver to check in a connection -operations: - - name: ready - - name: checkOut - label: conn - - name: checkIn - connection: conn -events: - - type: ConnectionCheckedIn - connectionId: 42 - address: 42 -ignore: - - ConnectionPoolCreated - - ConnectionPoolReady - - ConnectionCreated - - ConnectionReady - - ConnectionClosed - - ConnectionCheckOutStarted - - ConnectionCheckedOut diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-connection.json b/testdata/connection-monitoring-and-pooling/pool-checkout-connection.json deleted file mode 100644 index d89b342605..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-connection.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must be able to check out a connection", - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut" - } - ], - "events": [ - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCreated", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionReady", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 1, - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolReady", - "ConnectionPoolCreated" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-connection.yml b/testdata/connection-monitoring-and-pooling/pool-checkout-connection.yml deleted file mode 100644 index bbbd03ff5c..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-connection.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: 1 -style: unit -description: must be able to check out a connection -operations: - - name: ready - - name: checkOut -events: - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCreated - connectionId: 1 - address: 42 - - type: ConnectionReady - connectionId: 1 - address: 42 - - type: ConnectionCheckedOut - connectionId: 1 - address: 42 -ignore: - - ConnectionPoolReady - - ConnectionPoolCreated diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-custom-maxConnecting-is-enforced.json b/testdata/connection-monitoring-and-pooling/pool-checkout-custom-maxConnecting-is-enforced.json deleted file mode 100644 index 6620f82fd9..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-custom-maxConnecting-is-enforced.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "version": 1, - "style": "integration", - "description": "custom maxConnecting is enforced", - "runOn": [ - { - "minServerVersion": "4.4.0" - } - ], - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "isMaster", - "hello" - ], - "closeConnection": false, - "blockConnection": true, - "blockTimeMS": 500 - } - }, - "poolOptions": { - "maxConnecting": 1, - "maxPoolSize": 2, - "waitQueueTimeoutMS": 5000 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "start", - "target": "thread1" - }, - { - "name": "start", - "target": "thread2" - }, - { - "name": "checkOut", - "thread": "thread1" - }, - { - "name": "waitForEvent", - "event": "ConnectionCreated", - "count": 1 - }, - { - "name": "checkOut", - "thread": "thread2" - }, - { - "name": "waitForEvent", - "event": "ConnectionReady", - "count": 2 - } - ], - "events": [ - { - "type": "ConnectionCreated" - }, - { - "type": "ConnectionReady" - }, - { - "type": "ConnectionCreated" - }, - { - "type": "ConnectionReady" - } - ], - "ignore": [ - "ConnectionCheckOutStarted", - "ConnectionCheckedIn", - "ConnectionCheckedOut", - "ConnectionClosed", - "ConnectionPoolCreated", - "ConnectionPoolReady" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-custom-maxConnecting-is-enforced.yml b/testdata/connection-monitoring-and-pooling/pool-checkout-custom-maxConnecting-is-enforced.yml deleted file mode 100644 index dc8852696e..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-custom-maxConnecting-is-enforced.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: 1 -style: integration -description: custom maxConnecting is enforced -runOn: - - - minServerVersion: "4.4.0" -failPoint: - configureFailPoint: failCommand - mode: "alwaysOn" - data: - failCommands: ["isMaster","hello"] - closeConnection: false - blockConnection: true - blockTimeMS: 500 -poolOptions: - maxConnecting: 1 - # gives opportunity for the checkout in thread2 to establish a new connection, which it must not do until thread1 establishes one - maxPoolSize: 2 - waitQueueTimeoutMS: 5000 -operations: - - name: ready - # thread1 exists to consume the single permit to open a connection, - # so that thread2 would be blocked acquiring a permit, which results in ordering its ConnectionCreated event after - # the ConnectionReady event from thread1. - - name: start - target: thread1 - - name: start - target: thread2 - - name: checkOut - thread: thread1 - - name: waitForEvent - event: ConnectionCreated - count: 1 - - name: checkOut - thread: thread2 - - name: waitForEvent - event: ConnectionReady - count: 2 -events: - - type: ConnectionCreated - - type: ConnectionReady - - type: ConnectionCreated - - type: ConnectionReady -ignore: - - ConnectionCheckOutStarted - - ConnectionCheckedIn - - ConnectionCheckedOut - - ConnectionClosed - - ConnectionPoolCreated - - ConnectionPoolReady diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-error-closed.json b/testdata/connection-monitoring-and-pooling/pool-checkout-error-closed.json deleted file mode 100644 index ee2926e1c0..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-error-closed.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must throw error if checkOut is called on a closed pool", - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut", - "label": "conn1" - }, - { - "name": "checkIn", - "connection": "conn1" - }, - { - "name": "close" - }, - { - "name": "checkOut" - } - ], - "error": { - "type": "PoolClosedError", - "message": "Attempted to check out a connection from closed connection pool" - }, - "events": [ - { - "type": "ConnectionPoolCreated", - "address": 42, - "options": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "address": 42, - "connectionId": 42 - }, - { - "type": "ConnectionCheckedIn", - "address": 42, - "connectionId": 42 - }, - { - "type": "ConnectionPoolClosed", - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckOutFailed", - "address": 42, - "reason": "poolClosed" - } - ], - "ignore": [ - "ConnectionPoolReady", - "ConnectionCreated", - "ConnectionReady", - "ConnectionClosed" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-error-closed.yml b/testdata/connection-monitoring-and-pooling/pool-checkout-error-closed.yml deleted file mode 100644 index 4d1b0f3b29..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-error-closed.yml +++ /dev/null @@ -1,38 +0,0 @@ -version: 1 -style: unit -description: must throw error if checkOut is called on a closed pool -operations: - - name: ready - - name: checkOut - label: conn1 - - name: checkIn - connection: conn1 - - name: close - - name: checkOut -error: - type: PoolClosedError - message: Attempted to check out a connection from closed connection pool -events: - - type: ConnectionPoolCreated - address: 42 - options: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckedOut - address: 42 - connectionId: 42 - - type: ConnectionCheckedIn - address: 42 - connectionId: 42 - - type: ConnectionPoolClosed - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckOutFailed - address: 42 - reason: poolClosed -ignore: - - ConnectionPoolReady - - ConnectionCreated - - ConnectionReady - - ConnectionClosed diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-maxConnecting-is-enforced.json b/testdata/connection-monitoring-and-pooling/pool-checkout-maxConnecting-is-enforced.json deleted file mode 100644 index 732478bf7e..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-maxConnecting-is-enforced.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "version": 1, - "style": "integration", - "description": "maxConnecting is enforced", - "runOn": [ - { - "minServerVersion": "4.4.0" - } - ], - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 50 - }, - "data": { - "failCommands": [ - "isMaster", - "hello" - ], - "closeConnection": false, - "blockConnection": true, - "blockTimeMS": 750 - } - }, - "poolOptions": { - "maxPoolSize": 10, - "waitQueueTimeoutMS": 5000 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "start", - "target": "thread1" - }, - { - "name": "start", - "target": "thread2" - }, - { - "name": "start", - "target": "thread3" - }, - { - "name": "checkOut", - "thread": "thread1" - }, - { - "name": "waitForEvent", - "event": "ConnectionCreated", - "count": 1 - }, - { - "name": "wait", - "ms": 100 - }, - { - "name": "checkOut", - "thread": "thread2" - }, - { - "name": "checkOut", - "thread": "thread3" - }, - { - "name": "waitForEvent", - "event": "ConnectionReady", - "count": 3 - } - ], - "events": [ - { - "type": "ConnectionCreated", - "address": 42, - "connectionId": 1 - }, - { - "type": "ConnectionCreated", - "address": 42 - }, - { - "type": "ConnectionReady", - "address": 42, - "connectionId": 1 - }, - { - "type": "ConnectionCreated", - "address": 42 - }, - { - "type": "ConnectionReady", - "address": 42 - }, - { - "type": "ConnectionReady", - "address": 42 - } - ], - "ignore": [ - "ConnectionCheckOutStarted", - "ConnectionCheckedIn", - "ConnectionCheckedOut", - "ConnectionClosed", - "ConnectionPoolCreated", - "ConnectionPoolReady" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-maxConnecting-is-enforced.yml b/testdata/connection-monitoring-and-pooling/pool-checkout-maxConnecting-is-enforced.yml deleted file mode 100644 index 1b7c4bdeed..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-maxConnecting-is-enforced.yml +++ /dev/null @@ -1,79 +0,0 @@ -version: 1 -style: integration -description: maxConnecting is enforced -runOn: - - - # required for blockConnection in fail point - minServerVersion: "4.4.0" -failPoint: - configureFailPoint: failCommand - # high amount to ensure not interfered with by monitor checks. - mode: { times: 50 } - data: - failCommands: ["isMaster","hello"] - closeConnection: false - blockConnection: true - blockTimeMS: 750 -poolOptions: - maxPoolSize: 10 - waitQueueTimeoutMS: 5000 -operations: - - name: ready - # start 3 threads - - name: start - target: thread1 - - name: start - target: thread2 - - name: start - target: thread3 - # start creating a Connection. This will take a while - # due to the fail point. - - name: checkOut - thread: thread1 - # wait for thread1 to actually start creating a Connection - - name: waitForEvent - event: ConnectionCreated - count: 1 - # wait some more time to ensure thread1 has begun establishing a Connection - - name: wait - ms: 100 - # start 2 check out requests. Only one thread should - # start creating a Connection and the other one should be - # waiting for pendingConnectionCount to be less than maxConnecting, - # only starting once thread1 finishes creating its Connection. - - name: checkOut - thread: thread2 - - name: checkOut - thread: thread3 - # wait until all Connections have been created. - - name: waitForEvent - event: ConnectionReady - count: 3 -events: - # thread1 creates its connection - - type: ConnectionCreated - address: 42 - connectionId: 1 - # either thread2 or thread3 creates its connection - # the other thread is stuck waiting for maxConnecting to come down - - type: ConnectionCreated - address: 42 - # thread1 finishes establishing its connection, freeing - # up the blocked thread to start establishing - - type: ConnectionReady - address: 42 - connectionId: 1 - - type: ConnectionCreated - address: 42 - # the remaining two Connections finish establishing - - type: ConnectionReady - address: 42 - - type: ConnectionReady - address: 42 -ignore: - - ConnectionCheckOutStarted - - ConnectionCheckedIn - - ConnectionCheckedOut - - ConnectionClosed - - ConnectionPoolCreated - - ConnectionPoolReady diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-maxConnecting-timeout.json b/testdata/connection-monitoring-and-pooling/pool-checkout-maxConnecting-timeout.json deleted file mode 100644 index 84ddf8fdba..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-maxConnecting-timeout.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "version": 1, - "style": "integration", - "description": "waiting on maxConnecting is limited by WaitQueueTimeoutMS", - "runOn": [ - { - "minServerVersion": "4.4.0" - } - ], - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 50 - }, - "data": { - "failCommands": [ - "isMaster", - "hello" - ], - "closeConnection": false, - "blockConnection": true, - "blockTimeMS": 750 - } - }, - "poolOptions": { - "maxPoolSize": 10, - "waitQueueTimeoutMS": 50 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "start", - "target": "thread1" - }, - { - "name": "checkOut", - "thread": "thread1" - }, - { - "name": "start", - "target": "thread2" - }, - { - "name": "checkOut", - "thread": "thread2" - }, - { - "name": "waitForEvent", - "event": "ConnectionCreated", - "count": 2 - }, - { - "name": "start", - "target": "thread3" - }, - { - "name": "checkOut", - "thread": "thread3" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutFailed", - "count": 1 - }, - { - "name": "waitForThread", - "target": "thread3" - } - ], - "error": { - "type": "WaitQueueTimeoutError", - "message": "Timed out while checking out a connection from connection pool" - }, - "events": [ - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckOutFailed", - "reason": "timeout", - "address": 42 - } - ], - "ignore": [ - "ConnectionCreated", - "ConnectionCheckedIn", - "ConnectionCheckedOut", - "ConnectionClosed", - "ConnectionPoolCreated", - "ConnectionPoolReady" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-maxConnecting-timeout.yml b/testdata/connection-monitoring-and-pooling/pool-checkout-maxConnecting-timeout.yml deleted file mode 100644 index 383f666ad0..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-maxConnecting-timeout.yml +++ /dev/null @@ -1,69 +0,0 @@ -version: 1 -style: integration -description: waiting on maxConnecting is limited by WaitQueueTimeoutMS -runOn: - - - # required for blockConnection in fail point - minServerVersion: "4.4.0" -failPoint: - configureFailPoint: failCommand - # high amount to ensure not interfered with by monitor checks. - mode: { times: 50 } - data: - failCommands: ["isMaster","hello"] - closeConnection: false - blockConnection: true - blockTimeMS: 750 -poolOptions: - maxPoolSize: 10 - # Drivers that limit connection establishment by waitQueueTimeoutMS may skip - # this test. While waitQueueTimeoutMS is technically not supposed to limit establishment time, - # it will soon be deprecated, so it is easier for those drivers to just skip this test. - waitQueueTimeoutMS: 50 -operations: - - name: ready - # start creating two connections simultaneously. - - name: start - target: thread1 - - name: checkOut - thread: thread1 - - name: start - target: thread2 - - name: checkOut - thread: thread2 - # wait for other two threads to start establishing - - name: waitForEvent - event: ConnectionCreated - count: 2 - # start a third thread that will be blocked waiting for - # one of the other two to finish - - name: start - target: thread3 - - name: checkOut - thread: thread3 - - name: waitForEvent - event: ConnectionCheckOutFailed - count: 1 - # rejoin thread3, should experience error - - name: waitForThread - target: thread3 -error: - type: WaitQueueTimeoutError - message: Timed out while checking out a connection from connection pool -events: - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckOutFailed - reason: timeout - address: 42 -ignore: - - ConnectionCreated - - ConnectionCheckedIn - - ConnectionCheckedOut - - ConnectionClosed - - ConnectionPoolCreated - - ConnectionPoolReady diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-minPoolSize-connection-maxConnecting.json b/testdata/connection-monitoring-and-pooling/pool-checkout-minPoolSize-connection-maxConnecting.json deleted file mode 100644 index 3b0d43e877..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-minPoolSize-connection-maxConnecting.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "version": 1, - "style": "integration", - "description": "threads blocked by maxConnecting check out minPoolSize connections", - "runOn": [ - { - "minServerVersion": "4.4.0" - } - ], - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "isMaster", - "hello" - ], - "closeConnection": false, - "blockConnection": true, - "blockTimeMS": 500 - } - }, - "poolOptions": { - "minPoolSize": 2, - "maxPoolSize": 3, - "waitQueueTimeoutMS": 5000 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "start", - "target": "thread1" - }, - { - "name": "start", - "target": "thread2" - }, - { - "name": "wait", - "ms": 200 - }, - { - "name": "checkOut", - "thread": "thread1" - }, - { - "name": "waitForEvent", - "event": "ConnectionCreated", - "count": 2 - }, - { - "name": "checkOut", - "thread": "thread2" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckedOut", - "count": 2 - } - ], - "events": [ - { - "type": "ConnectionCreated", - "address": 42 - }, - { - "type": "ConnectionCreated", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolReady", - "ConnectionClosed", - "ConnectionReady", - "ConnectionPoolCreated", - "ConnectionCheckOutStarted" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-minPoolSize-connection-maxConnecting.yml b/testdata/connection-monitoring-and-pooling/pool-checkout-minPoolSize-connection-maxConnecting.yml deleted file mode 100644 index 0491c53982..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-minPoolSize-connection-maxConnecting.yml +++ /dev/null @@ -1,63 +0,0 @@ -version: 1 -style: integration -description: threads blocked by maxConnecting check out minPoolSize connections -runOn: - - - # required for blockConnection in fail point - minServerVersion: "4.4.0" -failPoint: - configureFailPoint: failCommand - mode: "alwaysOn" - data: - failCommands: ["isMaster","hello"] - closeConnection: false - blockConnection: true - blockTimeMS: 500 -poolOptions: - # allows both thread1 and the background thread to start opening connections concurrently - minPoolSize: 2 - # gives opportunity for the checkout in thread2 to open a new connection, which it must not do nonetheless - maxPoolSize: 3 - waitQueueTimeoutMS: 5000 -operations: - - name: ready - # thread1 exists to hold on one of the two permits to open a connection (the other one is initially held by the background thread), - # so that thread2 would be blocked acquiring a permit, which opens an opportunity for it to grab the connection newly opened - # by the background thread instead of opening a third connection. - - name: start - target: thread1 - - name: start - target: thread2 - # Ideally, thread1 should be holding for its permit to open a connection till the end of the test, but we cannot express that. - # This delay emulates the above requirement: - # - it is long enough to make sure that the background thread opens a connection before thread1 releases its permit; - # - it is short enough to allow thread2 to become blocked acquiring a permit to open a connection, and then grab the connection - # opened by the background thread, before the background thread releases its permit. - - name: wait - ms: 200 - - name: checkOut - thread: thread1 - - name: waitForEvent - event: ConnectionCreated - count: 2 - - name: checkOut - thread: thread2 - - name: waitForEvent - event: ConnectionCheckedOut - count: 2 -events: - # exactly 2 connections must be created and checked out - - type: ConnectionCreated - address: 42 - - type: ConnectionCreated - address: 42 - - type: ConnectionCheckedOut - address: 42 - - type: ConnectionCheckedOut - address: 42 -ignore: - - ConnectionPoolReady - - ConnectionClosed - - ConnectionReady - - ConnectionPoolCreated - - ConnectionCheckOutStarted diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-multiple.json b/testdata/connection-monitoring-and-pooling/pool-checkout-multiple.json deleted file mode 100644 index 07a4eda629..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-multiple.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must be able to check out multiple connections at the same time", - "operations": [ - { - "name": "ready" - }, - { - "name": "start", - "target": "thread1" - }, - { - "name": "start", - "target": "thread2" - }, - { - "name": "start", - "target": "thread3" - }, - { - "name": "checkOut", - "thread": "thread1" - }, - { - "name": "checkOut", - "thread": "thread2" - }, - { - "name": "checkOut", - "thread": "thread3" - }, - { - "name": "waitForThread", - "target": "thread1" - }, - { - "name": "waitForThread", - "target": "thread2" - }, - { - "name": "waitForThread", - "target": "thread3" - } - ], - "events": [ - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - } - ], - "ignore": [ - "ConnectionCreated", - "ConnectionPoolReady", - "ConnectionReady", - "ConnectionPoolCreated", - "ConnectionCheckOutStarted" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-multiple.yml b/testdata/connection-monitoring-and-pooling/pool-checkout-multiple.yml deleted file mode 100644 index 03a355df06..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-multiple.yml +++ /dev/null @@ -1,39 +0,0 @@ -version: 1 -style: unit -description: must be able to check out multiple connections at the same time -operations: - - name: ready - - name: start - target: thread1 - - name: start - target: thread2 - - name: start - target: thread3 - - name: checkOut - thread: thread1 - - name: checkOut - thread: thread2 - - name: checkOut - thread: thread3 - - name: waitForThread - target: thread1 - - name: waitForThread - target: thread2 - - name: waitForThread - target: thread3 -events: - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 -ignore: - - ConnectionCreated - - ConnectionPoolReady - - ConnectionReady - - ConnectionPoolCreated - - ConnectionCheckOutStarted diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-no-idle.json b/testdata/connection-monitoring-and-pooling/pool-checkout-no-idle.json deleted file mode 100644 index 0b0fe572ff..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-no-idle.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must destroy and must not check out an idle connection if found while iterating available connections", - "poolOptions": { - "maxIdleTimeMS": 10, - "backgroundThreadIntervalMS": -1 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut", - "label": "conn" - }, - { - "name": "checkIn", - "connection": "conn" - }, - { - "name": "wait", - "ms": 50 - }, - { - "name": "checkOut" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckedOut", - "count": 2 - } - ], - "events": [ - { - "type": "ConnectionPoolCreated", - "address": 42, - "options": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionClosed", - "connectionId": 1, - "reason": "idle", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 2, - "address": 42 - } - ], - "ignore": [ - "ConnectionReady", - "ConnectionPoolReady", - "ConnectionCreated", - "ConnectionCheckOutStarted" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-no-idle.yml b/testdata/connection-monitoring-and-pooling/pool-checkout-no-idle.yml deleted file mode 100644 index 4df351211c..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-no-idle.yml +++ /dev/null @@ -1,41 +0,0 @@ -version: 1 -style: unit -description: must destroy and must not check out an idle connection if found while iterating available connections -poolOptions: - maxIdleTimeMS: 10 - backgroundThreadIntervalMS: -1 -operations: - - name: ready - - name: checkOut - label: conn - - name: checkIn - connection: conn - - name: wait - ms: 50 - - name: checkOut - - name: waitForEvent - event: ConnectionCheckedOut - count: 2 -events: - - type: ConnectionPoolCreated - address: 42 - options: 42 - - type: ConnectionCheckedOut - connectionId: 1 - address: 42 - - type: ConnectionCheckedIn - connectionId: 1 - address: 42 - # In between these, wait so connection becomes idle - - type: ConnectionClosed - connectionId: 1 - reason: idle - address: 42 - - type: ConnectionCheckedOut - connectionId: 2 - address: 42 -ignore: - - ConnectionReady - - ConnectionPoolReady - - ConnectionCreated - - ConnectionCheckOutStarted diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-no-stale.json b/testdata/connection-monitoring-and-pooling/pool-checkout-no-stale.json deleted file mode 100644 index ec76f4e9c8..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-no-stale.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must destroy and must not check out a stale connection if found while iterating available connections", - "poolOptions": { - "backgroundThreadIntervalMS": -1 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut", - "label": "conn" - }, - { - "name": "checkIn", - "connection": "conn" - }, - { - "name": "clear" - }, - { - "name": "ready" - }, - { - "name": "checkOut" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckedOut", - "count": 2 - } - ], - "events": [ - { - "type": "ConnectionPoolCreated", - "address": 42, - "options": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionPoolCleared", - "address": 42 - }, - { - "type": "ConnectionClosed", - "connectionId": 1, - "reason": "stale", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 2, - "address": 42 - } - ], - "ignore": [ - "ConnectionReady", - "ConnectionPoolReady", - "ConnectionCreated", - "ConnectionCheckOutStarted" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-no-stale.yml b/testdata/connection-monitoring-and-pooling/pool-checkout-no-stale.yml deleted file mode 100644 index 02d827b773..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-no-stale.yml +++ /dev/null @@ -1,41 +0,0 @@ -version: 1 -style: unit -description: must destroy and must not check out a stale connection if found while iterating available connections -poolOptions: - backgroundThreadIntervalMS: -1 -operations: - - name: ready - - name: checkOut - label: conn - - name: checkIn - connection: conn - - name: clear - - name: ready - - name: checkOut - - name: waitForEvent - event: ConnectionCheckedOut - count: 2 -events: - - type: ConnectionPoolCreated - address: 42 - options: 42 - - type: ConnectionCheckedOut - connectionId: 1 - address: 42 - - type: ConnectionCheckedIn - connectionId: 1 - address: 42 - - type: ConnectionPoolCleared - address: 42 - - type: ConnectionClosed - connectionId: 1 - reason: stale - address: 42 - - type: ConnectionCheckedOut - connectionId: 2 - address: 42 -ignore: - - ConnectionReady - - ConnectionPoolReady - - ConnectionCreated - - ConnectionCheckOutStarted diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-returned-connection-maxConnecting.json b/testdata/connection-monitoring-and-pooling/pool-checkout-returned-connection-maxConnecting.json deleted file mode 100644 index 965d56f6d8..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-returned-connection-maxConnecting.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "version": 1, - "style": "integration", - "description": "threads blocked by maxConnecting check out returned connections", - "runOn": [ - { - "minServerVersion": "4.4.0" - } - ], - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 50 - }, - "data": { - "failCommands": [ - "isMaster", - "hello" - ], - "closeConnection": false, - "blockConnection": true, - "blockTimeMS": 750 - } - }, - "poolOptions": { - "maxPoolSize": 10, - "waitQueueTimeoutMS": 5000 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut", - "label": "conn0" - }, - { - "name": "start", - "target": "thread1" - }, - { - "name": "checkOut", - "thread": "thread1" - }, - { - "name": "start", - "target": "thread2" - }, - { - "name": "checkOut", - "thread": "thread2" - }, - { - "name": "start", - "target": "thread3" - }, - { - "name": "checkOut", - "thread": "thread3" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutStarted", - "count": 4 - }, - { - "name": "wait", - "ms": 100 - }, - { - "name": "checkIn", - "connection": "conn0" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckedOut", - "count": 4 - } - ], - "events": [ - { - "type": "ConnectionCreated", - "address": 42, - "connectionId": 1 - }, - { - "type": "ConnectionCheckedOut", - "address": 42 - }, - { - "type": "ConnectionCreated", - "address": 42 - }, - { - "type": "ConnectionCreated", - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolReady", - "ConnectionClosed", - "ConnectionReady", - "ConnectionPoolCreated", - "ConnectionCheckOutStarted" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-checkout-returned-connection-maxConnecting.yml b/testdata/connection-monitoring-and-pooling/pool-checkout-returned-connection-maxConnecting.yml deleted file mode 100644 index dab6e557d8..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-checkout-returned-connection-maxConnecting.yml +++ /dev/null @@ -1,86 +0,0 @@ -version: 1 -style: integration -description: threads blocked by maxConnecting check out returned connections -runOn: - - - # required for blockConnection in fail point - minServerVersion: "4.4.0" -failPoint: - configureFailPoint: failCommand - # high amount to ensure not interfered with by monitor checks. - mode: { times: 50 } - data: - failCommands: ["isMaster","hello"] - closeConnection: false - blockConnection: true - blockTimeMS: 750 -poolOptions: - maxPoolSize: 10 - waitQueueTimeoutMS: 5000 -operations: - - name: ready - # check out a connection and hold on to it. - - name: checkOut - label: conn0 - # then start three threads that all attempt to check out. Two threads - # will fill maxConnecting, and the other should be waiting either for - # the other two to finish or for the main thread to check its connection - # back in. - - name: start - target: thread1 - - name: checkOut - thread: thread1 - - name: start - target: thread2 - - name: checkOut - thread: thread2 - - name: start - target: thread3 - - name: checkOut - thread: thread3 - # wait for all three to start checking out and a little longer - # for the establishments to begin. - - name: waitForEvent - event: ConnectionCheckOutStarted - count: 4 - - name: wait - ms: 100 - # check original connection back in, so the thread that isn't - # currently establishing will become unblocked. Then wait for - # all threads to complete. - - name: checkIn - connection: conn0 - - name: waitForEvent - event: ConnectionCheckedOut - count: 4 -events: - # main thread checking out a Connection and holding it - - type: ConnectionCreated - address: 42 - connectionId: 1 - - type: ConnectionCheckedOut - address: 42 - # two threads creating their Connections - - type: ConnectionCreated - address: 42 - - type: ConnectionCreated - address: 42 - # main thread checking its Connection back in - - type: ConnectionCheckedIn - connectionId: 1 - address: 42 - # remaining thread checking out the returned Connection - - type: ConnectionCheckedOut - connectionId: 1 - address: 42 - # first two threads finishing Connection establishment - - type: ConnectionCheckedOut - address: 42 - - type: ConnectionCheckedOut - address: 42 -ignore: - - ConnectionPoolReady - - ConnectionClosed - - ConnectionReady - - ConnectionPoolCreated - - ConnectionCheckOutStarted diff --git a/testdata/connection-monitoring-and-pooling/pool-clear-clears-waitqueue.json b/testdata/connection-monitoring-and-pooling/pool-clear-clears-waitqueue.json deleted file mode 100644 index d4aef928c7..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-clear-clears-waitqueue.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "clearing pool clears the WaitQueue", - "poolOptions": { - "maxPoolSize": 1, - "waitQueueTimeoutMS": 30000 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut" - }, - { - "name": "start", - "target": "thread1" - }, - { - "name": "checkOut", - "thread": "thread1" - }, - { - "name": "start", - "target": "thread2" - }, - { - "name": "checkOut", - "thread": "thread2" - }, - { - "name": "start", - "target": "thread3" - }, - { - "name": "checkOut", - "thread": "thread3" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutStarted", - "count": 4 - }, - { - "name": "clear" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutFailed", - "count": 3, - "timeout": 1000 - } - ], - "events": [ - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckOutFailed", - "reason": "connectionError", - "address": 42 - }, - { - "type": "ConnectionCheckOutFailed", - "reason": "connectionError", - "address": 42 - }, - { - "type": "ConnectionCheckOutFailed", - "reason": "connectionError", - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolReady", - "ConnectionPoolCleared", - "ConnectionPoolCreated", - "ConnectionCreated", - "ConnectionReady", - "ConnectionCheckedIn", - "ConnectionClosed" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-clear-clears-waitqueue.yml b/testdata/connection-monitoring-and-pooling/pool-clear-clears-waitqueue.yml deleted file mode 100644 index 521f8ed245..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-clear-clears-waitqueue.yml +++ /dev/null @@ -1,63 +0,0 @@ -version: 1 -style: unit -description: clearing pool clears the WaitQueue -poolOptions: - maxPoolSize: 1 - waitQueueTimeoutMS: 30000 -operations: - - name: ready - # check out only connection in the pool - - name: checkOut - # start a few threads that all will enter - # the wait queue - - name: start - target: thread1 - - name: checkOut - thread: thread1 - - name: start - target: thread2 - - name: checkOut - thread: thread2 - - name: start - target: thread3 - - name: checkOut - thread: thread3 - # wait for the 3 threads to start checking out a connection - - name: waitForEvent - event: ConnectionCheckOutStarted - count: 4 - # clear the pool, ejecting the previous three threads - # from the WaitQueue - - name: clear - - name: waitForEvent - event: ConnectionCheckOutFailed - count: 3 - timeout: 1000 -events: - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckedOut - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckOutFailed - reason: connectionError - address: 42 - - type: ConnectionCheckOutFailed - reason: connectionError - address: 42 - - type: ConnectionCheckOutFailed - reason: connectionError - address: 42 -ignore: - - ConnectionPoolReady - - ConnectionPoolCleared - - ConnectionPoolCreated - - ConnectionCreated - - ConnectionReady - - ConnectionCheckedIn - - ConnectionClosed diff --git a/testdata/connection-monitoring-and-pooling/pool-clear-interrupting-pending-connections.json b/testdata/connection-monitoring-and-pooling/pool-clear-interrupting-pending-connections.json deleted file mode 100644 index ceae07a1c7..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-clear-interrupting-pending-connections.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "version": 1, - "style": "integration", - "description": "clear with interruptInUseConnections = true closes pending connections", - "runOn": [ - { - "minServerVersion": "4.9.0" - } - ], - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "isMaster", - "hello" - ], - "closeConnection": false, - "blockConnection": true, - "blockTimeMS": 1000 - } - }, - "poolOptions": { - "minPoolSize": 0 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "start", - "target": "thread1" - }, - { - "name": "checkOut", - "thread": "thread1" - }, - { - "name": "waitForEvent", - "event": "ConnectionCreated", - "count": 1 - }, - { - "name": "clear", - "interruptInUseConnections": true - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutFailed", - "count": 1 - } - ], - "events": [ - { - "type": "ConnectionCheckOutStarted" - }, - { - "type": "ConnectionCreated" - }, - { - "type": "ConnectionPoolCleared", - "interruptInUseConnections": true - }, - { - "type": "ConnectionClosed" - }, - { - "type": "ConnectionCheckOutFailed" - } - ], - "ignore": [ - "ConnectionCheckedIn", - "ConnectionCheckedOut", - "ConnectionPoolCreated", - "ConnectionPoolReady" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-clear-interrupting-pending-connections.yml b/testdata/connection-monitoring-and-pooling/pool-clear-interrupting-pending-connections.yml deleted file mode 100644 index d13257c3c4..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-clear-interrupting-pending-connections.yml +++ /dev/null @@ -1,42 +0,0 @@ -version: 1 -style: integration -description: clear with interruptInUseConnections = true closes pending connections -runOn: - - - minServerVersion: "4.9.0" -failPoint: - configureFailPoint: failCommand - mode: "alwaysOn" - data: - failCommands: ["isMaster","hello"] - closeConnection: false - blockConnection: true - blockTimeMS: 1000 -poolOptions: - minPoolSize: 0 -operations: - - name: ready - - name: start - target: thread1 - - name: checkOut - thread: thread1 - - name: waitForEvent - event: ConnectionCreated - count: 1 - - name: clear - interruptInUseConnections: true - - name: waitForEvent - event: ConnectionCheckOutFailed - count: 1 -events: - - type: ConnectionCheckOutStarted - - type: ConnectionCreated - - type: ConnectionPoolCleared - interruptInUseConnections: true - - type: ConnectionClosed - - type: ConnectionCheckOutFailed -ignore: - - ConnectionCheckedIn - - ConnectionCheckedOut - - ConnectionPoolCreated - - ConnectionPoolReady \ No newline at end of file diff --git a/testdata/connection-monitoring-and-pooling/pool-clear-min-size.json b/testdata/connection-monitoring-and-pooling/pool-clear-min-size.json deleted file mode 100644 index 239df871b8..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-clear-min-size.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "pool clear halts background minPoolSize establishments", - "poolOptions": { - "minPoolSize": 1, - "backgroundThreadIntervalMS": 50 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "waitForEvent", - "event": "ConnectionReady", - "count": 1 - }, - { - "name": "clear" - }, - { - "name": "wait", - "ms": 200 - }, - { - "name": "ready" - }, - { - "name": "waitForEvent", - "event": "ConnectionReady", - "count": 2 - } - ], - "events": [ - { - "type": "ConnectionPoolReady", - "address": 42 - }, - { - "type": "ConnectionCreated", - "address": 42 - }, - { - "type": "ConnectionReady", - "address": 42 - }, - { - "type": "ConnectionPoolCleared", - "address": 42 - }, - { - "type": "ConnectionPoolReady", - "address": 42 - }, - { - "type": "ConnectionCreated", - "address": 42 - }, - { - "type": "ConnectionReady", - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolCreated", - "ConnectionClosed" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-clear-min-size.yml b/testdata/connection-monitoring-and-pooling/pool-clear-min-size.yml deleted file mode 100644 index 959c6ccafe..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-clear-min-size.yml +++ /dev/null @@ -1,37 +0,0 @@ -version: 1 -style: unit -description: pool clear halts background minPoolSize establishments -poolOptions: - minPoolSize: 1 - backgroundThreadIntervalMS: 50 -operations: - - name: ready - - name: waitForEvent - event: ConnectionReady - count: 1 - - name: clear - # ensure no connections created after clear - - name: wait - ms: 200 - - name: ready - - name: waitForEvent - event: ConnectionReady - count: 2 -events: - - type: ConnectionPoolReady - address: 42 - - type: ConnectionCreated - address: 42 - - type: ConnectionReady - address: 42 - - type: ConnectionPoolCleared - address: 42 - - type: ConnectionPoolReady - address: 42 - - type: ConnectionCreated - address: 42 - - type: ConnectionReady - address: 42 -ignore: - - ConnectionPoolCreated - - ConnectionClosed diff --git a/testdata/connection-monitoring-and-pooling/pool-clear-paused.json b/testdata/connection-monitoring-and-pooling/pool-clear-paused.json deleted file mode 100644 index 847f08d849..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-clear-paused.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "clearing a paused pool emits no events", - "operations": [ - { - "name": "clear" - }, - { - "name": "ready" - }, - { - "name": "clear" - }, - { - "name": "clear" - } - ], - "events": [ - { - "type": "ConnectionPoolReady", - "address": 42 - }, - { - "type": "ConnectionPoolCleared", - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolCreated" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-clear-paused.yml b/testdata/connection-monitoring-and-pooling/pool-clear-paused.yml deleted file mode 100644 index 5f311f6ff8..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-clear-paused.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: 1 -style: unit -description: clearing a paused pool emits no events -operations: - - name: clear - - name: ready - - name: clear - - name: clear -events: - - type: ConnectionPoolReady - address: 42 - - type: ConnectionPoolCleared - address: 42 -ignore: - - ConnectionPoolCreated diff --git a/testdata/connection-monitoring-and-pooling/pool-clear-ready.json b/testdata/connection-monitoring-and-pooling/pool-clear-ready.json deleted file mode 100644 index 800c3545ad..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-clear-ready.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "after clear, cannot check out connections until pool ready", - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut" - }, - { - "name": "clear" - }, - { - "name": "start", - "target": "thread1" - }, - { - "name": "checkOut", - "thread": "thread1" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutFailed", - "count": 1 - }, - { - "name": "ready" - }, - { - "name": "checkOut" - } - ], - "events": [ - { - "type": "ConnectionPoolReady", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "address": 42, - "connectionId": 42 - }, - { - "type": "ConnectionPoolCleared", - "address": 42 - }, - { - "type": "ConnectionCheckOutFailed", - "address": 42, - "reason": "connectionError" - }, - { - "type": "ConnectionPoolReady", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolCreated", - "ConnectionReady", - "ConnectionCheckOutStarted", - "ConnectionCreated" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-clear-ready.yml b/testdata/connection-monitoring-and-pooling/pool-clear-ready.yml deleted file mode 100644 index c783d4d096..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-clear-ready.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: 1 -style: unit -description: after clear, cannot check out connections until pool ready -operations: - - name: ready - - name: checkOut - - name: clear - - name: start - target: thread1 - - name: checkOut - thread: thread1 - - name: waitForEvent - event: ConnectionCheckOutFailed - count: 1 - - name: ready - - name: checkOut -events: - - type: ConnectionPoolReady - address: 42 - - type: ConnectionCheckedOut - address: 42 - connectionId: 42 - - type: ConnectionPoolCleared - address: 42 - - type: ConnectionCheckOutFailed - address: 42 - reason: connectionError - - type: ConnectionPoolReady - address: 42 - - type: ConnectionCheckedOut - address: 42 -ignore: - - ConnectionPoolCreated - - ConnectionReady - - ConnectionCheckOutStarted - - ConnectionCreated diff --git a/testdata/connection-monitoring-and-pooling/pool-clear-schedule-run-interruptInUseConnections-false.json b/testdata/connection-monitoring-and-pooling/pool-clear-schedule-run-interruptInUseConnections-false.json deleted file mode 100644 index 3d7536951d..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-clear-schedule-run-interruptInUseConnections-false.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "Pool clear SHOULD schedule the next background thread run immediately (interruptInUseConnections = false)", - "poolOptions": { - "backgroundThreadIntervalMS": 10000 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut" - }, - { - "name": "checkOut", - "label": "conn" - }, - { - "name": "checkIn", - "connection": "conn" - }, - { - "name": "clear", - "interruptInUseConnections": false - }, - { - "name": "waitForEvent", - "event": "ConnectionPoolCleared", - "count": 1, - "timeout": 1000 - }, - { - "name": "waitForEvent", - "event": "ConnectionClosed", - "count": 1, - "timeout": 1000 - }, - { - "name": "close" - } - ], - "events": [ - { - "type": "ConnectionCheckedOut", - "connectionId": 1, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 2, - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 2, - "address": 42 - }, - { - "type": "ConnectionPoolCleared", - "interruptInUseConnections": false - }, - { - "type": "ConnectionClosed", - "connectionId": 2, - "reason": "stale", - "address": 42 - }, - { - "type": "ConnectionPoolClosed", - "address": 42 - } - ], - "ignore": [ - "ConnectionCreated", - "ConnectionPoolReady", - "ConnectionReady", - "ConnectionCheckOutStarted", - "ConnectionPoolCreated" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-clear-schedule-run-interruptInUseConnections-false.yml b/testdata/connection-monitoring-and-pooling/pool-clear-schedule-run-interruptInUseConnections-false.yml deleted file mode 100644 index e156b691c8..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-clear-schedule-run-interruptInUseConnections-false.yml +++ /dev/null @@ -1,48 +0,0 @@ -version: 1 -style: unit -description: Pool clear SHOULD schedule the next background thread run immediately (interruptInUseConnections = false) -poolOptions: - # ensure it's not involved by default - backgroundThreadIntervalMS: 10000 -operations: - - name: ready - - name: checkOut - - name: checkOut - label: conn - - name: checkIn - connection: conn - - name: clear - interruptInUseConnections: false - - name: waitForEvent - event: ConnectionPoolCleared - count: 1 - timeout: 1000 - - name: waitForEvent - event: ConnectionClosed - count: 1 - timeout: 1000 - - name: close -events: - - type: ConnectionCheckedOut - connectionId: 1 - address: 42 - - type: ConnectionCheckedOut - connectionId: 2 - address: 42 - - type: ConnectionCheckedIn - connectionId: 2 - address: 42 - - type: ConnectionPoolCleared - interruptInUseConnections: false - - type: ConnectionClosed - connectionId: 2 - reason: stale - address: 42 - - type: ConnectionPoolClosed - address: 42 -ignore: - - ConnectionCreated - - ConnectionPoolReady - - ConnectionReady - - ConnectionCheckOutStarted - - ConnectionPoolCreated \ No newline at end of file diff --git a/testdata/connection-monitoring-and-pooling/pool-close-destroy-conns.json b/testdata/connection-monitoring-and-pooling/pool-close-destroy-conns.json deleted file mode 100644 index a3d58a2136..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-close-destroy-conns.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "When a pool is closed, it MUST first destroy all available connections in that pool", - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut" - }, - { - "name": "checkOut", - "label": "conn" - }, - { - "name": "checkOut" - }, - { - "name": "checkIn", - "connection": "conn" - }, - { - "name": "close" - } - ], - "events": [ - { - "type": "ConnectionCheckedIn", - "connectionId": 2, - "address": 42 - }, - { - "type": "ConnectionClosed", - "connectionId": 2, - "reason": "poolClosed", - "address": 42 - }, - { - "type": "ConnectionPoolClosed", - "address": 42 - } - ], - "ignore": [ - "ConnectionCreated", - "ConnectionPoolReady", - "ConnectionReady", - "ConnectionPoolCreated", - "ConnectionCheckOutStarted", - "ConnectionCheckedOut" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-close-destroy-conns.yml b/testdata/connection-monitoring-and-pooling/pool-close-destroy-conns.yml deleted file mode 100644 index 0140cdd198..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-close-destroy-conns.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: 1 -style: unit -description: When a pool is closed, it MUST first destroy all available connections in that pool -operations: - - name: ready - - name: checkOut - - name: checkOut - label: conn - - name: checkOut - - name: checkIn - connection: conn - - name: close -events: - - type: ConnectionCheckedIn - connectionId: 2 - address: 42 - - type: ConnectionClosed - connectionId: 2 - reason: poolClosed - address: 42 - - type: ConnectionPoolClosed - address: 42 -ignore: - - ConnectionCreated - - ConnectionPoolReady - - ConnectionReady - - ConnectionPoolCreated - - ConnectionCheckOutStarted - - ConnectionCheckedOut - diff --git a/testdata/connection-monitoring-and-pooling/pool-close.json b/testdata/connection-monitoring-and-pooling/pool-close.json deleted file mode 100644 index fe083d73e6..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-close.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must be able to manually close a pool", - "operations": [ - { - "name": "close" - } - ], - "events": [ - { - "type": "ConnectionPoolCreated", - "address": 42, - "options": 42 - }, - { - "type": "ConnectionPoolClosed", - "address": 42 - } - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-close.yml b/testdata/connection-monitoring-and-pooling/pool-close.yml deleted file mode 100644 index 2562224b43..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-close.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 1 -style: unit -description: must be able to manually close a pool -operations: - - name: close -events: - - type: ConnectionPoolCreated - address: 42 - options: 42 - - type: ConnectionPoolClosed - address: 42 diff --git a/testdata/connection-monitoring-and-pooling/pool-create-max-size.json b/testdata/connection-monitoring-and-pooling/pool-create-max-size.json deleted file mode 100644 index e3a1fa8eda..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-create-max-size.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must never exceed maxPoolSize total connections", - "poolOptions": { - "maxPoolSize": 3 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut", - "label": "conn1" - }, - { - "name": "checkOut" - }, - { - "name": "checkOut", - "label": "conn2" - }, - { - "name": "checkIn", - "connection": "conn2" - }, - { - "name": "checkOut" - }, - { - "name": "start", - "target": "thread1" - }, - { - "name": "checkOut", - "thread": "thread1" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutStarted", - "count": 5 - }, - { - "name": "checkIn", - "connection": "conn1" - }, - { - "name": "waitForThread", - "target": "thread1" - } - ], - "events": [ - { - "type": "ConnectionPoolCreated", - "address": 42, - "options": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCreated", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCreated", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCreated", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - } - ], - "ignore": [ - "ConnectionReady", - "ConnectionPoolReady" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-create-max-size.yml b/testdata/connection-monitoring-and-pooling/pool-create-max-size.yml deleted file mode 100644 index fa85d9eb48..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-create-max-size.yml +++ /dev/null @@ -1,73 +0,0 @@ -version: 1 -style: unit -description: must never exceed maxPoolSize total connections -poolOptions: - maxPoolSize: 3 -operations: - - name: ready - - name: checkOut - label: conn1 - - name: checkOut - - name: checkOut - label: conn2 - - name: checkIn - connection: conn2 - - name: checkOut - - name: start - target: thread1 - - name: checkOut - thread: thread1 - - name: waitForEvent - event: ConnectionCheckOutStarted - count: 5 - - name: checkIn - connection: conn1 - - name: waitForThread - target: thread1 -events: - - type: ConnectionPoolCreated - address: 42 - options: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCreated - connectionId: 42 - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCreated - connectionId: 42 - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCreated - connectionId: 42 - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 - - type: ConnectionCheckedIn - connectionId: 42 - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckedIn - connectionId: 42 - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 -ignore: - - ConnectionReady - - ConnectionPoolReady diff --git a/testdata/connection-monitoring-and-pooling/pool-create-min-size-error.json b/testdata/connection-monitoring-and-pooling/pool-create-min-size-error.json deleted file mode 100644 index 1c744b850c..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-create-min-size-error.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": 1, - "style": "integration", - "description": "error during minPoolSize population clears pool", - "runOn": [ - { - "minServerVersion": "4.9.0" - } - ], - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 50 - }, - "data": { - "failCommands": [ - "isMaster", - "hello" - ], - "closeConnection": true, - "appName": "poolCreateMinSizeErrorTest" - } - }, - "poolOptions": { - "minPoolSize": 1, - "backgroundThreadIntervalMS": 50, - "appName": "poolCreateMinSizeErrorTest" - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "waitForEvent", - "event": "ConnectionPoolCleared", - "count": 1 - }, - { - "name": "wait", - "ms": 200 - } - ], - "events": [ - { - "type": "ConnectionPoolReady", - "address": 42 - }, - { - "type": "ConnectionCreated", - "address": 42 - }, - { - "type": "ConnectionClosed", - "address": 42, - "connectionId": 42, - "reason": "error" - }, - { - "type": "ConnectionPoolCleared", - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolCreated" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-create-min-size-error.yml b/testdata/connection-monitoring-and-pooling/pool-create-min-size-error.yml deleted file mode 100644 index dd5890b1d9..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-create-min-size-error.yml +++ /dev/null @@ -1,40 +0,0 @@ -version: 1 -style: integration -description: error during minPoolSize population clears pool -runOn: - - - # required for appName in fail point - minServerVersion: "4.9.0" -failPoint: - configureFailPoint: failCommand - # high amount to ensure not interfered with by monitor checks. - mode: { times: 50 } - data: - failCommands: ["isMaster","hello"] - closeConnection: true - appName: "poolCreateMinSizeErrorTest" -poolOptions: - minPoolSize: 1 - backgroundThreadIntervalMS: 50 - appName: "poolCreateMinSizeErrorTest" -operations: - - name: ready - - name: waitForEvent - event: ConnectionPoolCleared - count: 1 - # ensure pool doesn't start making new connections - - name: wait - ms: 200 -events: - - type: ConnectionPoolReady - address: 42 - - type: ConnectionCreated - address: 42 - - type: ConnectionClosed - address: 42 - connectionId: 42 - reason: error - - type: ConnectionPoolCleared - address: 42 -ignore: - - ConnectionPoolCreated diff --git a/testdata/connection-monitoring-and-pooling/pool-create-min-size.json b/testdata/connection-monitoring-and-pooling/pool-create-min-size.json deleted file mode 100644 index 43118f7841..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-create-min-size.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must be able to start a pool with minPoolSize connections", - "poolOptions": { - "minPoolSize": 3 - }, - "operations": [ - { - "name": "wait", - "ms": 200 - }, - { - "name": "ready" - }, - { - "name": "waitForEvent", - "event": "ConnectionCreated", - "count": 3 - }, - { - "name": "waitForEvent", - "event": "ConnectionReady", - "count": 3 - }, - { - "name": "checkOut" - } - ], - "events": [ - { - "type": "ConnectionPoolCreated", - "address": 42, - "options": 42 - }, - { - "type": "ConnectionPoolReady", - "address": 42 - }, - { - "type": "ConnectionCreated", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCreated", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCreated", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - } - ], - "ignore": [ - "ConnectionReady", - "ConnectionClosed", - "ConnectionCheckOutStarted" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-create-min-size.yml b/testdata/connection-monitoring-and-pooling/pool-create-min-size.yml deleted file mode 100644 index a91e33f7a9..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-create-min-size.yml +++ /dev/null @@ -1,40 +0,0 @@ -version: 1 -style: unit -description: must be able to start a pool with minPoolSize connections -poolOptions: - minPoolSize: 3 -operations: - # ensure no connections are created until this pool is ready - - name: wait - ms: 200 - - name: ready - - name: waitForEvent - event: ConnectionCreated - count: 3 - - name: waitForEvent - event: ConnectionReady - count: 3 - - name: checkOut -events: - - type: ConnectionPoolCreated - address: 42 - options: 42 - - type: ConnectionPoolReady - address: 42 - - type: ConnectionCreated - connectionId: 42 - address: 42 - - type: ConnectionCreated - connectionId: 42 - address: 42 - - type: ConnectionCreated - connectionId: 42 - address: 42 - # Ensures that by the time pool is closed, there are at least 3 connections - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 -ignore: - - ConnectionReady - - ConnectionClosed - - ConnectionCheckOutStarted diff --git a/testdata/connection-monitoring-and-pooling/pool-create-with-options.json b/testdata/connection-monitoring-and-pooling/pool-create-with-options.json deleted file mode 100644 index 4e8223f91e..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-create-with-options.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must be able to start a pool with various options set", - "poolOptions": { - "maxPoolSize": 50, - "minPoolSize": 5, - "maxIdleTimeMS": 100 - }, - "operations": [ - { - "name": "waitForEvent", - "event": "ConnectionPoolCreated", - "count": 1 - } - ], - "events": [ - { - "type": "ConnectionPoolCreated", - "address": 42, - "options": { - "maxPoolSize": 50, - "minPoolSize": 5, - "maxIdleTimeMS": 100 - } - } - ], - "ignore": [ - "ConnectionCreated", - "ConnectionReady" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-create-with-options.yml b/testdata/connection-monitoring-and-pooling/pool-create-with-options.yml deleted file mode 100644 index 32c8d0e54c..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-create-with-options.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: 1 -style: unit -description: must be able to start a pool with various options set -poolOptions: - maxPoolSize: 50 - minPoolSize: 5 - maxIdleTimeMS: 100 -operations: - - name: waitForEvent - event: ConnectionPoolCreated - count: 1 -events: - - type: ConnectionPoolCreated - address: 42 - options: - maxPoolSize: 50 - minPoolSize: 5 - maxIdleTimeMS: 100 -ignore: - - ConnectionCreated - - ConnectionReady diff --git a/testdata/connection-monitoring-and-pooling/pool-create.json b/testdata/connection-monitoring-and-pooling/pool-create.json deleted file mode 100644 index 8c1f85537f..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-create.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must be able to create a pool", - "operations": [ - { - "name": "waitForEvent", - "event": "ConnectionPoolCreated", - "count": 1 - } - ], - "events": [ - { - "type": "ConnectionPoolCreated", - "address": 42, - "options": 42 - } - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-create.yml b/testdata/connection-monitoring-and-pooling/pool-create.yml deleted file mode 100644 index f4989e8d4b..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-create.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 1 -style: unit -description: must be able to create a pool -operations: - - name: waitForEvent - event: ConnectionPoolCreated - count: 1 -events: - - type: ConnectionPoolCreated - address: 42 - options: 42 - diff --git a/testdata/connection-monitoring-and-pooling/pool-ready-ready.json b/testdata/connection-monitoring-and-pooling/pool-ready-ready.json deleted file mode 100644 index 25dfa9c97c..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-ready-ready.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "readying a ready pool emits no events", - "operations": [ - { - "name": "ready" - }, - { - "name": "ready" - }, - { - "name": "ready" - }, - { - "name": "clear" - }, - { - "name": "ready" - } - ], - "events": [ - { - "type": "ConnectionPoolReady", - "address": 42 - }, - { - "type": "ConnectionPoolCleared", - "address": 42 - }, - { - "type": "ConnectionPoolReady", - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolCreated" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-ready-ready.yml b/testdata/connection-monitoring-and-pooling/pool-ready-ready.yml deleted file mode 100644 index b3d3ae7ad1..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-ready-ready.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: 1 -style: unit -description: readying a ready pool emits no events -operations: - - name: ready - - name: ready - - name: ready - # the first ready after this clear should emit an event - - name: clear - - name: ready -events: - - type: ConnectionPoolReady - address: 42 - - type: ConnectionPoolCleared - address: 42 - - type: ConnectionPoolReady - address: 42 -ignore: - - ConnectionPoolCreated diff --git a/testdata/connection-monitoring-and-pooling/pool-ready.json b/testdata/connection-monitoring-and-pooling/pool-ready.json deleted file mode 100644 index 29ce7326cf..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-ready.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "pool starts as cleared and becomes ready", - "operations": [ - { - "name": "start", - "target": "thread1" - }, - { - "name": "checkOut", - "thread": "thread1" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutFailed", - "count": 1 - }, - { - "name": "ready" - }, - { - "name": "checkOut" - } - ], - "events": [ - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckOutFailed", - "reason": "connectionError", - "address": 42 - }, - { - "type": "ConnectionPoolReady", - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCreated", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "address": 42 - } - ], - "ignore": [ - "ConnectionPoolCreated", - "ConnectionReady" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/pool-ready.yml b/testdata/connection-monitoring-and-pooling/pool-ready.yml deleted file mode 100644 index 730d4d27b7..0000000000 --- a/testdata/connection-monitoring-and-pooling/pool-ready.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: 1 -style: unit -description: pool starts as cleared and becomes ready -operations: - - name: start - target: thread1 - - name: checkOut - thread: thread1 - - name: waitForEvent - event: ConnectionCheckOutFailed - count: 1 - - name: ready - - name: checkOut -events: - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckOutFailed - reason: connectionError - address: 42 - - type: ConnectionPoolReady - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCreated - address: 42 - - type: ConnectionCheckedOut - address: 42 -ignore: - - ConnectionPoolCreated - - ConnectionReady diff --git a/testdata/connection-monitoring-and-pooling/wait-queue-fairness.json b/testdata/connection-monitoring-and-pooling/wait-queue-fairness.json deleted file mode 100644 index 88a67c60ec..0000000000 --- a/testdata/connection-monitoring-and-pooling/wait-queue-fairness.json +++ /dev/null @@ -1,196 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must issue Connections to threads in the order that the threads entered the queue", - "poolOptions": { - "maxPoolSize": 1, - "waitQueueTimeoutMS": 5000 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut", - "label": "conn0" - }, - { - "name": "start", - "target": "thread1" - }, - { - "name": "checkOut", - "thread": "thread1", - "label": "conn1" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutStarted", - "count": 2 - }, - { - "name": "wait", - "ms": 100 - }, - { - "name": "start", - "target": "thread2" - }, - { - "name": "checkOut", - "thread": "thread2", - "label": "conn2" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutStarted", - "count": 3 - }, - { - "name": "wait", - "ms": 100 - }, - { - "name": "start", - "target": "thread3" - }, - { - "name": "checkOut", - "thread": "thread3", - "label": "conn3" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutStarted", - "count": 4 - }, - { - "name": "wait", - "ms": 100 - }, - { - "name": "start", - "target": "thread4" - }, - { - "name": "checkOut", - "thread": "thread4", - "label": "conn4" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutStarted", - "count": 5 - }, - { - "name": "wait", - "ms": 100 - }, - { - "name": "checkIn", - "connection": "conn0" - }, - { - "name": "waitForThread", - "target": "thread1" - }, - { - "name": "checkIn", - "connection": "conn1" - }, - { - "name": "waitForThread", - "target": "thread2" - }, - { - "name": "checkIn", - "connection": "conn2" - }, - { - "name": "waitForThread", - "target": "thread3" - }, - { - "name": "checkIn", - "connection": "conn3" - }, - { - "name": "waitForThread", - "target": "thread4" - } - ], - "events": [ - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - } - ], - "ignore": [ - "ConnectionCreated", - "ConnectionReady", - "ConnectionClosed", - "ConnectionPoolReady", - "ConnectionPoolCreated" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/wait-queue-fairness.yml b/testdata/connection-monitoring-and-pooling/wait-queue-fairness.yml deleted file mode 100644 index e7027c3304..0000000000 --- a/testdata/connection-monitoring-and-pooling/wait-queue-fairness.yml +++ /dev/null @@ -1,126 +0,0 @@ -version: 1 -style: unit -description: must issue Connections to threads in the order that the threads entered the queue -poolOptions: - maxPoolSize: 1 - waitQueueTimeoutMS: 5000 -operations: - - name: ready - # Check out sole connection in pool - - name: checkOut - label: conn0 - # Create 4 threads, have them all queue up for connections - # Note: this might become non-deterministic depending on how you - # implement your test runner. The goal is for each thread to - # have started and begun checkOut before the next thread starts. - # The sleep operations should make this more consistent. - - name: start - target: thread1 - - name: checkOut - thread: thread1 - label: conn1 - - name: waitForEvent - event: ConnectionCheckOutStarted - count: 2 - # Give thread1 some time to actually enter the wait queue since the - # ConnectionCheckOutStarted event is publish beforehand. - - name: wait - ms: 100 - - name: start - target: thread2 - - name: checkOut - thread: thread2 - label: conn2 - - name: waitForEvent - event: ConnectionCheckOutStarted - count: 3 - # Give thread2 some time to actually enter the wait queue since the - # ConnectionCheckOutStarted event is publish beforehand. - - name: wait - ms: 100 - - name: start - target: thread3 - - name: checkOut - thread: thread3 - label: conn3 - - name: waitForEvent - event: ConnectionCheckOutStarted - count: 4 - # Give thread3 some time to actually enter the wait queue since the - # ConnectionCheckOutStarted event is publish beforehand. - - name: wait - ms: 100 - - name: start - target: thread4 - - name: checkOut - thread: thread4 - label: conn4 - - name: waitForEvent - event: ConnectionCheckOutStarted - count: 5 - # Give thread4 some time to actually enter the wait queue since the - # ConnectionCheckOutStarted event is publish beforehand. - - name: wait - ms: 100 - # From main thread, keep checking in connection and then wait for appropriate thread - # Test will timeout if threads are not enqueued in proper order - - name: checkIn - connection: conn0 - - name: waitForThread - target: thread1 - - name: checkIn - connection: conn1 - - name: waitForThread - target: thread2 - - name: checkIn - connection: conn2 - - name: waitForThread - target: thread3 - - name: checkIn - connection: conn3 - - name: waitForThread - target: thread4 -events: - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckedIn - connectionId: 42 - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 - - type: ConnectionCheckedIn - connectionId: 42 - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 - - type: ConnectionCheckedIn - connectionId: 42 - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 - - type: ConnectionCheckedIn - connectionId: 42 - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 -ignore: - - ConnectionCreated - - ConnectionReady - - ConnectionClosed - - ConnectionPoolReady - - ConnectionPoolCreated diff --git a/testdata/connection-monitoring-and-pooling/wait-queue-timeout.json b/testdata/connection-monitoring-and-pooling/wait-queue-timeout.json deleted file mode 100644 index fbcbdfb04d..0000000000 --- a/testdata/connection-monitoring-and-pooling/wait-queue-timeout.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "version": 1, - "style": "unit", - "description": "must aggressively timeout threads enqueued longer than waitQueueTimeoutMS", - "poolOptions": { - "maxPoolSize": 1, - "waitQueueTimeoutMS": 50 - }, - "operations": [ - { - "name": "ready" - }, - { - "name": "checkOut", - "label": "conn0" - }, - { - "name": "start", - "target": "thread1" - }, - { - "name": "checkOut", - "thread": "thread1" - }, - { - "name": "waitForEvent", - "event": "ConnectionCheckOutFailed", - "count": 1 - }, - { - "name": "checkIn", - "connection": "conn0" - }, - { - "name": "waitForThread", - "target": "thread1" - } - ], - "error": { - "type": "WaitQueueTimeoutError", - "message": "Timed out while checking out a connection from connection pool" - }, - "events": [ - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckedOut", - "connectionId": 42, - "address": 42 - }, - { - "type": "ConnectionCheckOutStarted", - "address": 42 - }, - { - "type": "ConnectionCheckOutFailed", - "reason": "timeout", - "address": 42 - }, - { - "type": "ConnectionCheckedIn", - "connectionId": 42, - "address": 42 - } - ], - "ignore": [ - "ConnectionCreated", - "ConnectionReady", - "ConnectionClosed", - "ConnectionPoolCreated", - "ConnectionPoolReady" - ] -} diff --git a/testdata/connection-monitoring-and-pooling/wait-queue-timeout.yml b/testdata/connection-monitoring-and-pooling/wait-queue-timeout.yml deleted file mode 100644 index 5433c14898..0000000000 --- a/testdata/connection-monitoring-and-pooling/wait-queue-timeout.yml +++ /dev/null @@ -1,48 +0,0 @@ -version: 1 -style: unit -description: must aggressively timeout threads enqueued longer than waitQueueTimeoutMS -poolOptions: - maxPoolSize: 1 - waitQueueTimeoutMS: 50 -operations: - - name: ready - # Check out only possible connection - - name: checkOut - label: conn0 - # Start a thread, have it enter the wait queue - - name: start - target: thread1 - - name: checkOut - thread: thread1 - # Wait for other thread to time out, then check in connection - - name: waitForEvent - event: ConnectionCheckOutFailed - count: 1 - - name: checkIn - connection: conn0 - # Rejoin thread1, should experience error - - name: waitForThread - target: thread1 -error: - type: WaitQueueTimeoutError - message: Timed out while checking out a connection from connection pool -events: - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckedOut - connectionId: 42 - address: 42 - - type: ConnectionCheckOutStarted - address: 42 - - type: ConnectionCheckOutFailed - reason: timeout - address: 42 - - type: ConnectionCheckedIn - connectionId: 42 - address: 42 -ignore: - - ConnectionCreated - - ConnectionReady - - ConnectionClosed - - ConnectionPoolCreated - - ConnectionPoolReady diff --git a/testdata/connection-string/invalid-uris.json b/testdata/connection-string/invalid-uris.json deleted file mode 100644 index 2a182fac7e..0000000000 --- a/testdata/connection-string/invalid-uris.json +++ /dev/null @@ -1,274 +0,0 @@ -{ - "tests": [ - { - "description": "Empty string", - "uri": "", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Invalid scheme", - "uri": "mongo://localhost:27017", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Missing host", - "uri": "mongodb://", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Double colon in host identifier", - "uri": "mongodb://localhost::27017", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Double colon in host identifier and trailing slash", - "uri": "mongodb://localhost::27017/", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Double colon in host identifier with missing host and port", - "uri": "mongodb://::", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Double colon in host identifier with missing port", - "uri": "mongodb://localhost,localhost::", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Double colon in host identifier and second host", - "uri": "mongodb://localhost::27017,abc", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Invalid port (negative number) with hostname", - "uri": "mongodb://localhost:-1", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Invalid port (zero) with hostname", - "uri": "mongodb://localhost:0/", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Invalid port (positive number) with hostname", - "uri": "mongodb://localhost:65536", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Invalid port (positive number) with hostname and trailing slash", - "uri": "mongodb://localhost:65536/", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Invalid port (non-numeric string) with hostname", - "uri": "mongodb://localhost:foo", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Invalid port (negative number) with IP literal", - "uri": "mongodb://[::1]:-1", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Invalid port (zero) with IP literal", - "uri": "mongodb://[::1]:0/", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Invalid port (positive number) with IP literal", - "uri": "mongodb://[::1]:65536", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Invalid port (positive number) with IP literal and trailing slash", - "uri": "mongodb://[::1]:65536/", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Invalid port (non-numeric string) with IP literal", - "uri": "mongodb://[::1]:foo", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Missing delimiting slash between hosts and options", - "uri": "mongodb://example.com?w=1", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Incomplete key value pair for option", - "uri": "mongodb://example.com/?w", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Username with password containing an unescaped colon", - "uri": "mongodb://alice:foo:bar@127.0.0.1", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Username containing an unescaped at-sign", - "uri": "mongodb://alice@@127.0.0.1", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Username with password containing an unescaped at-sign", - "uri": "mongodb://alice@foo:bar@127.0.0.1", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Username containing an unescaped slash", - "uri": "mongodb://alice/@localhost/db", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Username containing unescaped slash with password", - "uri": "mongodb://alice/bob:foo@localhost/db", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Username with password containing an unescaped slash", - "uri": "mongodb://alice:foo/bar@localhost/db", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Host with unescaped slash", - "uri": "mongodb:///tmp/mongodb-27017.sock/", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "mongodb+srv with multiple service names", - "uri": "mongodb+srv://test5.test.mongodb.com,test6.test.mongodb.com", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "mongodb+srv with port number", - "uri": "mongodb+srv://test7.test.mongodb.com:27018", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - }, - { - "description": "Username with password containing an unescaped percent sign", - "uri": "mongodb://alice%foo:bar@127.0.0.1", - "valid": false, - "warning": null, - "hosts": null, - "auth": null, - "options": null - } - ] -} diff --git a/testdata/connection-string/invalid-uris.yml b/testdata/connection-string/invalid-uris.yml deleted file mode 100644 index 766be5282c..0000000000 --- a/testdata/connection-string/invalid-uris.yml +++ /dev/null @@ -1,241 +0,0 @@ -tests: - - - description: "Empty string" - uri: "" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Invalid scheme" - uri: "mongo://localhost:27017" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Missing host" - uri: "mongodb://" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Double colon in host identifier" - uri: "mongodb://localhost::27017" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Double colon in host identifier and trailing slash" - uri: "mongodb://localhost::27017/" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Double colon in host identifier with missing host and port" - uri: "mongodb://::" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Double colon in host identifier with missing port" - uri: "mongodb://localhost,localhost::" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Double colon in host identifier and second host" - uri: "mongodb://localhost::27017,abc" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Invalid port (negative number) with hostname" - uri: "mongodb://localhost:-1" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Invalid port (zero) with hostname" - uri: "mongodb://localhost:0/" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Invalid port (positive number) with hostname" - uri: "mongodb://localhost:65536" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Invalid port (positive number) with hostname and trailing slash" - uri: "mongodb://localhost:65536/" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Invalid port (non-numeric string) with hostname" - uri: "mongodb://localhost:foo" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Invalid port (negative number) with IP literal" - uri: "mongodb://[::1]:-1" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Invalid port (zero) with IP literal" - uri: "mongodb://[::1]:0/" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Invalid port (positive number) with IP literal" - uri: "mongodb://[::1]:65536" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Invalid port (positive number) with IP literal and trailing slash" - uri: "mongodb://[::1]:65536/" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Invalid port (non-numeric string) with IP literal" - uri: "mongodb://[::1]:foo" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Missing delimiting slash between hosts and options" - uri: "mongodb://example.com?w=1" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Incomplete key value pair for option" - uri: "mongodb://example.com/?w" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Username with password containing an unescaped colon" - uri: "mongodb://alice:foo:bar@127.0.0.1" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Username containing an unescaped at-sign" - uri: "mongodb://alice@@127.0.0.1" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Username with password containing an unescaped at-sign" - uri: "mongodb://alice@foo:bar@127.0.0.1" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Username containing an unescaped slash" - uri: "mongodb://alice/@localhost/db" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Username containing unescaped slash with password" - uri: "mongodb://alice/bob:foo@localhost/db" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Username with password containing an unescaped slash" - uri: "mongodb://alice:foo/bar@localhost/db" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Host with unescaped slash" - uri: "mongodb:///tmp/mongodb-27017.sock/" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "mongodb+srv with multiple service names" - uri: "mongodb+srv://test5.test.mongodb.com,test6.test.mongodb.com" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "mongodb+srv with port number" - uri: "mongodb+srv://test7.test.mongodb.com:27018" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ - - - description: "Username with password containing an unescaped percent sign" - uri: "mongodb://alice%foo:bar@127.0.0.1" - valid: false - warning: ~ - hosts: ~ - auth: ~ - options: ~ diff --git a/testdata/connection-string/valid-auth.json b/testdata/connection-string/valid-auth.json deleted file mode 100644 index 4f684ff185..0000000000 --- a/testdata/connection-string/valid-auth.json +++ /dev/null @@ -1,332 +0,0 @@ -{ - "tests": [ - { - "description": "User info for single IPv4 host without database", - "uri": "mongodb://alice:foo@127.0.0.1", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ipv4", - "host": "127.0.0.1", - "port": null - } - ], - "auth": { - "username": "alice", - "password": "foo", - "db": null - }, - "options": null - }, - { - "description": "User info for single IPv4 host with database", - "uri": "mongodb://alice:foo@127.0.0.1/test", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ipv4", - "host": "127.0.0.1", - "port": null - } - ], - "auth": { - "username": "alice", - "password": "foo", - "db": "test" - }, - "options": null - }, - { - "description": "User info for single IP literal host without database", - "uri": "mongodb://bob:bar@[::1]:27018", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ip_literal", - "host": "::1", - "port": 27018 - } - ], - "auth": { - "username": "bob", - "password": "bar", - "db": null - }, - "options": null - }, - { - "description": "User info for single IP literal host with database", - "uri": "mongodb://bob:bar@[::1]:27018/admin", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ip_literal", - "host": "::1", - "port": 27018 - } - ], - "auth": { - "username": "bob", - "password": "bar", - "db": "admin" - }, - "options": null - }, - { - "description": "User info for single hostname without database", - "uri": "mongodb://eve:baz@example.com", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "example.com", - "port": null - } - ], - "auth": { - "username": "eve", - "password": "baz", - "db": null - }, - "options": null - }, - { - "description": "User info for single hostname with database", - "uri": "mongodb://eve:baz@example.com/db2", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "example.com", - "port": null - } - ], - "auth": { - "username": "eve", - "password": "baz", - "db": "db2" - }, - "options": null - }, - { - "description": "User info for multiple hosts without database", - "uri": "mongodb://alice:secret@127.0.0.1,example.com:27018", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ipv4", - "host": "127.0.0.1", - "port": null - }, - { - "type": "hostname", - "host": "example.com", - "port": 27018 - } - ], - "auth": { - "username": "alice", - "password": "secret", - "db": null - }, - "options": null - }, - { - "description": "User info for multiple hosts with database", - "uri": "mongodb://alice:secret@example.com,[::1]:27019/admin", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "example.com", - "port": null - }, - { - "type": "ip_literal", - "host": "::1", - "port": 27019 - } - ], - "auth": { - "username": "alice", - "password": "secret", - "db": "admin" - }, - "options": null - }, - { - "description": "Username without password", - "uri": "mongodb://alice@127.0.0.1", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ipv4", - "host": "127.0.0.1", - "port": null - } - ], - "auth": { - "username": "alice", - "password": null, - "db": null - }, - "options": null - }, - { - "description": "Username with empty password", - "uri": "mongodb://alice:@127.0.0.1", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ipv4", - "host": "127.0.0.1", - "port": null - } - ], - "auth": { - "username": "alice", - "password": "", - "db": null - }, - "options": null - }, - { - "description": "Escaped username and database without password", - "uri": "mongodb://%40l%3Ace%2F%3D@example.com/my%3Ddb", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "example.com", - "port": null - } - ], - "auth": { - "username": "@l:ce/=", - "password": null, - "db": "my=db" - }, - "options": null - }, - { - "description": "Escaped user info and database (MONGODB-CR)", - "uri": "mongodb://%24am:f%3Azzb%40z%2Fz%3D@127.0.0.1/admin%3F?authMechanism=MONGODB-CR", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ipv4", - "host": "127.0.0.1", - "port": null - } - ], - "auth": { - "username": "$am", - "password": "f:zzb@z/z=", - "db": "admin?" - }, - "options": { - "authmechanism": "MONGODB-CR" - } - }, - { - "description": "Subdelimiters in user/pass don't need escaping (MONGODB-CR)", - "uri": "mongodb://!$&'()*+,;=:!$&'()*+,;=@127.0.0.1/admin?authMechanism=MONGODB-CR", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ipv4", - "host": "127.0.0.1", - "port": null - } - ], - "auth": { - "username": "!$&'()*+,;=", - "password": "!$&'()*+,;=", - "db": "admin" - }, - "options": { - "authmechanism": "MONGODB-CR" - } - }, - { - "description": "Escaped username (MONGODB-X509)", - "uri": "mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/?authMechanism=MONGODB-X509", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "localhost", - "port": null - } - ], - "auth": { - "username": "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry", - "password": null, - "db": null - }, - "options": { - "authmechanism": "MONGODB-X509" - } - }, - { - "description": "Escaped username (GSSAPI)", - "uri": "mongodb://user%40EXAMPLE.COM:secret@localhost/?authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:true&authMechanism=GSSAPI", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "localhost", - "port": null - } - ], - "auth": { - "username": "user@EXAMPLE.COM", - "password": "secret", - "db": null - }, - "options": { - "authmechanism": "GSSAPI", - "authmechanismproperties": { - "SERVICE_NAME": "other", - "CANONICALIZE_HOST_NAME": true - } - } - }, - { - "description": "At-signs in options aren't part of the userinfo", - "uri": "mongodb://alice:secret@example.com/admin?replicaset=my@replicaset", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "example.com", - "port": null - } - ], - "auth": { - "username": "alice", - "password": "secret", - "db": "admin" - }, - "options": { - "replicaset": "my@replicaset" - } - } - ] -} diff --git a/testdata/connection-string/valid-auth.yml b/testdata/connection-string/valid-auth.yml deleted file mode 100644 index 01c866ee9e..0000000000 --- a/testdata/connection-string/valid-auth.yml +++ /dev/null @@ -1,257 +0,0 @@ -tests: - - - description: "User info for single IPv4 host without database" - uri: "mongodb://alice:foo@127.0.0.1" - valid: true - warning: false - hosts: - - - type: "ipv4" - host: "127.0.0.1" - port: ~ - auth: - username: "alice" - password: "foo" - db: ~ - options: ~ - - - description: "User info for single IPv4 host with database" - uri: "mongodb://alice:foo@127.0.0.1/test" - valid: true - warning: false - hosts: - - - type: "ipv4" - host: "127.0.0.1" - port: ~ - auth: - username: "alice" - password: "foo" - db: "test" - options: ~ - - - description: "User info for single IP literal host without database" - uri: "mongodb://bob:bar@[::1]:27018" - valid: true - warning: false - hosts: - - - type: "ip_literal" - host: "::1" - port: 27018 - auth: - username: "bob" - password: "bar" - db: ~ - options: ~ - - - description: "User info for single IP literal host with database" - uri: "mongodb://bob:bar@[::1]:27018/admin" - valid: true - warning: false - hosts: - - - type: "ip_literal" - host: "::1" - port: 27018 - auth: - username: "bob" - password: "bar" - db: "admin" - options: ~ - - - description: "User info for single hostname without database" - uri: "mongodb://eve:baz@example.com" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "example.com" - port: ~ - auth: - username: "eve" - password: "baz" - db: ~ - options: ~ - - - description: "User info for single hostname with database" - uri: "mongodb://eve:baz@example.com/db2" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "example.com" - port: ~ - auth: - username: "eve" - password: "baz" - db: "db2" - options: ~ - - - description: "User info for multiple hosts without database" - uri: "mongodb://alice:secret@127.0.0.1,example.com:27018" - valid: true - warning: false - hosts: - - - type: "ipv4" - host: "127.0.0.1" - port: ~ - - - type: "hostname" - host: "example.com" - port: 27018 - auth: - username: "alice" - password: "secret" - db: ~ - options: ~ - - - description: "User info for multiple hosts with database" - uri: "mongodb://alice:secret@example.com,[::1]:27019/admin" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "example.com" - port: ~ - - - type: "ip_literal" - host: "::1" - port: 27019 - auth: - username: "alice" - password: "secret" - db: "admin" - options: ~ - - - description: "Username without password" - uri: "mongodb://alice@127.0.0.1" - valid: true - warning: false - hosts: - - - type: "ipv4" - host: "127.0.0.1" - port: ~ - auth: - username: "alice" - password: ~ - db: ~ - options: ~ - - - description: "Username with empty password" - uri: "mongodb://alice:@127.0.0.1" - valid: true - warning: false - hosts: - - - type: "ipv4" - host: "127.0.0.1" - port: ~ - auth: - username: "alice" - password: "" - db: ~ - options: ~ - - - description: "Escaped username and database without password" - uri: "mongodb://%40l%3Ace%2F%3D@example.com/my%3Ddb" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "example.com" - port: ~ - auth: - username: "@l:ce/=" - password: ~ - db: "my=db" - options: ~ - - - description: "Escaped user info and database (MONGODB-CR)" - uri: "mongodb://%24am:f%3Azzb%40z%2Fz%3D@127.0.0.1/admin%3F?authMechanism=MONGODB-CR" - valid: true - warning: false - hosts: - - - type: "ipv4" - host: "127.0.0.1" - port: ~ - auth: - username: "$am" - password: "f:zzb@z/z=" - db: "admin?" - options: - authmechanism: "MONGODB-CR" - - - description: "Subdelimiters in user/pass don't need escaping (MONGODB-CR)" - uri: "mongodb://!$&'()*+,;=:!$&'()*+,;=@127.0.0.1/admin?authMechanism=MONGODB-CR" - valid: true - warning: false - hosts: - - - type: "ipv4" - host: "127.0.0.1" - port: ~ - auth: - username: "!$&'()*+,;=" - password: "!$&'()*+,;=" - db: "admin" - options: - authmechanism: "MONGODB-CR" - - - description: "Escaped username (MONGODB-X509)" - uri: "mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/?authMechanism=MONGODB-X509" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "localhost" - port: ~ - auth: - username: "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry" - password: ~ - db: ~ - options: - authmechanism: "MONGODB-X509" - - - description: "Escaped username (GSSAPI)" - uri: "mongodb://user%40EXAMPLE.COM:secret@localhost/?authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:true&authMechanism=GSSAPI" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "localhost" - port: ~ - auth: - username: "user@EXAMPLE.COM" - password: "secret" - db: ~ - options: - authmechanism: "GSSAPI" - authmechanismproperties: - SERVICE_NAME: "other" - CANONICALIZE_HOST_NAME: true - - - description: "At-signs in options aren't part of the userinfo" - uri: "mongodb://alice:secret@example.com/admin?replicaset=my@replicaset" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "example.com" - port: ~ - auth: - username: "alice" - password: "secret" - db: "admin" - options: - replicaset: "my@replicaset" diff --git a/testdata/connection-string/valid-db-with-dotted-name.json b/testdata/connection-string/valid-db-with-dotted-name.json deleted file mode 100644 index 5b5aaa5ee3..0000000000 --- a/testdata/connection-string/valid-db-with-dotted-name.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "tests": [ - { - "description": "Multiple Unix domain sockets and auth DB resembling a socket (relative path)", - "uri": "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "rel/mongodb-27018.sock", - "port": null - } - ], - "auth": { - "username": null, - "password": null, - "db": "admin.sock" - }, - "options": null - }, - { - "description": "Multiple Unix domain sockets with auth DB resembling a path (relative path)", - "uri": "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin.shoe", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "rel/mongodb-27018.sock", - "port": null - } - ], - "auth": { - "username": null, - "password": null, - "db": "admin.shoe" - }, - "options": null - }, - { - "description": "Multiple Unix domain sockets and auth DB resembling a socket (absolute path)", - "uri": "mongodb://%2Ftmp%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock/admin.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "/tmp/mongodb-27018.sock", - "port": null - } - ], - "auth": { - "username": null, - "password": null, - "db": "admin.sock" - }, - "options": null - }, - { - "description": "Multiple Unix domain sockets with auth DB resembling a path (absolute path)", - "uri": "mongodb://%2Ftmp%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock/admin.shoe", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "/tmp/mongodb-27018.sock", - "port": null - } - ], - "auth": { - "username": null, - "password": null, - "db": "admin.shoe" - }, - "options": null - } - ] -} diff --git a/testdata/connection-string/valid-db-with-dotted-name.yml b/testdata/connection-string/valid-db-with-dotted-name.yml deleted file mode 100644 index 651e62e654..0000000000 --- a/testdata/connection-string/valid-db-with-dotted-name.yml +++ /dev/null @@ -1,77 +0,0 @@ -tests: - - - description: "Multiple Unix domain sockets and auth DB resembling a socket (relative path)" - uri: "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "rel/mongodb-27018.sock" - port: ~ - auth: - username: ~ - password: ~ - db: "admin.sock" - options: ~ - - - description: "Multiple Unix domain sockets with auth DB resembling a path (relative path)" - uri: "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin.shoe" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "rel/mongodb-27018.sock" - port: ~ - auth: - username: ~ - password: ~ - db: "admin.shoe" - options: ~ - - - description: "Multiple Unix domain sockets and auth DB resembling a socket (absolute path)" - uri: "mongodb://%2Ftmp%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock/admin.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "/tmp/mongodb-27018.sock" - port: ~ - auth: - username: ~ - password: ~ - db: "admin.sock" - options: ~ - - - description: "Multiple Unix domain sockets with auth DB resembling a path (absolute path)" - uri: "mongodb://%2Ftmp%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock/admin.shoe" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "/tmp/mongodb-27018.sock" - port: ~ - auth: - username: ~ - password: ~ - db: "admin.shoe" - options: ~ diff --git a/testdata/connection-string/valid-host_identifiers.json b/testdata/connection-string/valid-host_identifiers.json deleted file mode 100644 index e8833b4af2..0000000000 --- a/testdata/connection-string/valid-host_identifiers.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "tests": [ - { - "description": "Single IPv4 host without port", - "uri": "mongodb://127.0.0.1", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ipv4", - "host": "127.0.0.1", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Single IPv4 host with port", - "uri": "mongodb://127.0.0.1:27018", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ipv4", - "host": "127.0.0.1", - "port": 27018 - } - ], - "auth": null, - "options": null - }, - { - "description": "Single IP literal host without port", - "uri": "mongodb://[::1]", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ip_literal", - "host": "::1", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Single IP literal host with port", - "uri": "mongodb://[::1]:27019", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ip_literal", - "host": "::1", - "port": 27019 - } - ], - "auth": null, - "options": null - }, - { - "description": "Single hostname without port", - "uri": "mongodb://example.com", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "example.com", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Single hostname with port", - "uri": "mongodb://example.com:27020", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "example.com", - "port": 27020 - } - ], - "auth": null, - "options": null - }, - { - "description": "Single hostname (resembling IPv4) without port", - "uri": "mongodb://256.0.0.1", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "256.0.0.1", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Multiple hosts (mixed formats)", - "uri": "mongodb://127.0.0.1,[::1]:27018,example.com:27019", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ipv4", - "host": "127.0.0.1", - "port": null - }, - { - "type": "ip_literal", - "host": "::1", - "port": 27018 - }, - { - "type": "hostname", - "host": "example.com", - "port": 27019 - } - ], - "auth": null, - "options": null - }, - { - "description": "UTF-8 hosts", - "uri": "mongodb://bücher.example.com,umläut.example.com/", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "bücher.example.com", - "port": null - }, - { - "type": "hostname", - "host": "umläut.example.com", - "port": null - } - ], - "auth": null, - "options": null - } - ] -} diff --git a/testdata/connection-string/valid-host_identifiers.yml b/testdata/connection-string/valid-host_identifiers.yml deleted file mode 100644 index 4d185c8764..0000000000 --- a/testdata/connection-string/valid-host_identifiers.yml +++ /dev/null @@ -1,121 +0,0 @@ -tests: - - - description: "Single IPv4 host without port" - uri: "mongodb://127.0.0.1" - valid: true - warning: false - hosts: - - - type: "ipv4" - host: "127.0.0.1" - port: ~ - auth: ~ - options: ~ - - - description: "Single IPv4 host with port" - uri: "mongodb://127.0.0.1:27018" - valid: true - warning: false - hosts: - - - type: "ipv4" - host: "127.0.0.1" - port: 27018 - auth: ~ - options: ~ - - - description: "Single IP literal host without port" - uri: "mongodb://[::1]" - valid: true - warning: false - hosts: - - - type: "ip_literal" - host: "::1" - port: ~ - auth: ~ - options: ~ - - - description: "Single IP literal host with port" - uri: "mongodb://[::1]:27019" - valid: true - warning: false - hosts: - - - type: "ip_literal" - host: "::1" - port: 27019 - auth: ~ - options: ~ - - - description: "Single hostname without port" - uri: "mongodb://example.com" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "example.com" - port: ~ - auth: ~ - options: ~ - - - description: "Single hostname with port" - uri: "mongodb://example.com:27020" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "example.com" - port: 27020 - auth: ~ - options: ~ - - - description: "Single hostname (resembling IPv4) without port" - uri: "mongodb://256.0.0.1" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "256.0.0.1" - port: ~ - auth: ~ - options: ~ - - - description: "Multiple hosts (mixed formats)" - uri: "mongodb://127.0.0.1,[::1]:27018,example.com:27019" - valid: true - warning: false - hosts: - - - type: "ipv4" - host: "127.0.0.1" - port: ~ - - - type: "ip_literal" - host: "::1" - port: 27018 - - - type: "hostname" - host: "example.com" - port: 27019 - auth: ~ - options: ~ - - - description: "UTF-8 hosts" - uri: "mongodb://bücher.example.com,umläut.example.com/" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "bücher.example.com" - port: ~ - - - type: "hostname" - host: "umläut.example.com" - port: ~ - auth: ~ - options: ~ diff --git a/testdata/connection-string/valid-options.json b/testdata/connection-string/valid-options.json deleted file mode 100644 index 4c2bded9e7..0000000000 --- a/testdata/connection-string/valid-options.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "tests": [ - { - "description": "Option names are normalized to lowercase", - "uri": "mongodb://alice:secret@example.com/admin?AUTHMechanism=MONGODB-CR", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "example.com", - "port": null - } - ], - "auth": { - "username": "alice", - "password": "secret", - "db": "admin" - }, - "options": { - "authmechanism": "MONGODB-CR" - } - } - ] -} diff --git a/testdata/connection-string/valid-options.yml b/testdata/connection-string/valid-options.yml deleted file mode 100644 index e1b94039c8..0000000000 --- a/testdata/connection-string/valid-options.yml +++ /dev/null @@ -1,17 +0,0 @@ -tests: - - - description: "Option names are normalized to lowercase" - uri: "mongodb://alice:secret@example.com/admin?AUTHMechanism=MONGODB-CR" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "example.com" - port: ~ - auth: - username: "alice" - password: "secret" - db: "admin" - options: - authmechanism: "MONGODB-CR" diff --git a/testdata/connection-string/valid-unix_socket-absolute.json b/testdata/connection-string/valid-unix_socket-absolute.json deleted file mode 100644 index 66491db13b..0000000000 --- a/testdata/connection-string/valid-unix_socket-absolute.json +++ /dev/null @@ -1,266 +0,0 @@ -{ - "tests": [ - { - "description": "Unix domain socket (absolute path with trailing slash)", - "uri": "mongodb://%2Ftmp%2Fmongodb-27017.sock/", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/mongodb-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unix domain socket (absolute path without trailing slash)", - "uri": "mongodb://%2Ftmp%2Fmongodb-27017.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/mongodb-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unix domain socket (mixed case)", - "uri": "mongodb://%2Ftmp%2FMongoDB-27017.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/MongoDB-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unix domain socket (absolute path with spaces in path)", - "uri": "mongodb://%2Ftmp%2F %2Fmongodb-27017.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/ /mongodb-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Multiple Unix domain sockets (absolute paths)", - "uri": "mongodb://%2Ftmp%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "/tmp/mongodb-27018.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Multiple hosts (absolute path and ipv4)", - "uri": "mongodb://127.0.0.1:27017,%2Ftmp%2Fmongodb-27017.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ipv4", - "host": "127.0.0.1", - "port": 27017 - }, - { - "type": "unix", - "host": "/tmp/mongodb-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Multiple hosts (absolute path and hostname resembling relative path)", - "uri": "mongodb://mongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "/tmp/mongodb-27018.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unix domain socket with auth database (absolute path)", - "uri": "mongodb://alice:foo@%2Ftmp%2Fmongodb-27017.sock/admin", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/mongodb-27017.sock", - "port": null - } - ], - "auth": { - "username": "alice", - "password": "foo", - "db": "admin" - }, - "options": null - }, - { - "description": "Unix domain socket with path resembling socket file (absolute path with trailing slash)", - "uri": "mongodb://%2Ftmp%2Fpath.to.sock%2Fmongodb-27017.sock/", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/path.to.sock/mongodb-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unix domain socket with path resembling socket file (absolute path without trailing slash)", - "uri": "mongodb://%2Ftmp%2Fpath.to.sock%2Fmongodb-27017.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/path.to.sock/mongodb-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unix domain socket with path resembling socket file and auth (absolute path)", - "uri": "mongodb://bob:bar@%2Ftmp%2Fpath.to.sock%2Fmongodb-27017.sock/admin", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/path.to.sock/mongodb-27017.sock", - "port": null - } - ], - "auth": { - "username": "bob", - "password": "bar", - "db": "admin" - }, - "options": null - }, - { - "description": "Multiple Unix domain sockets and auth DB (absolute path)", - "uri": "mongodb://%2Ftmp%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock/admin", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "/tmp/mongodb-27018.sock", - "port": null - } - ], - "auth": { - "username": null, - "password": null, - "db": "admin" - }, - "options": null - }, - { - "description": "Multiple Unix domain sockets with auth DB (absolute path)", - "uri": "mongodb://%2Ftmp%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock/admin", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "/tmp/mongodb-27018.sock", - "port": null - } - ], - "auth": { - "username": null, - "password": null, - "db": "admin" - }, - "options": null - }, - { - "description": "Multiple Unix domain sockets with auth and query string (absolute path)", - "uri": "mongodb://bob:bar@%2Ftmp%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock/admin?w=1", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "/tmp/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "/tmp/mongodb-27018.sock", - "port": null - } - ], - "auth": { - "username": "bob", - "password": "bar", - "db": "admin" - }, - "options": { - "w": 1 - } - } - ] -} diff --git a/testdata/connection-string/valid-unix_socket-absolute.yml b/testdata/connection-string/valid-unix_socket-absolute.yml deleted file mode 100644 index cdfd00d332..0000000000 --- a/testdata/connection-string/valid-unix_socket-absolute.yml +++ /dev/null @@ -1,209 +0,0 @@ -tests: - - - description: "Unix domain socket (absolute path with trailing slash)" - uri: "mongodb://%2Ftmp%2Fmongodb-27017.sock/" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/mongodb-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Unix domain socket (absolute path without trailing slash)" - uri: "mongodb://%2Ftmp%2Fmongodb-27017.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/mongodb-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Unix domain socket (mixed case)" - uri: "mongodb://%2Ftmp%2FMongoDB-27017.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/MongoDB-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Unix domain socket (absolute path with spaces in path)" - uri: "mongodb://%2Ftmp%2F %2Fmongodb-27017.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/ /mongodb-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Multiple Unix domain sockets (absolute paths)" - uri: "mongodb://%2Ftmp%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "/tmp/mongodb-27018.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Multiple hosts (absolute path and ipv4)" - uri: "mongodb://127.0.0.1:27017,%2Ftmp%2Fmongodb-27017.sock" - valid: true - warning: false - hosts: - - - type: "ipv4" - host: "127.0.0.1" - port: 27017 - - - type: "unix" - host: "/tmp/mongodb-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Multiple hosts (absolute path and hostname resembling relative path)" - uri: "mongodb://mongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "/tmp/mongodb-27018.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Unix domain socket with auth database (absolute path)" - uri: "mongodb://alice:foo@%2Ftmp%2Fmongodb-27017.sock/admin" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/mongodb-27017.sock" - port: ~ - auth: - username: "alice" - password: "foo" - db: "admin" - options: ~ - - - description: "Unix domain socket with path resembling socket file (absolute path with trailing slash)" - uri: "mongodb://%2Ftmp%2Fpath.to.sock%2Fmongodb-27017.sock/" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/path.to.sock/mongodb-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Unix domain socket with path resembling socket file (absolute path without trailing slash)" - uri: "mongodb://%2Ftmp%2Fpath.to.sock%2Fmongodb-27017.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/path.to.sock/mongodb-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Unix domain socket with path resembling socket file and auth (absolute path)" - uri: "mongodb://bob:bar@%2Ftmp%2Fpath.to.sock%2Fmongodb-27017.sock/admin" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/path.to.sock/mongodb-27017.sock" - port: ~ - auth: - username: "bob" - password: "bar" - db: "admin" - options: ~ - - - description: "Multiple Unix domain sockets and auth DB (absolute path)" - uri: "mongodb://%2Ftmp%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock/admin" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "/tmp/mongodb-27018.sock" - port: ~ - auth: - username: ~ - password: ~ - db: "admin" - options: ~ - - - description: "Multiple Unix domain sockets with auth DB (absolute path)" - uri: "mongodb://%2Ftmp%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock/admin" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "/tmp/mongodb-27018.sock" - port: ~ - auth: - username: ~ - password: ~ - db: "admin" - options: ~ - - - description: "Multiple Unix domain sockets with auth and query string (absolute path)" - uri: "mongodb://bob:bar@%2Ftmp%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock/admin?w=1" - valid: true - warning: false - hosts: - - - type: "unix" - host: "/tmp/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "/tmp/mongodb-27018.sock" - port: ~ - auth: - username: "bob" - password: "bar" - db: "admin" - options: - w: 1 diff --git a/testdata/connection-string/valid-unix_socket-relative.json b/testdata/connection-string/valid-unix_socket-relative.json deleted file mode 100644 index 788720920b..0000000000 --- a/testdata/connection-string/valid-unix_socket-relative.json +++ /dev/null @@ -1,286 +0,0 @@ -{ - "tests": [ - { - "description": "Unix domain socket (relative path with trailing slash)", - "uri": "mongodb://rel%2Fmongodb-27017.sock/", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/mongodb-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unix domain socket (relative path without trailing slash)", - "uri": "mongodb://rel%2Fmongodb-27017.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/mongodb-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unix domain socket (mixed case)", - "uri": "mongodb://rel%2FMongoDB-27017.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/MongoDB-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unix domain socket (relative path with spaces)", - "uri": "mongodb://rel%2F %2Fmongodb-27017.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/ /mongodb-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Multiple Unix domain sockets (relative paths)", - "uri": "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "rel/mongodb-27018.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Multiple Unix domain sockets (relative and absolute paths)", - "uri": "mongodb://rel%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "/tmp/mongodb-27018.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Multiple hosts (relative path and ipv4)", - "uri": "mongodb://127.0.0.1:27017,rel%2Fmongodb-27017.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "ipv4", - "host": "127.0.0.1", - "port": 27017 - }, - { - "type": "unix", - "host": "rel/mongodb-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Multiple hosts (relative path and hostname resembling relative path)", - "uri": "mongodb://mongodb-27017.sock,rel%2Fmongodb-27018.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "hostname", - "host": "mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "rel/mongodb-27018.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unix domain socket with auth database (relative path)", - "uri": "mongodb://alice:foo@rel%2Fmongodb-27017.sock/admin", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/mongodb-27017.sock", - "port": null - } - ], - "auth": { - "username": "alice", - "password": "foo", - "db": "admin" - }, - "options": null - }, - { - "description": "Unix domain socket with path resembling socket file (relative path with trailing slash)", - "uri": "mongodb://rel%2Fpath.to.sock%2Fmongodb-27017.sock/", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/path.to.sock/mongodb-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unix domain socket with path resembling socket file (relative path without trailing slash)", - "uri": "mongodb://rel%2Fpath.to.sock%2Fmongodb-27017.sock", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/path.to.sock/mongodb-27017.sock", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unix domain socket with path resembling socket file and auth (relative path)", - "uri": "mongodb://bob:bar@rel%2Fpath.to.sock%2Fmongodb-27017.sock/admin", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/path.to.sock/mongodb-27017.sock", - "port": null - } - ], - "auth": { - "username": "bob", - "password": "bar", - "db": "admin" - }, - "options": null - }, - { - "description": "Multiple Unix domain sockets and auth DB resembling a socket (relative path)", - "uri": "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "rel/mongodb-27018.sock", - "port": null - } - ], - "auth": { - "username": null, - "password": null, - "db": "admin" - }, - "options": null - }, - { - "description": "Multiple Unix domain sockets with auth DB resembling a path (relative path)", - "uri": "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "rel/mongodb-27018.sock", - "port": null - } - ], - "auth": { - "username": null, - "password": null, - "db": "admin" - }, - "options": null - }, - { - "description": "Multiple Unix domain sockets with auth and query string (relative path)", - "uri": "mongodb://bob:bar@rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin?w=1", - "valid": true, - "warning": false, - "hosts": [ - { - "type": "unix", - "host": "rel/mongodb-27017.sock", - "port": null - }, - { - "type": "unix", - "host": "rel/mongodb-27018.sock", - "port": null - } - ], - "auth": { - "username": "bob", - "password": "bar", - "db": "admin" - }, - "options": { - "w": 1 - } - } - ] -} diff --git a/testdata/connection-string/valid-unix_socket-relative.yml b/testdata/connection-string/valid-unix_socket-relative.yml deleted file mode 100644 index 6d0d108205..0000000000 --- a/testdata/connection-string/valid-unix_socket-relative.yml +++ /dev/null @@ -1,225 +0,0 @@ -tests: - - - description: "Unix domain socket (relative path with trailing slash)" - uri: "mongodb://rel%2Fmongodb-27017.sock/" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/mongodb-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Unix domain socket (relative path without trailing slash)" - uri: "mongodb://rel%2Fmongodb-27017.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/mongodb-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Unix domain socket (mixed case)" - uri: "mongodb://rel%2FMongoDB-27017.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/MongoDB-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Unix domain socket (relative path with spaces)" - uri: "mongodb://rel%2F %2Fmongodb-27017.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/ /mongodb-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Multiple Unix domain sockets (relative paths)" - uri: "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "rel/mongodb-27018.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Multiple Unix domain sockets (relative and absolute paths)" - uri: "mongodb://rel%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "/tmp/mongodb-27018.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Multiple hosts (relative path and ipv4)" - uri: "mongodb://127.0.0.1:27017,rel%2Fmongodb-27017.sock" - valid: true - warning: false - hosts: - - - type: "ipv4" - host: "127.0.0.1" - port: 27017 - - - type: "unix" - host: "rel/mongodb-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Multiple hosts (relative path and hostname resembling relative path)" - uri: "mongodb://mongodb-27017.sock,rel%2Fmongodb-27018.sock" - valid: true - warning: false - hosts: - - - type: "hostname" - host: "mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "rel/mongodb-27018.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Unix domain socket with auth database (relative path)" - uri: "mongodb://alice:foo@rel%2Fmongodb-27017.sock/admin" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/mongodb-27017.sock" - port: ~ - auth: - username: "alice" - password: "foo" - db: "admin" - options: ~ - - - description: "Unix domain socket with path resembling socket file (relative path with trailing slash)" - uri: "mongodb://rel%2Fpath.to.sock%2Fmongodb-27017.sock/" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/path.to.sock/mongodb-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Unix domain socket with path resembling socket file (relative path without trailing slash)" - uri: "mongodb://rel%2Fpath.to.sock%2Fmongodb-27017.sock" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/path.to.sock/mongodb-27017.sock" - port: ~ - auth: ~ - options: ~ - - - description: "Unix domain socket with path resembling socket file and auth (relative path)" - uri: "mongodb://bob:bar@rel%2Fpath.to.sock%2Fmongodb-27017.sock/admin" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/path.to.sock/mongodb-27017.sock" - port: ~ - auth: - username: "bob" - password: "bar" - db: "admin" - options: ~ - - - description: "Multiple Unix domain sockets and auth DB resembling a socket (relative path)" - uri: "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "rel/mongodb-27018.sock" - port: ~ - auth: - username: ~ - password: ~ - db: "admin" - options: ~ - - - description: "Multiple Unix domain sockets with auth DB resembling a path (relative path)" - uri: "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "rel/mongodb-27018.sock" - port: ~ - auth: - username: ~ - password: ~ - db: "admin" - options: ~ - - - description: "Multiple Unix domain sockets with auth and query string (relative path)" - uri: "mongodb://bob:bar@rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin?w=1" - valid: true - warning: false - hosts: - - - type: "unix" - host: "rel/mongodb-27017.sock" - port: ~ - - - type: "unix" - host: "rel/mongodb-27018.sock" - port: ~ - auth: - username: "bob" - password: "bar" - db: "admin" - options: - w: 1 diff --git a/testdata/connection-string/valid-warnings.json b/testdata/connection-string/valid-warnings.json deleted file mode 100644 index 87f7248f21..0000000000 --- a/testdata/connection-string/valid-warnings.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "tests": [ - { - "description": "Unrecognized option keys are ignored", - "uri": "mongodb://example.com/?foo=bar", - "valid": true, - "warning": true, - "hosts": [ - { - "type": "hostname", - "host": "example.com", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Unsupported option values are ignored", - "uri": "mongodb://example.com/?fsync=ifPossible", - "valid": true, - "warning": true, - "hosts": [ - { - "type": "hostname", - "host": "example.com", - "port": null - } - ], - "auth": null, - "options": null - }, - { - "description": "Repeated option keys", - "uri": "mongodb://example.com/?replicaSet=test&replicaSet=test", - "valid": true, - "warning": true, - "hosts": [ - { - "type": "hostname", - "host": "example.com", - "port": null - } - ], - "auth": null, - "options": { - "replicaset": "test" - } - }, - { - "description": "Deprecated (or unknown) options are ignored if replacement exists", - "uri": "mongodb://example.com/?wtimeout=5&wtimeoutMS=10", - "valid": true, - "warning": true, - "hosts": [ - { - "type": "hostname", - "host": "example.com", - "port": null - } - ], - "auth": null, - "options": { - "wtimeoutms": 10 - } - } - ] -} diff --git a/testdata/connection-string/valid-warnings.yml b/testdata/connection-string/valid-warnings.yml deleted file mode 100644 index 4515c9a3bf..0000000000 --- a/testdata/connection-string/valid-warnings.yml +++ /dev/null @@ -1,51 +0,0 @@ -tests: - - - description: "Unrecognized option keys are ignored" - uri: "mongodb://example.com/?foo=bar" - valid: true - warning: true - hosts: - - - type: "hostname" - host: "example.com" - port: ~ - auth: ~ - options: ~ - - - description: "Unsupported option values are ignored" - uri: "mongodb://example.com/?fsync=ifPossible" - valid: true - warning: true - hosts: - - - type: "hostname" - host: "example.com" - port: ~ - auth: ~ - options: ~ - - - description: "Repeated option keys" - uri: "mongodb://example.com/?replicaSet=test&replicaSet=test" - valid: true - warning: true - hosts: - - - type: "hostname" - host: "example.com" - port: ~ - auth: ~ - options: - replicaset: "test" - - - description: "Deprecated (or unknown) options are ignored if replacement exists" - uri: "mongodb://example.com/?wtimeout=5&wtimeoutMS=10" - valid: true - warning: true - hosts: - - - type: "hostname" - host: "example.com" - port: ~ - auth: ~ - options: - wtimeoutms: 10 diff --git a/testdata/convenient-transactions/callback-aborts.json b/testdata/convenient-transactions/callback-aborts.json deleted file mode 100644 index 2a3038e8ba..0000000000 --- a/testdata/convenient-transactions/callback-aborts.json +++ /dev/null @@ -1,244 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "withTransaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "withTransaction succeeds if callback aborts", - "useMultipleMongoses": true, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "withTransaction succeeds if callback aborts with no ops", - "useMultipleMongoses": true, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "abortTransaction", - "object": "session0" - } - ] - } - } - } - ], - "expectations": [], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "withTransaction still succeeds if callback aborts and runs extra op", - "useMultipleMongoses": true, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "autocommit": null, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 2 - } - ] - } - } - } - ] -} diff --git a/testdata/convenient-transactions/callback-aborts.yml b/testdata/convenient-transactions/callback-aborts.yml deleted file mode 100644 index fcb4f39163..0000000000 --- a/testdata/convenient-transactions/callback-aborts.yml +++ /dev/null @@ -1,170 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "withTransaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - - # Session state will be ABORTED when callback returns to withTransaction - description: withTransaction succeeds if callback aborts - useMultipleMongoses: true - operations: - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - - - name: abortTransaction - object: session0 - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: abortTransaction - database_name: admin - outcome: - collection: - data: [] - - - # Session state will be ABORTED when callback returns to withTransaction - description: withTransaction succeeds if callback aborts with no ops - useMultipleMongoses: true - operations: - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: abortTransaction - object: session0 - expectations: [] - outcome: - collection: - data: [] - - - # Session state will be NO_TXN when callback returns to withTransaction - description: withTransaction still succeeds if callback aborts and runs extra op - useMultipleMongoses: true - operations: - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - - - name: abortTransaction - object: session0 - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 2 } - result: - insertedId: 2 - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: abortTransaction - database_name: admin - - - command_started_event: - command: - # This test is agnostic about retryWrites, so we do not assert the - # txnNumber. If retryWrites=true, the txnNumber will be incremented - # from the value used in the previous transaction; otherwise, the - # field will not be present at all. - insert: *collection_name - documents: - - { _id: 2 } - ordered: true - lsid: session0 - # omitted fields - autocommit: ~ - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - outcome: - collection: - data: - - { _id: 2 } diff --git a/testdata/convenient-transactions/callback-commits.json b/testdata/convenient-transactions/callback-commits.json deleted file mode 100644 index 4abbbdd0e6..0000000000 --- a/testdata/convenient-transactions/callback-commits.json +++ /dev/null @@ -1,303 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "withTransaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "withTransaction succeeds if callback commits", - "useMultipleMongoses": true, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - }, - { - "description": "withTransaction still succeeds if callback commits and runs extra op", - "useMultipleMongoses": true, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "result": { - "insertedId": 3 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 3 - } - ], - "ordered": true, - "lsid": "session0", - "autocommit": null, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - } - } - ] -} diff --git a/testdata/convenient-transactions/callback-commits.yml b/testdata/convenient-transactions/callback-commits.yml deleted file mode 100644 index 6eb6bc6fcc..0000000000 --- a/testdata/convenient-transactions/callback-commits.yml +++ /dev/null @@ -1,204 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "withTransaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - - # Session state will be COMMITTED when callback returns to withTransaction - description: withTransaction succeeds if callback commits - useMultipleMongoses: true - operations: - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 2 } - result: - insertedId: 2 - - - name: commitTransaction - object: session0 - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 2 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - outcome: - collection: - data: - - { _id: 1 } - - { _id: 2 } - - - # Session state will be NO_TXN when callback returns to withTransaction - description: withTransaction still succeeds if callback commits and runs extra op - useMultipleMongoses: true - operations: - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 2 } - result: - insertedId: 2 - - - name: commitTransaction - object: session0 - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 3 } - result: - insertedId: 3 - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 2 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - # This test is agnostic about retryWrites, so we do not assert the - # txnNumber. If retryWrites=true, the txnNumber will be incremented - # from the value used in the previous transaction; otherwise, the - # field will not be present at all. - insert: *collection_name - documents: - - { _id: 3 } - ordered: true - lsid: session0 - # omitted fields - autocommit: ~ - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - outcome: - collection: - data: - - { _id: 1 } - - { _id: 2 } - - { _id: 3 } diff --git a/testdata/convenient-transactions/callback-retry.json b/testdata/convenient-transactions/callback-retry.json deleted file mode 100644 index a0391c1b5d..0000000000 --- a/testdata/convenient-transactions/callback-retry.json +++ /dev/null @@ -1,315 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "withTransaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "callback succeeds after multiple connection errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "3" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "3" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "callback is not retried after non-transient error (DuplicateKeyError)", - "useMultipleMongoses": true, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "errorLabelsOmit": [ - "TransientTransactionError", - "UnknownTransactionCommitResult" - ] - } - } - ] - } - }, - "result": { - "errorLabelsOmit": [ - "TransientTransactionError", - "UnknownTransactionCommitResult" - ], - "errorContains": "E11000" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/convenient-transactions/callback-retry.yml b/testdata/convenient-transactions/callback-retry.yml deleted file mode 100644 index edff016bdb..0000000000 --- a/testdata/convenient-transactions/callback-retry.yml +++ /dev/null @@ -1,215 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "withTransaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - - description: callback succeeds after multiple connection errors - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - closeConnection: true - operations: - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - # We do not assert the result here, as insertOne will fail for - # the first two executions of the callback before ultimately - # succeeding and returning a result. Asserting the state of the - # output collection after the test is sufficient. - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: abortTransaction - database_name: admin - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - # second transaction will be causally consistent with the first - readConcern: { afterClusterTime: 42 } - # txnNumber is incremented when retrying the transaction - txnNumber: { $numberLong: "2" } - startTransaction: true - autocommit: false - # omitted fields - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "2" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: abortTransaction - database_name: admin - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - # third transaction will be causally consistent with the second - readConcern: { afterClusterTime: 42 } - # txnNumber is incremented when retrying the transaction - txnNumber: { $numberLong: "3" } - startTransaction: true - autocommit: false - # omitted fields - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "3" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - outcome: - collection: - data: - - { _id: 1 } - - - description: callback is not retried after non-transient error (DuplicateKeyError) - useMultipleMongoses: true - operations: - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - errorLabelsOmit: ["TransientTransactionError", "UnknownTransactionCommitResult"] - result: - errorLabelsOmit: ["TransientTransactionError", "UnknownTransactionCommitResult"] - # DuplicateKey error code included in the bulk write error message - # returned by the server - errorContains: E11000 - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: abortTransaction - database_name: admin - outcome: - collection: - data: [] diff --git a/testdata/convenient-transactions/commit-retry.json b/testdata/convenient-transactions/commit-retry.json deleted file mode 100644 index 6257e99345..0000000000 --- a/testdata/convenient-transactions/commit-retry.json +++ /dev/null @@ -1,533 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "withTransaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "commitTransaction succeeds after multiple connection errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction retry only overwrites write concern w option", - "skipReason": "GODRIVER-2348: wtimeout is deprecated", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - }, - "options": { - "writeConcern": { - "w": 2, - "j": true, - "wtimeout": 5000 - } - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": 2, - "j": true, - "wtimeout": 5000 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": "majority", - "j": true, - "wtimeout": 5000 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": "majority", - "j": true, - "wtimeout": 5000 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commit is retried after commitTransaction UnknownTransactionCommitResult (NotWritablePrimary)", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 10107, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commit is not retried after MaxTimeMSExpired error", - "skipReason": "GODRIVER-2348: maxTimeMS is deprecated", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 50 - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - }, - "options": { - "maxCommitTimeMS": 60000 - } - }, - "result": { - "errorCodeName": "MaxTimeMSExpired", - "errorLabelsContain": [ - "UnknownTransactionCommitResult" - ], - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "maxTimeMS": 60000, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/convenient-transactions/commit-retry.yml b/testdata/convenient-transactions/commit-retry.yml deleted file mode 100644 index 3ff6497ae4..0000000000 --- a/testdata/convenient-transactions/commit-retry.yml +++ /dev/null @@ -1,327 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "withTransaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - - description: commitTransaction succeeds after multiple connection errors - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - closeConnection: true - operations: - - &withTransaction - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # commitTransaction applies w:majority on retries (SPEC-1185) - writeConcern: { w: majority, wtimeout: 10000 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # commitTransaction applies w:majority on retries (SPEC-1185) - writeConcern: { w: majority, wtimeout: 10000 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - outcome: - collection: - data: - - { _id: 1 } - - - description: commitTransaction retry only overwrites write concern w option - skipReason: "GODRIVER-2348: wtimeout is deprecated" - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - closeConnection: true - operations: - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - options: - writeConcern: { w: 2, j: true, wtimeout: 5000 } - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - writeConcern: { w: 2, j: true, wtimeout: 5000 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # commitTransaction applies w:majority on retries (SPEC-1185) - writeConcern: { w: majority, j: true, wtimeout: 5000 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # commitTransaction applies w:majority on retries (SPEC-1185) - writeConcern: { w: majority, j: true, wtimeout: 5000 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - outcome: - collection: - data: - - { _id: 1 } - - - description: commit is retried after commitTransaction UnknownTransactionCommitResult (NotWritablePrimary) - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - errorCode: 10107 # NotWritablePrimary - errorLabels: ["RetryableWriteError"] # SPEC-1565 - closeConnection: false - operations: - - *withTransaction - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # commitTransaction applies w:majority on retries (SPEC-1185) - writeConcern: { w: majority, wtimeout: 10000 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # commitTransaction applies w:majority on retries (SPEC-1185) - writeConcern: { w: majority, wtimeout: 10000 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - outcome: - collection: - data: - - { _id: 1 } - - - description: commit is not retried after MaxTimeMSExpired error - skipReason: "GODRIVER-2348: maxTimeMS is deprecated" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 50 # MaxTimeMSExpired - operations: - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - options: - maxCommitTimeMS: 60000 - result: - errorCodeName: MaxTimeMSExpired - errorLabelsContain: ["UnknownTransactionCommitResult"] - errorLabelsOmit: ["TransientTransactionError"] - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - maxTimeMS: 60000 - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - outcome: - collection: - # In reality, the outcome of the commit is unknown but we fabricate - # the error with failCommand.errorCode which does not apply the commit - # operation. - data: [] diff --git a/testdata/convenient-transactions/commit-transienttransactionerror-4.2.json b/testdata/convenient-transactions/commit-transienttransactionerror-4.2.json deleted file mode 100644 index 7663bb54e1..0000000000 --- a/testdata/convenient-transactions/commit-transienttransactionerror-4.2.json +++ /dev/null @@ -1,197 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.6", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "withTransaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "transaction is retried after commitTransaction TransientTransactionError (PreparedTransactionInProgress)", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 267, - "closeConnection": false - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "3" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "3" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/convenient-transactions/commit-transienttransactionerror-4.2.yml b/testdata/convenient-transactions/commit-transienttransactionerror-4.2.yml deleted file mode 100644 index 10f51d079b..0000000000 --- a/testdata/convenient-transactions/commit-transienttransactionerror-4.2.yml +++ /dev/null @@ -1,139 +0,0 @@ -runOn: - - - minServerVersion: "4.1.6" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "withTransaction-tests" -collection_name: &collection_name "test" - -data: [] - -# These tests use error codes where the TransientTransactionError label will be -# applied to the error response for commitTransaction. This will cause the -# entire transaction to be retried instead of commitTransaction. -# -# See: https://github.com/mongodb/mongo/blob/r4.1.6/src/mongo/db/handle_request_response.cpp -tests: - - - description: transaction is retried after commitTransaction TransientTransactionError (PreparedTransactionInProgress) - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - errorCode: 267 # PreparedTransactionInProgress - closeConnection: false - operations: - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - # second transaction will be causally consistent with the first - readConcern: { afterClusterTime: 42 } - # txnNumber is incremented when retrying the transaction - txnNumber: { $numberLong: "2" } - startTransaction: true - autocommit: false - # omitted fields - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "2" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - # third transaction will be causally consistent with the second - readConcern: { afterClusterTime: 42 } - # txnNumber is incremented when retrying the transaction - txnNumber: { $numberLong: "3" } - startTransaction: true - autocommit: false - # omitted fields - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "3" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - outcome: - collection: - data: - - { _id: 1 } diff --git a/testdata/convenient-transactions/commit-transienttransactionerror.json b/testdata/convenient-transactions/commit-transienttransactionerror.json deleted file mode 100644 index 18becbe09c..0000000000 --- a/testdata/convenient-transactions/commit-transienttransactionerror.json +++ /dev/null @@ -1,725 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "withTransaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "transaction is retried after commitTransaction TransientTransactionError (LockTimeout)", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 24, - "closeConnection": false - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "3" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "3" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "transaction is retried after commitTransaction TransientTransactionError (WriteConflict)", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 112, - "closeConnection": false - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "3" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "3" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "transaction is retried after commitTransaction TransientTransactionError (SnapshotUnavailable)", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 246, - "closeConnection": false - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "3" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "3" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "transaction is retried after commitTransaction TransientTransactionError (NoSuchTransaction)", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 251, - "closeConnection": false - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "3" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "3" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/convenient-transactions/commit-transienttransactionerror.yml b/testdata/convenient-transactions/commit-transienttransactionerror.yml deleted file mode 100644 index db1f64ae54..0000000000 --- a/testdata/convenient-transactions/commit-transienttransactionerror.yml +++ /dev/null @@ -1,175 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "withTransaction-tests" -collection_name: &collection_name "test" - -data: [] - -# These tests use error codes where the TransientTransactionError label will be -# applied to the error response for commitTransaction. This will cause the -# entire transaction to be retried instead of commitTransaction. -# -# See: https://github.com/mongodb/mongo/blob/r4.1.6/src/mongo/db/handle_request_response.cpp -tests: - - - description: transaction is retried after commitTransaction TransientTransactionError (LockTimeout) - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - errorCode: 24 # LockTimeout - closeConnection: false - operations: &operations - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - expectations: &expectations - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - # second transaction will be causally consistent with the first - readConcern: { afterClusterTime: 42 } - # txnNumber is incremented when retrying the transaction - txnNumber: { $numberLong: "2" } - startTransaction: true - autocommit: false - # omitted fields - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "2" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - # third transaction will be causally consistent with the second - readConcern: { afterClusterTime: 42 } - # txnNumber is incremented when retrying the transaction - txnNumber: { $numberLong: "3" } - startTransaction: true - autocommit: false - # omitted fields - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "3" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - outcome: &outcome - collection: - data: - - { _id: 1 } - - - description: transaction is retried after commitTransaction TransientTransactionError (WriteConflict) - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - errorCode: 112 # WriteConflict - closeConnection: false - operations: *operations - expectations: *expectations - outcome: *outcome - - - description: transaction is retried after commitTransaction TransientTransactionError (SnapshotUnavailable) - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - errorCode: 246 # SnapshotUnavailable - closeConnection: false - operations: *operations - expectations: *expectations - outcome: *outcome - - - description: transaction is retried after commitTransaction TransientTransactionError (NoSuchTransaction) - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - errorCode: 251 # NoSuchTransaction - closeConnection: false - operations: *operations - expectations: *expectations - outcome: *outcome diff --git a/testdata/convenient-transactions/commit-writeconcernerror.json b/testdata/convenient-transactions/commit-writeconcernerror.json deleted file mode 100644 index fbad645546..0000000000 --- a/testdata/convenient-transactions/commit-writeconcernerror.json +++ /dev/null @@ -1,602 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "withTransaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "commitTransaction is retried after WriteConcernFailed timeout error", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 64, - "codeName": "WriteConcernFailed", - "errmsg": "waiting for replication timed out", - "errInfo": { - "wtimeout": true - } - } - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction is retried after WriteConcernFailed non-timeout error", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 64, - "codeName": "WriteConcernFailed", - "errmsg": "multiple errors reported" - } - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction is not retried after UnknownReplWriteConcern error", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 79, - "codeName": "UnknownReplWriteConcern", - "errmsg": "No write concern mode named 'foo' found in replica set configuration" - } - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - }, - "result": { - "errorCodeName": "UnknownReplWriteConcern", - "errorLabelsOmit": [ - "TransientTransactionError", - "UnknownTransactionCommitResult" - ] - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction is not retried after UnsatisfiableWriteConcern error", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 100, - "codeName": "UnsatisfiableWriteConcern", - "errmsg": "Not enough data-bearing nodes" - } - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - }, - "result": { - "errorCodeName": "UnsatisfiableWriteConcern", - "errorLabelsOmit": [ - "TransientTransactionError", - "UnknownTransactionCommitResult" - ] - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction is not retried after MaxTimeMSExpired error", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 50, - "codeName": "MaxTimeMSExpired", - "errmsg": "operation exceeded time limit" - } - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - }, - "result": { - "errorCodeName": "MaxTimeMSExpired", - "errorLabelsContain": [ - "UnknownTransactionCommitResult" - ], - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/convenient-transactions/commit-writeconcernerror.yml b/testdata/convenient-transactions/commit-writeconcernerror.yml deleted file mode 100644 index 5c5f364d58..0000000000 --- a/testdata/convenient-transactions/commit-writeconcernerror.yml +++ /dev/null @@ -1,216 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "withTransaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - - description: commitTransaction is retried after WriteConcernFailed timeout error - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - # Do not specify closeConnection: false, since that would conflict - # with writeConcernError (see: SERVER-39292) - writeConcernError: - code: 64 - codeName: WriteConcernFailed - errmsg: "waiting for replication timed out" - errInfo: { wtimeout: true } - operations: - - &operation - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - expectations: &expectations_with_retries - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # commitTransaction applies w:majority on retries (SPEC-1185) - writeConcern: { w: majority, wtimeout: 10000 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # commitTransaction applies w:majority on retries (SPEC-1185) - writeConcern: { w: majority, wtimeout: 10000 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - # The write operation is still applied despite the write concern error - outcome: &outcome - collection: - data: - - { _id: 1 } - - - # This test configures the fail point to return an error with the - # WriteConcernFailed code but without errInfo that would identify it as a - # wtimeout error. This tests that drivers do not assume that all - # WriteConcernFailed errors are due to a replication timeout. - description: commitTransaction is retried after WriteConcernFailed non-timeout error - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - # Do not specify closeConnection: false, since that would conflict - # with writeConcernError (see: SERVER-39292) - writeConcernError: - code: 64 - codeName: WriteConcernFailed - errmsg: "multiple errors reported" - operations: - - *operation - expectations: *expectations_with_retries - outcome: *outcome - - - description: commitTransaction is not retried after UnknownReplWriteConcern error - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 79 - codeName: UnknownReplWriteConcern - errmsg: "No write concern mode named 'foo' found in replica set configuration" - operations: - - <<: *operation - result: - errorCodeName: UnknownReplWriteConcern - errorLabelsOmit: ["TransientTransactionError", "UnknownTransactionCommitResult"] - expectations: &expectations_without_retries - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - # failCommand with writeConcernError still applies the write operation(s) - outcome: *outcome - - - - description: commitTransaction is not retried after UnsatisfiableWriteConcern error - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 100 - codeName: UnsatisfiableWriteConcern - errmsg: "Not enough data-bearing nodes" - operations: - - <<: *operation - result: - errorCodeName: UnsatisfiableWriteConcern - errorLabelsOmit: ["TransientTransactionError", "UnknownTransactionCommitResult"] - expectations: *expectations_without_retries - # failCommand with writeConcernError still applies the write operation(s) - outcome: *outcome - - - - description: commitTransaction is not retried after MaxTimeMSExpired error - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 50 - codeName: MaxTimeMSExpired - errmsg: "operation exceeded time limit" - operations: - - <<: *operation - result: - errorCodeName: MaxTimeMSExpired - errorLabelsContain: ["UnknownTransactionCommitResult"] - errorLabelsOmit: ["TransientTransactionError"] - expectations: *expectations_without_retries - # failCommand with writeConcernError still applies the write operation(s) - outcome: *outcome diff --git a/testdata/convenient-transactions/commit.json b/testdata/convenient-transactions/commit.json deleted file mode 100644 index 0a7451db95..0000000000 --- a/testdata/convenient-transactions/commit.json +++ /dev/null @@ -1,286 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "withTransaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "withTransaction commits after callback returns", - "useMultipleMongoses": true, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - }, - { - "description": "withTransaction commits after callback returns (second transaction)", - "useMultipleMongoses": true, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": { - "afterClusterTime": 42 - }, - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - } - ] -} diff --git a/testdata/convenient-transactions/commit.yml b/testdata/convenient-transactions/commit.yml deleted file mode 100644 index b84a3e8bd0..0000000000 --- a/testdata/convenient-transactions/commit.yml +++ /dev/null @@ -1,193 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "withTransaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - - description: withTransaction commits after callback returns - useMultipleMongoses: true - operations: - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 2 } - result: - insertedId: 2 - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 2 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - outcome: - collection: - data: - - { _id: 1 } - - { _id: 2 } - - - # In this scenario, the callback commits the transaction originally started - # by withTransaction and starts a second transaction before returning. Since - # withTransaction only examines the session's state, it should commit that - # second transaction after the callback returns. - description: withTransaction commits after callback returns (second transaction) - useMultipleMongoses: true - operations: - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - - - name: commitTransaction - object: session0 - - - name: startTransaction - object: session0 - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 2 } - result: - insertedId: 2 - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 2 } - ordered: true - lsid: session0 - # second transaction will be causally consistent with the first - readConcern: { afterClusterTime: 42 } - # txnNumber is incremented for the second transaction - txnNumber: { $numberLong: "2" } - startTransaction: true - autocommit: false - # omitted fields - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "2" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - outcome: - collection: - data: - - { _id: 1 } - - { _id: 2 } diff --git a/testdata/convenient-transactions/transaction-options.json b/testdata/convenient-transactions/transaction-options.json deleted file mode 100644 index 6deff43cf4..0000000000 --- a/testdata/convenient-transactions/transaction-options.json +++ /dev/null @@ -1,577 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "withTransaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "withTransaction and no transaction options set", - "useMultipleMongoses": true, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "readConcern": null, - "startTransaction": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "withTransaction inherits transaction options from client", - "useMultipleMongoses": true, - "clientOptions": { - "readConcernLevel": "local", - "w": 1 - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "local" - }, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": 1 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "withTransaction inherits transaction options from defaultTransactionOptions", - "useMultipleMongoses": true, - "sessionOptions": { - "session0": { - "defaultTransactionOptions": { - "readConcern": { - "level": "majority" - }, - "writeConcern": { - "w": 1 - } - } - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "majority" - }, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": 1 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "withTransaction explicit transaction options", - "useMultipleMongoses": true, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - }, - "options": { - "readConcern": { - "level": "majority" - }, - "writeConcern": { - "w": 1 - } - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "majority" - }, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": 1 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "withTransaction explicit transaction options override defaultTransactionOptions", - "useMultipleMongoses": true, - "sessionOptions": { - "session0": { - "defaultTransactionOptions": { - "readConcern": { - "level": "snapshot" - }, - "writeConcern": { - "w": "majority" - } - } - } - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - }, - "options": { - "readConcern": { - "level": "majority" - }, - "writeConcern": { - "w": 1 - } - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "majority" - }, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": 1 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "withTransaction explicit transaction options override client options", - "useMultipleMongoses": true, - "clientOptions": { - "readConcernLevel": "local", - "w": "majority" - }, - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": { - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ] - }, - "options": { - "readConcern": { - "level": "majority" - }, - "writeConcern": { - "w": 1 - } - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "majority" - }, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "withTransaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "w": 1 - }, - "readConcern": null, - "startTransaction": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/convenient-transactions/transaction-options.yml b/testdata/convenient-transactions/transaction-options.yml deleted file mode 100644 index 15bdc65bfa..0000000000 --- a/testdata/convenient-transactions/transaction-options.yml +++ /dev/null @@ -1,274 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "withTransaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - - description: withTransaction and no transaction options set - useMultipleMongoses: true - operations: &operations - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - # omitted fields - readConcern: ~ - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - # omitted fields - readConcern: ~ - startTransaction: ~ - writeConcern: ~ - command_name: commitTransaction - database_name: admin - outcome: &outcome - collection: - data: - - { _id: 1 } - - - description: withTransaction inherits transaction options from client - useMultipleMongoses: true - clientOptions: - readConcernLevel: local - w: 1 - operations: *operations - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - readConcern: { level: local } - # omitted fields - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - writeConcern: { w: 1 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - outcome: *outcome - - - description: withTransaction inherits transaction options from defaultTransactionOptions - useMultipleMongoses: true - sessionOptions: - session0: - defaultTransactionOptions: - readConcern: { level: majority } - writeConcern: { w: 1 } - operations: *operations - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - readConcern: { level: majority } - # omitted fields - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - writeConcern: { w: 1 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - outcome: *outcome - - - description: withTransaction explicit transaction options - useMultipleMongoses: true - operations: &operations_explicit_transactionOptions - - - name: withTransaction - object: session0 - arguments: - callback: - operations: - - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - options: - readConcern: { level: majority } - writeConcern: { w: 1 } - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - readConcern: { level: majority } - # omitted fields - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - writeConcern: { w: 1 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - outcome: *outcome - - - description: withTransaction explicit transaction options override defaultTransactionOptions - useMultipleMongoses: true - sessionOptions: - session0: - defaultTransactionOptions: - readConcern: { level: snapshot } - writeConcern: { w: majority } - operations: *operations_explicit_transactionOptions - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - readConcern: { level: majority } - # omitted fields - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - writeConcern: { w: 1 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - outcome: *outcome - - - description: withTransaction explicit transaction options override client options - useMultipleMongoses: true - clientOptions: - readConcernLevel: local - w: majority - operations: *operations_explicit_transactionOptions - expectations: - - - command_started_event: - command: - insert: *collection_name - documents: - - { _id: 1 } - ordered: true - lsid: session0 - txnNumber: { $numberLong: "1" } - startTransaction: true - autocommit: false - readConcern: { level: majority } - # omitted fields - writeConcern: ~ - command_name: insert - database_name: *database_name - - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: { $numberLong: "1" } - autocommit: false - writeConcern: { w: 1 } - # omitted fields - readConcern: ~ - startTransaction: ~ - command_name: commitTransaction - database_name: admin - outcome: *outcome diff --git a/testdata/crud/unified/aggregate-allowdiskuse.json b/testdata/crud/unified/aggregate-allowdiskuse.json deleted file mode 100644 index 2e54175b8a..0000000000 --- a/testdata/crud/unified/aggregate-allowdiskuse.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "description": "aggregate-allowdiskuse", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Aggregate does not send allowDiskUse when value is not specified", - "operations": [ - { - "object": "collection0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": {} - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": {} - } - ], - "allowDiskUse": { - "$$exists": false - } - }, - "commandName": "aggregate", - "databaseName": "crud-tests" - } - } - ] - } - ] - }, - { - "description": "Aggregate sends allowDiskUse false when false is specified", - "operations": [ - { - "object": "collection0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": {} - } - ], - "allowDiskUse": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": {} - } - ], - "allowDiskUse": false - }, - "commandName": "aggregate", - "databaseName": "crud-tests" - } - } - ] - } - ] - }, - { - "description": "Aggregate sends allowDiskUse true when true is specified", - "operations": [ - { - "object": "collection0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": {} - } - ], - "allowDiskUse": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": {} - } - ], - "allowDiskUse": true - }, - "commandName": "aggregate", - "databaseName": "crud-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/aggregate-allowdiskuse.yml b/testdata/crud/unified/aggregate-allowdiskuse.yml deleted file mode 100644 index d9d2556205..0000000000 --- a/testdata/crud/unified/aggregate-allowdiskuse.yml +++ /dev/null @@ -1,75 +0,0 @@ -description: aggregate-allowdiskuse - -schemaVersion: '1.0' - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: 'Aggregate does not send allowDiskUse when value is not specified' - operations: - - object: *collection0 - name: aggregate - arguments: - pipeline: &pipeline [ { $match: {} } ] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *pipeline - allowDiskUse: { $$exists: false } - commandName: aggregate - databaseName: *database0Name - - - description: 'Aggregate sends allowDiskUse false when false is specified' - operations: - - object: *collection0 - name: aggregate - arguments: - pipeline: *pipeline - allowDiskUse: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *pipeline - allowDiskUse: false - commandName: aggregate - databaseName: *database0Name - - - description: 'Aggregate sends allowDiskUse true when true is specified' - operations: - - object: *collection0 - name: aggregate - arguments: - pipeline: *pipeline - allowDiskUse: true - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *pipeline - allowDiskUse: true - commandName: aggregate - databaseName: *database0Name diff --git a/testdata/crud/unified/aggregate-let.json b/testdata/crud/unified/aggregate-let.json deleted file mode 100644 index 039900920f..0000000000 --- a/testdata/crud/unified/aggregate-let.json +++ /dev/null @@ -1,376 +0,0 @@ -{ - "description": "aggregate-let", - "schemaVersion": "1.4", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - }, - { - "collection": { - "id": "collection1", - "database": "database0", - "collectionName": "coll1" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - }, - { - "collectionName": "coll1", - "databaseName": "crud-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Aggregate with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - } - }, - { - "$project": { - "_id": 0, - "x": "$$x", - "y": "$$y", - "rand": "$$rand" - } - } - ], - "let": { - "id": 1, - "x": "foo", - "y": { - "$literal": "$bar" - }, - "rand": { - "$rand": {} - } - } - }, - "expectResult": [ - { - "x": "foo", - "y": "$bar", - "rand": { - "$$type": "double" - } - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - } - }, - { - "$project": { - "_id": 0, - "x": "$$x", - "y": "$$y", - "rand": "$$rand" - } - } - ], - "let": { - "id": 1, - "x": "foo", - "y": { - "$literal": "$bar" - }, - "rand": { - "$rand": {} - } - } - } - } - } - ] - } - ] - }, - { - "description": "Aggregate with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "2.6.0", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": 1 - } - } - ], - "let": { - "x": "foo" - } - }, - "expectError": { - "errorContains": "unrecognized field 'let'", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "_id": 1 - } - } - ], - "let": { - "x": "foo" - } - } - } - } - ] - } - ] - }, - { - "description": "Aggregate to collection with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0", - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - } - }, - { - "$project": { - "_id": 1 - } - }, - { - "$out": "coll1" - } - ], - "let": { - "id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - } - }, - { - "$project": { - "_id": 1 - } - }, - { - "$out": "coll1" - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll1", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Aggregate to collection with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "2.6.0", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - } - }, - { - "$project": { - "_id": 1 - } - }, - { - "$out": "coll1" - } - ], - "let": { - "id": 1 - } - }, - "expectError": { - "errorContains": "unrecognized field 'let'", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - } - }, - { - "$project": { - "_id": 1 - } - }, - { - "$out": "coll1" - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/aggregate-let.yml b/testdata/crud/unified/aggregate-let.yml deleted file mode 100644 index 7fa1f9b798..0000000000 --- a/testdata/crud/unified/aggregate-let.yml +++ /dev/null @@ -1,138 +0,0 @@ -description: "aggregate-let" - -schemaVersion: "1.4" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - - collection: - id: &collection1 collection1 - database: *database0 - collectionName: &collection1Name coll1 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - collectionName: *collection1Name - databaseName: *database0Name - documents: [ ] - -tests: - - description: "Aggregate with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: aggregate - object: *collection0 - arguments: - pipeline: &pipeline0 - # $match takes a query expression, so $expr is necessary to utilize - # an aggregate expression context and access "let" variables. - - $match: { $expr: { $eq: ["$_id", "$$id"] } } - - $project: { _id: 0, x: "$$x", y: "$$y", rand: "$$rand" } - # Values in "let" must be constant or closed expressions that do not - # depend on document values. This test demonstrates a basic constant - # value, a value wrapped with $literal (to avoid expression parsing), - # and a closed expression (e.g. $rand). - let: &let0 - id: 1 - x: foo - y: { $literal: "$bar" } - rand: { $rand: {} } - expectResult: - - { x: "foo", y: "$bar", rand: { $$type: "double" } } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *pipeline0 - let: *let0 - - - description: "Aggregate with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "2.6.0" - maxServerVersion: "4.4.99" - operations: - - name: aggregate - object: *collection0 - arguments: - pipeline: &pipeline1 - - $match: { _id: 1 } - let: &let1 - x: foo - expectError: - # Older server versions may not report an error code, but the error - # message is consistent between 2.6.x and 4.4.x server versions. - errorContains: "unrecognized field 'let'" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *pipeline1 - let: *let1 - - - description: "Aggregate to collection with let option" - runOnRequirements: - - minServerVersion: "5.0" - serverless: "forbid" - operations: - - name: aggregate - object: *collection0 - arguments: - pipeline: &pipeline2 - - $match: { $expr: { $eq: ["$_id", "$$id"] } } - - $project: { _id: 1 } - - $out: *collection1Name - let: &let2 - id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *pipeline2 - let: *let2 - outcome: - - collectionName: *collection1Name - databaseName: *database0Name - documents: - - { _id: 1 } - - - description: "Aggregate to collection with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "2.6.0" - maxServerVersion: "4.4.99" - operations: - - name: aggregate - object: *collection0 - arguments: - pipeline: *pipeline2 - let: *let2 - expectError: - errorContains: "unrecognized field 'let'" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *pipeline2 - let: *let2 diff --git a/testdata/crud/unified/aggregate-merge-errorResponse.json b/testdata/crud/unified/aggregate-merge-errorResponse.json deleted file mode 100644 index 6c7305fd91..0000000000 --- a/testdata/crud/unified/aggregate-merge-errorResponse.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "description": "aggregate-merge-errorResponse", - "schemaVersion": "1.12", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 1 - }, - { - "_id": 2, - "x": 1 - } - ] - } - ], - "tests": [ - { - "description": "aggregate $merge DuplicateKey error is accessible", - "runOnRequirements": [ - { - "minServerVersion": "5.1", - "topologies": [ - "single", - "replicaset" - ] - } - ], - "operations": [ - { - "name": "aggregate", - "object": "database0", - "arguments": { - "pipeline": [ - { - "$documents": [ - { - "_id": 2, - "x": 1 - } - ] - }, - { - "$merge": { - "into": "test", - "whenMatched": "fail" - } - } - ] - }, - "expectError": { - "errorCode": 11000, - "errorResponse": { - "keyPattern": { - "_id": 1 - }, - "keyValue": { - "_id": 2 - } - } - } - } - ] - } - ] -} diff --git a/testdata/crud/unified/aggregate-merge-errorResponse.yml b/testdata/crud/unified/aggregate-merge-errorResponse.yml deleted file mode 100644 index 5fd679bffb..0000000000 --- a/testdata/crud/unified/aggregate-merge-errorResponse.yml +++ /dev/null @@ -1,42 +0,0 @@ -description: "aggregate-merge-errorResponse" - -schemaVersion: "1.12" - -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 1 } - - { _id: 2, x: 1 } - -tests: - - description: "aggregate $merge DuplicateKey error is accessible" - runOnRequirements: - - minServerVersion: "5.1" # SERVER-59097 - # Exclude sharded topologies since the aggregate command fails with - # IllegalOperation(20) instead of DuplicateKey(11000) - topologies: [ single, replicaset ] - operations: - - name: aggregate - object: *database0 - arguments: - pipeline: - - { $documents: [ { _id: 2, x: 1 } ] } - - { $merge: { into: *collection0Name, whenMatched: "fail" } } - expectError: - errorCode: 11000 # DuplicateKey - errorResponse: - keyPattern: { _id: 1 } - keyValue: { _id: 2 } diff --git a/testdata/crud/unified/aggregate-merge.json b/testdata/crud/unified/aggregate-merge.json deleted file mode 100644 index ac61ceb8a6..0000000000 --- a/testdata/crud/unified/aggregate-merge.json +++ /dev/null @@ -1,497 +0,0 @@ -{ - "description": "aggregate-merge", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.1.11" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_aggregate_merge" - } - }, - { - "collection": { - "id": "collection_readConcern_majority", - "database": "database0", - "collectionName": "test_aggregate_merge", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - } - } - }, - { - "collection": { - "id": "collection_readConcern_local", - "database": "database0", - "collectionName": "test_aggregate_merge", - "collectionOptions": { - "readConcern": { - "level": "local" - } - } - } - }, - { - "collection": { - "id": "collection_readConcern_available", - "database": "database0", - "collectionName": "test_aggregate_merge", - "collectionOptions": { - "readConcern": { - "level": "available" - } - } - } - } - ], - "initialData": [ - { - "collectionName": "test_aggregate_merge", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "Aggregate with $merge", - "operations": [ - { - "object": "collection0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$merge": { - "into": "other_test_collection" - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test_aggregate_merge", - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$merge": { - "into": "other_test_collection" - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "other_test_collection", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "Aggregate with $merge and batch size of 0", - "operations": [ - { - "object": "collection0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$merge": { - "into": "other_test_collection" - } - } - ], - "batchSize": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test_aggregate_merge", - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$merge": { - "into": "other_test_collection" - } - } - ], - "cursor": {} - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "other_test_collection", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "Aggregate with $merge and majority readConcern", - "operations": [ - { - "object": "collection_readConcern_majority", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$merge": { - "into": "other_test_collection" - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test_aggregate_merge", - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$merge": { - "into": "other_test_collection" - } - } - ], - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "other_test_collection", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "Aggregate with $merge and local readConcern", - "operations": [ - { - "object": "collection_readConcern_local", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$merge": { - "into": "other_test_collection" - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test_aggregate_merge", - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$merge": { - "into": "other_test_collection" - } - } - ], - "readConcern": { - "level": "local" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "other_test_collection", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "Aggregate with $merge and available readConcern", - "operations": [ - { - "object": "collection_readConcern_available", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$merge": { - "into": "other_test_collection" - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test_aggregate_merge", - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$merge": { - "into": "other_test_collection" - } - } - ], - "readConcern": { - "level": "available" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "other_test_collection", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/aggregate-merge.yml b/testdata/crud/unified/aggregate-merge.yml deleted file mode 100644 index 821f03e1c6..0000000000 --- a/testdata/crud/unified/aggregate-merge.yml +++ /dev/null @@ -1,185 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: aggregate-merge -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.1.11 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_aggregate_merge - - - collection: - id: &collection_readConcern_majority collection_readConcern_majority - database: database0 - collectionName: *collection_name - collectionOptions: - readConcern: { level: "majority" } - - - collection: - id: &collection_readConcern_local collection_readConcern_local - database: database0 - collectionName: *collection_name - collectionOptions: - readConcern: { level: "local" } - - - collection: - id: &collection_readConcern_available collection_readConcern_available - database: database0 - collectionName: *collection_name - collectionOptions: - readConcern: { level: "available" } -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 -tests: - - - description: 'Aggregate with $merge' - operations: - - - object: *collection0 - name: aggregate - arguments: &arguments - pipeline: &pipeline - - - $sort: - x: 1 - - - $match: - _id: - $gt: 1 - - - $merge: - into: &output_collection other_test_collection - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - aggregate: *collection_name - pipeline: *pipeline - outcome: &outcome - - - collectionName: *output_collection - databaseName: *database_name - documents: - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - description: 'Aggregate with $merge and batch size of 0' - operations: - - - object: *collection0 - name: aggregate - arguments: - pipeline: &pipeline - - - $sort: - x: 1 - - - $match: - _id: - $gt: 1 - - - $merge: - into: &output_collection other_test_collection - batchSize: 0 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - aggregate: *collection_name - pipeline: *pipeline - cursor: { } - outcome: *outcome - - - description: 'Aggregate with $merge and majority readConcern' - operations: - - - object: *collection_readConcern_majority - name: aggregate - arguments: *arguments - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - aggregate: *collection_name - pipeline: *pipeline - readConcern: - level: majority - outcome: *outcome - - - description: 'Aggregate with $merge and local readConcern' - operations: - - - object: *collection_readConcern_local - name: aggregate - arguments: *arguments - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - aggregate: *collection_name - pipeline: *pipeline - readConcern: - level: local - outcome: *outcome - - - description: 'Aggregate with $merge and available readConcern' - operations: - - - object: *collection_readConcern_available - name: aggregate - arguments: *arguments - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - aggregate: *collection_name - pipeline: *pipeline - readConcern: - level: available - outcome: *outcome diff --git a/testdata/crud/unified/aggregate-out-readConcern.json b/testdata/crud/unified/aggregate-out-readConcern.json deleted file mode 100644 index e293457c1c..0000000000 --- a/testdata/crud/unified/aggregate-out-readConcern.json +++ /dev/null @@ -1,407 +0,0 @@ -{ - "description": "aggregate-out-readConcern", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.1.0", - "topologies": [ - "replicaset", - "sharded" - ], - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_aggregate_out_readconcern" - } - }, - { - "collection": { - "id": "collection_readConcern_majority", - "database": "database0", - "collectionName": "test_aggregate_out_readconcern", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - } - } - }, - { - "collection": { - "id": "collection_readConcern_local", - "database": "database0", - "collectionName": "test_aggregate_out_readconcern", - "collectionOptions": { - "readConcern": { - "level": "local" - } - } - } - }, - { - "collection": { - "id": "collection_readConcern_available", - "database": "database0", - "collectionName": "test_aggregate_out_readconcern", - "collectionOptions": { - "readConcern": { - "level": "available" - } - } - } - }, - { - "collection": { - "id": "collection_readConcern_linearizable", - "database": "database0", - "collectionName": "test_aggregate_out_readconcern", - "collectionOptions": { - "readConcern": { - "level": "linearizable" - } - } - } - } - ], - "initialData": [ - { - "collectionName": "test_aggregate_out_readconcern", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "readConcern majority with out stage", - "operations": [ - { - "object": "collection_readConcern_majority", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "other_test_collection" - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test_aggregate_out_readconcern", - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "other_test_collection" - } - ], - "readConcern": { - "level": "majority" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "other_test_collection", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "readConcern local with out stage", - "operations": [ - { - "object": "collection_readConcern_local", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "other_test_collection" - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test_aggregate_out_readconcern", - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "other_test_collection" - } - ], - "readConcern": { - "level": "local" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "other_test_collection", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "readConcern available with out stage", - "operations": [ - { - "object": "collection_readConcern_available", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "other_test_collection" - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test_aggregate_out_readconcern", - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "other_test_collection" - } - ], - "readConcern": { - "level": "available" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "other_test_collection", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "readConcern linearizable with out stage", - "operations": [ - { - "object": "collection_readConcern_linearizable", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "other_test_collection" - } - ] - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test_aggregate_out_readconcern", - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "other_test_collection" - } - ], - "readConcern": { - "level": "linearizable" - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/aggregate-out-readConcern.yml b/testdata/crud/unified/aggregate-out-readConcern.yml deleted file mode 100644 index c210c46929..0000000000 --- a/testdata/crud/unified/aggregate-out-readConcern.yml +++ /dev/null @@ -1,171 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: aggregate-out-readConcern -schemaVersion: '1.4' -runOnRequirements: - - - minServerVersion: 4.1.0 - topologies: - - replicaset - - sharded - serverless: "forbid" -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_aggregate_out_readconcern - - - collection: - id: &collection_readConcern_majority collection_readConcern_majority - database: database0 - collectionName: *collection_name - collectionOptions: - readConcern: { level: "majority" } - - - collection: - id: &collection_readConcern_local collection_readConcern_local - database: database0 - collectionName: *collection_name - collectionOptions: - readConcern: { level: "local" } - - - collection: - id: &collection_readConcern_available collection_readConcern_available - database: database0 - collectionName: *collection_name - collectionOptions: - readConcern: { level: "available" } - - - collection: - id: &collection_readConcern_linearizable collection_readConcern_linearizable - database: database0 - collectionName: *collection_name - collectionOptions: - readConcern: { level: "linearizable" } -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 -tests: - - - description: 'readConcern majority with out stage' - operations: - - - object: *collection_readConcern_majority - name: aggregate - arguments: &arguments - pipeline: - - - $sort: - x: 1 - - - $match: - _id: - $gt: 1 - - - $out: &output_collection other_test_collection - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - aggregate: *collection_name - pipeline: &pipeline - - { $sort: { x: 1 } } - - { $match: { _id: { $gt: 1 } } } - - { $out: other_test_collection } - readConcern: - level: majority - outcome: &outcome - - - collectionName: *output_collection - databaseName: *database_name - documents: - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - description: 'readConcern local with out stage' - operations: - - - object: *collection_readConcern_local - name: aggregate - arguments: *arguments - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - aggregate: *collection_name - pipeline: *pipeline - readConcern: - level: local - outcome: *outcome - - - description: 'readConcern available with out stage' - operations: - - - object: *collection_readConcern_available - name: aggregate - arguments: *arguments - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - aggregate: *collection_name - pipeline: *pipeline - readConcern: - level: available - outcome: *outcome - - - description: 'readConcern linearizable with out stage' - operations: - - - object: *collection_readConcern_linearizable - name: aggregate - arguments: *arguments - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - aggregate: *collection_name - pipeline: *pipeline - readConcern: - level: linearizable diff --git a/testdata/crud/unified/aggregate-write-readPreference.json b/testdata/crud/unified/aggregate-write-readPreference.json deleted file mode 100644 index b50592a98f..0000000000 --- a/testdata/crud/unified/aggregate-write-readPreference.json +++ /dev/null @@ -1,461 +0,0 @@ -{ - "description": "aggregate-write-readPreference", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "3.6", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "_yamlAnchors": { - "readConcern": { - "level": "local" - }, - "writeConcern": { - "w": 1 - } - }, - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ], - "uriOptions": { - "readConcernLevel": "local", - "w": 1 - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "db0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0", - "collectionOptions": { - "readPreference": { - "mode": "secondaryPreferred", - "maxStalenessSeconds": 600 - } - } - } - }, - { - "collection": { - "id": "collection1", - "database": "database0", - "collectionName": "coll1" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "db0", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - }, - { - "collectionName": "coll1", - "databaseName": "db0", - "documents": [] - } - ], - "tests": [ - { - "description": "Aggregate with $out includes read preference for 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0", - "serverless": "forbid", - "maxServerVersion": "7.99" - } - ], - "operations": [ - { - "object": "collection0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - }, - { - "$out": "coll1" - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - }, - { - "$out": "coll1" - } - ], - "$readPreference": { - "mode": "secondaryPreferred", - "maxStalenessSeconds": 600 - }, - "readConcern": { - "level": "local" - }, - "writeConcern": { - "w": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll1", - "databaseName": "db0", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "Aggregate with $out omits read preference for pre-5.0 server", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.4.99", - "serverless": "forbid" - } - ], - "operations": [ - { - "object": "collection0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - }, - { - "$out": "coll1" - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - }, - { - "$out": "coll1" - } - ], - "$readPreference": { - "$$exists": false - }, - "readConcern": { - "level": "local" - }, - "writeConcern": { - "w": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll1", - "databaseName": "db0", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "Aggregate with $merge includes read preference for 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "object": "collection0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - }, - { - "$merge": { - "into": "coll1" - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - }, - { - "$merge": { - "into": "coll1" - } - } - ], - "$readPreference": { - "mode": "secondaryPreferred", - "maxStalenessSeconds": 600 - }, - "readConcern": { - "level": "local" - }, - "writeConcern": { - "w": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll1", - "databaseName": "db0", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "Aggregate with $merge omits read preference for pre-5.0 server", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "object": "collection0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - }, - { - "$merge": { - "into": "coll1" - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - }, - { - "$merge": { - "into": "coll1" - } - } - ], - "$readPreference": { - "$$exists": false - }, - "readConcern": { - "level": "local" - }, - "writeConcern": { - "w": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll1", - "databaseName": "db0", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/aggregate-write-readPreference.yml b/testdata/crud/unified/aggregate-write-readPreference.yml deleted file mode 100644 index 4959588095..0000000000 --- a/testdata/crud/unified/aggregate-write-readPreference.yml +++ /dev/null @@ -1,157 +0,0 @@ -description: aggregate-write-readPreference - -schemaVersion: '1.4' - -runOnRequirements: - # 3.6+ non-standalone is needed to utilize $readPreference in OP_MSG - - minServerVersion: "3.6" - topologies: [ replicaset, sharded, load-balanced ] - -_yamlAnchors: - readConcern: &readConcern - level: &readConcernLevel "local" - writeConcern: &writeConcern - w: &writeConcernW 1 - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - # Used to test that read and write concerns are still inherited - uriOptions: - readConcernLevel: *readConcernLevel - w: *writeConcernW - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name db0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - collectionOptions: - readPreference: &readPreference - # secondaryPreferred is specified for compatibility with clusters that - # may not have a secondary (e.g. each shard is only a primary). - mode: secondaryPreferred - # maxStalenessSeconds is specified to ensure that drivers forward the - # read preference to mongos or a load balancer. That would not be the - # case with only secondaryPreferred. - maxStalenessSeconds: 600 - - collection: - id: &collection1 collection1 - database: *database0 - collectionName: &collection1Name coll1 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - collectionName: *collection1Name - databaseName: *database0Name - documents: [] - -tests: - - description: "Aggregate with $out includes read preference for 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - serverless: "forbid" - # GODRIVER-3218 - maxServerVersion: "7.99" - operations: - - object: *collection0 - name: aggregate - arguments: - pipeline: &outPipeline - - { $match: { _id: { $gt: 1 } } } - - { $sort: { x: 1 } } - - { $out: *collection1Name } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *outPipeline - $readPreference: *readPreference - readConcern: *readConcern - writeConcern: *writeConcern - outcome: &outcome - - collectionName: *collection1Name - databaseName: *database0Name - documents: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "Aggregate with $out omits read preference for pre-5.0 server" - runOnRequirements: - # MongoDB 4.2 introduced support for read concerns and write stages. - # Pre-4.2 servers may allow a "local" read concern anyway, but some - # drivers may avoid inheriting a client-level read concern for pre-4.2. - - minServerVersion: "4.2" - maxServerVersion: "4.4.99" - serverless: "forbid" - operations: - - object: *collection0 - name: aggregate - arguments: - pipeline: *outPipeline - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *outPipeline - $readPreference: { $$exists: false } - readConcern: *readConcern - writeConcern: *writeConcern - outcome: *outcome - - - description: "Aggregate with $merge includes read preference for 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - object: *collection0 - name: aggregate - arguments: - pipeline: &mergePipeline - - { $match: { _id: { $gt: 1 } } } - - { $sort: { x: 1 } } - - { $merge: { into: *collection1Name } } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *mergePipeline - $readPreference: *readPreference - readConcern: *readConcern - writeConcern: *writeConcern - outcome: *outcome - - - description: "Aggregate with $merge omits read preference for pre-5.0 server" - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.4.99" - operations: - - object: *collection0 - name: aggregate - arguments: - pipeline: *mergePipeline - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *mergePipeline - $readPreference: { $$exists: false } - readConcern: *readConcern - writeConcern: *writeConcern - outcome: *outcome diff --git a/testdata/crud/unified/aggregate.json b/testdata/crud/unified/aggregate.json deleted file mode 100644 index 2e46e74ef7..0000000000 --- a/testdata/crud/unified/aggregate.json +++ /dev/null @@ -1,568 +0,0 @@ -{ - "description": "aggregate", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "aggregate-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "aggregate-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - }, - { - "_id": 6, - "x": 66 - } - ] - } - ], - "tests": [ - { - "description": "aggregate with multiple batches works", - "operations": [ - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "batchSize": 2 - }, - "object": "collection0", - "expectResult": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - }, - { - "_id": 6, - "x": 66 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "cursor": { - "batchSize": 2 - } - }, - "commandName": "aggregate", - "databaseName": "aggregate-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "coll0", - "batchSize": 2 - }, - "commandName": "getMore", - "databaseName": "aggregate-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "coll0", - "batchSize": 2 - }, - "commandName": "getMore", - "databaseName": "aggregate-tests" - } - } - ] - } - ] - }, - { - "description": "aggregate with a string comment", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0" - } - ], - "operations": [ - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "comment": "comment" - }, - "object": "collection0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "comment": "comment" - } - } - } - ] - } - ] - }, - { - "description": "aggregate with a document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "comment": { - "content": "test" - } - }, - "object": "collection0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "comment": { - "content": "test" - } - } - } - } - ] - } - ] - }, - { - "description": "aggregate with a document comment - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "comment": { - "content": "test" - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "comment": { - "content": "test" - } - }, - "commandName": "aggregate", - "databaseName": "aggregate-tests" - } - } - ] - } - ] - }, - { - "description": "aggregate with comment sets comment on getMore", - "skipReason": "aggregate comments are string-only", - "runOnRequirements": [ - { - "minServerVersion": "4.4.0" - } - ], - "operations": [ - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "batchSize": 2, - "comment": { - "content": "test" - } - }, - "object": "collection0", - "expectResult": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - }, - { - "_id": 6, - "x": 66 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "cursor": { - "batchSize": 2 - }, - "comment": { - "content": "test" - } - }, - "commandName": "aggregate", - "databaseName": "aggregate-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "coll0", - "batchSize": 2, - "comment": { - "content": "test" - } - }, - "commandName": "getMore", - "databaseName": "aggregate-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "coll0", - "batchSize": 2, - "comment": { - "content": "test" - } - }, - "commandName": "getMore", - "databaseName": "aggregate-tests" - } - } - ] - } - ] - }, - { - "description": "aggregate with comment does not set comment on getMore - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "maxServerVersion": "4.3.99" - } - ], - "operations": [ - { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "batchSize": 2, - "comment": "comment" - }, - "object": "collection0", - "expectResult": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - }, - { - "_id": 6, - "x": 66 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "cursor": { - "batchSize": 2 - }, - "comment": "comment" - }, - "commandName": "aggregate", - "databaseName": "aggregate-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "coll0", - "batchSize": 2, - "comment": { - "$$exists": false - } - }, - "commandName": "getMore", - "databaseName": "aggregate-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "coll0", - "batchSize": 2, - "comment": { - "$$exists": false - } - }, - "commandName": "getMore", - "databaseName": "aggregate-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/aggregate.yml b/testdata/crud/unified/aggregate.yml deleted file mode 100644 index e0f47f5a43..0000000000 --- a/testdata/crud/unified/aggregate.yml +++ /dev/null @@ -1,216 +0,0 @@ -description: "aggregate" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true # ensure cursors pin to a single server - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name aggregate-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - - { _id: 6, x: 66 } - -tests: - - description: "aggregate with multiple batches works" - operations: - - name: aggregate - arguments: - pipeline: [ { $match: { _id: { $gt: 1 } }} ] - batchSize: 2 - object: *collection0 - expectResult: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - - { _id: 6, x: 66 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: [ { $match: { _id: { $gt: 1 } }} ] - cursor: { batchSize: 2 } - commandName: aggregate - databaseName: *database0Name - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 2 - commandName: getMore - databaseName: *database0Name - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 2 - commandName: getMore - databaseName: *database0Name - - - description: "aggregate with a string comment" - runOnRequirements: - - minServerVersion: "3.6.0" - operations: - - name: aggregate - arguments: - pipeline: [ { $match: { _id: { $gt: 1 } }} ] - comment: "comment" - object: *collection0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: [ { $match: { _id: { $gt: 1 } } } ] - comment: "comment" - - - description: "aggregate with a document comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: aggregate - arguments: - pipeline: [ { $match: { _id: { $gt: 1 } }} ] - comment: &comment0 { content: "test" } - object: *collection0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: [ { $match: { _id: { $gt: 1 } } } ] - comment: *comment0 - - - description: "aggregate with a document comment - pre 4.4" - runOnRequirements: - - minServerVersion: "3.6.0" - maxServerVersion: "4.2.99" - operations: - - name: aggregate - object: *collection0 - arguments: - pipeline: [ { $match: { _id: { $gt: 1 } }} ] - comment: *comment0 - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: [ { $match: { _id: { $gt: 1 } }} ] - comment: *comment0 - commandName: aggregate - databaseName: *database0Name - - - description: "aggregate with comment sets comment on getMore" - runOnRequirements: - - minServerVersion: "4.4.0" - topologies: [ single, replicaset ] - operations: - - name: aggregate - arguments: - pipeline: [ { $match: { _id: { $gt: 1 } }} ] - batchSize: 2 - comment: *comment0 - object: *collection0 - expectResult: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - - { _id: 6, x: 66 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: [ { $match: { _id: { $gt: 1 } }} ] - cursor: { batchSize: 2 } - comment: *comment0 - commandName: aggregate - databaseName: *database0Name - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 2 - comment: *comment0 - commandName: getMore - databaseName: *database0Name - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 2 - comment: *comment0 - commandName: getMore - databaseName: *database0Name - - - description: "aggregate with comment does not set comment on getMore - pre 4.4" - runOnRequirements: - - minServerVersion: "3.6.0" - maxServerVersion: "4.3.99" - operations: - - name: aggregate - arguments: - pipeline: [ { $match: { _id: { $gt: 1 } }} ] - batchSize: 2 - comment: "comment" - object: *collection0 - expectResult: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - - { _id: 6, x: 66 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: [ { $match: { _id: { $gt: 1 } }} ] - cursor: { batchSize: 2 } - comment: "comment" - commandName: aggregate - databaseName: *database0Name - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 2 - comment: { $$exists: false } - commandName: getMore - databaseName: *database0Name - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 2 - comment: { $$exists: false } - commandName: getMore - databaseName: *database0Name diff --git a/testdata/crud/unified/bulkWrite-arrayFilters-clientError.json b/testdata/crud/unified/bulkWrite-arrayFilters-clientError.json deleted file mode 100644 index 63815e3233..0000000000 --- a/testdata/crud/unified/bulkWrite-arrayFilters-clientError.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "description": "bulkWrite-arrayFilters-clientError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "maxServerVersion": "3.5.5" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "crud-v2" - } - } - ], - "initialData": [ - { - "collectionName": "crud-v2", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite on server that doesn't support arrayFilters", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": {}, - "update": { - "$set": { - "y.0.b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 1 - } - ] - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ] - }, - { - "description": "BulkWrite on server that doesn't support arrayFilters with arrayFilters on second op", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": {}, - "update": { - "$set": { - "y.0.b": 2 - } - } - } - }, - { - "updateMany": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 1 - } - ] - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-arrayFilters-clientError.yml b/testdata/crud/unified/bulkWrite-arrayFilters-clientError.yml deleted file mode 100644 index 8b4c7a1c9e..0000000000 --- a/testdata/crud/unified/bulkWrite-arrayFilters-clientError.yml +++ /dev/null @@ -1,98 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: bulkWrite-arrayFilters-clientError -schemaVersion: '1.0' -runOnRequirements: - - - maxServerVersion: 3.5.5 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name crud-v2 -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - 'y': - - - b: 3 - - - b: 1 - - - _id: 2 - 'y': - - - b: 0 - - - b: 1 -tests: - - - description: 'BulkWrite on server that doesn''t support arrayFilters' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateOne: - filter: { } - update: - $set: - y.0.b: 2 - arrayFilters: - - - i.b: 1 - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - - - description: 'BulkWrite on server that doesn''t support arrayFilters with arrayFilters on second op' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateOne: - filter: { } - update: - $set: - y.0.b: 2 - - - updateMany: - filter: { } - update: - $set: - 'y.$[i].b': 2 - arrayFilters: - - - i.b: 1 - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] diff --git a/testdata/crud/unified/bulkWrite-arrayFilters.json b/testdata/crud/unified/bulkWrite-arrayFilters.json deleted file mode 100644 index 70ee014f7a..0000000000 --- a/testdata/crud/unified/bulkWrite-arrayFilters.json +++ /dev/null @@ -1,279 +0,0 @@ -{ - "description": "bulkWrite-arrayFilters", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "3.5.6" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite updateOne with arrayFilters", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 3 - } - ] - } - } - ], - "ordered": true - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": {}, - "u": { - "$set": { - "y.$[i].b": 2 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - }, - "arrayFilters": [ - { - "i.b": 3 - } - ] - } - ], - "ordered": true - }, - "commandName": "update", - "databaseName": "crud-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "y": [ - { - "b": 2 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - } - ] - } - ] - }, - { - "description": "BulkWrite updateMany with arrayFilters", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 1 - } - ] - } - } - ], - "ordered": true - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": {}, - "u": { - "$set": { - "y.$[i].b": 2 - } - }, - "multi": true, - "upsert": { - "$$unsetOrMatches": false - }, - "arrayFilters": [ - { - "i.b": 1 - } - ] - } - ], - "ordered": true - }, - "commandName": "update", - "databaseName": "crud-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 2 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 2 - } - ] - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-arrayFilters.yml b/testdata/crud/unified/bulkWrite-arrayFilters.yml deleted file mode 100644 index a236acb12d..0000000000 --- a/testdata/crud/unified/bulkWrite-arrayFilters.yml +++ /dev/null @@ -1,174 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: bulkWrite-arrayFilters -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 3.5.6 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-tests - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - 'y': - - - b: 3 - - - b: 1 - - - _id: 2 - 'y': - - - b: 0 - - - b: 1 -tests: - - - description: 'BulkWrite updateOne with arrayFilters' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateOne: - filter: { } - update: - $set: - 'y.$[i].b': 2 - arrayFilters: - - - i.b: 3 - ordered: true - expectResult: - deletedCount: 0 - insertedCount: 0 - insertedIds: { $$unsetOrMatches: {} } - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - upsertedIds: { } - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: { } - u: - $set: { 'y.$[i].b': 2 } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - arrayFilters: - - { i.b: 3 } - ordered: true - commandName: update - databaseName: *database_name - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - 'y': - - - b: 2 - - - b: 1 - - - _id: 2 - 'y': - - - b: 0 - - - b: 1 - - - description: 'BulkWrite updateMany with arrayFilters' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateMany: - filter: { } - update: - $set: - 'y.$[i].b': 2 - arrayFilters: - - - i.b: 1 - ordered: true - expectResult: - deletedCount: 0 - insertedCount: 0 - insertedIds: { $$unsetOrMatches: {} } - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - upsertedIds: { } - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: { } - u: - $set: { 'y.$[i].b': 2 } - multi: true - upsert: { $$unsetOrMatches: false } - arrayFilters: - - { i.b: 1 } - ordered: true - commandName: update - databaseName: *database_name - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - 'y': - - - b: 3 - - - b: 2 - - - _id: 2 - 'y': - - - b: 0 - - - b: 2 diff --git a/testdata/crud/unified/bulkWrite-comment.json b/testdata/crud/unified/bulkWrite-comment.json deleted file mode 100644 index 0b2addc850..0000000000 --- a/testdata/crud/unified/bulkWrite-comment.json +++ /dev/null @@ -1,519 +0,0 @@ -{ - "description": "bulkWrite-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "BulkWrite_comment" - } - } - ], - "initialData": [ - { - "collectionName": "BulkWrite_comment", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 5, - "x": "inserted" - } - } - }, - { - "replaceOne": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": "replaced" - } - } - }, - { - "updateOne": { - "filter": { - "_id": 2 - }, - "update": { - "$set": { - "x": "updated" - } - } - } - }, - { - "deleteOne": { - "filter": { - "_id": 3 - } - } - } - ], - "comment": "comment" - }, - "expectResult": { - "deletedCount": 1, - "insertedCount": 1, - "insertedIds": { - "$$unsetOrMatches": { - "0": 5 - } - }, - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "BulkWrite_comment", - "documents": [ - { - "_id": 5, - "x": "inserted" - } - ], - "ordered": true, - "comment": "comment" - } - } - }, - { - "commandStartedEvent": { - "command": { - "update": "BulkWrite_comment", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "x": "replaced" - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": 2 - }, - "u": { - "$set": { - "x": "updated" - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "ordered": true, - "comment": "comment" - } - } - }, - { - "commandStartedEvent": { - "command": { - "delete": "BulkWrite_comment", - "deletes": [ - { - "q": { - "_id": 3 - }, - "limit": 1 - } - ], - "ordered": true, - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "BulkWrite_comment", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": "replaced" - }, - { - "_id": 2, - "x": "updated" - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": "inserted" - } - ] - } - ] - }, - { - "description": "BulkWrite with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 5, - "x": "inserted" - } - } - }, - { - "replaceOne": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": "replaced" - } - } - }, - { - "updateOne": { - "filter": { - "_id": 2 - }, - "update": { - "$set": { - "x": "updated" - } - } - } - }, - { - "deleteOne": { - "filter": { - "_id": 3 - } - } - } - ], - "comment": { - "key": "value" - } - }, - "expectResult": { - "deletedCount": 1, - "insertedCount": 1, - "insertedIds": { - "$$unsetOrMatches": { - "0": 5 - } - }, - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "BulkWrite_comment", - "documents": [ - { - "_id": 5, - "x": "inserted" - } - ], - "ordered": true, - "comment": { - "key": "value" - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "update": "BulkWrite_comment", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "x": "replaced" - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": 2 - }, - "u": { - "$set": { - "x": "updated" - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "ordered": true, - "comment": { - "key": "value" - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "delete": "BulkWrite_comment", - "deletes": [ - { - "q": { - "_id": 3 - }, - "limit": 1 - } - ], - "ordered": true, - "comment": { - "key": "value" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "BulkWrite_comment", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": "replaced" - }, - { - "_id": 2, - "x": "updated" - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": "inserted" - } - ] - } - ] - }, - { - "description": "BulkWrite with comment - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 5, - "x": "inserted" - } - } - }, - { - "replaceOne": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": "replaced" - } - } - }, - { - "updateOne": { - "filter": { - "_id": 2 - }, - "update": { - "$set": { - "x": "updated" - } - } - } - }, - { - "deleteOne": { - "filter": { - "_id": 3 - } - } - } - ], - "comment": "comment" - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "BulkWrite_comment", - "documents": [ - { - "_id": 5, - "x": "inserted" - } - ], - "ordered": true, - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "BulkWrite_comment", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-comment.yml b/testdata/crud/unified/bulkWrite-comment.yml deleted file mode 100644 index 812935577c..0000000000 --- a/testdata/crud/unified/bulkWrite-comment.yml +++ /dev/null @@ -1,177 +0,0 @@ - - -description: bulkWrite-comment -schemaVersion: '1.0' - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name BulkWrite_comment - -initialData: &initial_data - - collectionName: *collection_name - databaseName: *database_name - documents: - - _id: 1 - x: 11 - - _id: 2 - x: 22 - - _id: 3 - x: 33 - - _id: 4 - x: 44 - -tests: - - description: 'BulkWrite with string comment' - runOnRequirements: - - minServerVersion: "4.4" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: &requests - - insertOne: - document: &inserted_document - _id: 5 - x: "inserted" - - replaceOne: - filter: &replaceOne_filter - _id: 1 - replacement: &replacement { _id: 1, x: "replaced" } - - updateOne: - filter: &updateOne_filter - _id: 2 - update: &update { $set: {x: "updated"} } - - deleteOne: - filter: &deleteOne_filter - _id: 3 - comment: &string_comment "comment" - expectResult: &expect_results - deletedCount: 1 - insertedCount: 1 - insertedIds: { $$unsetOrMatches: { 0: 5} } - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - upsertedIds: { } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection_name - documents: - - *inserted_document - ordered: true - comment: *string_comment - - commandStartedEvent: - command: - update: *collection_name - updates: - - q: *replaceOne_filter - u: *replacement - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: *updateOne_filter - u: *update - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - ordered: true - comment: *string_comment - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - q: *deleteOne_filter - limit: 1 - ordered: true - comment: *string_comment - outcome: &outcome - - collectionName: *collection_name - databaseName: *database_name - documents: - - _id: 1 - x: "replaced" - - _id: 2 - x: "updated" - - _id: 4 - x: 44 - - _id: 5 - x: "inserted" - - - description: 'BulkWrite with document comment' - runOnRequirements: - - minServerVersion: "4.4" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: *requests - comment: &document_comment { key: "value" } - expectResult: *expect_results - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection_name - documents: - - *inserted_document - ordered: true - comment: *document_comment - - commandStartedEvent: - command: - update: *collection_name - updates: - - q: *replaceOne_filter - u: *replacement - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - q: *updateOne_filter - u: *update - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - ordered: true - comment: *document_comment - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - q: *deleteOne_filter - limit: 1 - ordered: true - comment: *document_comment - outcome: *outcome - - - description: 'BulkWrite with comment - pre 4.4' - runOnRequirements: - - minServerVersion: "3.4.0" - maxServerVersion: "4.2.99" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: *requests - comment: "comment" - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection_name - documents: - - *inserted_document - ordered: true - comment: "comment" - outcome: *initial_data diff --git a/testdata/crud/unified/bulkWrite-delete-hint-clientError.json b/testdata/crud/unified/bulkWrite-delete-hint-clientError.json deleted file mode 100644 index 2961b55dc0..0000000000 --- a/testdata/crud/unified/bulkWrite-delete-hint-clientError.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "description": "bulkWrite-delete-hint-clientError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "maxServerVersion": "3.3.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "BulkWrite_delete_hint" - } - } - ], - "initialData": [ - { - "collectionName": "BulkWrite_delete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite deleteOne with hints unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteOne": { - "filter": { - "_id": 1 - }, - "hint": "_id_" - } - }, - { - "deleteOne": { - "filter": { - "_id": 2 - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "BulkWrite_delete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "BulkWrite deleteMany with hints unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteMany": { - "filter": { - "_id": { - "$lt": 3 - } - }, - "hint": "_id_" - } - }, - { - "deleteMany": { - "filter": { - "_id": { - "$gte": 4 - } - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "BulkWrite_delete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-delete-hint-clientError.yml b/testdata/crud/unified/bulkWrite-delete-hint-clientError.yml deleted file mode 100644 index 2b0bdb1c21..0000000000 --- a/testdata/crud/unified/bulkWrite-delete-hint-clientError.yml +++ /dev/null @@ -1,113 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: bulkWrite-delete-hint-clientError -schemaVersion: '1.0' -runOnRequirements: - - - maxServerVersion: 3.3.99 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name BulkWrite_delete_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 -tests: - - - description: 'BulkWrite deleteOne with hints unsupported (client-side error)' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - deleteOne: - filter: &deleteOne_filter1 - _id: 1 - hint: &hint_string _id_ - - - deleteOne: - filter: &deleteOne_filter2 - _id: 2 - hint: &hint_doc - _id: 1 - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 - - - description: 'BulkWrite deleteMany with hints unsupported (client-side error)' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - deleteMany: - filter: &deleteMany_filter1 - _id: - $lt: 3 - hint: *hint_string - - - deleteMany: - filter: &deleteMany_filter2 - _id: - $gte: 4 - hint: *hint_doc - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/bulkWrite-delete-hint-serverError.json b/testdata/crud/unified/bulkWrite-delete-hint-serverError.json deleted file mode 100644 index fa99522093..0000000000 --- a/testdata/crud/unified/bulkWrite-delete-hint-serverError.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "description": "bulkWrite-delete-hint-serverError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.3.3" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "BulkWrite_delete_hint" - } - } - ], - "initialData": [ - { - "collectionName": "BulkWrite_delete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite deleteOne with hints unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteOne": { - "filter": { - "_id": 1 - }, - "hint": "_id_" - } - }, - { - "deleteOne": { - "filter": { - "_id": 2 - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "BulkWrite_delete_hint", - "deletes": [ - { - "q": { - "_id": 1 - }, - "hint": "_id_", - "limit": 1 - }, - { - "q": { - "_id": 2 - }, - "hint": { - "_id": 1 - }, - "limit": 1 - } - ], - "ordered": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "BulkWrite_delete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "BulkWrite deleteMany with hints unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteMany": { - "filter": { - "_id": { - "$lt": 3 - } - }, - "hint": "_id_" - } - }, - { - "deleteMany": { - "filter": { - "_id": { - "$gte": 4 - } - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "BulkWrite_delete_hint", - "deletes": [ - { - "q": { - "_id": { - "$lt": 3 - } - }, - "hint": "_id_", - "limit": 0 - }, - { - "q": { - "_id": { - "$gte": 4 - } - }, - "hint": { - "_id": 1 - }, - "limit": 0 - } - ], - "ordered": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "BulkWrite_delete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-delete-hint-serverError.yml b/testdata/crud/unified/bulkWrite-delete-hint-serverError.yml deleted file mode 100644 index e757bade0c..0000000000 --- a/testdata/crud/unified/bulkWrite-delete-hint-serverError.yml +++ /dev/null @@ -1,142 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: bulkWrite-delete-hint-serverError -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 3.4.0 - maxServerVersion: 4.3.3 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name BulkWrite_delete_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 -tests: - - - description: 'BulkWrite deleteOne with hints unsupported (server-side error)' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - deleteOne: - filter: &deleteOne_filter1 - _id: 1 - hint: &hint_string _id_ - - - deleteOne: - filter: &deleteOne_filter2 - _id: 2 - hint: &hint_doc - _id: 1 - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - - q: *deleteOne_filter1 - hint: *hint_string - limit: 1 - - - q: *deleteOne_filter2 - hint: *hint_doc - limit: 1 - ordered: true - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 - - - description: 'BulkWrite deleteMany with hints unsupported (server-side error)' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - deleteMany: - filter: &deleteMany_filter1 - _id: - $lt: 3 - hint: *hint_string - - - deleteMany: - filter: &deleteMany_filter2 - _id: - $gte: 4 - hint: *hint_doc - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - - q: *deleteMany_filter1 - hint: *hint_string - limit: 0 - - - q: *deleteMany_filter2 - hint: *hint_doc - limit: 0 - ordered: true - outcome: *outcome diff --git a/testdata/crud/unified/bulkWrite-delete-hint.json b/testdata/crud/unified/bulkWrite-delete-hint.json deleted file mode 100644 index 9fcdecefd7..0000000000 --- a/testdata/crud/unified/bulkWrite-delete-hint.json +++ /dev/null @@ -1,247 +0,0 @@ -{ - "description": "bulkWrite-delete-hint", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.3.4" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "BulkWrite_delete_hint" - } - } - ], - "initialData": [ - { - "collectionName": "BulkWrite_delete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite deleteOne with hints", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteOne": { - "filter": { - "_id": 1 - }, - "hint": "_id_" - } - }, - { - "deleteOne": { - "filter": { - "_id": 2 - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectResult": { - "deletedCount": 2, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "BulkWrite_delete_hint", - "deletes": [ - { - "q": { - "_id": 1 - }, - "hint": "_id_", - "limit": 1 - }, - { - "q": { - "_id": 2 - }, - "hint": { - "_id": 1 - }, - "limit": 1 - } - ], - "ordered": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "BulkWrite_delete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "BulkWrite deleteMany with hints", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteMany": { - "filter": { - "_id": { - "$lt": 3 - } - }, - "hint": "_id_" - } - }, - { - "deleteMany": { - "filter": { - "_id": { - "$gte": 4 - } - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectResult": { - "deletedCount": 3, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "BulkWrite_delete_hint", - "deletes": [ - { - "q": { - "_id": { - "$lt": 3 - } - }, - "hint": "_id_", - "limit": 0 - }, - { - "q": { - "_id": { - "$gte": 4 - } - }, - "hint": { - "_id": 1 - }, - "limit": 0 - } - ], - "ordered": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "BulkWrite_delete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-delete-hint.yml b/testdata/crud/unified/bulkWrite-delete-hint.yml deleted file mode 100644 index 8b7f84aa94..0000000000 --- a/testdata/crud/unified/bulkWrite-delete-hint.yml +++ /dev/null @@ -1,154 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: bulkWrite-delete-hint -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.3.4 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name BulkWrite_delete_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 -tests: - - - description: 'BulkWrite deleteOne with hints' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - deleteOne: - filter: &deleteOne_filter1 - _id: 1 - hint: &hint_string _id_ - - - deleteOne: - filter: &deleteOne_filter2 - _id: 2 - hint: &hint_doc - _id: 1 - ordered: true - expectResult: - deletedCount: 2 - insertedCount: 0 - insertedIds: { $$unsetOrMatches: {} } - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: { } - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - - q: *deleteOne_filter1 - hint: *hint_string - limit: 1 - - - q: *deleteOne_filter2 - hint: *hint_doc - limit: 1 - ordered: true - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 - - - description: 'BulkWrite deleteMany with hints' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - deleteMany: - filter: &deleteMany_filter1 - _id: - $lt: 3 - hint: *hint_string - - - deleteMany: - filter: &deleteMany_filter2 - _id: - $gte: 4 - hint: *hint_doc - ordered: true - expectResult: - deletedCount: 3 - insertedCount: 0 - insertedIds: { $$unsetOrMatches: {} } - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: { } - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - - q: *deleteMany_filter1 - hint: *hint_string - limit: 0 - - - q: *deleteMany_filter2 - hint: *hint_doc - limit: 0 - ordered: true - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 3 - x: 33 diff --git a/testdata/crud/unified/bulkWrite-deleteMany-let.json b/testdata/crud/unified/bulkWrite-deleteMany-let.json deleted file mode 100644 index 45c20ea49a..0000000000 --- a/testdata/crud/unified/bulkWrite-deleteMany-let.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "description": "BulkWrite deleteMany-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite deleteMany with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteMany": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - } - } - } - ], - "let": { - "id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "limit": 0 - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "BulkWrite deleteMany with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteOne": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - } - } - } - ], - "let": { - "id": 1 - } - }, - "expectError": { - "errorContains": "'delete.let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "limit": 1 - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-deleteMany-let.yml b/testdata/crud/unified/bulkWrite-deleteMany-let.yml deleted file mode 100644 index 48b3a06d2e..0000000000 --- a/testdata/crud/unified/bulkWrite-deleteMany-let.yml +++ /dev/null @@ -1,86 +0,0 @@ -description: "BulkWrite deleteMany-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "BulkWrite deleteMany with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: - - deleteMany: - filter: &filter - $expr: - $eq: [ "$_id", "$$id" ] - let: &let - id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - q: *filter - limit: 0 - let: *let - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 2 } - - - description: "BulkWrite deleteMany with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "3.6.0" - maxServerVersion: "4.4.99" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: - - deleteOne: - filter: *filter - let: *let - expectError: - errorContains: "'delete.let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - q: *filter - limit: 1 - let: *let - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } diff --git a/testdata/crud/unified/bulkWrite-deleteOne-let.json b/testdata/crud/unified/bulkWrite-deleteOne-let.json deleted file mode 100644 index f3268163cb..0000000000 --- a/testdata/crud/unified/bulkWrite-deleteOne-let.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "description": "BulkWrite deleteOne-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite deleteOne with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteOne": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - } - } - } - ], - "let": { - "id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "limit": 1 - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "BulkWrite deleteOne with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "maxServerVersion": "4.9" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteOne": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - } - } - } - ], - "let": { - "id": 1 - } - }, - "expectError": { - "errorContains": "'delete.let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "limit": 1 - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-deleteOne-let.yml b/testdata/crud/unified/bulkWrite-deleteOne-let.yml deleted file mode 100644 index 128d74a441..0000000000 --- a/testdata/crud/unified/bulkWrite-deleteOne-let.yml +++ /dev/null @@ -1,86 +0,0 @@ -description: "BulkWrite deleteOne-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "BulkWrite deleteOne with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: - - deleteOne: - filter: &filter - $expr: - $eq: [ "$_id", "$$id" ] - let: &let - id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - q: *filter - limit: 1 - let: *let - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 2 } - - - description: "BulkWrite deleteOne with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "3.6.0" - maxServerVersion: "4.9" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: - - deleteOne: - filter: *filter - let: *let - expectError: - errorContains: "'delete.let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - q: *filter - limit: 1 - let: *let - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } diff --git a/testdata/crud/unified/bulkWrite-errorResponse.json b/testdata/crud/unified/bulkWrite-errorResponse.json deleted file mode 100644 index 157637c713..0000000000 --- a/testdata/crud/unified/bulkWrite-errorResponse.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "description": "bulkWrite-errorResponse", - "schemaVersion": "1.12", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "tests": [ - { - "description": "bulkWrite operations support errorResponse assertions", - "runOnRequirements": [ - { - "minServerVersion": "4.0.0", - "topologies": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.2.0", - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 8 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - }, - "expectError": { - "errorCode": 8, - "errorResponse": { - "code": 8 - } - } - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-errorResponse.yml b/testdata/crud/unified/bulkWrite-errorResponse.yml deleted file mode 100644 index d4f335dfd3..0000000000 --- a/testdata/crud/unified/bulkWrite-errorResponse.yml +++ /dev/null @@ -1,50 +0,0 @@ -description: "bulkWrite-errorResponse" - -schemaVersion: "1.12" - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -tests: - # This test intentionally executes only a single insert operation in the bulk - # write to make the error code and response assertions less ambiguous. That - # said, some drivers may still need to skip this test because the CRUD spec - # does not prescribe how drivers should formulate a BulkWriteException beyond - # collecting write and write concern errors. - - description: "bulkWrite operations support errorResponse assertions" - runOnRequirements: - - minServerVersion: "4.0.0" - topologies: [ single, replicaset ] - - minServerVersion: "4.2.0" - topologies: [ sharded ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - errorCode: &errorCode 8 # UnknownError - - name: bulkWrite - object: *collection0 - arguments: - requests: - - insertOne: - document: { _id: 1 } - expectError: - errorCode: *errorCode - errorResponse: - code: *errorCode diff --git a/testdata/crud/unified/bulkWrite-insertOne-dots_and_dollars.json b/testdata/crud/unified/bulkWrite-insertOne-dots_and_dollars.json deleted file mode 100644 index 92bbb1aaf2..0000000000 --- a/testdata/crud/unified/bulkWrite-insertOne-dots_and_dollars.json +++ /dev/null @@ -1,374 +0,0 @@ -{ - "description": "bulkWrite-insertOne-dots_and_dollars", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Inserting document with top-level dollar-prefixed key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 1, - "$a": 1 - } - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 1, - "insertedIds": { - "$$unsetOrMatches": { - "0": 1 - } - }, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "$a": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "$a": 1 - } - ] - } - ] - }, - { - "description": "Inserting document with top-level dollar-prefixed key on pre-5.0 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "4.99" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 1, - "$a": 1 - } - } - } - ] - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "$a": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [] - } - ] - }, - { - "description": "Inserting document with top-level dotted key", - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 1, - "a.b": 1 - } - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 1, - "insertedIds": { - "$$unsetOrMatches": { - "0": 1 - } - }, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "a.b": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a.b": 1 - } - ] - } - ] - }, - { - "description": "Inserting document with dollar-prefixed key in embedded doc", - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 1, - "a": { - "$b": 1 - } - } - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 1, - "insertedIds": { - "$$unsetOrMatches": { - "0": 1 - } - }, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "a": { - "$b": 1 - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "$b": 1 - } - } - ] - } - ] - }, - { - "description": "Inserting document with dotted key in embedded doc", - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 1, - "a": { - "b.c": 1 - } - } - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 1, - "insertedIds": { - "$$unsetOrMatches": { - "0": 1 - } - }, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "a": { - "b.c": 1 - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "b.c": 1 - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-insertOne-dots_and_dollars.yml b/testdata/crud/unified/bulkWrite-insertOne-dots_and_dollars.yml deleted file mode 100644 index de3885ac8c..0000000000 --- a/testdata/crud/unified/bulkWrite-insertOne-dots_and_dollars.yml +++ /dev/null @@ -1,138 +0,0 @@ -description: "bulkWrite-insertOne-dots_and_dollars" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: "Inserting document with top-level dollar-prefixed key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - insertOne: - document: &dollarPrefixedKey { _id: 1, $a: 1 } - expectResult: &bulkWriteResult - deletedCount: 0 - insertedCount: 1 - insertedIds: { $$unsetOrMatches: { 0: 1 } } - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: { } - expectEvents: &expectEventsDollarPrefixedKey - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dollarPrefixedKey - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dollarPrefixedKey - - - description: "Inserting document with top-level dollar-prefixed key on pre-5.0 server yields server-side error" - runOnRequirements: - - maxServerVersion: "4.99" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - insertOne: - document: *dollarPrefixedKey - expectError: - isClientError: false - expectEvents: *expectEventsDollarPrefixedKey - outcome: *initialData - - - description: "Inserting document with top-level dotted key" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - insertOne: - document: &dottedKey { _id: 1, a.b: 1 } - expectResult: *bulkWriteResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dottedKey - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKey - - - description: "Inserting document with dollar-prefixed key in embedded doc" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - insertOne: - document: &dollarPrefixedKeyInEmbedded { _id: 1, a: { $b: 1 } } - expectResult: *bulkWriteResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dollarPrefixedKeyInEmbedded - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dollarPrefixedKeyInEmbedded - - - description: "Inserting document with dotted key in embedded doc" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - insertOne: - document: &dottedKeyInEmbedded { _id: 1, a: { b.c: 1 } } - expectResult: *bulkWriteResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dottedKeyInEmbedded - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKeyInEmbedded diff --git a/testdata/crud/unified/bulkWrite-replaceOne-dots_and_dollars.json b/testdata/crud/unified/bulkWrite-replaceOne-dots_and_dollars.json deleted file mode 100644 index fce647d8f4..0000000000 --- a/testdata/crud/unified/bulkWrite-replaceOne-dots_and_dollars.json +++ /dev/null @@ -1,532 +0,0 @@ -{ - "description": "bulkWrite-replaceOne-dots_and_dollars", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ], - "tests": [ - { - "description": "Replacing document with top-level dotted key on 3.6+ server", - "runOnRequirements": [ - { - "minServerVersion": "3.6" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a.b": 1 - } - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a.b": 1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a.b": 1 - } - ] - } - ] - }, - { - "description": "Replacing document with top-level dotted key on pre-3.6 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "3.4.99" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a.b": 1 - } - } - } - ] - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a.b": 1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Replacing document with dollar-prefixed key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "$b": 1 - } - } - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a": { - "$b": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "$b": 1 - } - } - ] - } - ] - }, - { - "description": "Replacing document with dollar-prefixed key in embedded doc on pre-5.0 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "4.99" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "$b": 1 - } - } - } - } - ] - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a": { - "$b": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Replacing document with dotted key in embedded doc on 3.6+ server", - "runOnRequirements": [ - { - "minServerVersion": "3.6" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "b.c": 1 - } - } - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a": { - "b.c": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "b.c": 1 - } - } - ] - } - ] - }, - { - "description": "Replacing document with dotted key in embedded doc on pre-3.6 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "3.4.99" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "b.c": 1 - } - } - } - } - ] - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a": { - "b.c": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-replaceOne-dots_and_dollars.yml b/testdata/crud/unified/bulkWrite-replaceOne-dots_and_dollars.yml deleted file mode 100644 index 65c414c1d6..0000000000 --- a/testdata/crud/unified/bulkWrite-replaceOne-dots_and_dollars.yml +++ /dev/null @@ -1,165 +0,0 @@ -description: "bulkWrite-replaceOne-dots_and_dollars" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - -tests: - - description: "Replacing document with top-level dotted key on 3.6+ server" - runOnRequirements: - - minServerVersion: "3.6" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - replaceOne: - filter: { _id: 1 } - replacement: &dottedKey { _id: 1, a.b: 1 } - expectResult: &bulkWriteResult - deletedCount: 0 - insertedCount: 0 - insertedIds: { $$unsetOrMatches: { } } - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - upsertedIds: { } - expectEvents: &expectEventsDottedKey - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dottedKey - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKey - - - description: "Replacing document with top-level dotted key on pre-3.6 server yields server-side error" - runOnRequirements: - - maxServerVersion: "3.4.99" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - replaceOne: - filter: { _id: 1 } - replacement: *dottedKey - expectError: - isClientError: false - expectEvents: *expectEventsDottedKey - outcome: *initialData - - - description: "Replacing document with dollar-prefixed key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - replaceOne: - filter: { _id: 1 } - replacement: &dollarPrefixedKeyInEmbedded { _id: 1, a: { $b: 1 } } - expectResult: *bulkWriteResult - expectEvents: &expectEventsDollarPrefixedKeyInEmbedded - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dollarPrefixedKeyInEmbedded - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dollarPrefixedKeyInEmbedded - - - description: "Replacing document with dollar-prefixed key in embedded doc on pre-5.0 server yields server-side error" - runOnRequirements: - - maxServerVersion: "4.99" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - replaceOne: - filter: { _id: 1 } - replacement: *dollarPrefixedKeyInEmbedded - expectError: - isClientError: false - expectEvents: *expectEventsDollarPrefixedKeyInEmbedded - outcome: *initialData - - - description: "Replacing document with dotted key in embedded doc on 3.6+ server" - runOnRequirements: - - minServerVersion: "3.6" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - replaceOne: - filter: { _id: 1 } - replacement: &dottedKeyInEmbedded { _id: 1, a: { b.c: 1 } } - expectResult: *bulkWriteResult - expectEvents: &expectEventsDottedKeyInEmbedded - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dottedKeyInEmbedded - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKeyInEmbedded - - - description: "Replacing document with dotted key in embedded doc on pre-3.6 server yields server-side error" - runOnRequirements: - - maxServerVersion: "3.4.99" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - replaceOne: - filter: { _id: 1 } - replacement: *dottedKeyInEmbedded - expectError: - isClientError: false - expectEvents: *expectEventsDottedKeyInEmbedded - outcome: *initialData diff --git a/testdata/crud/unified/bulkWrite-replaceOne-let.json b/testdata/crud/unified/bulkWrite-replaceOne-let.json deleted file mode 100644 index 70f63837a8..0000000000 --- a/testdata/crud/unified/bulkWrite-replaceOne-let.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "description": "BulkWrite replaceOne-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite replaceOne with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "replacement": { - "x": 3 - } - } - } - ], - "let": { - "id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "u": { - "x": 3 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 3 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "BulkWrite replaceOne with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.9" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "replacement": { - "x": 3 - } - } - } - ], - "let": { - "id": 1 - } - }, - "expectError": { - "errorContains": "'update.let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "u": { - "x": 3 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-replaceOne-let.yml b/testdata/crud/unified/bulkWrite-replaceOne-let.yml deleted file mode 100644 index 5453868ba4..0000000000 --- a/testdata/crud/unified/bulkWrite-replaceOne-let.yml +++ /dev/null @@ -1,93 +0,0 @@ -description: "BulkWrite replaceOne-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "BulkWrite replaceOne with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: - - replaceOne: - filter: &filter - $expr: - $eq: [ "$_id", "$$id" ] - replacement: &replacement {"x": 3} - let: &let - id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: *filter - u: *replacement - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - let: *let - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 3 } - - { _id: 2 } - - - description: "BulkWrite replaceOne with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.9" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: - - replaceOne: - filter: *filter - replacement: *replacement - let: *let - expectError: - errorContains: "'update.let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: *filter - u: *replacement - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - let: *let - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } diff --git a/testdata/crud/unified/bulkWrite-replaceOne-sort.json b/testdata/crud/unified/bulkWrite-replaceOne-sort.json deleted file mode 100644 index c0bd383514..0000000000 --- a/testdata/crud/unified/bulkWrite-replaceOne-sort.json +++ /dev/null @@ -1,239 +0,0 @@ -{ - "description": "BulkWrite replaceOne-sort", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite replaceOne with sort option", - "runOnRequirements": [ - { - "minServerVersion": "8.0" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "sort": { - "_id": -1 - }, - "replacement": { - "x": 1 - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "x": 1 - }, - "sort": { - "_id": -1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 1 - }, - "commandName": "update" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 1 - } - ] - } - ] - }, - { - "description": "BulkWrite replaceOne with sort option unsupported (server-side error)", - "runOnRequirements": [ - { - "maxServerVersion": "7.99" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "sort": { - "_id": -1 - }, - "replacement": { - "x": 1 - } - } - } - ] - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "x": 1 - }, - "sort": { - "_id": -1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-replaceOne-sort.yml b/testdata/crud/unified/bulkWrite-replaceOne-sort.yml deleted file mode 100644 index 9594166f5b..0000000000 --- a/testdata/crud/unified/bulkWrite-replaceOne-sort.yml +++ /dev/null @@ -1,94 +0,0 @@ -description: BulkWrite replaceOne-sort - -schemaVersion: "1.0" - -createEntities: - - client: - id: client0 - observeEvents: [ commandStartedEvent, commandSucceededEvent ] - - database: - id: database0 - client: client0 - databaseName: crud-tests - - collection: - id: collection0 - database: database0 - collectionName: coll0 - -initialData: - - collectionName: coll0 - databaseName: crud-tests - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: BulkWrite replaceOne with sort option - runOnRequirements: - - minServerVersion: "8.0" - operations: - - object: collection0 - name: bulkWrite - arguments: - requests: - - replaceOne: - filter: { _id: {$gt: 1 } } - sort: { _id: -1 } - replacement: { x: 1 } - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - update: coll0 - updates: - - q: { _id: { $gt: 1 } } - u: { x: 1 } - sort: { _id: -1 } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - commandSucceededEvent: - reply: { ok: 1, n: 1 } - commandName: update - outcome: - - collectionName: coll0 - databaseName: crud-tests - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 1 } - - - description: BulkWrite replaceOne with sort option unsupported (server-side error) - runOnRequirements: - - maxServerVersion: "7.99" - operations: - - object: collection0 - name: bulkWrite - arguments: - requests: - - replaceOne: - filter: { _id: { $gt: 1 } } - sort: { _id: -1 } - replacement: { x: 1 } - expectError: - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - update: coll0 - updates: - - q: { _id: { $gt: 1 } } - u: { x: 1 } - sort: { _id: -1 } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: coll0 - databaseName: crud-tests - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } diff --git a/testdata/crud/unified/bulkWrite-update-hint-clientError.json b/testdata/crud/unified/bulkWrite-update-hint-clientError.json deleted file mode 100644 index d5eb71c29e..0000000000 --- a/testdata/crud/unified/bulkWrite-update-hint-clientError.json +++ /dev/null @@ -1,284 +0,0 @@ -{ - "description": "bulkWrite-update-hint-clientError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "maxServerVersion": "3.3.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_bulkwrite_update_hint" - } - } - ], - "initialData": [ - { - "collectionName": "test_bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite updateOne with update hints unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - } - }, - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "test_bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "BulkWrite updateMany with update hints unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": { - "_id": { - "$lt": 3 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - } - }, - { - "updateMany": { - "filter": { - "_id": { - "$lt": 3 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "test_bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "BulkWrite replaceOne with update hints unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": 3 - }, - "replacement": { - "x": 333 - }, - "hint": "_id_" - } - }, - { - "replaceOne": { - "filter": { - "_id": 4 - }, - "replacement": { - "x": 444 - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "test_bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-update-hint-clientError.yml b/testdata/crud/unified/bulkWrite-update-hint-clientError.yml deleted file mode 100644 index df1eae485e..0000000000 --- a/testdata/crud/unified/bulkWrite-update-hint-clientError.yml +++ /dev/null @@ -1,148 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: bulkWrite-update-hint-clientError -schemaVersion: '1.0' -runOnRequirements: - - - maxServerVersion: 3.3.99 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_bulkwrite_update_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 -tests: - - - description: 'BulkWrite updateOne with update hints unsupported (client-side error)' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateOne: - filter: &updateOne_filter - _id: 1 - update: &updateOne_update - $inc: - x: 1 - hint: &hint_string _id_ - - - updateOne: - filter: *updateOne_filter - update: *updateOne_update - hint: &hint_doc - _id: 1 - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 - - - description: 'BulkWrite updateMany with update hints unsupported (client-side error)' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateMany: - filter: &updateMany_filter - _id: - $lt: 3 - update: &updateMany_update - $inc: - x: 1 - hint: *hint_string - - - updateMany: - filter: *updateMany_filter - update: *updateMany_update - hint: *hint_doc - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome - - - description: 'BulkWrite replaceOne with update hints unsupported (client-side error)' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - replaceOne: - filter: - _id: 3 - replacement: - x: 333 - hint: *hint_string - - - replaceOne: - filter: - _id: 4 - replacement: - x: 444 - hint: *hint_doc - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/bulkWrite-update-hint-serverError.json b/testdata/crud/unified/bulkWrite-update-hint-serverError.json deleted file mode 100644 index b0f7e1b381..0000000000 --- a/testdata/crud/unified/bulkWrite-update-hint-serverError.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "description": "bulkWrite-update-hint-serverError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.1.9" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_bulkwrite_update_hint" - } - } - ], - "initialData": [ - { - "collectionName": "test_bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite updateOne with update hints unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - } - }, - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_bulkwrite_update_hint", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_", - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": 1 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "ordered": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "BulkWrite updateMany with update hints unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": { - "_id": { - "$lt": 3 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - } - }, - { - "updateMany": { - "filter": { - "_id": { - "$lt": 3 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_bulkwrite_update_hint", - "updates": [ - { - "q": { - "_id": { - "$lt": 3 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "hint": "_id_", - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": { - "$lt": 3 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "hint": { - "_id": 1 - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "ordered": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "BulkWrite replaceOne with update hints unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": 3 - }, - "replacement": { - "x": 333 - }, - "hint": "_id_" - } - }, - { - "replaceOne": { - "filter": { - "_id": 4 - }, - "replacement": { - "x": 444 - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_bulkwrite_update_hint", - "updates": [ - { - "q": { - "_id": 3 - }, - "u": { - "x": 333 - }, - "hint": "_id_", - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - }, - { - "q": { - "_id": 4 - }, - "u": { - "x": 444 - }, - "hint": { - "_id": 1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "ordered": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-update-hint-serverError.yml b/testdata/crud/unified/bulkWrite-update-hint-serverError.yml deleted file mode 100644 index 0b4ed166e0..0000000000 --- a/testdata/crud/unified/bulkWrite-update-hint-serverError.yml +++ /dev/null @@ -1,239 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: bulkWrite-update-hint-serverError -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 3.4.0 - maxServerVersion: 4.1.9 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_bulkwrite_update_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 -tests: - - - description: 'BulkWrite updateOne with update hints unsupported (server-side error)' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateOne: - filter: &updateOne_filter - _id: 1 - update: &updateOne_update - $inc: - x: 1 - hint: &hint_string _id_ - - - updateOne: - filter: *updateOne_filter - update: *updateOne_update - hint: &hint_doc - _id: 1 - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *updateOne_filter - u: *updateOne_update - hint: *hint_string - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - - q: *updateOne_filter - u: *updateOne_update - hint: *hint_doc - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - ordered: true - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 - - - description: 'BulkWrite updateMany with update hints unsupported (server-side error)' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateMany: - filter: &updateMany_filter - _id: - $lt: 3 - update: &updateMany_update - $inc: - x: 1 - hint: *hint_string - - - updateMany: - filter: *updateMany_filter - update: *updateMany_update - hint: *hint_doc - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *updateMany_filter - u: *updateMany_update - multi: true - hint: *hint_string - upsert: { $$unsetOrMatches: false } - - - q: *updateMany_filter - u: *updateMany_update - multi: true - hint: *hint_doc - upsert: { $$unsetOrMatches: false } - ordered: true - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 - - - description: 'BulkWrite replaceOne with update hints unsupported (server-side error)' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - replaceOne: - filter: - _id: 3 - replacement: - x: 333 - hint: *hint_string - - - replaceOne: - filter: - _id: 4 - replacement: - x: 444 - hint: *hint_doc - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: - _id: 3 - u: - x: 333 - hint: *hint_string - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - - q: - _id: 4 - u: - x: 444 - hint: *hint_doc - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - ordered: true - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 diff --git a/testdata/crud/unified/bulkWrite-update-hint.json b/testdata/crud/unified/bulkWrite-update-hint.json deleted file mode 100644 index 4206359891..0000000000 --- a/testdata/crud/unified/bulkWrite-update-hint.json +++ /dev/null @@ -1,445 +0,0 @@ -{ - "description": "bulkWrite-update-hint", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_bulkwrite_update_hint" - } - } - ], - "initialData": [ - { - "collectionName": "test_bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite updateOne with update hints", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - } - }, - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_bulkwrite_update_hint", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - }, - "hint": "_id_" - }, - { - "q": { - "_id": 1 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - }, - "hint": { - "_id": 1 - } - } - ], - "ordered": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 13 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "BulkWrite updateMany with update hints", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": { - "_id": { - "$lt": 3 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - } - }, - { - "updateMany": { - "filter": { - "_id": { - "$lt": 3 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 4, - "modifiedCount": 4, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_bulkwrite_update_hint", - "updates": [ - { - "q": { - "_id": { - "$lt": 3 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "upsert": { - "$$unsetOrMatches": false - }, - "hint": "_id_" - }, - { - "q": { - "_id": { - "$lt": 3 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "upsert": { - "$$unsetOrMatches": false - }, - "hint": { - "_id": 1 - } - } - ], - "ordered": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 13 - }, - { - "_id": 2, - "x": 24 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "BulkWrite replaceOne with update hints", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": 3 - }, - "replacement": { - "x": 333 - }, - "hint": "_id_" - } - }, - { - "replaceOne": { - "filter": { - "_id": 4 - }, - "replacement": { - "x": 444 - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_bulkwrite_update_hint", - "updates": [ - { - "q": { - "_id": 3 - }, - "u": { - "x": 333 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - }, - "hint": "_id_" - }, - { - "q": { - "_id": 4 - }, - "u": { - "x": 444 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - }, - "hint": { - "_id": 1 - } - } - ], - "ordered": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 333 - }, - { - "_id": 4, - "x": 444 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-update-hint.yml b/testdata/crud/unified/bulkWrite-update-hint.yml deleted file mode 100644 index 9f5a0e080e..0000000000 --- a/testdata/crud/unified/bulkWrite-update-hint.yml +++ /dev/null @@ -1,256 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: bulkWrite-update-hint -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.2.0 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_bulkwrite_update_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 -tests: - - - description: 'BulkWrite updateOne with update hints' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateOne: - filter: &updateOne_filter - _id: 1 - update: &updateOne_update - $inc: - x: 1 - hint: &hint_string _id_ - - - updateOne: - filter: *updateOne_filter - update: *updateOne_update - hint: &hint_doc - _id: 1 - ordered: true - expectResult: - deletedCount: 0 - insertedCount: 0 - insertedIds: { $$unsetOrMatches: {} } - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - upsertedIds: { } - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *updateOne_filter - u: *updateOne_update - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - hint: *hint_string - - - q: *updateOne_filter - u: *updateOne_update - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - hint: *hint_doc - ordered: true - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 13 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 - - - description: 'BulkWrite updateMany with update hints' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateMany: - filter: &updateMany_filter - _id: - $lt: 3 - update: &updateMany_update - $inc: - x: 1 - hint: *hint_string - - - updateMany: - filter: *updateMany_filter - update: *updateMany_update - hint: *hint_doc - ordered: true - expectResult: - deletedCount: 0 - insertedCount: 0 - insertedIds: { $$unsetOrMatches: {} } - matchedCount: 4 - modifiedCount: 4 - upsertedCount: 0 - upsertedIds: { } - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *updateMany_filter - u: *updateMany_update - multi: true - upsert: { $$unsetOrMatches: false } - hint: *hint_string - - - q: *updateMany_filter - u: *updateMany_update - multi: true - upsert: { $$unsetOrMatches: false } - hint: *hint_doc - ordered: true - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 13 - - - _id: 2 - x: 24 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 - - - description: 'BulkWrite replaceOne with update hints' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - replaceOne: - filter: - _id: 3 - replacement: - x: 333 - hint: *hint_string - - - replaceOne: - filter: - _id: 4 - replacement: - x: 444 - hint: *hint_doc - ordered: true - expectResult: - deletedCount: 0 - insertedCount: 0 - insertedIds: { $$unsetOrMatches: {} } - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - upsertedIds: { } - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: - _id: 3 - u: - x: 333 - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - hint: *hint_string - - - q: - _id: 4 - u: - x: 444 - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - hint: *hint_doc - ordered: true - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 333 - - - _id: 4 - x: 444 diff --git a/testdata/crud/unified/bulkWrite-update-validation.json b/testdata/crud/unified/bulkWrite-update-validation.json deleted file mode 100644 index f9bfda0edd..0000000000 --- a/testdata/crud/unified/bulkWrite-update-validation.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "description": "bulkWrite-update-validation", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite replaceOne prohibits atomic modifiers", - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": 1 - }, - "replacement": { - "$set": { - "x": 22 - } - } - } - } - ] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "BulkWrite updateOne requires atomic modifiers", - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": { - "x": 22 - } - } - } - ] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "BulkWrite updateMany requires atomic modifiers", - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "x": 44 - } - } - } - ] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-update-validation.yml b/testdata/crud/unified/bulkWrite-update-validation.yml deleted file mode 100644 index 57defd56a4..0000000000 --- a/testdata/crud/unified/bulkWrite-update-validation.yml +++ /dev/null @@ -1,73 +0,0 @@ -description: "bulkWrite-update-validation" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "BulkWrite replaceOne prohibits atomic modifiers" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - replaceOne: - filter: { _id: 1 } - replacement: { $set: { x: 22 } } - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] - outcome: *initialData - - - description: "BulkWrite updateOne requires atomic modifiers" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - updateOne: - filter: { _id: 1 } - update: { x: 22 } - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] - outcome: *initialData - - - description: "BulkWrite updateMany requires atomic modifiers" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - updateMany: - filter: { _id: { $gt: 1 } } - update: { x: 44 } - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] - outcome: *initialData diff --git a/testdata/crud/unified/bulkWrite-updateMany-dots_and_dollars.json b/testdata/crud/unified/bulkWrite-updateMany-dots_and_dollars.json deleted file mode 100644 index 35a5cdd52a..0000000000 --- a/testdata/crud/unified/bulkWrite-updateMany-dots_and_dollars.json +++ /dev/null @@ -1,452 +0,0 @@ -{ - "description": "bulkWrite-updateMany-dots_and_dollars", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {} - } - ] - } - ], - "tests": [ - { - "description": "Updating document to set top-level dollar-prefixed key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ] - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {}, - "$a": 1 - } - ] - } - ] - }, - { - "description": "Updating document to set top-level dotted key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ] - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {}, - "a.b": 1 - } - ] - } - ] - }, - { - "description": "Updating document to set dollar-prefixed key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ] - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": { - "$a": 1 - } - } - ] - } - ] - }, - { - "description": "Updating document to set dotted key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ] - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": { - "a.b": 1 - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-updateMany-dots_and_dollars.yml b/testdata/crud/unified/bulkWrite-updateMany-dots_and_dollars.yml deleted file mode 100644 index 68cebd09cf..0000000000 --- a/testdata/crud/unified/bulkWrite-updateMany-dots_and_dollars.yml +++ /dev/null @@ -1,150 +0,0 @@ -description: "bulkWrite-updateMany-dots_and_dollars" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {} } - -tests: - - description: "Updating document to set top-level dollar-prefixed key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - updateMany: - filter: { _id: 1 } - update: &dollarPrefixedKey - - { $replaceWith: { $setField: { field: { $literal: $a }, value: 1, input: $$ROOT } } } - expectResult: &bulkWriteResult - deletedCount: 0 - insertedCount: 0 - insertedIds: { $$unsetOrMatches: { } } - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - upsertedIds: { } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dollarPrefixedKey - multi: true - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {}, $a: 1 } - - - description: "Updating document to set top-level dotted key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - updateMany: - filter: { _id: 1 } - update: &dottedKey - - { $replaceWith: { $setField: { field: { $literal: a.b }, value: 1, input: $$ROOT } } } - expectResult: *bulkWriteResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dottedKey - multi: true - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {}, a.b: 1 } - - - description: "Updating document to set dollar-prefixed key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - updateMany: - filter: { _id: 1 } - update: &dollarPrefixedKeyInEmbedded - - { $set: { foo: { $setField: { field: { $literal: $a }, value: 1, input: $foo } } } } - expectResult: *bulkWriteResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dollarPrefixedKeyInEmbedded - multi: true - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: { $a: 1 } } - - - description: "Updating document to set dotted key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - updateMany: - filter: { _id: 1 } - update: &dottedKeyInEmbedded - - { $set: { foo: { $setField: { field: { $literal: a.b }, value: 1, input: $foo } } } } - expectResult: *bulkWriteResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dottedKeyInEmbedded - multi: true - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: { a.b: 1 } } diff --git a/testdata/crud/unified/bulkWrite-updateMany-let.json b/testdata/crud/unified/bulkWrite-updateMany-let.json deleted file mode 100644 index fbeba1a607..0000000000 --- a/testdata/crud/unified/bulkWrite-updateMany-let.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "description": "BulkWrite updateMany-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 20 - }, - { - "_id": 2, - "x": 21 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite updateMany with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "update": [ - { - "$set": { - "x": 21 - } - } - ] - } - } - ], - "let": { - "id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "u": [ - { - "$set": { - "x": 21 - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 21 - }, - { - "_id": 2, - "x": 21 - } - ] - } - ] - }, - { - "description": "BulkWrite updateMany with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.9" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "update": [ - { - "$set": { - "x": 21 - } - } - ] - } - } - ], - "let": { - "id": 1 - } - }, - "expectError": { - "errorContains": "'update.let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "u": [ - { - "$set": { - "x": 21 - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 20 - }, - { - "_id": 2, - "x": 21 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-updateMany-let.yml b/testdata/crud/unified/bulkWrite-updateMany-let.yml deleted file mode 100644 index f67d000334..0000000000 --- a/testdata/crud/unified/bulkWrite-updateMany-let.yml +++ /dev/null @@ -1,96 +0,0 @@ -description: "BulkWrite updateMany-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 20 } - - { _id: 2, x: 21 } - -tests: - - description: "BulkWrite updateMany with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: - - updateMany: - filter: &filter - $expr: - $eq: [ "$_id", "$$id" ] - update: &update - - $set: - x: 21 - let: &let - id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: *filter - u: *update - multi: true - upsert: { $$unsetOrMatches: false } - let: *let - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 21 } - - { _id: 2, x: 21 } - - - description: "BulkWrite updateMany with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "4.2.0" - maxServerVersion: "4.9" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: - - updateMany: - filter: *filter - update: *update - let: *let - expectError: - errorContains: "'update.let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: *filter - u: *update - multi: true - upsert: { $$unsetOrMatches: false } - let: *let - - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 20 } - - { _id: 2, x: 21 } diff --git a/testdata/crud/unified/bulkWrite-updateOne-dots_and_dollars.json b/testdata/crud/unified/bulkWrite-updateOne-dots_and_dollars.json deleted file mode 100644 index cbbe113ce8..0000000000 --- a/testdata/crud/unified/bulkWrite-updateOne-dots_and_dollars.json +++ /dev/null @@ -1,460 +0,0 @@ -{ - "description": "bulkWrite-updateOne-dots_and_dollars", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {} - } - ] - } - ], - "tests": [ - { - "description": "Updating document to set top-level dollar-prefixed key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ] - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {}, - "$a": 1 - } - ] - } - ] - }, - { - "description": "Updating document to set top-level dotted key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ] - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {}, - "a.b": 1 - } - ] - } - ] - }, - { - "description": "Updating document to set dollar-prefixed key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ] - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": { - "$a": 1 - } - } - ] - } - ] - }, - { - "description": "Updating document to set dotted key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ] - } - } - ] - }, - "expectResult": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": {} - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": { - "a.b": 1 - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-updateOne-dots_and_dollars.yml b/testdata/crud/unified/bulkWrite-updateOne-dots_and_dollars.yml deleted file mode 100644 index c5a1662db1..0000000000 --- a/testdata/crud/unified/bulkWrite-updateOne-dots_and_dollars.yml +++ /dev/null @@ -1,150 +0,0 @@ -description: "bulkWrite-updateOne-dots_and_dollars" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {} } - -tests: - - description: "Updating document to set top-level dollar-prefixed key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - updateOne: - filter: { _id: 1 } - update: &dollarPrefixedKey - - { $replaceWith: { $setField: { field: { $literal: $a }, value: 1, input: $$ROOT } } } - expectResult: &bulkWriteResult - deletedCount: 0 - insertedCount: 0 - insertedIds: { $$unsetOrMatches: { } } - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - upsertedIds: { } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dollarPrefixedKey - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {}, $a: 1 } - - - description: "Updating document to set top-level dotted key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - updateOne: - filter: { _id: 1 } - update: &dottedKey - - { $replaceWith: { $setField: { field: { $literal: a.b }, value: 1, input: $$ROOT } } } - expectResult: *bulkWriteResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dottedKey - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {}, a.b: 1 } - - - description: "Updating document to set dollar-prefixed key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - updateOne: - filter: { _id: 1 } - update: &dollarPrefixedKeyInEmbedded - - { $set: { foo: { $setField: { field: { $literal: $a }, value: 1, input: $foo } } } } - expectResult: *bulkWriteResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dollarPrefixedKeyInEmbedded - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: { $a: 1 } } - - - description: "Updating document to set dotted key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - updateOne: - filter: { _id: 1 } - update: &dottedKeyInEmbedded - - { $set: { foo: { $setField: { field: { $literal: a.b }, value: 1, input: $foo } } } } - expectResult: *bulkWriteResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dottedKeyInEmbedded - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: { a.b: 1 } } diff --git a/testdata/crud/unified/bulkWrite-updateOne-let.json b/testdata/crud/unified/bulkWrite-updateOne-let.json deleted file mode 100644 index 96783c782f..0000000000 --- a/testdata/crud/unified/bulkWrite-updateOne-let.json +++ /dev/null @@ -1,247 +0,0 @@ -{ - "description": "BulkWrite updateOne-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 20 - }, - { - "_id": 2, - "x": 21 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite updateOne with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "update": [ - { - "$set": { - "x": 22 - } - } - ] - } - } - ], - "let": { - "id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "u": [ - { - "$set": { - "x": 22 - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 22 - }, - { - "_id": 2, - "x": 21 - } - ] - } - ] - }, - { - "description": "BulkWrite updateOne with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.9" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "update": [ - { - "$set": { - "x": 22 - } - } - ] - } - } - ], - "let": { - "id": 1 - } - }, - "expectError": { - "errorContains": "'update.let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "u": [ - { - "$set": { - "x": 22 - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 20 - }, - { - "_id": 2, - "x": 21 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-updateOne-let.yml b/testdata/crud/unified/bulkWrite-updateOne-let.yml deleted file mode 100644 index dc3cd2b599..0000000000 --- a/testdata/crud/unified/bulkWrite-updateOne-let.yml +++ /dev/null @@ -1,95 +0,0 @@ -description: "BulkWrite updateOne-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 20 } - - { _id: 2, x: 21 } - -tests: - - description: "BulkWrite updateOne with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: - - updateOne: - filter: &filter - $expr: - $eq: [ "$_id", "$$id" ] - update: &update - - $set: - x: 22 - let: &let - id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: *filter - u: *update - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - let: *let - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 22 } - - { _id: 2, x: 21 } - - - description: "BulkWrite updateOne with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "4.2.0" - maxServerVersion: "4.9" - operations: - - object: *collection0 - name: bulkWrite - arguments: - requests: - - updateOne: - filter: *filter - update: *update - let: *let - expectError: - errorContains: "'update.let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: *filter - u: *update - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - let: *let - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 20 } - - { _id: 2, x: 21 } diff --git a/testdata/crud/unified/bulkWrite-updateOne-sort.json b/testdata/crud/unified/bulkWrite-updateOne-sort.json deleted file mode 100644 index f78bd3bf3e..0000000000 --- a/testdata/crud/unified/bulkWrite-updateOne-sort.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "description": "BulkWrite updateOne-sort", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite updateOne with sort option", - "runOnRequirements": [ - { - "minServerVersion": "8.0" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "sort": { - "_id": -1 - }, - "update": [ - { - "$set": { - "x": 1 - } - } - ] - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": [ - { - "$set": { - "x": 1 - } - } - ], - "sort": { - "_id": -1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 1 - }, - "commandName": "update" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 1 - } - ] - } - ] - }, - { - "description": "BulkWrite updateOne with sort option unsupported (server-side error)", - "runOnRequirements": [ - { - "maxServerVersion": "7.99" - } - ], - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "sort": { - "_id": -1 - }, - "update": [ - { - "$set": { - "x": 1 - } - } - ] - } - } - ] - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": [ - { - "$set": { - "x": 1 - } - } - ], - "sort": { - "_id": -1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/bulkWrite-updateOne-sort.yml b/testdata/crud/unified/bulkWrite-updateOne-sort.yml deleted file mode 100644 index 9446986fab..0000000000 --- a/testdata/crud/unified/bulkWrite-updateOne-sort.yml +++ /dev/null @@ -1,94 +0,0 @@ -description: BulkWrite updateOne-sort - -schemaVersion: "1.0" - -createEntities: - - client: - id: client0 - observeEvents: [ commandStartedEvent, commandSucceededEvent ] - - database: - id: database0 - client: client0 - databaseName: crud-tests - - collection: - id: collection0 - database: database0 - collectionName: coll0 - -initialData: - - collectionName: coll0 - databaseName: crud-tests - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: BulkWrite updateOne with sort option - runOnRequirements: - - minServerVersion: "8.0" - operations: - - object: collection0 - name: bulkWrite - arguments: - requests: - - updateOne: - filter: { _id: { $gt: 1 } } - sort: { _id: -1 } - update: [ $set: { x: 1 } ] - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - update: coll0 - updates: - - q: { _id: { $gt: 1 } } - u: [ $set: { x: 1 } ] - sort: { _id: -1 } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - commandSucceededEvent: - reply: { ok: 1, n: 1 } - commandName: update - outcome: - - collectionName: coll0 - databaseName: crud-tests - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 1 } - - - description: BulkWrite updateOne with sort option unsupported (server-side error) - runOnRequirements: - - maxServerVersion: "7.99" - operations: - - object: collection0 - name: bulkWrite - arguments: - requests: - - updateOne: - filter: { _id: { $gt: 1 } } - sort: { _id: -1 } - update: [ $set: { x: 1 } ] - expectError: - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - update: coll0 - updates: - - q: { _id: { $gt: 1 } } - u: [ $set: { x: 1 } ] - sort: { _id: -1 } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: coll0 - databaseName: crud-tests - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } diff --git a/testdata/crud/unified/client-bulkWrite-delete-options.json b/testdata/crud/unified/client-bulkWrite-delete-options.json deleted file mode 100644 index d9987897dc..0000000000 --- a/testdata/crud/unified/client-bulkWrite-delete-options.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "description": "client bulkWrite delete options", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "crud-tests.coll0", - "collation": { - "locale": "simple" - }, - "hint": "_id_" - }, - "tests": [ - { - "description": "client bulk write delete with collation", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - }, - "collation": { - "locale": "simple" - } - } - }, - { - "deleteMany": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": { - "$gt": 1 - } - }, - "collation": { - "locale": "simple" - } - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 0, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 3, - "insertResults": {}, - "updateResults": {}, - "deleteResults": { - "0": { - "deletedCount": 1 - }, - "1": { - "deletedCount": 2 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "delete": 0, - "filter": { - "_id": 1 - }, - "collation": { - "locale": "simple" - }, - "multi": false - }, - { - "delete": 0, - "filter": { - "_id": { - "$gt": 1 - } - }, - "collation": { - "locale": "simple" - }, - "multi": true - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "databaseName": "crud-tests", - "collectionName": "coll0", - "documents": [] - } - ] - }, - { - "description": "client bulk write delete with hint", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - }, - "hint": "_id_" - } - }, - { - "deleteMany": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": { - "$gt": 1 - } - }, - "hint": "_id_" - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 0, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 3, - "insertResults": {}, - "updateResults": {}, - "deleteResults": { - "0": { - "deletedCount": 1 - }, - "1": { - "deletedCount": 2 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "delete": 0, - "filter": { - "_id": 1 - }, - "hint": "_id_", - "multi": false - }, - { - "delete": 0, - "filter": { - "_id": { - "$gt": 1 - } - }, - "hint": "_id_", - "multi": true - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "databaseName": "crud-tests", - "collectionName": "coll0", - "documents": [] - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-delete-options.yml b/testdata/crud/unified/client-bulkWrite-delete-options.yml deleted file mode 100644 index 9297838535..0000000000 --- a/testdata/crud/unified/client-bulkWrite-delete-options.yml +++ /dev/null @@ -1,137 +0,0 @@ -description: "client bulkWrite delete options" -schemaVersion: "1.4" # To support `serverless: forbid` -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -_yamlAnchors: - namespace: &namespace "crud-tests.coll0" - collation: &collation { "locale": "simple" } - hint: &hint _id_ - -tests: - - description: "client bulk write delete with collation" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - deleteOne: - namespace: *namespace - filter: { _id: 1 } - collation: *collation - - deleteMany: - namespace: *namespace - filter: { _id: { $gt: 1 } } - collation: *collation - verboseResults: true - expectResult: - insertedCount: 0 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 3 - insertResults: {} - updateResults: {} - deleteResults: - 0: - deletedCount: 1 - 1: - deletedCount: 2 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - delete: 0 - filter: { _id: 1 } - collation: *collation - multi: false - - delete: 0 - filter: { _id: { $gt: 1 } } - collation: *collation - multi: true - nsInfo: - - ns: *namespace - outcome: - - databaseName: *database0Name - collectionName: *collection0Name - documents: [] - - description: "client bulk write delete with hint" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - deleteOne: - namespace: *namespace - filter: { _id: 1 } - hint: *hint - - deleteMany: - namespace: *namespace - filter: { _id: { $gt: 1 } } - hint: *hint - verboseResults: true - expectResult: - insertedCount: 0 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 3 - insertResults: {} - updateResults: {} - deleteResults: - 0: - deletedCount: 1 - 1: - deletedCount: 2 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - delete: 0 - filter: { _id: 1 } - hint: *hint - multi: false - - delete: 0 - filter: { _id: { $gt: 1 } } - hint: *hint - multi: true - outcome: - - databaseName: *database0Name - collectionName: *collection0Name - documents: [] diff --git a/testdata/crud/unified/client-bulkWrite-errorResponse.json b/testdata/crud/unified/client-bulkWrite-errorResponse.json deleted file mode 100644 index b828aad3b9..0000000000 --- a/testdata/crud/unified/client-bulkWrite-errorResponse.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "description": "client bulkWrite errorResponse", - "schemaVersion": "1.12", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false - } - } - ], - "_yamlAnchors": { - "namespace": "crud-tests.coll0" - }, - "tests": [ - { - "description": "client bulkWrite operations support errorResponse assertions", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "errorCode": 8 - } - } - } - }, - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1 - } - } - } - ] - }, - "expectError": { - "errorCode": 8, - "errorResponse": { - "code": 8 - } - } - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-errorResponse.yml b/testdata/crud/unified/client-bulkWrite-errorResponse.yml deleted file mode 100644 index d63010afc7..0000000000 --- a/testdata/crud/unified/client-bulkWrite-errorResponse.yml +++ /dev/null @@ -1,38 +0,0 @@ -description: "client bulkWrite errorResponse" -schemaVersion: "1.12" -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false # Avoid setting fail points with multiple mongoses - -_yamlAnchors: - namespace: &namespace "crud-tests.coll0" - -tests: - - description: "client bulkWrite operations support errorResponse assertions" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ bulkWrite ] - errorCode: &errorCode 8 # UnknownError - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 1 } - expectError: - errorCode: *errorCode - errorResponse: - code: *errorCode diff --git a/testdata/crud/unified/client-bulkWrite-errors.json b/testdata/crud/unified/client-bulkWrite-errors.json deleted file mode 100644 index 015bd95c99..0000000000 --- a/testdata/crud/unified/client-bulkWrite-errors.json +++ /dev/null @@ -1,513 +0,0 @@ -{ - "description": "client bulkWrite errors", - "schemaVersion": "1.21", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ], - "uriOptions": { - "retryWrites": false - }, - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "crud-tests.coll0", - "writeConcernErrorCode": 91, - "writeConcernErrorMessage": "Replication is being shut down", - "undefinedVarCode": 17276 - }, - "tests": [ - { - "description": "an individual operation fails during an ordered bulkWrite", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - } - } - }, - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id2" - ] - } - } - } - }, - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 3 - } - } - } - ], - "verboseResults": true - }, - "expectError": { - "expectResult": { - "insertedCount": 0, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 1, - "insertResults": {}, - "updateResults": {}, - "deleteResults": { - "0": { - "deletedCount": 1 - } - } - }, - "writeErrors": { - "1": { - "code": 17276 - } - } - } - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "an individual operation fails during an unordered bulkWrite", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - } - } - }, - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id2" - ] - } - } - } - }, - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 3 - } - } - } - ], - "verboseResults": true, - "ordered": false - }, - "expectError": { - "expectResult": { - "insertedCount": 0, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 2, - "insertResults": {}, - "updateResults": {}, - "deleteResults": { - "0": { - "deletedCount": 1 - }, - "2": { - "deletedCount": 1 - } - } - }, - "writeErrors": { - "1": { - "code": 17276 - } - } - } - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "detailed results are omitted from error when verboseResults is false", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - } - } - }, - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id2" - ] - } - } - } - }, - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 3 - } - } - } - ], - "verboseResults": false - }, - "expectError": { - "expectResult": { - "insertedCount": 0, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 1, - "insertResults": { - "$$unsetOrMatches": {} - }, - "updateResults": { - "$$unsetOrMatches": {} - }, - "deleteResults": { - "$$unsetOrMatches": {} - } - }, - "writeErrors": { - "1": { - "code": 17276 - } - } - } - } - ] - }, - { - "description": "a top-level failure occurs during a bulkWrite", - "operations": [ - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "errorCode": 8 - } - } - } - }, - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "x": 1 - } - } - } - ], - "verboseResults": true - }, - "expectError": { - "errorCode": 8 - } - } - ] - }, - { - "description": "a bulk write with only errors does not report a partial result", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id2" - ] - } - } - } - } - ], - "verboseResults": true - }, - "expectError": { - "expectResult": { - "$$unsetOrMatches": {} - }, - "writeErrors": { - "0": { - "code": 17276 - } - } - } - } - ] - }, - { - "description": "a write concern error occurs during a bulkWrite", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down" - } - } - } - } - }, - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 10 - } - } - } - ], - "verboseResults": true - }, - "expectError": { - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 10 - } - }, - "updateResults": {}, - "deleteResults": {} - }, - "writeConcernErrors": [ - { - "code": 91, - "message": "Replication is being shut down" - } - ] - } - } - ] - }, - { - "description": "an empty list of write models is a client-side error", - "operations": [ - { - "name": "clientBulkWrite", - "object": "client0", - "arguments": { - "models": [], - "verboseResults": true - }, - "expectError": { - "isClientError": true - } - } - ] - }, - { - "description": "Requesting unacknowledged write with verboseResults is a client-side error", - "operations": [ - { - "name": "clientBulkWrite", - "object": "client0", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 10 - } - } - } - ], - "verboseResults": true, - "ordered": false, - "writeConcern": { - "w": 0 - } - }, - "expectError": { - "isClientError": true, - "errorContains": "Cannot request unacknowledged write concern and verbose results" - } - } - ] - }, - { - "description": "Requesting unacknowledged write with ordered is a client-side error", - "operations": [ - { - "name": "clientBulkWrite", - "object": "client0", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 10 - } - } - } - ], - "writeConcern": { - "w": 0 - } - }, - "expectError": { - "isClientError": true, - "errorContains": "Cannot request unacknowledged write concern and ordered writes" - } - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-errors.yml b/testdata/crud/unified/client-bulkWrite-errors.yml deleted file mode 100644 index 79c0496161..0000000000 --- a/testdata/crud/unified/client-bulkWrite-errors.yml +++ /dev/null @@ -1,270 +0,0 @@ -description: "client bulkWrite errors" -schemaVersion: "1.21" -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - uriOptions: - retryWrites: false - useMultipleMongoses: false # Target a single mongos with failpoint - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -_yamlAnchors: - namespace: &namespace "crud-tests.coll0" - writeConcernErrorCode: &writeConcernErrorCode 91 - writeConcernErrorMessage: &writeConcernErrorMessage "Replication is being shut down" - undefinedVarCode: &undefinedVarCode 17276 # Use of an undefined variable - -tests: - - description: "an individual operation fails during an ordered bulkWrite" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - deleteOne: - namespace: *namespace - filter: { _id: 1 } - - deleteOne: - namespace: *namespace - filter: - $expr: - $eq: [ "$_id", "$$id2" ] # Attempt to access a nonexistent let var - - deleteOne: - namespace: *namespace - filter: { _id: 3 } - verboseResults: true - expectError: - expectResult: - insertedCount: 0 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 1 - insertResults: {} - updateResults: {} - deleteResults: - 0: - deletedCount: 1 - writeErrors: - 1: - code: *undefinedVarCode - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - description: "an individual operation fails during an unordered bulkWrite" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - deleteOne: - namespace: *namespace - filter: { _id: 1 } - - deleteOne: - namespace: *namespace - filter: - $expr: - $eq: [ "$_id", "$$id2" ] # Attempt to access a nonexistent let var - - deleteOne: - namespace: *namespace - filter: { _id: 3 } - verboseResults: true - ordered: false - expectError: - expectResult: - insertedCount: 0 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 2 - insertResults: {} - updateResults: {} - deleteResults: - 0: - deletedCount: 1 - 2: - deletedCount: 1 - writeErrors: - 1: - code: *undefinedVarCode - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 2, x: 22 } - - description: "detailed results are omitted from error when verboseResults is false" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - deleteOne: - namespace: *namespace - filter: { _id: 1 } - - deleteOne: - namespace: *namespace - filter: - $expr: - $eq: [ "$_id", "$$id2" ] # Attempt to access a nonexistent let var - - deleteOne: - namespace: *namespace - filter: { _id: 3 } - verboseResults: false - expectError: - expectResult: - insertedCount: 0 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 1 - insertResults: - $$unsetOrMatches: {} - updateResults: - $$unsetOrMatches: {} - deleteResults: - $$unsetOrMatches: {} - writeErrors: - 1: - code: *undefinedVarCode - - description: "a top-level failure occurs during a bulkWrite" - operations: - - object: testRunner - name: failPoint - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: - - bulkWrite - errorCode: 8 # UnknownError - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { x: 1 } - verboseResults: true - expectError: - errorCode: 8 - - description: "a bulk write with only errors does not report a partial result" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - deleteOne: - namespace: *namespace - filter: - $expr: - $eq: [ "$_id", "$$id2" ] # Attempt to access a nonexistent let var - verboseResults: true - expectError: - expectResult: - $$unsetOrMatches: {} # Empty or nonexistent result when no successful writes occurred - writeErrors: - 0: - code: *undefinedVarCode - - description: "a write concern error occurs during a bulkWrite" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: - - bulkWrite - writeConcernError: - code: *writeConcernErrorCode - errmsg: *writeConcernErrorMessage - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 10 } - verboseResults: true - expectError: - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 10 - updateResults: {} - deleteResults: {} - writeConcernErrors: - - code: *writeConcernErrorCode - message: *writeConcernErrorMessage - - description: "an empty list of write models is a client-side error" - operations: - - name: clientBulkWrite - object: *client0 - arguments: - models: [] - verboseResults: true - expectError: - isClientError: true - - description: "Requesting unacknowledged write with verboseResults is a client-side error" - operations: - - name: clientBulkWrite - object: *client0 - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 10 } - verboseResults: true - ordered: false - writeConcern: { w: 0 } - expectError: - isClientError: true - errorContains: "Cannot request unacknowledged write concern and verbose results" - - description: "Requesting unacknowledged write with ordered is a client-side error" - operations: - - name: clientBulkWrite - object: *client0 - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 10 } - # Omit `ordered` option. Defaults to true. - writeConcern: { w: 0 } - expectError: - isClientError: true - errorContains: "Cannot request unacknowledged write concern and ordered writes" diff --git a/testdata/crud/unified/client-bulkWrite-mixed-namespaces.json b/testdata/crud/unified/client-bulkWrite-mixed-namespaces.json deleted file mode 100644 index 55f0618923..0000000000 --- a/testdata/crud/unified/client-bulkWrite-mixed-namespaces.json +++ /dev/null @@ -1,315 +0,0 @@ -{ - "description": "client bulkWrite with mixed namespaces", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "db0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - }, - { - "collection": { - "id": "collection1", - "database": "database0", - "collectionName": "coll1" - } - }, - { - "database": { - "id": "database1", - "client": "client0", - "databaseName": "db1" - } - }, - { - "collection": { - "id": "collection2", - "database": "database1", - "collectionName": "coll2" - } - } - ], - "initialData": [ - { - "databaseName": "db0", - "collectionName": "coll0", - "documents": [] - }, - { - "databaseName": "db0", - "collectionName": "coll1", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - }, - { - "databaseName": "db1", - "collectionName": "coll2", - "documents": [ - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "_yamlAnchors": { - "db0Coll0Namespace": "db0.coll0", - "db0Coll1Namespace": "db0.coll1", - "db1Coll2Namespace": "db1.coll2" - }, - "tests": [ - { - "description": "client bulkWrite with mixed namespaces", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "db0.coll0", - "document": { - "_id": 1 - } - } - }, - { - "insertOne": { - "namespace": "db0.coll0", - "document": { - "_id": 2 - } - } - }, - { - "updateOne": { - "namespace": "db0.coll1", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "deleteOne": { - "namespace": "db1.coll2", - "filter": { - "_id": 3 - } - } - }, - { - "deleteOne": { - "namespace": "db0.coll1", - "filter": { - "_id": 2 - } - } - }, - { - "replaceOne": { - "namespace": "db1.coll2", - "filter": { - "_id": 4 - }, - "replacement": { - "x": 45 - } - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 2, - "upsertedCount": 0, - "matchedCount": 2, - "modifiedCount": 2, - "deletedCount": 2, - "insertResults": { - "0": { - "insertedId": 1 - }, - "1": { - "insertedId": 2 - } - }, - "updateResults": { - "2": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - }, - "5": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - } - }, - "deleteResults": { - "3": { - "deletedCount": 1 - }, - "4": { - "deletedCount": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "bulkWrite": 1, - "ops": [ - { - "insert": 0, - "document": { - "_id": 1 - } - }, - { - "insert": 0, - "document": { - "_id": 2 - } - }, - { - "update": 1, - "filter": { - "_id": 1 - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "multi": false - }, - { - "delete": 2, - "filter": { - "_id": 3 - }, - "multi": false - }, - { - "delete": 1, - "filter": { - "_id": 2 - }, - "multi": false - }, - { - "update": 2, - "filter": { - "_id": 4 - }, - "updateMods": { - "x": 45 - }, - "multi": false - } - ], - "nsInfo": [ - { - "ns": "db0.coll0" - }, - { - "ns": "db0.coll1" - }, - { - "ns": "db1.coll2" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "databaseName": "db0", - "collectionName": "coll0", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - }, - { - "databaseName": "db0", - "collectionName": "coll1", - "documents": [ - { - "_id": 1, - "x": 12 - } - ] - }, - { - "databaseName": "db1", - "collectionName": "coll2", - "documents": [ - { - "_id": 4, - "x": 45 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-mixed-namespaces.yml b/testdata/crud/unified/client-bulkWrite-mixed-namespaces.yml deleted file mode 100644 index 9788bce8c5..0000000000 --- a/testdata/crud/unified/client-bulkWrite-mixed-namespaces.yml +++ /dev/null @@ -1,147 +0,0 @@ -description: "client bulkWrite with mixed namespaces" -schemaVersion: "1.4" # To support `serverless: forbid` -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name db0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - - collection: - id: &collection1 collection1 - database: *database0 - collectionName: &collection1Name coll1 - - database: - id: &database1 database1 - client: *client0 - databaseName: &database1Name db1 - - collection: - id: &collection2 collection2 - database: *database1 - collectionName: &collection2Name coll2 - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: [] - - databaseName: *database0Name - collectionName: *collection1Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - databaseName: *database1Name - collectionName: *collection2Name - documents: - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - -_yamlAnchors: - db0Coll0Namespace: &db0Coll0Namespace "db0.coll0" - db0Coll1Namespace: &db0Coll1Namespace "db0.coll1" - db1Coll2Namespace: &db1Coll2Namespace "db1.coll2" - -tests: - - description: "client bulkWrite with mixed namespaces" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *db0Coll0Namespace - document: { _id: 1 } - - insertOne: - namespace: *db0Coll0Namespace - document: { _id: 2 } - - updateOne: - namespace: *db0Coll1Namespace - filter: { _id: 1 } - update: { $inc: { x: 1 } } - - deleteOne: - namespace: *db1Coll2Namespace - filter: { _id: 3 } - - deleteOne: - namespace: *db0Coll1Namespace - filter: { _id: 2 } - - replaceOne: - namespace: *db1Coll2Namespace - filter: { _id: 4 } - replacement: { x: 45 } - verboseResults: true - expectResult: - insertedCount: 2 - upsertedCount: 0 - matchedCount: 2 - modifiedCount: 2 - deletedCount: 2 - insertResults: - 0: - insertedId: 1 - 1: - insertedId: 2 - updateResults: - 2: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - 5: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - deleteResults: - 3: - deletedCount: 1 - 4: - deletedCount: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - bulkWrite: 1 - ops: - - insert: 0 - document: { _id: 1 } - - insert: 0 - document: { _id: 2 } - - update: 1 - filter: { _id: 1 } - updateMods: { $inc: { x: 1 } } - multi: false - - delete: 2 - filter: { _id: 3 } - multi: false - - delete: 1 - filter: { _id: 2 } - multi: false - - update: 2 - filter: { _id: 4 } - updateMods: { x: 45 } - multi: false - nsInfo: - - ns: *db0Coll0Namespace - - ns: *db0Coll1Namespace - - ns: *db1Coll2Namespace - outcome: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - { _id: 1 } - - { _id: 2 } - - databaseName: *database0Name - collectionName: *collection1Name - documents: - - { _id: 1, x: 12 } - - databaseName: *database1Name - collectionName: *collection2Name - documents: - - { _id: 4, x: 45 } diff --git a/testdata/crud/unified/client-bulkWrite-options.json b/testdata/crud/unified/client-bulkWrite-options.json deleted file mode 100644 index 708fe4e85b..0000000000 --- a/testdata/crud/unified/client-bulkWrite-options.json +++ /dev/null @@ -1,716 +0,0 @@ -{ - "description": "client bulkWrite top-level options", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "client": { - "id": "writeConcernClient", - "uriOptions": { - "w": 1 - }, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "crud-tests.coll0", - "comment": { - "bulk": "write" - }, - "let": { - "id1": 1, - "id2": 2 - }, - "writeConcern": { - "w": "majority" - } - }, - "tests": [ - { - "description": "client bulkWrite comment", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 3, - "x": 33 - } - } - } - ], - "comment": { - "bulk": "write" - }, - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 3 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "comment": { - "bulk": "write" - }, - "ops": [ - { - "insert": 0, - "document": { - "_id": 3, - "x": 33 - } - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "client bulkWrite bypassDocumentValidation", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 3, - "x": 33 - } - } - } - ], - "bypassDocumentValidation": true, - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 3 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "bypassDocumentValidation": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 3, - "x": 33 - } - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "client bulkWrite let", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "updateOne": { - "namespace": "crud-tests.coll0", - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id1" - ] - } - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id2" - ] - } - } - } - } - ], - "let": { - "id1": 1, - "id2": 2 - }, - "verboseResults": true - }, - "expectResult": { - "insertedCount": 0, - "upsertedCount": 0, - "matchedCount": 1, - "modifiedCount": 1, - "deletedCount": 1, - "insertResults": {}, - "updateResults": { - "0": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - } - }, - "deleteResults": { - "1": { - "deletedCount": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "let": { - "id1": 1, - "id2": 2 - }, - "ops": [ - { - "update": 0, - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id1" - ] - } - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "multi": false - }, - { - "delete": 0, - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id2" - ] - } - }, - "multi": false - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "databaseName": "crud-tests", - "collectionName": "coll0", - "documents": [ - { - "_id": 1, - "x": 12 - } - ] - } - ] - }, - { - "description": "client bulkWrite bypassDocumentValidation: false is sent", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 3, - "x": 33 - } - } - } - ], - "bypassDocumentValidation": false, - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 3 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "bypassDocumentValidation": false, - "ops": [ - { - "insert": 0, - "document": { - "_id": 3, - "x": 33 - } - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "client bulkWrite writeConcern", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 3, - "x": 33 - } - } - } - ], - "writeConcern": { - "w": "majority" - }, - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 3 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "writeConcern": { - "w": "majority" - }, - "ops": [ - { - "insert": 0, - "document": { - "_id": 3, - "x": 33 - } - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ] - }, - { - "description": "client bulkWrite inherits writeConcern from client", - "operations": [ - { - "object": "writeConcernClient", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 3, - "x": 33 - } - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 3 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "writeConcernClient", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "writeConcern": { - "w": 1 - }, - "ops": [ - { - "insert": 0, - "document": { - "_id": 3, - "x": 33 - } - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ] - }, - { - "description": "client bulkWrite writeConcern option overrides client writeConcern", - "operations": [ - { - "object": "writeConcernClient", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 3, - "x": 33 - } - } - } - ], - "writeConcern": { - "w": "majority" - }, - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 3 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "writeConcernClient", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "writeConcern": { - "w": "majority" - }, - "ops": [ - { - "insert": 0, - "document": { - "_id": 3, - "x": 33 - } - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-options.yml b/testdata/crud/unified/client-bulkWrite-options.yml deleted file mode 100644 index e0cbe747b3..0000000000 --- a/testdata/crud/unified/client-bulkWrite-options.yml +++ /dev/null @@ -1,351 +0,0 @@ -description: "client bulkWrite top-level options" -schemaVersion: "1.4" # To support `serverless: forbid` -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - client: - id: &writeConcernClient writeConcernClient - uriOptions: - &clientWriteConcern { w: 1 } - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -_yamlAnchors: - namespace: &namespace "crud-tests.coll0" - comment: &comment { bulk: "write" } - let: &let { id1: 1, id2: 2 } - writeConcern: &majorityWriteConcern { w: "majority" } - -tests: - - description: "client bulkWrite comment" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 3, x: 33 } - comment: *comment - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 3 - updateResults: {} - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - comment: *comment - ops: - - insert: 0 - document: { _id: 3, x: 33 } - nsInfo: - - ns: *namespace - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - description: "client bulkWrite bypassDocumentValidation" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 3, x: 33 } - bypassDocumentValidation: true - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 3 - updateResults: {} - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - bypassDocumentValidation: true - ops: - - insert: 0 - document: { _id: 3, x: 33 } - nsInfo: - - ns: *namespace - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - description: "client bulkWrite let" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - updateOne: - namespace: *namespace - filter: - $expr: - $eq: [ "$_id", "$$id1" ] - update: - $inc: { x: 1 } - - deleteOne: - namespace: *namespace - filter: - $expr: - $eq: [ "$_id", "$$id2" ] - let: *let - verboseResults: true - expectResult: - insertedCount: 0 - upsertedCount: 0 - matchedCount: 1 - modifiedCount: 1 - deletedCount: 1 - insertResults: {} - updateResults: - 0: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - deleteResults: - 1: - deletedCount: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - let: *let - ops: - - update: 0 - filter: - $expr: - $eq: [ "$_id", "$$id1" ] - updateMods: { $inc: { x: 1 } } - multi: false - - delete: 0 - filter: - $expr: - $eq: [ "$_id", "$$id2" ] - multi: false - nsInfo: - - ns: *namespace - outcome: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - { _id: 1, x: 12 } - - description: "client bulkWrite bypassDocumentValidation: false is sent" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 3, x: 33 } - bypassDocumentValidation: false - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 3 - updateResults: {} - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - bypassDocumentValidation: false - ops: - - insert: 0 - document: { _id: 3, x: 33 } - nsInfo: - - ns: *namespace - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - description: "client bulkWrite writeConcern" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 3, x: 33 } - writeConcern: *majorityWriteConcern - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 3 - updateResults: {} - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - writeConcern: *majorityWriteConcern - ops: - - insert: 0 - document: { _id: 3, x: 33 } - nsInfo: - - ns: *namespace - - description: "client bulkWrite inherits writeConcern from client" - operations: - - object: *writeConcernClient - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 3, x: 33 } - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 3 - updateResults: {} - deleteResults: {} - expectEvents: - - client: *writeConcernClient - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - writeConcern: { w: 1 } - ops: - - insert: 0 - document: { _id: 3, x: 33 } - nsInfo: - - ns: *namespace - - description: "client bulkWrite writeConcern option overrides client writeConcern" - operations: - - object: *writeConcernClient - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 3, x: 33 } - writeConcern: *majorityWriteConcern - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 3 - updateResults: {} - deleteResults: {} - expectEvents: - - client: *writeConcernClient - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - writeConcern: *majorityWriteConcern - ops: - - insert: 0 - document: { _id: 3, x: 33 } - nsInfo: - - ns: *namespace diff --git a/testdata/crud/unified/client-bulkWrite-ordered.json b/testdata/crud/unified/client-bulkWrite-ordered.json deleted file mode 100644 index 6fb10d992f..0000000000 --- a/testdata/crud/unified/client-bulkWrite-ordered.json +++ /dev/null @@ -1,291 +0,0 @@ -{ - "description": "client bulkWrite with ordered option", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [] - } - ], - "_yamlAnchors": { - "namespace": "crud-tests.coll0" - }, - "tests": [ - { - "description": "client bulkWrite with ordered: false", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - } - ], - "verboseResults": true, - "ordered": false - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 1 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": false, - "ops": [ - { - "insert": 0, - "document": { - "_id": 1, - "x": 11 - } - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - }, - { - "description": "client bulkWrite with ordered: true", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - } - ], - "verboseResults": true, - "ordered": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 1 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 1, - "x": 11 - } - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - }, - { - "description": "client bulkWrite defaults to ordered: true", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 1 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 1, - "x": 11 - } - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-ordered.yml b/testdata/crud/unified/client-bulkWrite-ordered.yml deleted file mode 100644 index 48aa8ad40a..0000000000 --- a/testdata/crud/unified/client-bulkWrite-ordered.yml +++ /dev/null @@ -1,153 +0,0 @@ -description: "client bulkWrite with ordered option" -schemaVersion: "1.4" # To support `serverless: forbid` -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -_yamlAnchors: - namespace: &namespace "crud-tests.coll0" - -tests: - - description: "client bulkWrite with ordered: false" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 1, x: 11 } - verboseResults: true - ordered: false - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 1 - updateResults: {} - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: false - ops: - - insert: 0 - document: { _id: 1, x: 11 } - nsInfo: - - ns: *namespace - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - description: "client bulkWrite with ordered: true" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 1, x: 11 } - verboseResults: true - ordered: true - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 1 - updateResults: {} - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 1, x: 11 } - nsInfo: - - ns: *namespace - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - description: "client bulkWrite defaults to ordered: true" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 1, x: 11 } - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 1 - updateResults: {} - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 1, x: 11 } - nsInfo: - - ns: *namespace - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } diff --git a/testdata/crud/unified/client-bulkWrite-partialResults.json b/testdata/crud/unified/client-bulkWrite-partialResults.json deleted file mode 100644 index 1b75e37834..0000000000 --- a/testdata/crud/unified/client-bulkWrite-partialResults.json +++ /dev/null @@ -1,540 +0,0 @@ -{ - "description": "client bulkWrite partial results", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "crud-tests.coll0", - "newDocument": { - "_id": 2, - "x": 22 - } - }, - "tests": [ - { - "description": "partialResult is unset when first operation fails during an ordered bulk write (verbose)", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - }, - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 2, - "x": 22 - } - } - } - ], - "ordered": true, - "verboseResults": true - }, - "expectError": { - "expectResult": { - "$$unsetOrMatches": { - "insertedCount": { - "$$exists": false - }, - "upsertedCount": { - "$$exists": false - }, - "matchedCount": { - "$$exists": false - }, - "modifiedCount": { - "$$exists": false - }, - "deletedCount": { - "$$exists": false - }, - "insertResults": { - "$$exists": false - }, - "updateResults": { - "$$exists": false - }, - "deleteResults": { - "$$exists": false - } - } - } - } - } - ] - }, - { - "description": "partialResult is unset when first operation fails during an ordered bulk write (summary)", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - }, - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 2, - "x": 22 - } - } - } - ], - "ordered": true, - "verboseResults": false - }, - "expectError": { - "expectResult": { - "$$unsetOrMatches": { - "insertedCount": { - "$$exists": false - }, - "upsertedCount": { - "$$exists": false - }, - "matchedCount": { - "$$exists": false - }, - "modifiedCount": { - "$$exists": false - }, - "deletedCount": { - "$$exists": false - }, - "insertResults": { - "$$exists": false - }, - "updateResults": { - "$$exists": false - }, - "deleteResults": { - "$$exists": false - } - } - } - } - } - ] - }, - { - "description": "partialResult is set when second operation fails during an ordered bulk write (verbose)", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - } - ], - "ordered": true, - "verboseResults": true - }, - "expectError": { - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 2 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - } - ] - }, - { - "description": "partialResult is set when second operation fails during an ordered bulk write (summary)", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - } - ], - "ordered": true, - "verboseResults": false - }, - "expectError": { - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "$$unsetOrMatches": {} - }, - "updateResults": { - "$$unsetOrMatches": {} - }, - "deleteResults": { - "$$unsetOrMatches": {} - } - } - } - } - ] - }, - { - "description": "partialResult is unset when all operations fail during an unordered bulk write", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - }, - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - } - ], - "ordered": false - }, - "expectError": { - "expectResult": { - "$$unsetOrMatches": { - "insertedCount": { - "$$exists": false - }, - "upsertedCount": { - "$$exists": false - }, - "matchedCount": { - "$$exists": false - }, - "modifiedCount": { - "$$exists": false - }, - "deletedCount": { - "$$exists": false - }, - "insertResults": { - "$$exists": false - }, - "updateResults": { - "$$exists": false - }, - "deleteResults": { - "$$exists": false - } - } - } - } - } - ] - }, - { - "description": "partialResult is set when first operation fails during an unordered bulk write (verbose)", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - }, - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 2, - "x": 22 - } - } - } - ], - "ordered": false, - "verboseResults": true - }, - "expectError": { - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "1": { - "insertedId": 2 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - } - ] - }, - { - "description": "partialResult is set when first operation fails during an unordered bulk write (summary)", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - }, - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 2, - "x": 22 - } - } - } - ], - "ordered": false, - "verboseResults": false - }, - "expectError": { - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "$$unsetOrMatches": {} - }, - "updateResults": { - "$$unsetOrMatches": {} - }, - "deleteResults": { - "$$unsetOrMatches": {} - } - } - } - } - ] - }, - { - "description": "partialResult is set when second operation fails during an unordered bulk write (verbose)", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - } - ], - "ordered": false, - "verboseResults": true - }, - "expectError": { - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 2 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - } - ] - }, - { - "description": "partialResult is set when second operation fails during an unordered bulk write (summary)", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 1, - "x": 11 - } - } - } - ], - "ordered": false, - "verboseResults": false - }, - "expectError": { - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "$$unsetOrMatches": {} - }, - "updateResults": { - "$$unsetOrMatches": {} - }, - "deleteResults": { - "$$unsetOrMatches": {} - } - } - } - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-partialResults.yml b/testdata/crud/unified/client-bulkWrite-partialResults.yml deleted file mode 100644 index 1cda7318f8..0000000000 --- a/testdata/crud/unified/client-bulkWrite-partialResults.yml +++ /dev/null @@ -1,262 +0,0 @@ -description: "client bulkWrite partial results" -schemaVersion: "1.4" # To support `serverless: forbid` -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - &existingDocument { _id: 1, x: 11 } - -_yamlAnchors: - namespace: &namespace "crud-tests.coll0" - newDocument: &newDocument { _id: 2, x: 22 } - -tests: - - description: "partialResult is unset when first operation fails during an ordered bulk write (verbose)" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: *existingDocument - - insertOne: - namespace: *namespace - document: *newDocument - ordered: true - verboseResults: true - expectError: - expectResult: - $$unsetOrMatches: - insertedCount: { $$exists: false } - upsertedCount: { $$exists: false } - matchedCount: { $$exists: false } - modifiedCount: { $$exists: false } - deletedCount: { $$exists: false } - insertResults: { $$exists: false } - updateResults: { $$exists: false } - deleteResults: { $$exists: false } - - description: "partialResult is unset when first operation fails during an ordered bulk write (summary)" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: *existingDocument - - insertOne: - namespace: *namespace - document: *newDocument - ordered: true - verboseResults: false - expectError: - expectResult: - $$unsetOrMatches: - insertedCount: { $$exists: false } - upsertedCount: { $$exists: false } - matchedCount: { $$exists: false } - modifiedCount: { $$exists: false } - deletedCount: { $$exists: false } - insertResults: { $$exists: false } - updateResults: { $$exists: false } - deleteResults: { $$exists: false } - - description: "partialResult is set when second operation fails during an ordered bulk write (verbose)" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: *newDocument - - insertOne: - namespace: *namespace - document: *existingDocument - ordered: true - verboseResults: true - expectError: - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 2 - updateResults: {} - deleteResults: {} - - description: "partialResult is set when second operation fails during an ordered bulk write (summary)" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: *newDocument - - insertOne: - namespace: *namespace - document: *existingDocument - ordered: true - verboseResults: false - expectError: - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - $$unsetOrMatches: {} - updateResults: - $$unsetOrMatches: {} - deleteResults: - $$unsetOrMatches: {} - - description: "partialResult is unset when all operations fail during an unordered bulk write" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: *existingDocument - - insertOne: - namespace: *namespace - document: *existingDocument - ordered: false - expectError: - expectResult: - $$unsetOrMatches: - insertedCount: { $$exists: false } - upsertedCount: { $$exists: false } - matchedCount: { $$exists: false } - modifiedCount: { $$exists: false } - deletedCount: { $$exists: false } - insertResults: { $$exists: false } - updateResults: { $$exists: false } - deleteResults: { $$exists: false } - - description: "partialResult is set when first operation fails during an unordered bulk write (verbose)" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: *existingDocument - - insertOne: - namespace: *namespace - document: *newDocument - ordered: false - verboseResults: true - expectError: - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 1: - insertedId: 2 - updateResults: {} - deleteResults: {} - - description: "partialResult is set when first operation fails during an unordered bulk write (summary)" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: *existingDocument - - insertOne: - namespace: *namespace - document: *newDocument - ordered: false - verboseResults: false - expectError: - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - $$unsetOrMatches: {} - updateResults: - $$unsetOrMatches: {} - deleteResults: - $$unsetOrMatches: {} - - description: "partialResult is set when second operation fails during an unordered bulk write (verbose)" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: *newDocument - - insertOne: - namespace: *namespace - document: *existingDocument - ordered: false - verboseResults: true - expectError: - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 2 - updateResults: {} - deleteResults: {} - - description: "partialResult is set when second operation fails during an unordered bulk write (summary)" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: *newDocument - - insertOne: - namespace: *namespace - document: *existingDocument - ordered: false - verboseResults: false - expectError: - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - $$unsetOrMatches: {} - updateResults: - $$unsetOrMatches: {} - deleteResults: - $$unsetOrMatches: {} diff --git a/testdata/crud/unified/client-bulkWrite-replaceOne-sort.json b/testdata/crud/unified/client-bulkWrite-replaceOne-sort.json deleted file mode 100644 index b86bc5f942..0000000000 --- a/testdata/crud/unified/client-bulkWrite-replaceOne-sort.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "description": "client bulkWrite updateOne-sort", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "crud-tests.coll0" - }, - "tests": [ - { - "description": "client bulkWrite replaceOne with sort option", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "replaceOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": { - "$gt": 1 - } - }, - "sort": { - "_id": -1 - }, - "replacement": { - "x": 1 - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "ops": [ - { - "update": 0, - "filter": { - "_id": { - "$gt": 1 - } - }, - "updateMods": { - "x": 1 - }, - "sort": { - "_id": -1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "nErrors": 0, - "nMatched": 1, - "nModified": 1 - }, - "commandName": "bulkWrite" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 1 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-replaceOne-sort.yml b/testdata/crud/unified/client-bulkWrite-replaceOne-sort.yml deleted file mode 100644 index a159ba5955..0000000000 --- a/testdata/crud/unified/client-bulkWrite-replaceOne-sort.yml +++ /dev/null @@ -1,77 +0,0 @@ -description: client bulkWrite updateOne-sort - -schemaVersion: "1.4" - -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid # Serverless does not support bulkWrite: CLOUDP-256344. - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -_yamlAnchors: - namespace: &namespace "crud-tests.coll0" - -tests: - - description: client bulkWrite replaceOne with sort option - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - replaceOne: - namespace: *namespace - filter: { _id: { $gt: 1 } } - sort: { _id: -1 } - replacement: { x: 1 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - ops: - - update: 0 - filter: { _id: { $gt: 1 } } - updateMods: { x: 1 } - sort: { _id: -1 } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - nsInfo: - - ns: *namespace - - commandSucceededEvent: - reply: - ok: 1 - nErrors: 0 - nMatched: 1 - nModified: 1 - commandName: bulkWrite - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 1 } diff --git a/testdata/crud/unified/client-bulkWrite-results.json b/testdata/crud/unified/client-bulkWrite-results.json deleted file mode 100644 index accf5a9cbf..0000000000 --- a/testdata/crud/unified/client-bulkWrite-results.json +++ /dev/null @@ -1,833 +0,0 @@ -{ - "description": "client bulkWrite results", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 5, - "x": 55 - }, - { - "_id": 6, - "x": 66 - }, - { - "_id": 7, - "x": 77 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "crud-tests.coll0" - }, - "tests": [ - { - "description": "client bulkWrite with verboseResults: true returns detailed results", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 8, - "x": 88 - } - } - }, - { - "updateOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "updateMany": { - "namespace": "crud-tests.coll0", - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "update": { - "$inc": { - "x": 2 - } - } - } - }, - { - "replaceOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 4 - }, - "replacement": { - "x": 44 - }, - "upsert": true - } - }, - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 5 - } - } - }, - { - "deleteMany": { - "namespace": "crud-tests.coll0", - "filter": { - "$and": [ - { - "_id": { - "$gt": 5 - } - }, - { - "_id": { - "$lte": 7 - } - } - ] - } - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 1, - "matchedCount": 3, - "modifiedCount": 3, - "deletedCount": 3, - "insertResults": { - "0": { - "insertedId": 8 - } - }, - "updateResults": { - "1": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - }, - "2": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedId": { - "$$exists": false - } - }, - "3": { - "matchedCount": 1, - "modifiedCount": 0, - "upsertedId": 4 - } - }, - "deleteResults": { - "4": { - "deletedCount": 1 - }, - "5": { - "deletedCount": 2 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 8, - "x": 88 - } - }, - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "multi": false - }, - { - "update": 0, - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "updateMods": { - "$inc": { - "x": 2 - } - }, - "multi": true - }, - { - "update": 0, - "filter": { - "_id": 4 - }, - "updateMods": { - "x": 44 - }, - "upsert": true, - "multi": false - }, - { - "delete": 0, - "filter": { - "_id": 5 - }, - "multi": false - }, - { - "delete": 0, - "filter": { - "$and": [ - { - "_id": { - "$gt": 5 - } - }, - { - "_id": { - "$lte": 7 - } - } - ] - }, - "multi": true - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 24 - }, - { - "_id": 3, - "x": 35 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 8, - "x": 88 - } - ] - } - ] - }, - { - "description": "client bulkWrite with verboseResults: false omits detailed results", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 8, - "x": 88 - } - } - }, - { - "updateOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "updateMany": { - "namespace": "crud-tests.coll0", - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "update": { - "$inc": { - "x": 2 - } - } - } - }, - { - "replaceOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 4 - }, - "replacement": { - "x": 44 - }, - "upsert": true - } - }, - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 5 - } - } - }, - { - "deleteMany": { - "namespace": "crud-tests.coll0", - "filter": { - "$and": [ - { - "_id": { - "$gt": 5 - } - }, - { - "_id": { - "$lte": 7 - } - } - ] - } - } - } - ], - "verboseResults": false - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 1, - "matchedCount": 3, - "modifiedCount": 3, - "deletedCount": 3, - "insertResults": { - "$$unsetOrMatches": {} - }, - "updateResults": { - "$$unsetOrMatches": {} - }, - "deleteResults": { - "$$unsetOrMatches": {} - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": true, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 8, - "x": 88 - } - }, - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "multi": false - }, - { - "update": 0, - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "updateMods": { - "$inc": { - "x": 2 - } - }, - "multi": true - }, - { - "update": 0, - "filter": { - "_id": 4 - }, - "updateMods": { - "x": 44 - }, - "upsert": true, - "multi": false - }, - { - "delete": 0, - "filter": { - "_id": 5 - }, - "multi": false - }, - { - "delete": 0, - "filter": { - "$and": [ - { - "_id": { - "$gt": 5 - } - }, - { - "_id": { - "$lte": 7 - } - } - ] - }, - "multi": true - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 24 - }, - { - "_id": 3, - "x": 35 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 8, - "x": 88 - } - ] - } - ] - }, - { - "description": "client bulkWrite defaults to verboseResults: false", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "crud-tests.coll0", - "document": { - "_id": 8, - "x": 88 - } - } - }, - { - "updateOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "updateMany": { - "namespace": "crud-tests.coll0", - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "update": { - "$inc": { - "x": 2 - } - } - } - }, - { - "replaceOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 4 - }, - "replacement": { - "x": 44 - }, - "upsert": true - } - }, - { - "deleteOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 5 - } - } - }, - { - "deleteMany": { - "namespace": "crud-tests.coll0", - "filter": { - "$and": [ - { - "_id": { - "$gt": 5 - } - }, - { - "_id": { - "$lte": 7 - } - } - ] - } - } - } - ] - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 1, - "matchedCount": 3, - "modifiedCount": 3, - "deletedCount": 3, - "insertResults": { - "$$unsetOrMatches": {} - }, - "updateResults": { - "$$unsetOrMatches": {} - }, - "deleteResults": { - "$$unsetOrMatches": {} - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": true, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 8, - "x": 88 - } - }, - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "multi": false - }, - { - "update": 0, - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "updateMods": { - "$inc": { - "x": 2 - } - }, - "multi": true - }, - { - "update": 0, - "filter": { - "_id": 4 - }, - "updateMods": { - "x": 44 - }, - "upsert": true, - "multi": false - }, - { - "delete": 0, - "filter": { - "_id": 5 - }, - "multi": false - }, - { - "delete": 0, - "filter": { - "$and": [ - { - "_id": { - "$gt": 5 - } - }, - { - "_id": { - "$lte": 7 - } - } - ] - }, - "multi": true - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 24 - }, - { - "_id": 3, - "x": 35 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 8, - "x": 88 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-results.yml b/testdata/crud/unified/client-bulkWrite-results.yml deleted file mode 100644 index 86cb5346ae..0000000000 --- a/testdata/crud/unified/client-bulkWrite-results.yml +++ /dev/null @@ -1,312 +0,0 @@ -description: "client bulkWrite results" -schemaVersion: "1.4" # To support `serverless: forbid` -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 5, x: 55 } - - { _id: 6, x: 66 } - - { _id: 7, x: 77 } - -_yamlAnchors: - namespace: &namespace "crud-tests.coll0" - -tests: - - description: "client bulkWrite with verboseResults: true returns detailed results" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 8, x: 88 } - - updateOne: - namespace: *namespace - filter: { _id: 1 } - update: { $inc: { x: 1 } } - - updateMany: - namespace: *namespace - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - update: { $inc: { x: 2 } } - - replaceOne: - namespace: *namespace - filter: { _id: 4 } - replacement: { x: 44 } - upsert: true - - deleteOne: - namespace: *namespace - filter: { _id: 5 } - - deleteMany: - namespace: *namespace - filter: - $and: [ { _id: { $gt: 5 } }, { _id: { $lte: 7 } } ] - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 1 - matchedCount: 3 - modifiedCount: 3 - deletedCount: 3 - insertResults: - 0: - insertedId: 8 - updateResults: - 1: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - 2: - matchedCount: 2 - modifiedCount: 2 - upsertedId: { $$exists: false } - 3: - matchedCount: 1 - modifiedCount: 0 - upsertedId: 4 - deleteResults: - 4: - deletedCount: 1 - 5: - deletedCount: 2 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 8, x: 88 } - - update: 0 - filter: { _id: 1 } - updateMods: { $inc: { x: 1 } } - multi: false - - update: 0 - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - updateMods: { $inc: { x: 2 } } - multi: true - - update: 0 - filter: { _id: 4 } - updateMods: { x: 44 } - upsert: true - multi: false - - delete: 0 - filter: { _id: 5 } - multi: false - - delete: 0 - filter: - $and: [ { _id: { $gt: 5 } }, { _id: { $lte: 7 } } ] - multi: true - nsInfo: - - ns: *namespace - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 12 } - - { _id: 2, x: 24 } - - { _id: 3, x: 35 } - - { _id: 4, x: 44 } - - { _id: 8, x: 88 } - - description: "client bulkWrite with verboseResults: false omits detailed results" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 8, x: 88 } - - updateOne: - namespace: *namespace - filter: { _id: 1 } - update: { $inc: { x: 1 } } - - updateMany: - namespace: *namespace - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - update: { $inc: { x: 2 } } - - replaceOne: - namespace: *namespace - filter: { _id: 4 } - replacement: { x: 44 } - upsert: true - - deleteOne: - namespace: *namespace - filter: { _id: 5 } - - deleteMany: - namespace: *namespace - filter: - $and: [ { _id: { $gt: 5 } }, { _id: { $lte: 7 } } ] - verboseResults: false - expectResult: - insertedCount: 1 - upsertedCount: 1 - matchedCount: 3 - modifiedCount: 3 - deletedCount: 3 - insertResults: - $$unsetOrMatches: {} - updateResults: - $$unsetOrMatches: {} - deleteResults: - $$unsetOrMatches: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: true - ordered: true - ops: - - insert: 0 - document: { _id: 8, x: 88 } - - update: 0 - filter: { _id: 1 } - updateMods: { $inc: { x: 1 } } - multi: false - - update: 0 - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - updateMods: { $inc: { x: 2 } } - multi: true - - update: 0 - filter: { _id: 4 } - updateMods: { x: 44 } - upsert: true - multi: false - - delete: 0 - filter: { _id: 5 } - multi: false - - delete: 0 - filter: - $and: [ { _id: { $gt: 5 } }, { _id: { $lte: 7 } } ] - multi: true - nsInfo: - - ns: *namespace - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 12 } - - { _id: 2, x: 24 } - - { _id: 3, x: 35 } - - { _id: 4, x: 44 } - - { _id: 8, x: 88 } - - description: "client bulkWrite defaults to verboseResults: false" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 8, x: 88 } - - updateOne: - namespace: *namespace - filter: { _id: 1 } - update: { $inc: { x: 1 } } - - updateMany: - namespace: *namespace - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - update: { $inc: { x: 2 } } - - replaceOne: - namespace: *namespace - filter: { _id: 4 } - replacement: { x: 44 } - upsert: true - - deleteOne: - namespace: *namespace - filter: { _id: 5 } - - deleteMany: - namespace: *namespace - filter: - $and: [ { _id: { $gt: 5 } }, { _id: { $lte: 7 } } ] - expectResult: - insertedCount: 1 - upsertedCount: 1 - matchedCount: 3 - modifiedCount: 3 - deletedCount: 3 - insertResults: - $$unsetOrMatches: {} - updateResults: - $$unsetOrMatches: {} - deleteResults: - $$unsetOrMatches: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: true - ordered: true - ops: - - insert: 0 - document: { _id: 8, x: 88 } - - update: 0 - filter: { _id: 1 } - updateMods: { $inc: { x: 1 } } - multi: false - - update: 0 - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - updateMods: { $inc: { x: 2 } } - multi: true - - update: 0 - filter: { _id: 4 } - updateMods: { x: 44 } - upsert: true - multi: false - - delete: 0 - filter: { _id: 5 } - multi: false - - delete: 0 - filter: - $and: [ { _id: { $gt: 5 } }, { _id: { $lte: 7 } } ] - multi: true - nsInfo: - - ns: *namespace - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 12 } - - { _id: 2, x: 24 } - - { _id: 3, x: 35 } - - { _id: 4, x: 44 } - - { _id: 8, x: 88 } diff --git a/testdata/crud/unified/client-bulkWrite-update-options.json b/testdata/crud/unified/client-bulkWrite-update-options.json deleted file mode 100644 index ce6241c681..0000000000 --- a/testdata/crud/unified/client-bulkWrite-update-options.json +++ /dev/null @@ -1,949 +0,0 @@ -{ - "description": "client bulkWrite update options", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "array": [ - 1, - 2, - 3 - ] - }, - { - "_id": 2, - "array": [ - 1, - 2, - 3 - ] - }, - { - "_id": 3, - "array": [ - 1, - 2, - 3 - ] - }, - { - "_id": 4, - "array": [ - 1, - 2, - 3 - ] - } - ] - } - ], - "_yamlAnchors": { - "namespace": "crud-tests.coll0", - "collation": { - "locale": "simple" - }, - "hint": "_id_" - }, - "tests": [ - { - "description": "client bulkWrite update with arrayFilters", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "updateOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "array.$[i]": 4 - } - }, - "arrayFilters": [ - { - "i": { - "$gte": 2 - } - } - ] - } - }, - { - "updateMany": { - "namespace": "crud-tests.coll0", - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "update": { - "$set": { - "array.$[i]": 5 - } - }, - "arrayFilters": [ - { - "i": { - "$gte": 2 - } - } - ] - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 0, - "upsertedCount": 0, - "matchedCount": 3, - "modifiedCount": 3, - "deletedCount": 0, - "insertResults": {}, - "updateResults": { - "0": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - }, - "1": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedId": { - "$$exists": false - } - } - }, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$set": { - "array.$[i]": 4 - } - }, - "arrayFilters": [ - { - "i": { - "$gte": 2 - } - } - ], - "multi": false - }, - { - "update": 0, - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "updateMods": { - "$set": { - "array.$[i]": 5 - } - }, - "arrayFilters": [ - { - "i": { - "$gte": 2 - } - } - ], - "multi": true - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "databaseName": "crud-tests", - "collectionName": "coll0", - "documents": [ - { - "_id": 1, - "array": [ - 1, - 4, - 4 - ] - }, - { - "_id": 2, - "array": [ - 1, - 5, - 5 - ] - }, - { - "_id": 3, - "array": [ - 1, - 5, - 5 - ] - }, - { - "_id": 4, - "array": [ - 1, - 2, - 3 - ] - } - ] - } - ] - }, - { - "description": "client bulkWrite update with collation", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "updateOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "array": [ - 1, - 2, - 4 - ] - } - }, - "collation": { - "locale": "simple" - } - } - }, - { - "updateMany": { - "namespace": "crud-tests.coll0", - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "update": { - "$set": { - "array": [ - 1, - 2, - 5 - ] - } - }, - "collation": { - "locale": "simple" - } - } - }, - { - "replaceOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 4 - }, - "replacement": { - "array": [ - 1, - 2, - 6 - ] - }, - "collation": { - "locale": "simple" - } - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 0, - "upsertedCount": 0, - "matchedCount": 4, - "modifiedCount": 4, - "deletedCount": 0, - "insertResults": {}, - "updateResults": { - "0": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - }, - "1": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedId": { - "$$exists": false - } - }, - "2": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - } - }, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$set": { - "array": [ - 1, - 2, - 4 - ] - } - }, - "collation": { - "locale": "simple" - }, - "multi": false - }, - { - "update": 0, - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "updateMods": { - "$set": { - "array": [ - 1, - 2, - 5 - ] - } - }, - "collation": { - "locale": "simple" - }, - "multi": true - }, - { - "update": 0, - "filter": { - "_id": 4 - }, - "updateMods": { - "array": [ - 1, - 2, - 6 - ] - }, - "collation": { - "locale": "simple" - }, - "multi": false - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "databaseName": "crud-tests", - "collectionName": "coll0", - "documents": [ - { - "_id": 1, - "array": [ - 1, - 2, - 4 - ] - }, - { - "_id": 2, - "array": [ - 1, - 2, - 5 - ] - }, - { - "_id": 3, - "array": [ - 1, - 2, - 5 - ] - }, - { - "_id": 4, - "array": [ - 1, - 2, - 6 - ] - } - ] - } - ] - }, - { - "description": "client bulkWrite update with hint", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "updateOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "array": [ - 1, - 2, - 4 - ] - } - }, - "hint": "_id_" - } - }, - { - "updateMany": { - "namespace": "crud-tests.coll0", - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "update": { - "$set": { - "array": [ - 1, - 2, - 5 - ] - } - }, - "hint": "_id_" - } - }, - { - "replaceOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 4 - }, - "replacement": { - "array": [ - 1, - 2, - 6 - ] - }, - "hint": "_id_" - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 0, - "upsertedCount": 0, - "matchedCount": 4, - "modifiedCount": 4, - "deletedCount": 0, - "insertResults": {}, - "updateResults": { - "0": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - }, - "1": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedId": { - "$$exists": false - } - }, - "2": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - } - }, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$set": { - "array": [ - 1, - 2, - 4 - ] - } - }, - "hint": "_id_", - "multi": false - }, - { - "update": 0, - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "updateMods": { - "$set": { - "array": [ - 1, - 2, - 5 - ] - } - }, - "hint": "_id_", - "multi": true - }, - { - "update": 0, - "filter": { - "_id": 4 - }, - "updateMods": { - "array": [ - 1, - 2, - 6 - ] - }, - "hint": "_id_", - "multi": false - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "databaseName": "crud-tests", - "collectionName": "coll0", - "documents": [ - { - "_id": 1, - "array": [ - 1, - 2, - 4 - ] - }, - { - "_id": 2, - "array": [ - 1, - 2, - 5 - ] - }, - { - "_id": 3, - "array": [ - 1, - 2, - 5 - ] - }, - { - "_id": 4, - "array": [ - 1, - 2, - 6 - ] - } - ] - } - ] - }, - { - "description": "client bulkWrite update with upsert", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "updateOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 5 - }, - "update": { - "$set": { - "array": [ - 1, - 2, - 4 - ] - } - }, - "upsert": true - } - }, - { - "replaceOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 6 - }, - "replacement": { - "array": [ - 1, - 2, - 6 - ] - }, - "upsert": true - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 0, - "upsertedCount": 2, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": {}, - "updateResults": { - "0": { - "matchedCount": 1, - "modifiedCount": 0, - "upsertedId": 5 - }, - "1": { - "matchedCount": 1, - "modifiedCount": 0, - "upsertedId": 6 - } - }, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "update": 0, - "filter": { - "_id": 5 - }, - "updateMods": { - "$set": { - "array": [ - 1, - 2, - 4 - ] - } - }, - "upsert": true, - "multi": false - }, - { - "update": 0, - "filter": { - "_id": 6 - }, - "updateMods": { - "array": [ - 1, - 2, - 6 - ] - }, - "upsert": true, - "multi": false - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "databaseName": "crud-tests", - "collectionName": "coll0", - "documents": [ - { - "_id": 1, - "array": [ - 1, - 2, - 3 - ] - }, - { - "_id": 2, - "array": [ - 1, - 2, - 3 - ] - }, - { - "_id": 3, - "array": [ - 1, - 2, - 3 - ] - }, - { - "_id": 4, - "array": [ - 1, - 2, - 3 - ] - }, - { - "_id": 5, - "array": [ - 1, - 2, - 4 - ] - }, - { - "_id": 6, - "array": [ - 1, - 2, - 6 - ] - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-update-options.yml b/testdata/crud/unified/client-bulkWrite-update-options.yml deleted file mode 100644 index c5cc20d480..0000000000 --- a/testdata/crud/unified/client-bulkWrite-update-options.yml +++ /dev/null @@ -1,338 +0,0 @@ -description: "client bulkWrite update options" -schemaVersion: "1.4" # To support `serverless: forbid` -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, array: [ 1, 2, 3 ] } - - { _id: 2, array: [ 1, 2, 3 ] } - - { _id: 3, array: [ 1, 2, 3 ] } - - { _id: 4, array: [ 1, 2, 3 ] } - -_yamlAnchors: - namespace: &namespace "crud-tests.coll0" - collation: &collation { "locale": "simple" } - hint: &hint _id_ - -tests: - - description: "client bulkWrite update with arrayFilters" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - updateOne: - namespace: *namespace - filter: { _id: 1 } - update: - $set: - array.$[i]: 4 - arrayFilters: [ i: { $gte: 2 } ] - - updateMany: - namespace: *namespace - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - update: - $set: - array.$[i]: 5 - arrayFilters: [ i: { $gte: 2 } ] - verboseResults: true - expectResult: - insertedCount: 0 - upsertedCount: 0 - matchedCount: 3 - modifiedCount: 3 - deletedCount: 0 - insertResults: {} - updateResults: - 0: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - 1: - matchedCount: 2 - modifiedCount: 2 - upsertedId: { $$exists: false } - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - update: 0 - filter: { _id: 1 } - updateMods: - $set: - array.$[i]: 4 - arrayFilters: [ i: { $gte: 2 } ] - multi: false - - update: 0 - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - updateMods: - $set: - array.$[i]: 5 - arrayFilters: [ i: { $gte: 2 } ] - multi: true - nsInfo: - - ns: *namespace - outcome: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - { _id: 1, array: [ 1, 4, 4 ] } - - { _id: 2, array: [ 1, 5, 5 ] } - - { _id: 3, array: [ 1, 5, 5 ] } - - { _id: 4, array: [ 1, 2, 3 ] } - - description: "client bulkWrite update with collation" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - updateOne: - namespace: *namespace - filter: { _id: 1 } - update: { $set: { array: [ 1, 2, 4 ] } } - collation: *collation - - updateMany: - namespace: *namespace - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - update: { $set: { array: [ 1, 2, 5 ] } } - collation: *collation - - replaceOne: - namespace: *namespace - filter: { _id: 4 } - replacement: { array: [ 1, 2, 6 ] } - collation: *collation - verboseResults: true - expectResult: - insertedCount: 0 - upsertedCount: 0 - matchedCount: 4 - modifiedCount: 4 - deletedCount: 0 - insertResults: {} - updateResults: - 0: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - 1: - matchedCount: 2 - modifiedCount: 2 - upsertedId: { $$exists: false } - 2: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - update: 0 - filter: { _id: 1 } - updateMods: { $set: { array: [ 1, 2, 4 ] } } - collation: *collation - multi: false - - update: 0 - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - updateMods: { $set: { array: [ 1, 2, 5 ] } } - collation: *collation - multi: true - - update: 0 - filter: { _id: 4 } - updateMods: { array: [ 1, 2, 6 ] } - collation: *collation - multi: false - nsInfo: - - ns: *namespace - outcome: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - { _id: 1, array: [ 1, 2, 4 ] } - - { _id: 2, array: [ 1, 2, 5 ] } - - { _id: 3, array: [ 1, 2, 5 ] } - - { _id: 4, array: [ 1, 2, 6 ] } - - description: "client bulkWrite update with hint" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - updateOne: - namespace: *namespace - filter: { _id: 1 } - update: { $set: { array: [ 1, 2, 4 ] } } - hint: *hint - - updateMany: - namespace: *namespace - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - update: { $set: { array: [ 1, 2, 5 ] } } - hint: *hint - - replaceOne: - namespace: *namespace - filter: { _id: 4 } - replacement: { array: [ 1, 2, 6 ] } - hint: *hint - verboseResults: true - expectResult: - insertedCount: 0 - upsertedCount: 0 - matchedCount: 4 - modifiedCount: 4 - deletedCount: 0 - insertResults: {} - updateResults: - 0: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - 1: - matchedCount: 2 - modifiedCount: 2 - upsertedId: { $$exists: false } - 2: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - update: 0 - filter: { _id: 1 } - updateMods: { $set: { array: [ 1, 2, 4 ] } } - hint: *hint - multi: false - - update: 0 - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - updateMods: { $set: { array: [ 1, 2, 5 ] } } - hint: *hint - multi: true - - update: 0 - filter: { _id: 4 } - updateMods: { array: [ 1, 2, 6 ] } - hint: *hint - multi: false - nsInfo: - - ns: *namespace - outcome: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - { _id: 1, array: [ 1, 2, 4 ] } - - { _id: 2, array: [ 1, 2, 5 ] } - - { _id: 3, array: [ 1, 2, 5 ] } - - { _id: 4, array: [ 1, 2, 6 ] } - - description: "client bulkWrite update with upsert" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - updateOne: - namespace: *namespace - filter: { _id: 5 } - update: { $set: { array: [ 1, 2, 4 ] } } - upsert: true - - replaceOne: - namespace: *namespace - filter: { _id: 6 } - replacement: { array: [ 1, 2, 6 ] } - upsert: true - verboseResults: true - expectResult: - insertedCount: 0 - upsertedCount: 2 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: {} - updateResults: - 0: - matchedCount: 1 - modifiedCount: 0 - upsertedId: 5 - 1: - matchedCount: 1 - modifiedCount: 0 - upsertedId: 6 - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - update: 0 - filter: { _id: 5 } - updateMods: { $set: { array: [ 1, 2, 4 ] } } - upsert: true - multi: false - - update: 0 - filter: { _id: 6 } - updateMods: { array: [ 1, 2, 6 ] } - upsert: true - multi: false - nsInfo: - - ns: *namespace - outcome: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - { _id: 1, array: [ 1, 2, 3 ] } - - { _id: 2, array: [ 1, 2, 3 ] } - - { _id: 3, array: [ 1, 2, 3 ] } - - { _id: 4, array: [ 1, 2, 3 ] } - - { _id: 5, array: [ 1, 2, 4 ] } - - { _id: 6, array: [ 1, 2, 6 ] } diff --git a/testdata/crud/unified/client-bulkWrite-update-pipeline.json b/testdata/crud/unified/client-bulkWrite-update-pipeline.json deleted file mode 100644 index 9dba5ee6c5..0000000000 --- a/testdata/crud/unified/client-bulkWrite-update-pipeline.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "description": "client bulkWrite update pipeline", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 1 - }, - { - "_id": 2, - "x": 2 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "crud-tests.coll0" - }, - "tests": [ - { - "description": "client bulkWrite updateOne with pipeline", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "updateOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - }, - "update": [ - { - "$addFields": { - "foo": 1 - } - } - ] - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 0, - "upsertedCount": 0, - "matchedCount": 1, - "modifiedCount": 1, - "deletedCount": 0, - "insertResults": {}, - "updateResults": { - "0": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - } - }, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": [ - { - "$addFields": { - "foo": 1 - } - } - ], - "multi": false - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "databaseName": "crud-tests", - "collectionName": "coll0", - "documents": [ - { - "_id": 1, - "x": 1, - "foo": 1 - }, - { - "_id": 2, - "x": 2 - } - ] - } - ] - }, - { - "description": "client bulkWrite updateMany with pipeline", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "updateMany": { - "namespace": "crud-tests.coll0", - "filter": {}, - "update": [ - { - "$addFields": { - "foo": 1 - } - } - ] - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 0, - "upsertedCount": 0, - "matchedCount": 2, - "modifiedCount": 2, - "deletedCount": 0, - "insertResults": {}, - "updateResults": { - "0": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedId": { - "$$exists": false - } - } - }, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "update": 0, - "filter": {}, - "updateMods": [ - { - "$addFields": { - "foo": 1 - } - } - ], - "multi": true - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "databaseName": "crud-tests", - "collectionName": "coll0", - "documents": [ - { - "_id": 1, - "x": 1, - "foo": 1 - }, - { - "_id": 2, - "x": 2, - "foo": 1 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-update-pipeline.yml b/testdata/crud/unified/client-bulkWrite-update-pipeline.yml deleted file mode 100644 index c90e93b47c..0000000000 --- a/testdata/crud/unified/client-bulkWrite-update-pipeline.yml +++ /dev/null @@ -1,133 +0,0 @@ -description: "client bulkWrite update pipeline" -schemaVersion: "1.4" # To support `serverless: forbid` -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - {_id: 1, x: 1} - - {_id: 2, x: 2} - -_yamlAnchors: - namespace: &namespace "crud-tests.coll0" - -tests: - - description: "client bulkWrite updateOne with pipeline" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - updateOne: - namespace: *namespace - filter: { _id: 1 } - update: - - $addFields: - foo: 1 - verboseResults: true - expectResult: - insertedCount: 0 - upsertedCount: 0 - matchedCount: 1 - modifiedCount: 1 - deletedCount: 0 - insertResults: {} - updateResults: - 0: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { "$$exists": false } - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - update: 0 - filter: { _id: 1 } - updateMods: - - $addFields: - foo: 1 - multi: false - nsInfo: - - ns: *namespace - outcome: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - {_id: 1, x: 1, foo: 1} - - {_id: 2, x: 2 } - - - description: "client bulkWrite updateMany with pipeline" - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - updateMany: - namespace: *namespace - filter: {} - update: - - $addFields: - foo: 1 - verboseResults: true - expectResult: - insertedCount: 0 - upsertedCount: 0 - matchedCount: 2 - modifiedCount: 2 - deletedCount: 0 - insertResults: {} - updateResults: - 0: - matchedCount: 2 - modifiedCount: 2 - upsertedId: { "$$exists": false } - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - update: 0 - filter: { } - updateMods: - - $addFields: - foo: 1 - multi: true - nsInfo: - - ns: *namespace - outcome: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - {_id: 1, x: 1, foo: 1} - - {_id: 2, x: 2, foo: 1} diff --git a/testdata/crud/unified/client-bulkWrite-update-validation.json b/testdata/crud/unified/client-bulkWrite-update-validation.json deleted file mode 100644 index 617e711338..0000000000 --- a/testdata/crud/unified/client-bulkWrite-update-validation.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "description": "client-bulkWrite-update-validation", - "schemaVersion": "1.1", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "crud-tests.coll0" - }, - "tests": [ - { - "description": "client bulkWrite replaceOne prohibits atomic modifiers", - "operations": [ - { - "name": "clientBulkWrite", - "object": "client0", - "arguments": { - "models": [ - { - "replaceOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - }, - "replacement": { - "$set": { - "x": 22 - } - } - } - } - ] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "client bulkWrite updateOne requires atomic modifiers", - "operations": [ - { - "name": "clientBulkWrite", - "object": "client0", - "arguments": { - "models": [ - { - "updateOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": 1 - }, - "update": { - "x": 22 - } - } - } - ] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "client bulkWrite updateMany requires atomic modifiers", - "operations": [ - { - "name": "clientBulkWrite", - "object": "client0", - "arguments": { - "models": [ - { - "updateMany": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "x": 44 - } - } - } - ] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-update-validation.yml b/testdata/crud/unified/client-bulkWrite-update-validation.yml deleted file mode 100644 index 478554c322..0000000000 --- a/testdata/crud/unified/client-bulkWrite-update-validation.yml +++ /dev/null @@ -1,79 +0,0 @@ -description: "client-bulkWrite-update-validation" - -schemaVersion: "1.1" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -_yamlAnchors: - namespace: &namespace "crud-tests.coll0" - -tests: - - description: "client bulkWrite replaceOne prohibits atomic modifiers" - operations: - - name: clientBulkWrite - object: *client0 - arguments: - models: - - replaceOne: - namespace: *namespace - filter: { _id: 1 } - replacement: { $set: { x: 22 } } - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] - outcome: *initialData - - - description: "client bulkWrite updateOne requires atomic modifiers" - operations: - - name: clientBulkWrite - object: *client0 - arguments: - models: - - updateOne: - namespace: *namespace - filter: { _id: 1 } - update: { x: 22 } - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] - outcome: *initialData - - - description: "client bulkWrite updateMany requires atomic modifiers" - operations: - - name: clientBulkWrite - object: *client0 - arguments: - models: - - updateMany: - namespace: *namespace - filter: { _id: { $gt: 1 } } - update: { x: 44 } - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] - outcome: *initialData diff --git a/testdata/crud/unified/client-bulkWrite-updateOne-sort.json b/testdata/crud/unified/client-bulkWrite-updateOne-sort.json deleted file mode 100644 index ef75dcb374..0000000000 --- a/testdata/crud/unified/client-bulkWrite-updateOne-sort.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "description": "client bulkWrite updateOne-sort", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "crud-tests.coll0" - }, - "tests": [ - { - "description": "client bulkWrite updateOne with sort option", - "operations": [ - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "updateOne": { - "namespace": "crud-tests.coll0", - "filter": { - "_id": { - "$gt": 1 - } - }, - "sort": { - "_id": -1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "ops": [ - { - "update": 0, - "filter": { - "_id": { - "$gt": 1 - } - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "sort": { - "_id": -1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "nsInfo": [ - { - "ns": "crud-tests.coll0" - } - ] - } - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "nErrors": 0, - "nMatched": 1, - "nModified": 1 - }, - "commandName": "bulkWrite" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 34 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/client-bulkWrite-updateOne-sort.yml b/testdata/crud/unified/client-bulkWrite-updateOne-sort.yml deleted file mode 100644 index 73a265d6b8..0000000000 --- a/testdata/crud/unified/client-bulkWrite-updateOne-sort.yml +++ /dev/null @@ -1,77 +0,0 @@ -description: client bulkWrite updateOne-sort - -schemaVersion: "1.4" - -runOnRequirements: - - minServerVersion: "8.0" - serverless: forbid # Serverless does not support bulkWrite: CLOUDP-256344. - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -_yamlAnchors: - namespace: &namespace "crud-tests.coll0" - -tests: - - description: client bulkWrite updateOne with sort option - operations: - - object: *client0 - name: clientBulkWrite - arguments: - models: - - updateOne: - namespace: *namespace - filter: { _id: { $gt: 1 } } - sort: { _id: -1 } - update: { $inc: { x: 1 } } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - ops: - - update: 0 - filter: { _id: { $gt: 1 } } - updateMods: { $inc: { x: 1 } } - sort: { _id: -1 } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - nsInfo: - - ns: *namespace - - commandSucceededEvent: - reply: - ok: 1 - nErrors: 0 - nMatched: 1 - nModified: 1 - commandName: bulkWrite - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 34 } diff --git a/testdata/crud/unified/countDocuments-comment.json b/testdata/crud/unified/countDocuments-comment.json deleted file mode 100644 index e6c7ae8170..0000000000 --- a/testdata/crud/unified/countDocuments-comment.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "description": "countDocuments-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "countDocuments-comments-test" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "countDocuments-comments-test", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "countDocuments with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4.0" - } - ], - "operations": [ - { - "name": "countDocuments", - "object": "collection0", - "arguments": { - "filter": {}, - "comment": { - "key": "value" - } - }, - "expectResult": 3 - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ], - "comment": { - "key": "value" - } - }, - "commandName": "aggregate", - "databaseName": "countDocuments-comments-test" - } - } - ] - } - ] - }, - { - "description": "countDocuments with string comment", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0" - } - ], - "operations": [ - { - "name": "countDocuments", - "object": "collection0", - "arguments": { - "filter": {}, - "comment": "comment" - }, - "expectResult": 3 - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ], - "comment": "comment" - }, - "commandName": "aggregate", - "databaseName": "countDocuments-comments-test" - } - } - ] - } - ] - }, - { - "description": "countDocuments with document comment on less than 4.4.0 - server error", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "maxServerVersion": "4.3.99" - } - ], - "operations": [ - { - "name": "countDocuments", - "object": "collection0", - "arguments": { - "filter": {}, - "comment": { - "key": "value" - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ], - "comment": { - "key": "value" - } - }, - "commandName": "aggregate", - "databaseName": "countDocuments-comments-test" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/countDocuments-comment.yml b/testdata/crud/unified/countDocuments-comment.yml deleted file mode 100644 index 8f1f7bc4b4..0000000000 --- a/testdata/crud/unified/countDocuments-comment.yml +++ /dev/null @@ -1,92 +0,0 @@ -description: "countDocuments-comment" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name countDocuments-comments-test - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "countDocuments with document comment" - runOnRequirements: - - minServerVersion: 4.4.0 - operations: - - name: countDocuments - object: *collection0 - arguments: - filter: {} - comment: &documentComment { key: "value" } - expectResult: 3 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: &pipeline - - $match: {} - - $group: { _id: 1, n: { $sum: 1 } } - comment: *documentComment - commandName: aggregate - databaseName: *database0Name - - - description: "countDocuments with string comment" - runOnRequirements: - - minServerVersion: 3.6.0 - operations: - - name: countDocuments - object: *collection0 - arguments: - filter: {} - comment: &stringComment "comment" - expectResult: 3 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *pipeline - comment: *stringComment - commandName: aggregate - databaseName: *database0Name - - - description: "countDocuments with document comment on less than 4.4.0 - server error" - runOnRequirements: - - minServerVersion: 3.6.0 - maxServerVersion: 4.3.99 - operations: - - name: countDocuments - object: *collection0 - arguments: - filter: {} - comment: *documentComment - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - pipeline: *pipeline - comment: *documentComment - commandName: aggregate - databaseName: *database0Name diff --git a/testdata/crud/unified/db-aggregate-write-readPreference.json b/testdata/crud/unified/db-aggregate-write-readPreference.json deleted file mode 100644 index 10f583269c..0000000000 --- a/testdata/crud/unified/db-aggregate-write-readPreference.json +++ /dev/null @@ -1,447 +0,0 @@ -{ - "description": "db-aggregate-write-readPreference", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "3.6", - "topologies": [ - "replicaset" - ], - "serverless": "forbid" - } - ], - "_yamlAnchors": { - "readConcern": { - "level": "local" - }, - "writeConcern": { - "w": 1 - } - }, - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ], - "uriOptions": { - "readConcernLevel": "local", - "w": 1 - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "db0", - "databaseOptions": { - "readPreference": { - "mode": "secondaryPreferred", - "maxStalenessSeconds": 600 - } - } - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "db0", - "documents": [] - } - ], - "tests": [ - { - "description": "Database-level aggregate with $out includes read preference for 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0", - "serverless": "forbid", - "maxServerVersion": "7.99" - } - ], - "operations": [ - { - "object": "database0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - }, - { - "$addFields": { - "_id": 1 - } - }, - { - "$project": { - "_id": 1 - } - }, - { - "$out": "coll0" - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": 1, - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - }, - { - "$addFields": { - "_id": 1 - } - }, - { - "$project": { - "_id": 1 - } - }, - { - "$out": "coll0" - } - ], - "$readPreference": { - "mode": "secondaryPreferred", - "maxStalenessSeconds": 600 - }, - "readConcern": { - "level": "local" - }, - "writeConcern": { - "w": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "db0", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Database-level aggregate with $out omits read preference for pre-5.0 server", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.4.99", - "serverless": "forbid" - } - ], - "operations": [ - { - "object": "database0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - }, - { - "$addFields": { - "_id": 1 - } - }, - { - "$project": { - "_id": 1 - } - }, - { - "$out": "coll0" - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": 1, - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - }, - { - "$addFields": { - "_id": 1 - } - }, - { - "$project": { - "_id": 1 - } - }, - { - "$out": "coll0" - } - ], - "$readPreference": { - "$$exists": false - }, - "readConcern": { - "level": "local" - }, - "writeConcern": { - "w": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "db0", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Database-level aggregate with $merge includes read preference for 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "object": "database0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - }, - { - "$addFields": { - "_id": 1 - } - }, - { - "$project": { - "_id": 1 - } - }, - { - "$merge": { - "into": "coll0" - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": 1, - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - }, - { - "$addFields": { - "_id": 1 - } - }, - { - "$project": { - "_id": 1 - } - }, - { - "$merge": { - "into": "coll0" - } - } - ], - "$readPreference": { - "mode": "secondaryPreferred", - "maxStalenessSeconds": 600 - }, - "readConcern": { - "level": "local" - }, - "writeConcern": { - "w": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "db0", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Database-level aggregate with $merge omits read preference for pre-5.0 server", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "object": "database0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - }, - { - "$addFields": { - "_id": 1 - } - }, - { - "$project": { - "_id": 1 - } - }, - { - "$merge": { - "into": "coll0" - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": 1, - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - }, - { - "$addFields": { - "_id": 1 - } - }, - { - "$project": { - "_id": 1 - } - }, - { - "$merge": { - "into": "coll0" - } - } - ], - "$readPreference": { - "$$exists": false - }, - "readConcern": { - "level": "local" - }, - "writeConcern": { - "w": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "db0", - "documents": [ - { - "_id": 1 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/db-aggregate-write-readPreference.yml b/testdata/crud/unified/db-aggregate-write-readPreference.yml deleted file mode 100644 index eb0fb09bd0..0000000000 --- a/testdata/crud/unified/db-aggregate-write-readPreference.yml +++ /dev/null @@ -1,153 +0,0 @@ -description: db-aggregate-write-readPreference - -schemaVersion: '1.4' - -runOnRequirements: - # 3.6+ non-standalone is needed to utilize $readPreference in OP_MSG. - # Serverless does not support $listLocalSessions and $currentOp stages, and - # mongos does not allow combining them with $out or $merge. - - minServerVersion: "3.6" - topologies: [ replicaset ] - serverless: forbid - -_yamlAnchors: - readConcern: &readConcern - level: &readConcernLevel "local" - writeConcern: &writeConcern - w: &writeConcernW 1 - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - # Used to test that read and write concerns are still inherited - uriOptions: - readConcernLevel: *readConcernLevel - w: *writeConcernW - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name db0 - databaseOptions: - readPreference: &readPreference - # secondaryPreferred is specified for compatibility with clusters that - # may not have a secondary (e.g. each shard is only a primary). - mode: secondaryPreferred - # maxStalenessSeconds is specified to ensure that drivers forward the - # read preference to mongos or a load balancer. That would not be the - # case with only secondaryPreferred. - maxStalenessSeconds: 600 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: "Database-level aggregate with $out includes read preference for 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - serverless: "forbid" - # GODRIVER-3218 - maxServerVersion: "7.99" - operations: - - object: *database0 - name: aggregate - arguments: - pipeline: &outPipeline - - { $listLocalSessions: {} } - - { $limit: 1 } - - { $addFields: { _id: 1 } } - - { $project: { _id: 1 } } - - { $out: *collection0Name } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: 1 - pipeline: *outPipeline - $readPreference: *readPreference - readConcern: *readConcern - writeConcern: *writeConcern - outcome: &outcome - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - - description: "Database-level aggregate with $out omits read preference for pre-5.0 server" - runOnRequirements: - # MongoDB 4.2 introduced support for read concerns and write stages. - # Pre-4.2 servers may allow a "local" read concern anyway, but some - # drivers may avoid inheriting a client-level read concern for pre-4.2. - - minServerVersion: "4.2" - maxServerVersion: "4.4.99" - serverless: "forbid" - operations: - - object: *database0 - name: aggregate - arguments: - pipeline: *outPipeline - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: 1 - pipeline: *outPipeline - $readPreference: { $$exists: false } - readConcern: *readConcern - writeConcern: *writeConcern - outcome: *outcome - - - description: "Database-level aggregate with $merge includes read preference for 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - object: *database0 - name: aggregate - arguments: - pipeline: &mergePipeline - - { $listLocalSessions: {} } - - { $limit: 1 } - - { $addFields: { _id: 1 } } - - { $project: { _id: 1 } } - - { $merge: { into: *collection0Name } } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: 1 - pipeline: *mergePipeline - $readPreference: *readPreference - readConcern: *readConcern - writeConcern: *writeConcern - outcome: *outcome - - - description: "Database-level aggregate with $merge omits read preference for pre-5.0 server" - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.4.99" - operations: - - object: *database0 - name: aggregate - arguments: - pipeline: *mergePipeline - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: 1 - pipeline: *mergePipeline - $readPreference: { $$exists: false } - readConcern: *readConcern - writeConcern: *writeConcern - outcome: *outcome diff --git a/testdata/crud/unified/db-aggregate.json b/testdata/crud/unified/db-aggregate.json deleted file mode 100644 index 5015405bfc..0000000000 --- a/testdata/crud/unified/db-aggregate.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "description": "db-aggregate", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "admin" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "crud-v2" - } - } - ], - "tests": [ - { - "description": "Aggregate with $listLocalSessions", - "operations": [ - { - "object": "database0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - }, - { - "$addFields": { - "dummy": "dummy field" - } - }, - { - "$project": { - "_id": 0, - "dummy": 1 - } - } - ] - }, - "expectResult": [ - { - "dummy": "dummy field" - } - ] - } - ] - }, - { - "description": "Aggregate with $listLocalSessions and allowDiskUse", - "operations": [ - { - "object": "database0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - }, - { - "$addFields": { - "dummy": "dummy field" - } - }, - { - "$project": { - "_id": 0, - "dummy": 1 - } - } - ], - "allowDiskUse": true - }, - "expectResult": [ - { - "dummy": "dummy field" - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/db-aggregate.yml b/testdata/crud/unified/db-aggregate.yml deleted file mode 100644 index 032f94c731..0000000000 --- a/testdata/crud/unified/db-aggregate.yml +++ /dev/null @@ -1,73 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: db-aggregate -schemaVersion: '1.4' -runOnRequirements: - - - minServerVersion: 3.6.0 - # serverless does not support either of the current database-level aggregation stages ($listLocalSessions and - # $currentOp) - serverless: forbid -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name admin - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name crud-v2 -tests: - - - description: 'Aggregate with $listLocalSessions' - operations: - - - object: *database0 - name: aggregate - arguments: - pipeline: - - - $listLocalSessions: { } - - - $limit: 1 - - - $addFields: - dummy: 'dummy field' - - - $project: - _id: 0 - dummy: 1 - expectResult: - - - dummy: 'dummy field' - - - description: 'Aggregate with $listLocalSessions and allowDiskUse' - operations: - - - object: *database0 - name: aggregate - arguments: - pipeline: - - - $listLocalSessions: { } - - - $limit: 1 - - - $addFields: - dummy: 'dummy field' - - - $project: - _id: 0 - dummy: 1 - allowDiskUse: true - expectResult: - - - dummy: 'dummy field' diff --git a/testdata/crud/unified/deleteMany-comment.json b/testdata/crud/unified/deleteMany-comment.json deleted file mode 100644 index 6abc5fd58a..0000000000 --- a/testdata/crud/unified/deleteMany-comment.json +++ /dev/null @@ -1,245 +0,0 @@ -{ - "description": "deleteMany-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2, - "name": "name2" - }, - { - "_id": 3, - "name": "name3" - } - ] - } - ], - "tests": [ - { - "description": "deleteMany with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "deleteMany", - "object": "collection0", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "comment": "comment" - }, - "expectResult": { - "deletedCount": 2 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "limit": 0 - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "deleteMany with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "deleteMany", - "object": "collection0", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "comment": { - "key": "value" - } - }, - "expectResult": { - "deletedCount": 2 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "limit": 0 - } - ], - "comment": { - "key": "value" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "deleteMany with comment - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "deleteMany", - "object": "collection0", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "comment": "comment" - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "limit": 0 - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2, - "name": "name2" - }, - { - "_id": 3, - "name": "name3" - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/deleteMany-comment.yml b/testdata/crud/unified/deleteMany-comment.yml deleted file mode 100644 index 8f1b3522a7..0000000000 --- a/testdata/crud/unified/deleteMany-comment.yml +++ /dev/null @@ -1,97 +0,0 @@ -description: "deleteMany-comment" -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2, name: "name2" } - - { _id: 3, name: "name3" } - -tests: - - description: "deleteMany with string comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: deleteMany - object: *collection0 - arguments: - filter: &filter { _id: { $gt: 1 } } - comment: "comment" - expectResult: &expect_result - deletedCount: 2 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - q: *filter - limit: 0 - comment: "comment" - outcome: &outcome - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - - description: "deleteMany with document comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: deleteMany - object: *collection0 - arguments: - filter: *filter - comment: &comment { key: "value" } - expectResult: *expect_result - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - q: *filter - limit: 0 - comment: *comment - outcome: *outcome - - - description: "deleteMany with comment - pre 4.4" - runOnRequirements: - - minServerVersion: "3.4.0" - maxServerVersion: "4.2.99" - operations: - - name: deleteMany - object: *collection0 - arguments: - filter: *filter - comment: "comment" - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - q: *filter - limit: 0 - comment: "comment" - outcome: *initialData diff --git a/testdata/crud/unified/deleteMany-hint-clientError.json b/testdata/crud/unified/deleteMany-hint-clientError.json deleted file mode 100644 index 66320122b5..0000000000 --- a/testdata/crud/unified/deleteMany-hint-clientError.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "description": "deleteMany-hint-clientError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "maxServerVersion": "3.3.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "DeleteMany_hint" - } - } - ], - "initialData": [ - { - "collectionName": "DeleteMany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "DeleteMany with hint string unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "deleteMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "DeleteMany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "DeleteMany with hint document unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "deleteMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "DeleteMany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/deleteMany-hint-clientError.yml b/testdata/crud/unified/deleteMany-hint-clientError.yml deleted file mode 100644 index 21ff1debbe..0000000000 --- a/testdata/crud/unified/deleteMany-hint-clientError.yml +++ /dev/null @@ -1,87 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: deleteMany-hint-clientError -schemaVersion: '1.0' -runOnRequirements: - - - maxServerVersion: 3.3.99 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name DeleteMany_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 -tests: - - - description: 'DeleteMany with hint string unsupported (client-side error)' - operations: - - - object: *collection0 - name: deleteMany - arguments: - filter: &filter - _id: - $gt: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - description: 'DeleteMany with hint document unsupported (client-side error)' - operations: - - - object: *collection0 - name: deleteMany - arguments: - filter: *filter - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/deleteMany-hint-serverError.json b/testdata/crud/unified/deleteMany-hint-serverError.json deleted file mode 100644 index 88d4a65576..0000000000 --- a/testdata/crud/unified/deleteMany-hint-serverError.json +++ /dev/null @@ -1,190 +0,0 @@ -{ - "description": "deleteMany-hint-serverError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.3.3" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "DeleteMany_hint" - } - } - ], - "initialData": [ - { - "collectionName": "DeleteMany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "DeleteMany with hint string unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "deleteMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "DeleteMany_hint", - "deletes": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "hint": "_id_", - "limit": 0 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "DeleteMany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "DeleteMany with hint document unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "deleteMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "DeleteMany_hint", - "deletes": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "hint": { - "_id": 1 - }, - "limit": 0 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "DeleteMany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/deleteMany-hint-serverError.yml b/testdata/crud/unified/deleteMany-hint-serverError.yml deleted file mode 100644 index 2e20988d0b..0000000000 --- a/testdata/crud/unified/deleteMany-hint-serverError.yml +++ /dev/null @@ -1,107 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: deleteMany-hint-serverError -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 3.4.0 - maxServerVersion: 4.3.3 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name DeleteMany_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 -tests: - - - description: 'DeleteMany with hint string unsupported (server-side error)' - operations: - - - object: *collection0 - name: deleteMany - arguments: - filter: &filter - _id: - $gt: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - - q: *filter - hint: _id_ - limit: 0 - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - description: 'DeleteMany with hint document unsupported (server-side error)' - operations: - - - object: *collection0 - name: deleteMany - arguments: - filter: *filter - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - - q: *filter - hint: - _id: 1 - limit: 0 - outcome: *outcome diff --git a/testdata/crud/unified/deleteMany-hint.json b/testdata/crud/unified/deleteMany-hint.json deleted file mode 100644 index 59d903d201..0000000000 --- a/testdata/crud/unified/deleteMany-hint.json +++ /dev/null @@ -1,173 +0,0 @@ -{ - "description": "deleteMany-hint", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.3.4" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "DeleteMany_hint" - } - } - ], - "initialData": [ - { - "collectionName": "DeleteMany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "DeleteMany with hint string", - "operations": [ - { - "object": "collection0", - "name": "deleteMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "hint": "_id_" - }, - "expectResult": { - "deletedCount": 2 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "DeleteMany_hint", - "deletes": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "hint": "_id_", - "limit": 0 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "DeleteMany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - }, - { - "description": "DeleteMany with hint document", - "operations": [ - { - "object": "collection0", - "name": "deleteMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectResult": { - "deletedCount": 2 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "DeleteMany_hint", - "deletes": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "hint": { - "_id": 1 - }, - "limit": 0 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "DeleteMany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/deleteMany-hint.yml b/testdata/crud/unified/deleteMany-hint.yml deleted file mode 100644 index 512b95e76b..0000000000 --- a/testdata/crud/unified/deleteMany-hint.yml +++ /dev/null @@ -1,99 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: deleteMany-hint -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.3.4 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name DeleteMany_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 -tests: - - - description: 'DeleteMany with hint string' - operations: - - - object: *collection0 - name: deleteMany - arguments: - filter: &filter - _id: - $gt: 1 - hint: _id_ - expectResult: &result - deletedCount: 2 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - - q: *filter - hint: _id_ - limit: 0 - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - description: 'DeleteMany with hint document' - operations: - - - object: *collection0 - name: deleteMany - arguments: - filter: *filter - hint: - _id: 1 - expectResult: *result - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - - q: *filter - hint: - _id: 1 - limit: 0 - outcome: *outcome diff --git a/testdata/crud/unified/deleteMany-let.json b/testdata/crud/unified/deleteMany-let.json deleted file mode 100644 index 71bf26a013..0000000000 --- a/testdata/crud/unified/deleteMany-let.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "description": "deleteMany-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2, - "name": "name" - }, - { - "_id": 3, - "name": "name" - } - ] - } - ], - "tests": [ - { - "description": "deleteMany with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "deleteMany", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$name", - "$$name" - ] - } - }, - "let": { - "name": "name" - } - }, - "expectResult": { - "deletedCount": 2 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "$expr": { - "$eq": [ - "$name", - "$$name" - ] - } - }, - "limit": 0 - } - ], - "let": { - "name": "name" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "deleteMany with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "name": "deleteMany", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$name", - "$$name" - ] - } - }, - "let": { - "name": "name" - } - }, - "expectError": { - "errorContains": "'delete.let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "$expr": { - "$eq": [ - "$name", - "$$name" - ] - } - }, - "limit": 0 - } - ], - "let": { - "name": "name" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2, - "name": "name" - }, - { - "_id": 3, - "name": "name" - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/deleteMany-let.yml b/testdata/crud/unified/deleteMany-let.yml deleted file mode 100644 index 723985aa8c..0000000000 --- a/testdata/crud/unified/deleteMany-let.yml +++ /dev/null @@ -1,93 +0,0 @@ -description: "deleteMany-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2, name: "name" } - - { _id: 3, name: "name" } - -tests: - - description: "deleteMany with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: deleteMany - object: *collection0 - arguments: - filter: &filter - $expr: - $eq: [ "$name", "$$name" ] - let: &let0 - name: "name" - expectResult: - deletedCount: 2 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - - q: *filter - limit: 0 - let: *let0 - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - - description: "deleteMany with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "3.6.0" - maxServerVersion: "4.4.99" - operations: - - name: deleteMany - object: *collection0 - arguments: - filter: &filter1 - $expr: - $eq: [ "$name", "$$name" ] - let: &let1 - name: "name" - expectError: - errorContains: "'delete.let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - - q: *filter1 - limit: 0 - let: *let1 - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2, name: "name" } - - { _id: 3, name: "name" } diff --git a/testdata/crud/unified/deleteOne-comment.json b/testdata/crud/unified/deleteOne-comment.json deleted file mode 100644 index 0f42b086a3..0000000000 --- a/testdata/crud/unified/deleteOne-comment.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "description": "deleteOne-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2, - "name": "name" - }, - { - "_id": 3, - "name": "name" - } - ] - } - ], - "tests": [ - { - "description": "deleteOne with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "deleteOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "comment": "comment" - }, - "expectResult": { - "deletedCount": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "_id": 1 - }, - "limit": 1 - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 2, - "name": "name" - }, - { - "_id": 3, - "name": "name" - } - ] - } - ] - }, - { - "description": "deleteOne with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "deleteOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "comment": { - "key": "value" - } - }, - "expectResult": { - "deletedCount": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "_id": 1 - }, - "limit": 1 - } - ], - "comment": { - "key": "value" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 2, - "name": "name" - }, - { - "_id": 3, - "name": "name" - } - ] - } - ] - }, - { - "description": "deleteOne with comment - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "deleteOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "comment": "comment" - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "_id": 1 - }, - "limit": 1 - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2, - "name": "name" - }, - { - "_id": 3, - "name": "name" - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/deleteOne-comment.yml b/testdata/crud/unified/deleteOne-comment.yml deleted file mode 100644 index f5e8884ac4..0000000000 --- a/testdata/crud/unified/deleteOne-comment.yml +++ /dev/null @@ -1,98 +0,0 @@ -escription: "deleteOne-comment" -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2, name: "name" } - - { _id: 3, name: "name" } - -tests: - - description: "deleteOne with string comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: deleteOne - object: *collection0 - arguments: - filter: &filter { _id: 1 } - comment: "comment" - expectResult: &expect_result - deletedCount: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - q: *filter - limit: 1 - comment: "comment" - outcome: &outcome - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 2, name: "name" } - - { _id: 3, name: "name" } - - - description: "deleteOne with document comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: deleteOne - object: *collection0 - arguments: - filter: *filter - comment: &comment { key: "value" } - expectResult: *expect_result - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - q: *filter - limit: 1 - comment: *comment - outcome: *outcome - - - description: "deleteOne with comment - pre 4.4" - runOnRequirements: - - minServerVersion: "3.4.0" - maxServerVersion: "4.2.99" - operations: - - name: deleteOne - object: *collection0 - arguments: - filter: *filter - comment: "comment" - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - q: *filter - limit: 1 - comment: "comment" - outcome: *initialData diff --git a/testdata/crud/unified/deleteOne-errorResponse.json b/testdata/crud/unified/deleteOne-errorResponse.json deleted file mode 100644 index 1f3a266f1e..0000000000 --- a/testdata/crud/unified/deleteOne-errorResponse.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "description": "deleteOne-errorResponse", - "schemaVersion": "1.12", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "tests": [ - { - "description": "delete operations support errorResponse assertions", - "runOnRequirements": [ - { - "minServerVersion": "4.0.0", - "topologies": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.2.0", - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "errorCode": 8 - } - } - } - }, - { - "name": "deleteOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - } - }, - "expectError": { - "errorCode": 8, - "errorResponse": { - "code": 8 - } - } - } - ] - } - ] -} diff --git a/testdata/crud/unified/deleteOne-errorResponse.yml b/testdata/crud/unified/deleteOne-errorResponse.yml deleted file mode 100644 index dcf013060e..0000000000 --- a/testdata/crud/unified/deleteOne-errorResponse.yml +++ /dev/null @@ -1,46 +0,0 @@ -description: "deleteOne-errorResponse" - -schemaVersion: "1.12" - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -tests: - # Some drivers may still need to skip this test because the CRUD spec does not - # prescribe how drivers should formulate a WriteException beyond collecting a - # write or write concern error. - - description: "delete operations support errorResponse assertions" - runOnRequirements: - - minServerVersion: "4.0.0" - topologies: [ single, replicaset ] - - minServerVersion: "4.2.0" - topologies: [ sharded ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ delete ] - errorCode: &errorCode 8 # UnknownError - - name: deleteOne - object: *collection0 - arguments: - filter: { _id: 1 } - expectError: - errorCode: *errorCode - errorResponse: - code: *errorCode diff --git a/testdata/crud/unified/deleteOne-hint-clientError.json b/testdata/crud/unified/deleteOne-hint-clientError.json deleted file mode 100644 index cf629f59e0..0000000000 --- a/testdata/crud/unified/deleteOne-hint-clientError.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "description": "deleteOne-hint-clientError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "maxServerVersion": "3.3.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "DeleteOne_hint" - } - } - ], - "initialData": [ - { - "collectionName": "DeleteOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "DeleteOne with hint string unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "DeleteOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "DeleteOne with hint document unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "DeleteOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/deleteOne-hint-clientError.yml b/testdata/crud/unified/deleteOne-hint-clientError.yml deleted file mode 100644 index be218fc9b5..0000000000 --- a/testdata/crud/unified/deleteOne-hint-clientError.yml +++ /dev/null @@ -1,80 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: deleteOne-hint-clientError -schemaVersion: '1.0' -runOnRequirements: - - - maxServerVersion: 3.3.99 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name DeleteOne_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'DeleteOne with hint string unsupported (client-side error)' - operations: - - - object: *collection0 - name: deleteOne - arguments: - filter: &filter - _id: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'DeleteOne with hint document unsupported (client-side error)' - operations: - - - object: *collection0 - name: deleteOne - arguments: - filter: *filter - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/deleteOne-hint-serverError.json b/testdata/crud/unified/deleteOne-hint-serverError.json deleted file mode 100644 index 15541ed857..0000000000 --- a/testdata/crud/unified/deleteOne-hint-serverError.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "description": "deleteOne-hint-serverError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.3.3" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "DeleteOne_hint" - } - } - ], - "initialData": [ - { - "collectionName": "DeleteOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "DeleteOne with hint string unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "DeleteOne_hint", - "deletes": [ - { - "q": { - "_id": 1 - }, - "hint": "_id_", - "limit": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "DeleteOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "DeleteOne with hint document unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "DeleteOne_hint", - "deletes": [ - { - "q": { - "_id": 1 - }, - "hint": { - "_id": 1 - }, - "limit": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "DeleteOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/deleteOne-hint-serverError.yml b/testdata/crud/unified/deleteOne-hint-serverError.yml deleted file mode 100644 index 6c8c0ea817..0000000000 --- a/testdata/crud/unified/deleteOne-hint-serverError.yml +++ /dev/null @@ -1,100 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: deleteOne-hint-serverError -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 3.4.0 - maxServerVersion: 4.3.3 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name DeleteOne_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'DeleteOne with hint string unsupported (server-side error)' - operations: - - - object: *collection0 - name: deleteOne - arguments: - filter: &filter - _id: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - - q: *filter - hint: _id_ - limit: 1 - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'DeleteOne with hint document unsupported (server-side error)' - operations: - - - object: *collection0 - name: deleteOne - arguments: - filter: *filter - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - - q: *filter - hint: - _id: 1 - limit: 1 - outcome: *outcome diff --git a/testdata/crud/unified/deleteOne-hint.json b/testdata/crud/unified/deleteOne-hint.json deleted file mode 100644 index bcc4bc2347..0000000000 --- a/testdata/crud/unified/deleteOne-hint.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "description": "deleteOne-hint", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.3.4" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "DeleteOne_hint" - } - } - ], - "initialData": [ - { - "collectionName": "DeleteOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "DeleteOne with hint string", - "operations": [ - { - "object": "collection0", - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": "_id_" - }, - "expectResult": { - "deletedCount": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "DeleteOne_hint", - "deletes": [ - { - "q": { - "_id": 1 - }, - "hint": "_id_", - "limit": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "DeleteOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "deleteOne with hint document", - "operations": [ - { - "object": "collection0", - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": { - "_id": 1 - } - }, - "expectResult": { - "deletedCount": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "DeleteOne_hint", - "deletes": [ - { - "q": { - "_id": 1 - }, - "hint": { - "_id": 1 - }, - "limit": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "DeleteOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/deleteOne-hint.yml b/testdata/crud/unified/deleteOne-hint.yml deleted file mode 100644 index f72356c99c..0000000000 --- a/testdata/crud/unified/deleteOne-hint.yml +++ /dev/null @@ -1,95 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: deleteOne-hint -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.3.4 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name DeleteOne_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'DeleteOne with hint string' - operations: - - - object: *collection0 - name: deleteOne - arguments: - filter: &filter - _id: 1 - hint: _id_ - expectResult: &result - deletedCount: 1 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - - q: *filter - hint: _id_ - limit: 1 - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 2 - x: 22 - - - description: 'deleteOne with hint document' - operations: - - - object: *collection0 - name: deleteOne - arguments: - filter: *filter - hint: - _id: 1 - expectResult: *result - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - delete: *collection_name - deletes: - - - q: *filter - hint: - _id: 1 - limit: 1 - outcome: *outcome diff --git a/testdata/crud/unified/deleteOne-let.json b/testdata/crud/unified/deleteOne-let.json deleted file mode 100644 index 9718682235..0000000000 --- a/testdata/crud/unified/deleteOne-let.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "description": "deleteOne-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "deleteOne with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "deleteOne", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "let": { - "id": 1 - } - }, - "expectResult": { - "deletedCount": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "limit": 1 - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "deleteOne with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "name": "deleteOne", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "let": { - "id": 1 - } - }, - "expectError": { - "errorContains": "'delete.let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "coll0", - "deletes": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "limit": 1 - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/deleteOne-let.yml b/testdata/crud/unified/deleteOne-let.yml deleted file mode 100644 index c52d98b99d..0000000000 --- a/testdata/crud/unified/deleteOne-let.yml +++ /dev/null @@ -1,91 +0,0 @@ -description: "deleteOne-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "deleteOne with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: deleteOne - object: *collection0 - arguments: - filter: &filter - $expr: - $eq: [ "$_id", "$$id" ] - let: &let0 - id: 1 - expectResult: - deletedCount: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - - q: *filter - limit: 1 - let: *let0 - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 2 } - - - description: "deleteOne with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "3.6.0" - maxServerVersion: "4.4.99" - operations: - - name: deleteOne - object: *collection0 - arguments: - filter: &filter1 - $expr: - $eq: [ "$_id", "$$id" ] - let: &let1 - id: 1 - expectError: - errorContains: "'delete.let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - delete: *collection0Name - deletes: - - - q: *filter1 - limit: 1 - let: *let1 - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } diff --git a/testdata/crud/unified/distinct-comment.json b/testdata/crud/unified/distinct-comment.json deleted file mode 100644 index 0519070164..0000000000 --- a/testdata/crud/unified/distinct-comment.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "description": "distinct-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "distinct-comment-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "distinct-comment-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "distinct with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4.14" - } - ], - "operations": [ - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": {}, - "comment": { - "key": "value" - } - }, - "expectResult": [ 11, 22, 33 ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "distinct": "coll0", - "key": "x", - "query": {}, - "comment": { - "key": "value" - } - }, - "commandName": "distinct", - "databaseName": "distinct-comment-tests" - } - } - ] - } - ] - }, - { - "description": "distinct with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4.0" - } - ], - "operations": [ - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": {}, - "comment": "comment" - }, - "expectResult": [ 11, 22, 33 ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "distinct": "coll0", - "key": "x", - "query": {}, - "comment": "comment" - }, - "commandName": "distinct", - "databaseName": "distinct-comment-tests" - } - } - ] - } - ] - }, - { - "description": "distinct with document comment - pre 4.4, server error", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "maxServerVersion": "4.4.13" - } - ], - "operations": [ - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": {}, - "comment": { - "key": "value" - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "distinct": "coll0", - "key": "x", - "query": {}, - "comment": { - "key": "value" - } - }, - "commandName": "distinct", - "databaseName": "distinct-comment-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/distinct-comment.yml b/testdata/crud/unified/distinct-comment.yml deleted file mode 100644 index c082009943..0000000000 --- a/testdata/crud/unified/distinct-comment.yml +++ /dev/null @@ -1,98 +0,0 @@ -description: "distinct-comment" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name distinct-comment-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "distinct with document comment" - runOnRequirements: - # https://jira.mongodb.org/browse/SERVER-44847 - # Server supports distinct with comment of any type for comment starting from 4.4.14. - - minServerVersion: "4.4.14" - operations: - - name: distinct - object: *collection0 - arguments: - fieldName: &fieldName x - filter: &filter {} - comment: &documentComment { key: "value"} - expectResult: [ 11, 22, 33 ] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - distinct: *collection0Name - key: *fieldName - query: *filter - comment: *documentComment - commandName: distinct - databaseName: *database0Name - - - description: "distinct with string comment" - runOnRequirements: - - minServerVersion: "4.4.0" - operations: - - name: distinct - object: *collection0 - arguments: - fieldName: *fieldName - filter: *filter - comment: &stringComment "comment" - expectResult: [ 11, 22, 33 ] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - distinct: *collection0Name - key: *fieldName - query: *filter - comment: *stringComment - commandName: distinct - databaseName: *database0Name - - - description: "distinct with document comment - pre 4.4, server error" - runOnRequirements: - - minServerVersion: "3.6.0" - maxServerVersion: "4.4.13" - operations: - - name: distinct - object: *collection0 - arguments: - fieldName: *fieldName - filter: *filter - comment: *documentComment - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - distinct: *collection0Name - key: *fieldName - query: *filter - comment: *documentComment - commandName: distinct - databaseName: *database0Name diff --git a/testdata/crud/unified/distinct-hint.json b/testdata/crud/unified/distinct-hint.json deleted file mode 100644 index 2a6869cbe0..0000000000 --- a/testdata/crud/unified/distinct-hint.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "description": "distinct-hint", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "7.1.0" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "distinct-hint-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "distinct-hint-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "distinct with hint string", - "operations": [ - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": { - "_id": 1 - }, - "hint": "_id_" - }, - "expectResult": [ - 11 - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "distinct": "coll0", - "key": "x", - "query": { - "_id": 1 - }, - "hint": "_id_" - }, - "commandName": "distinct", - "databaseName": "distinct-hint-tests" - } - } - ] - } - ] - }, - { - "description": "distinct with hint document", - "operations": [ - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": { - "_id": 1 - }, - "hint": { - "_id": 1 - } - }, - "expectResult": [ - 11 - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "distinct": "coll0", - "key": "x", - "query": { - "_id": 1 - }, - "hint": { - "_id": 1 - } - }, - "commandName": "distinct", - "databaseName": "distinct-hint-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/distinct-hint.yml b/testdata/crud/unified/distinct-hint.yml deleted file mode 100644 index 9d277616d3..0000000000 --- a/testdata/crud/unified/distinct-hint.yml +++ /dev/null @@ -1,73 +0,0 @@ -description: "distinct-hint" - -schemaVersion: "1.0" -runOnRequirements: - # https://jira.mongodb.org/browse/SERVER-14227 - # Server supports distinct with hint starting from 7.1.0. - - minServerVersion: "7.1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name distinct-hint-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "distinct with hint string" - operations: - - name: distinct - object: *collection0 - arguments: - fieldName: &fieldName x - filter: &filter { _id: 1 } - hint: _id_ - expectResult: [ 11 ] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - distinct: *collection0Name - key: *fieldName - query: *filter - hint: _id_ - commandName: distinct - databaseName: *database0Name - - - description: "distinct with hint document" - operations: - - name: distinct - object: *collection0 - arguments: - fieldName: *fieldName - filter: *filter - hint: - _id: 1 - expectResult: [ 11 ] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - distinct: *collection0Name - key: *fieldName - query: *filter - hint: - _id: 1 - commandName: distinct - databaseName: *database0Name diff --git a/testdata/crud/unified/estimatedDocumentCount-comment.json b/testdata/crud/unified/estimatedDocumentCount-comment.json deleted file mode 100644 index 6c0adacc8f..0000000000 --- a/testdata/crud/unified/estimatedDocumentCount-comment.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "description": "estimatedDocumentCount-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "edc-comment-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "edc-comment-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "estimatedDocumentCount with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4.14" - } - ], - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection0", - "arguments": { - "comment": { - "key": "value" - } - }, - "expectResult": 3 - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "count": "coll0", - "comment": { - "key": "value" - } - }, - "commandName": "count", - "databaseName": "edc-comment-tests" - } - } - ] - } - ] - }, - { - "description": "estimatedDocumentCount with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4.0" - } - ], - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection0", - "arguments": { - "comment": "comment" - }, - "expectResult": 3 - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "count": "coll0", - "comment": "comment" - }, - "commandName": "count", - "databaseName": "edc-comment-tests" - } - } - ] - } - ] - }, - { - "description": "estimatedDocumentCount with document comment - pre 4.4.14, server error", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "maxServerVersion": "4.4.13", - "topologies": [ - "single", - "replicaset" - ] - } - ], - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection0", - "arguments": { - "comment": { - "key": "value" - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "count": "coll0", - "comment": { - "key": "value" - } - }, - "commandName": "count", - "databaseName": "edc-comment-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/estimatedDocumentCount-comment.yml b/testdata/crud/unified/estimatedDocumentCount-comment.yml deleted file mode 100644 index b785315104..0000000000 --- a/testdata/crud/unified/estimatedDocumentCount-comment.yml +++ /dev/null @@ -1,95 +0,0 @@ -description: "estimatedDocumentCount-comment" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name edc-comment-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "estimatedDocumentCount with document comment" - runOnRequirements: - # https://jira.mongodb.org/browse/SERVER-63315 - # Server supports count with comment of any type for comment starting from 4.4.14. - - minServerVersion: "4.4.14" - operations: - - name: estimatedDocumentCount - object: *collection0 - arguments: - comment: &documentComment { key: "value"} - expectResult: 3 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - count: *collection0Name - comment: *documentComment - commandName: count - databaseName: *database0Name - - - description: "estimatedDocumentCount with string comment" - runOnRequirements: - - minServerVersion: "4.4.0" - operations: - - name: estimatedDocumentCount - object: *collection0 - arguments: - comment: &stringComment "comment" - expectResult: 3 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - count: *collection0Name - comment: *stringComment - commandName: count - databaseName: *database0Name - - - description: "estimatedDocumentCount with document comment - pre 4.4.14, server error" - runOnRequirements: - - minServerVersion: "3.6.0" - maxServerVersion: "4.4.13" - # Server does not raise an error if topology is sharded. - # https://jira.mongodb.org/browse/SERVER-65954 - topologies: [ single, replicaset ] - operations: - - name: estimatedDocumentCount - object: *collection0 - arguments: - # Even though according to the docs count command does not support any - # comment for server version less than 4.4, no error is raised by such - # servers. Therefore, we have only one test with a document comment - # to test server errors. - # https://jira.mongodb.org/browse/SERVER-63315 - # Server supports count with comment of any type for comment starting from 4.4.14. - comment: *documentComment - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - count: *collection0Name - comment: *documentComment - commandName: count - databaseName: *database0Name diff --git a/testdata/crud/unified/estimatedDocumentCount.json b/testdata/crud/unified/estimatedDocumentCount.json deleted file mode 100644 index 1b650c1cb6..0000000000 --- a/testdata/crud/unified/estimatedDocumentCount.json +++ /dev/null @@ -1,357 +0,0 @@ -{ - "description": "estimatedDocumentCount", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "uriOptions": { - "retryReads": false - }, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "edc-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - }, - { - "collection": { - "id": "collection1", - "database": "database0", - "collectionName": "coll1" - } - }, - { - "collection": { - "id": "collection0View", - "database": "database0", - "collectionName": "coll0view" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "edc-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "estimatedDocumentCount always uses count", - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection0", - "expectResult": 3 - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "count": "coll0" - }, - "commandName": "count", - "databaseName": "edc-tests" - } - } - ] - } - ] - }, - { - "description": "estimatedDocumentCount with maxTimeMS", - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection0", - "arguments": { - "maxTimeMS": 6000 - }, - "expectResult": 3 - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "count": "coll0", - "maxTimeMS": 6000 - }, - "commandName": "count", - "databaseName": "edc-tests" - } - } - ] - } - ] - }, - { - "description": "estimatedDocumentCount on non-existent collection", - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection1", - "expectResult": 0 - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "count": "coll1" - }, - "commandName": "count", - "databaseName": "edc-tests" - } - } - ] - } - ] - }, - { - "description": "estimatedDocumentCount errors correctly--command error", - "runOnRequirements": [ - { - "minServerVersion": "4.0.0", - "topologies": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.2.0", - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 8 - } - } - } - }, - { - "name": "estimatedDocumentCount", - "object": "collection0", - "expectError": { - "errorCode": 8 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "count": "coll0" - }, - "commandName": "count", - "databaseName": "edc-tests" - } - } - ] - } - ] - }, - { - "description": "estimatedDocumentCount errors correctly--socket error", - "runOnRequirements": [ - { - "minServerVersion": "4.0.0", - "topologies": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.2.0", - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "closeConnection": true - } - } - } - }, - { - "name": "estimatedDocumentCount", - "object": "collection0", - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "count": "coll0" - }, - "commandName": "count", - "databaseName": "edc-tests" - } - } - ] - } - ] - }, - { - "description": "estimatedDocumentCount works correctly on views", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0" - } - ], - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "coll0view" - } - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "collection": "coll0view", - "viewOn": "coll0", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ] - } - }, - { - "name": "estimatedDocumentCount", - "object": "collection0View", - "expectResult": 2 - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "drop": "coll0view" - }, - "commandName": "drop", - "databaseName": "edc-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "create": "coll0view", - "viewOn": "coll0", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ] - }, - "commandName": "create", - "databaseName": "edc-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "count": "coll0view" - }, - "commandName": "count", - "databaseName": "edc-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/estimatedDocumentCount.yml b/testdata/crud/unified/estimatedDocumentCount.yml deleted file mode 100644 index 12f33cc7e5..0000000000 --- a/testdata/crud/unified/estimatedDocumentCount.yml +++ /dev/null @@ -1,181 +0,0 @@ -description: "estimatedDocumentCount" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false # Avoid setting fail points with multiple mongoses - uriOptions: { retryReads: false } # Avoid retrying fail points with closeConnection - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name edc-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - - collection: - # Nonexistent collection intentionally omitted from initialData - id: &collection1 collection1 - database: *database0 - collectionName: &collection1Name coll1 - - collection: - id: &collection0View collection0View - database: *database0 - collectionName: &collection0ViewName coll0view - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "estimatedDocumentCount always uses count" - operations: - - name: estimatedDocumentCount - object: *collection0 - expectResult: 3 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - count: *collection0Name - commandName: count - databaseName: *database0Name - - - description: "estimatedDocumentCount with maxTimeMS" - operations: - - name: estimatedDocumentCount - object: *collection0 - arguments: - maxTimeMS: 6000 - expectResult: 3 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - count: *collection0Name - maxTimeMS: 6000 - commandName: count - databaseName: *database0Name - - - description: "estimatedDocumentCount on non-existent collection" - operations: - - name: estimatedDocumentCount - object: *collection1 - expectResult: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - count: *collection1Name - commandName: count - databaseName: *database0Name - - - description: "estimatedDocumentCount errors correctly--command error" - runOnRequirements: - - minServerVersion: "4.0.0" - topologies: [ single, replicaset ] - - minServerVersion: "4.2.0" - topologies: [ sharded ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ count ] - errorCode: 8 # UnknownError - - name: estimatedDocumentCount - object: *collection0 - expectError: - errorCode: 8 # UnknownError - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - count: *collection0Name - commandName: count - databaseName: *database0Name - - - description: "estimatedDocumentCount errors correctly--socket error" - runOnRequirements: - - minServerVersion: "4.0.0" - topologies: [ single, replicaset ] - - minServerVersion: "4.2.0" - topologies: [ sharded ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ count ] - closeConnection: true - - name: estimatedDocumentCount - object: *collection0 - expectError: - isError: true - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - count: *collection0Name - commandName: count - databaseName: *database0Name - - - description: "estimatedDocumentCount works correctly on views" - # viewOn option was added to the create command in 3.4 - runOnRequirements: - - minServerVersion: "3.4.0" - operations: - - name: dropCollection - object: *database0 - arguments: - collection: *collection0ViewName - - name: createCollection - object: *database0 - arguments: - collection: *collection0ViewName - viewOn: *collection0Name - pipeline: &pipeline - - { $match: { _id: { $gt: 1 } } } - - name: estimatedDocumentCount - object: *collection0View - expectResult: 2 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - drop: *collection0ViewName - commandName: drop - databaseName: *database0Name - - commandStartedEvent: - command: - create: *collection0ViewName - viewOn: *collection0Name - pipeline: *pipeline - commandName: create - databaseName: *database0Name - - commandStartedEvent: - command: - count: *collection0ViewName - commandName: count - databaseName: *database0Name diff --git a/testdata/crud/unified/find-allowdiskuse-clientError.json b/testdata/crud/unified/find-allowdiskuse-clientError.json deleted file mode 100644 index 5bd954e79d..0000000000 --- a/testdata/crud/unified/find-allowdiskuse-clientError.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "description": "find-allowdiskuse-clientError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "maxServerVersion": "3.0.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_find_allowdiskuse_clienterror" - } - } - ], - "tests": [ - { - "description": "Find fails when allowDiskUse true is specified against pre 3.2 server", - "operations": [ - { - "object": "collection0", - "name": "find", - "arguments": { - "filter": {}, - "allowDiskUse": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ] - }, - { - "description": "Find fails when allowDiskUse false is specified against pre 3.2 server", - "operations": [ - { - "object": "collection0", - "name": "find", - "arguments": { - "filter": {}, - "allowDiskUse": false - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ] - } - ] -} diff --git a/testdata/crud/unified/find-allowdiskuse-clientError.yml b/testdata/crud/unified/find-allowdiskuse-clientError.yml deleted file mode 100644 index 2bc26908fe..0000000000 --- a/testdata/crud/unified/find-allowdiskuse-clientError.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: find-allowdiskuse-clientError -schemaVersion: '1.0' -runOnRequirements: - - - maxServerVersion: 3.0.99 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_find_allowdiskuse_clienterror -tests: - - - description: 'Find fails when allowDiskUse true is specified against pre 3.2 server' - operations: - - - object: *collection0 - name: find - arguments: - filter: { } - allowDiskUse: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - - - description: 'Find fails when allowDiskUse false is specified against pre 3.2 server' - operations: - - - object: *collection0 - name: find - arguments: - filter: { } - allowDiskUse: false - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] diff --git a/testdata/crud/unified/find-allowdiskuse-serverError.json b/testdata/crud/unified/find-allowdiskuse-serverError.json deleted file mode 100644 index dc58f8f0e3..0000000000 --- a/testdata/crud/unified/find-allowdiskuse-serverError.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "find-allowdiskuse-serverError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "3.2", - "maxServerVersion": "4.3.0" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_find_allowdiskuse_servererror" - } - } - ], - "tests": [ - { - "description": "Find fails when allowDiskUse true is specified against pre 4.4 server (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "find", - "arguments": { - "filter": {}, - "allowDiskUse": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test_find_allowdiskuse_servererror", - "filter": {}, - "allowDiskUse": true - } - } - } - ] - } - ] - }, - { - "description": "Find fails when allowDiskUse false is specified against pre 4.4 server (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "find", - "arguments": { - "filter": {}, - "allowDiskUse": false - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test_find_allowdiskuse_servererror", - "filter": {}, - "allowDiskUse": false - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/find-allowdiskuse-serverError.yml b/testdata/crud/unified/find-allowdiskuse-serverError.yml deleted file mode 100644 index de73d8b37d..0000000000 --- a/testdata/crud/unified/find-allowdiskuse-serverError.yml +++ /dev/null @@ -1,68 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: find-allowdiskuse-serverError -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: '3.2' - maxServerVersion: 4.3.0 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_find_allowdiskuse_servererror -tests: - - - description: 'Find fails when allowDiskUse true is specified against pre 4.4 server (server-side error)' - operations: - - - object: *collection0 - name: find - arguments: - filter: &filter { } - allowDiskUse: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - find: *collection_name - filter: *filter - allowDiskUse: true - - - description: 'Find fails when allowDiskUse false is specified against pre 4.4 server (server-side error)' - operations: - - - object: *collection0 - name: find - arguments: - filter: *filter - allowDiskUse: false - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - find: *collection_name - filter: *filter - allowDiskUse: false diff --git a/testdata/crud/unified/find-allowdiskuse.json b/testdata/crud/unified/find-allowdiskuse.json deleted file mode 100644 index eb238ab93a..0000000000 --- a/testdata/crud/unified/find-allowdiskuse.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "description": "find-allowdiskuse", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_find_allowdiskuse" - } - } - ], - "tests": [ - { - "description": "Find does not send allowDiskUse when value is not specified", - "operations": [ - { - "object": "collection0", - "name": "find", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test_find_allowdiskuse", - "allowDiskUse": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "Find sends allowDiskUse false when false is specified", - "operations": [ - { - "object": "collection0", - "name": "find", - "arguments": { - "filter": {}, - "allowDiskUse": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test_find_allowdiskuse", - "allowDiskUse": false - } - } - } - ] - } - ] - }, - { - "description": "Find sends allowDiskUse true when true is specified", - "operations": [ - { - "object": "collection0", - "name": "find", - "arguments": { - "filter": {}, - "allowDiskUse": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test_find_allowdiskuse", - "allowDiskUse": true - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/find-allowdiskuse.yml b/testdata/crud/unified/find-allowdiskuse.yml deleted file mode 100644 index 1bf8eee562..0000000000 --- a/testdata/crud/unified/find-allowdiskuse.yml +++ /dev/null @@ -1,79 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: find-allowdiskuse -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.3.1 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_find_allowdiskuse -tests: - - - description: 'Find does not send allowDiskUse when value is not specified' - operations: - - - object: *collection0 - name: find - arguments: - filter: { } - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - find: *collection_name - allowDiskUse: - $$exists: false - - - description: 'Find sends allowDiskUse false when false is specified' - operations: - - - object: *collection0 - name: find - arguments: - filter: { } - allowDiskUse: false - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - find: *collection_name - allowDiskUse: false - - - description: 'Find sends allowDiskUse true when true is specified' - operations: - - - object: *collection0 - name: find - arguments: - filter: { } - allowDiskUse: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - find: *collection_name - allowDiskUse: true diff --git a/testdata/crud/unified/find-comment.json b/testdata/crud/unified/find-comment.json deleted file mode 100644 index 600a3723f1..0000000000 --- a/testdata/crud/unified/find-comment.json +++ /dev/null @@ -1,403 +0,0 @@ -{ - "description": "find-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - }, - { - "_id": 6, - "x": 66 - } - ] - } - ], - "tests": [ - { - "description": "find with string comment", - "runOnRequirements": [ - { - "minServerVersion": "3.6" - } - ], - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "comment": "comment" - }, - "expectResult": [ - { - "_id": 1 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": { - "_id": 1 - }, - "comment": "comment" - } - } - } - ] - } - ] - }, - { - "description": "find with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "comment": { - "key": "value" - } - }, - "expectResult": [ - { - "_id": 1 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": { - "_id": 1 - }, - "comment": { - "key": "value" - } - } - } - } - ] - } - ] - }, - { - "description": "find with document comment - pre 4.4", - "runOnRequirements": [ - { - "maxServerVersion": "4.2.99", - "minServerVersion": "3.6" - } - ], - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "comment": { - "key": "value" - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": { - "_id": 1 - }, - "comment": { - "key": "value" - } - } - } - } - ] - } - ] - }, - { - "description": "find with comment sets comment on getMore", - "runOnRequirements": [ - { - "minServerVersion": "4.4.0" - } - ], - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "batchSize": 2, - "comment": { - "key": "value" - } - }, - "expectResult": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - }, - { - "_id": 6, - "x": 66 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": { - "_id": { - "$gt": 1 - } - }, - "batchSize": 2, - "comment": { - "key": "value" - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "coll0", - "batchSize": 2, - "comment": { - "key": "value" - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "coll0", - "batchSize": 2, - "comment": { - "key": "value" - } - } - } - } - ] - } - ] - }, - { - "description": "find with comment does not set comment on getMore - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "maxServerVersion": "4.3.99" - } - ], - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "batchSize": 2, - "comment": "comment" - }, - "expectResult": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - }, - { - "_id": 6, - "x": 66 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": { - "_id": { - "$gt": 1 - } - }, - "batchSize": 2, - "comment": "comment" - } - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "coll0", - "batchSize": 2, - "comment": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "coll0", - "batchSize": 2, - "comment": { - "$$exists": false - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/find-comment.yml b/testdata/crud/unified/find-comment.yml deleted file mode 100644 index 905241ad0e..0000000000 --- a/testdata/crud/unified/find-comment.yml +++ /dev/null @@ -1,166 +0,0 @@ -description: "find-comment" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - - { _id: 6, x: 66 } - -tests: - - description: "find with string comment" - runOnRequirements: - - minServerVersion: "3.6" - operations: - - name: find - object: *collection0 - arguments: - filter: &filter - _id: 1 - comment: "comment" - expectResult: &expect_result - - { _id: 1 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: *filter - comment: "comment" - - - description: "find with document comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: find - object: *collection0 - arguments: - filter: *filter - comment: &comment { key: "value"} - expectResult: *expect_result - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: *filter - comment: *comment - - - description: "find with document comment - pre 4.4" - runOnRequirements: - - maxServerVersion: "4.2.99" - minServerVersion: "3.6" - operations: - - name: find - object: *collection0 - arguments: - filter: *filter - comment: *comment - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: *filter - comment: *comment - - - description: "find with comment sets comment on getMore" - runOnRequirements: - - minServerVersion: "4.4.0" - operations: - - name: find - object: *collection0 - arguments: - filter: &filter_get_more { _id: { $gt: 1 } } - batchSize: 2 - comment: *comment - expectResult: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - - { _id: 6, x: 66 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: { _id: { $gt: 1 } } - batchSize: 2 - comment: *comment - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 2 - comment: *comment - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 2 - comment: *comment - - - description: "find with comment does not set comment on getMore - pre 4.4" - runOnRequirements: - - minServerVersion: "3.6.0" - maxServerVersion: "4.3.99" - operations: - - name: find - object: *collection0 - arguments: - filter: &filter_get_more { _id: { $gt: 1 } } - batchSize: 2 - comment: "comment" - expectResult: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - - { _id: 6, x: 66 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: { _id: { $gt: 1 } } - batchSize: 2 - comment: "comment" - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 2 - comment: { $$exists: false } - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 2 - comment: { $$exists: false } diff --git a/testdata/crud/unified/find-let.json b/testdata/crud/unified/find-let.json deleted file mode 100644 index 4e9c9c99f4..0000000000 --- a/testdata/crud/unified/find-let.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "description": "find-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "Find with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "let": { - "id": 1 - } - }, - "expectResult": [ - { - "_id": 1 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "let": { - "id": 1 - } - } - } - } - ] - } - ] - }, - { - "description": "Find with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "let": { - "x": 1 - } - }, - "expectError": { - "errorContains": "Unrecognized field 'let'", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": { - "_id": 1 - }, - "let": { - "x": 1 - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/find-let.yml b/testdata/crud/unified/find-let.yml deleted file mode 100644 index 20afe85c87..0000000000 --- a/testdata/crud/unified/find-let.yml +++ /dev/null @@ -1,71 +0,0 @@ -description: "find-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "Find with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: find - object: *collection0 - arguments: - filter: &filter - $expr: - $eq: [ "$_id", "$$id" ] - let: &let0 - id: 1 - expectResult: - - { _id: 1 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: *filter - let: *let0 - - - description: "Find with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "3.6.0" - maxServerVersion: "4.4.99" - operations: - - name: find - object: *collection0 - arguments: - filter: &filter1 - _id: 1 - let: &let1 - x: 1 - expectError: - errorContains: "Unrecognized field 'let'" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: *filter1 - let: *let1 diff --git a/testdata/crud/unified/find.json b/testdata/crud/unified/find.json deleted file mode 100644 index 275d5d351a..0000000000 --- a/testdata/crud/unified/find.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "description": "find", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "find-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "find-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - }, - { - "_id": 6, - "x": 66 - } - ] - } - ], - "tests": [ - { - "description": "find with multiple batches works", - "operations": [ - { - "name": "find", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "batchSize": 2 - }, - "object": "collection0", - "expectResult": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - }, - { - "_id": 6, - "x": 66 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": { - "_id": { - "$gt": 1 - } - }, - "batchSize": 2 - }, - "commandName": "find", - "databaseName": "find-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "coll0", - "batchSize": 2 - }, - "commandName": "getMore", - "databaseName": "find-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "coll0", - "batchSize": 2 - }, - "commandName": "getMore", - "databaseName": "find-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/find.yml b/testdata/crud/unified/find.yml deleted file mode 100644 index 5615f07234..0000000000 --- a/testdata/crud/unified/find.yml +++ /dev/null @@ -1,68 +0,0 @@ -description: "find" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true # ensure cursors pin to a single server - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name find-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - - { _id: 6, x: 66 } - -tests: - - description: "find with multiple batches works" - operations: - - name: find - arguments: - filter: { _id: { $gt: 1 } } - batchSize: 2 - object: *collection0 - expectResult: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - - { _id: 6, x: 66 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: { _id: { $gt: 1 } } - batchSize: 2 - commandName: find - databaseName: *database0Name - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 2 - commandName: getMore - databaseName: *database0Name - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 2 - commandName: getMore - databaseName: *database0Name - diff --git a/testdata/crud/unified/findOneAndDelete-comment.json b/testdata/crud/unified/findOneAndDelete-comment.json deleted file mode 100644 index 821c26e20d..0000000000 --- a/testdata/crud/unified/findOneAndDelete-comment.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "description": "findOneAndDelete-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "findOneAndDelete with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "findOneAndDelete", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "comment": "comment" - }, - "expectResult": { - "_id": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "remove": true, - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "findOneAndDelete with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "findOneAndDelete", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "comment": { - "key": "value" - } - }, - "expectResult": { - "_id": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "remove": true, - "comment": { - "key": "value" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "findOneAndDelete with comment - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "findOneAndDelete", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "comment": "comment" - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "remove": true, - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/testdata/crud/unified/findOneAndDelete-comment.yml b/testdata/crud/unified/findOneAndDelete-comment.yml deleted file mode 100644 index dfa7ff2ce0..0000000000 --- a/testdata/crud/unified/findOneAndDelete-comment.yml +++ /dev/null @@ -1,96 +0,0 @@ -description: "findOneAndDelete-comment" -schemaVersion: "1.0" - - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "findOneAndDelete with string comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: findOneAndDelete - object: *collection0 - arguments: - filter: &filter - _id: 1 - comment: "comment" - expectResult: - _id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter - remove: true - comment: "comment" - outcome: &outcome - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 2 } - - - description: "findOneAndDelete with document comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: findOneAndDelete - object: *collection0 - arguments: - filter: *filter - comment: &comment { key: "value"} - expectResult: - _id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter - remove: true - comment: *comment - outcome: *outcome - - - description: "findOneAndDelete with comment - pre 4.4" - runOnRequirements: - - minServerVersion: "4.2.0" # findAndModify option validation was introduced in 4.2 - maxServerVersion: "4.2.99" - operations: - - name: findOneAndDelete - object: *collection0 - arguments: - filter: *filter - comment: "comment" - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter - remove: true - comment: "comment" - outcome: *initialData diff --git a/testdata/crud/unified/findOneAndDelete-hint-clientError.json b/testdata/crud/unified/findOneAndDelete-hint-clientError.json deleted file mode 100644 index c6ff467866..0000000000 --- a/testdata/crud/unified/findOneAndDelete-hint-clientError.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "description": "findOneAndDelete-hint-clientError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "maxServerVersion": "4.0.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "findOneAndDelete_hint" - } - } - ], - "initialData": [ - { - "collectionName": "findOneAndDelete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "FindOneAndDelete with hint string unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "findOneAndDelete", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "findOneAndDelete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "FindOneAndDelete with hint document", - "operations": [ - { - "object": "collection0", - "name": "findOneAndDelete", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "findOneAndDelete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndDelete-hint-clientError.yml b/testdata/crud/unified/findOneAndDelete-hint-clientError.yml deleted file mode 100644 index 220496872a..0000000000 --- a/testdata/crud/unified/findOneAndDelete-hint-clientError.yml +++ /dev/null @@ -1,91 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: findOneAndDelete-hint-clientError -schemaVersion: '1.0' -runOnRequirements: - - - maxServerVersion: 4.0.99 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name findOneAndDelete_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'FindOneAndDelete with hint string unsupported (client-side error)' - operations: - - - object: *collection0 - name: findOneAndDelete - arguments: - filter: &filter - _id: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'FindOneAndDelete with hint document' - operations: - - - object: *collection0 - name: findOneAndDelete - arguments: - filter: &filter - _id: 1 - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 diff --git a/testdata/crud/unified/findOneAndDelete-hint-serverError.json b/testdata/crud/unified/findOneAndDelete-hint-serverError.json deleted file mode 100644 index b874102728..0000000000 --- a/testdata/crud/unified/findOneAndDelete-hint-serverError.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "description": "findOneAndDelete-hint-serverError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.3.3" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "findOneAndDelete_hint" - } - } - ], - "initialData": [ - { - "collectionName": "findOneAndDelete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "FindOneAndDelete with hint string unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "findOneAndDelete", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "findOneAndDelete_hint", - "query": { - "_id": 1 - }, - "hint": "_id_", - "remove": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "findOneAndDelete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "FindOneAndDelete with hint document unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "findOneAndDelete", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "findOneAndDelete_hint", - "query": { - "_id": 1 - }, - "hint": { - "_id": 1 - }, - "remove": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "findOneAndDelete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndDelete-hint-serverError.yml b/testdata/crud/unified/findOneAndDelete-hint-serverError.yml deleted file mode 100644 index 5fd21eedc0..0000000000 --- a/testdata/crud/unified/findOneAndDelete-hint-serverError.yml +++ /dev/null @@ -1,107 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: findOneAndDelete-hint-serverError -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.2.0 - maxServerVersion: 4.3.3 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name findOneAndDelete_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'FindOneAndDelete with hint string unsupported (server-side error)' - operations: - - - object: *collection0 - name: findOneAndDelete - arguments: - filter: &filter - _id: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - query: *filter - hint: _id_ - remove: true - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'FindOneAndDelete with hint document unsupported (server-side error)' - operations: - - - object: *collection0 - name: findOneAndDelete - arguments: - filter: &filter - _id: 1 - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - query: *filter - hint: - _id: 1 - remove: true - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 diff --git a/testdata/crud/unified/findOneAndDelete-hint.json b/testdata/crud/unified/findOneAndDelete-hint.json deleted file mode 100644 index 8b53f2bd3f..0000000000 --- a/testdata/crud/unified/findOneAndDelete-hint.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "description": "findOneAndDelete-hint", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.3.4" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "findOneAndDelete_hint" - } - } - ], - "initialData": [ - { - "collectionName": "findOneAndDelete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "FindOneAndDelete with hint string", - "operations": [ - { - "object": "collection0", - "name": "findOneAndDelete", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": "_id_" - }, - "expectResult": { - "_id": 1, - "x": 11 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "findOneAndDelete_hint", - "query": { - "_id": 1 - }, - "hint": "_id_", - "remove": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "findOneAndDelete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "FindOneAndDelete with hint document", - "operations": [ - { - "object": "collection0", - "name": "findOneAndDelete", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": { - "_id": 1 - } - }, - "expectResult": { - "_id": 1, - "x": 11 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "findOneAndDelete_hint", - "query": { - "_id": 1 - }, - "hint": { - "_id": 1 - }, - "remove": true - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "findOneAndDelete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndDelete-hint.yml b/testdata/crud/unified/findOneAndDelete-hint.yml deleted file mode 100644 index 3dc4f3ff41..0000000000 --- a/testdata/crud/unified/findOneAndDelete-hint.yml +++ /dev/null @@ -1,102 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: findOneAndDelete-hint -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.3.4 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name findOneAndDelete_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'FindOneAndDelete with hint string' - operations: - - - object: *collection0 - name: findOneAndDelete - arguments: - filter: &filter - _id: 1 - hint: _id_ - expectResult: &result - _id: 1 - x: 11 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - query: *filter - hint: _id_ - remove: true - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 2 - x: 22 - - - description: 'FindOneAndDelete with hint document' - operations: - - - object: *collection0 - name: findOneAndDelete - arguments: - filter: &filter - _id: 1 - hint: - _id: 1 - expectResult: &result - _id: 1 - x: 11 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - query: *filter - hint: - _id: 1 - remove: true - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 2 - x: 22 diff --git a/testdata/crud/unified/findOneAndDelete-let.json b/testdata/crud/unified/findOneAndDelete-let.json deleted file mode 100644 index ba8e681c0e..0000000000 --- a/testdata/crud/unified/findOneAndDelete-let.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "description": "findOneAndDelete-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "findOneAndDelete with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "findOneAndDelete", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "let": { - "id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "remove": true, - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "findOneAndDelete with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "name": "findOneAndDelete", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "let": { - "id": 1 - } - }, - "expectError": { - "errorContains": "field 'let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "remove": true, - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndDelete-let.yml b/testdata/crud/unified/findOneAndDelete-let.yml deleted file mode 100644 index 0174af0a2b..0000000000 --- a/testdata/crud/unified/findOneAndDelete-let.yml +++ /dev/null @@ -1,86 +0,0 @@ -description: "findOneAndDelete-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "findOneAndDelete with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: findOneAndDelete - object: *collection0 - arguments: - filter: &filter - $expr: - $eq: [ "$_id", "$$id" ] - let: &let0 - id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter - remove: true - let: *let0 - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 2 } - - - description: "findOneAndDelete with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "4.2.0" - maxServerVersion: "4.4.99" - operations: - - name: findOneAndDelete - object: *collection0 - arguments: - filter: &filter1 - $expr: - $eq: [ "$_id", "$$id" ] - let: &let1 - id: 1 - expectError: - # This error message is consistent between 4.2.x and 4.4.x servers. - # Older servers return a different error message. - errorContains: "field 'let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter1 - remove: true - let: *let1 - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - diff --git a/testdata/crud/unified/findOneAndReplace-comment.json b/testdata/crud/unified/findOneAndReplace-comment.json deleted file mode 100644 index 06a3bbc68b..0000000000 --- a/testdata/crud/unified/findOneAndReplace-comment.json +++ /dev/null @@ -1,234 +0,0 @@ -{ - "description": "findOneAndReplace-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "findOneAndReplace with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 5 - }, - "comment": "comment" - }, - "expectResult": { - "_id": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": { - "x": 5 - }, - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 5 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "findOneAndReplace with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 5 - }, - "comment": { - "key": "value" - } - }, - "expectResult": { - "_id": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": { - "x": 5 - }, - "comment": { - "key": "value" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 5 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "findOneAndReplace with comment - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 5 - }, - "comment": "comment" - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": { - "x": 5 - }, - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] - } \ No newline at end of file diff --git a/testdata/crud/unified/findOneAndReplace-comment.yml b/testdata/crud/unified/findOneAndReplace-comment.yml deleted file mode 100644 index 2c6aaef07b..0000000000 --- a/testdata/crud/unified/findOneAndReplace-comment.yml +++ /dev/null @@ -1,101 +0,0 @@ -description: "findOneAndReplace-comment" -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "findOneAndReplace with string comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: findOneAndReplace - object: *collection0 - arguments: - filter: &filter - _id: 1 - replacement: &replacement - x: 5 - comment: "comment" - expectResult: - _id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter - update: *replacement - comment: "comment" - outcome: &outcome - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 5 } - - { _id: 2 } - - - description: "findOneAndReplace with document comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: findOneAndReplace - object: *collection0 - arguments: - filter: *filter - replacement: *replacement - comment: &comment { key: "value"} - expectResult: - _id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter - update: *replacement - comment: *comment - outcome: *outcome - - - - description: "findOneAndReplace with comment - pre 4.4" - runOnRequirements: - - minServerVersion: "4.2.0" # findAndModify option validation was introduced in 4.2 - maxServerVersion: "4.2.99" - operations: - - name: findOneAndReplace - object: *collection0 - arguments: - filter: *filter - replacement: *replacement - comment: "comment" - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter - update: *replacement - comment: "comment" - outcome: *initialData diff --git a/testdata/crud/unified/findOneAndReplace-dots_and_dollars.json b/testdata/crud/unified/findOneAndReplace-dots_and_dollars.json deleted file mode 100644 index 19ac447f84..0000000000 --- a/testdata/crud/unified/findOneAndReplace-dots_and_dollars.json +++ /dev/null @@ -1,430 +0,0 @@ -{ - "description": "findOneAndReplace-dots_and_dollars", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ], - "tests": [ - { - "description": "Replacing document with top-level dotted key on 3.6+ server", - "runOnRequirements": [ - { - "minServerVersion": "3.6" - } - ], - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a.b": 1 - } - }, - "expectResult": { - "_id": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": { - "_id": 1, - "a.b": 1 - }, - "new": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a.b": 1 - } - ] - } - ] - }, - { - "description": "Replacing document with top-level dotted key on pre-3.6 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "3.4.99" - } - ], - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a.b": 1 - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": { - "_id": 1, - "a.b": 1 - }, - "new": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Replacing document with dollar-prefixed key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "$b": 1 - } - } - }, - "expectResult": { - "_id": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": { - "_id": 1, - "a": { - "$b": 1 - } - }, - "new": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "$b": 1 - } - } - ] - } - ] - }, - { - "description": "Replacing document with dollar-prefixed key in embedded doc on pre-5.0 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "4.99" - } - ], - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "$b": 1 - } - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": { - "_id": 1, - "a": { - "$b": 1 - } - }, - "new": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Replacing document with dotted key in embedded doc on 3.6+ server", - "runOnRequirements": [ - { - "minServerVersion": "3.6" - } - ], - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "b.c": 1 - } - } - }, - "expectResult": { - "_id": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": { - "_id": 1, - "a": { - "b.c": 1 - } - }, - "new": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "b.c": 1 - } - } - ] - } - ] - }, - { - "description": "Replacing document with dotted key in embedded doc on pre-3.6 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "3.4.99" - } - ], - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "b.c": 1 - } - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": { - "_id": 1, - "a": { - "b.c": 1 - } - }, - "new": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndReplace-dots_and_dollars.yml b/testdata/crud/unified/findOneAndReplace-dots_and_dollars.yml deleted file mode 100644 index 0823824cca..0000000000 --- a/testdata/crud/unified/findOneAndReplace-dots_and_dollars.yml +++ /dev/null @@ -1,140 +0,0 @@ -description: "findOneAndReplace-dots_and_dollars" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - &initialDocument { _id: 1 } - -tests: - - description: "Replacing document with top-level dotted key on 3.6+ server" - runOnRequirements: - - minServerVersion: "3.6" - operations: - - name: findOneAndReplace - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: &dottedKey { _id: 1, a.b: 1 } - expectResult: *initialDocument - expectEvents: &expectEventsDottedKey - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: { _id: 1 } - update: *dottedKey - new: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKey - - - description: "Replacing document with top-level dotted key on pre-3.6 server yields server-side error" - runOnRequirements: - - maxServerVersion: "3.4.99" - operations: - - name: findOneAndReplace - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: *dottedKey - expectError: - isClientError: false - expectEvents: *expectEventsDottedKey - outcome: *initialData - - - description: "Replacing document with dollar-prefixed key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: findOneAndReplace - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: &dollarPrefixedKeyInEmbedded { _id: 1, a: { $b: 1 } } - expectResult: *initialDocument - expectEvents: &expectEventsDollarPrefixedKeyInEmbedded - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: { _id: 1 } - update: *dollarPrefixedKeyInEmbedded - new: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dollarPrefixedKeyInEmbedded - - - description: "Replacing document with dollar-prefixed key in embedded doc on pre-5.0 server yields server-side error" - runOnRequirements: - - maxServerVersion: "4.99" - operations: - - name: findOneAndReplace - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: *dollarPrefixedKeyInEmbedded - expectError: - isClientError: false - expectEvents: *expectEventsDollarPrefixedKeyInEmbedded - outcome: *initialData - - - description: "Replacing document with dotted key in embedded doc on 3.6+ server" - runOnRequirements: - - minServerVersion: "3.6" - operations: - - name: findOneAndReplace - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: &dottedKeyInEmbedded { _id: 1, a: { b.c: 1 } } - expectResult: *initialDocument - expectEvents: &expectEventsDottedKeyInEmbedded - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: { _id: 1 } - update: *dottedKeyInEmbedded - new: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKeyInEmbedded - - - description: "Replacing document with dotted key in embedded doc on pre-3.6 server yields server-side error" - runOnRequirements: - - maxServerVersion: "3.4.99" - operations: - - name: findOneAndReplace - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: *dottedKeyInEmbedded - expectError: - isClientError: false - expectEvents: *expectEventsDottedKeyInEmbedded - outcome: *initialData diff --git a/testdata/crud/unified/findOneAndReplace-hint-clientError.json b/testdata/crud/unified/findOneAndReplace-hint-clientError.json deleted file mode 100644 index 6b07eb1f4d..0000000000 --- a/testdata/crud/unified/findOneAndReplace-hint-clientError.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "description": "findOneAndReplace-hint-clientError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "maxServerVersion": "4.0.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "findOneAndReplace_hint" - } - } - ], - "initialData": [ - { - "collectionName": "findOneAndReplace_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "FindOneAndReplace with hint string unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 33 - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "findOneAndReplace_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "FindOneAndReplace with hint document unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 33 - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "findOneAndReplace_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndReplace-hint-clientError.yml b/testdata/crud/unified/findOneAndReplace-hint-clientError.yml deleted file mode 100644 index f59952ffc0..0000000000 --- a/testdata/crud/unified/findOneAndReplace-hint-clientError.yml +++ /dev/null @@ -1,83 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: findOneAndReplace-hint-clientError -schemaVersion: '1.0' -runOnRequirements: - - - maxServerVersion: 4.0.99 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name findOneAndReplace_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'FindOneAndReplace with hint string unsupported (client-side error)' - operations: - - - object: *collection0 - name: findOneAndReplace - arguments: - filter: &filter - _id: 1 - replacement: &replacement - x: 33 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'FindOneAndReplace with hint document unsupported (client-side error)' - operations: - - - object: *collection0 - name: findOneAndReplace - arguments: - filter: *filter - replacement: *replacement - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/findOneAndReplace-hint-serverError.json b/testdata/crud/unified/findOneAndReplace-hint-serverError.json deleted file mode 100644 index 7fbf5a0ea3..0000000000 --- a/testdata/crud/unified/findOneAndReplace-hint-serverError.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "description": "findOneAndReplace-hint-serverError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.3.0" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "findOneAndReplace_hint" - } - } - ], - "initialData": [ - { - "collectionName": "findOneAndReplace_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "FindOneAndReplace with hint string unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 33 - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "findOneAndReplace_hint", - "query": { - "_id": 1 - }, - "update": { - "x": 33 - }, - "hint": "_id_" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "findOneAndReplace_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "FindOneAndReplace with hint document unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 33 - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "findOneAndReplace_hint", - "query": { - "_id": 1 - }, - "update": { - "x": 33 - }, - "hint": { - "_id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "findOneAndReplace_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndReplace-hint-serverError.yml b/testdata/crud/unified/findOneAndReplace-hint-serverError.yml deleted file mode 100644 index 664cd0bbc5..0000000000 --- a/testdata/crud/unified/findOneAndReplace-hint-serverError.yml +++ /dev/null @@ -1,99 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: findOneAndReplace-hint-serverError -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.2.0 - maxServerVersion: 4.3.0 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name findOneAndReplace_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'FindOneAndReplace with hint string unsupported (server-side error)' - operations: - - - object: *collection0 - name: findOneAndReplace - arguments: - filter: &filter - _id: 1 - replacement: &replacement - x: 33 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - query: *filter - update: *replacement - hint: _id_ - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'FindOneAndReplace with hint document unsupported (server-side error)' - operations: - - - object: *collection0 - name: findOneAndReplace - arguments: - filter: *filter - replacement: *replacement - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - query: *filter - update: *replacement - hint: - _id: 1 - outcome: *outcome diff --git a/testdata/crud/unified/findOneAndReplace-hint.json b/testdata/crud/unified/findOneAndReplace-hint.json deleted file mode 100644 index d07c5921a7..0000000000 --- a/testdata/crud/unified/findOneAndReplace-hint.json +++ /dev/null @@ -1,173 +0,0 @@ -{ - "description": "findOneAndReplace-hint", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "findOneAndReplace_hint" - } - } - ], - "initialData": [ - { - "collectionName": "findOneAndReplace_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "FindOneAndReplace with hint string", - "operations": [ - { - "object": "collection0", - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 33 - }, - "hint": "_id_" - }, - "expectResult": { - "_id": 1, - "x": 11 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "findOneAndReplace_hint", - "query": { - "_id": 1 - }, - "update": { - "x": 33 - }, - "hint": "_id_" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "findOneAndReplace_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 33 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "FindOneAndReplace with hint document", - "operations": [ - { - "object": "collection0", - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 33 - }, - "hint": { - "_id": 1 - } - }, - "expectResult": { - "_id": 1, - "x": 11 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "findOneAndReplace_hint", - "query": { - "_id": 1 - }, - "update": { - "x": 33 - }, - "hint": { - "_id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "findOneAndReplace_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 33 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndReplace-hint.yml b/testdata/crud/unified/findOneAndReplace-hint.yml deleted file mode 100644 index 9c581270a7..0000000000 --- a/testdata/crud/unified/findOneAndReplace-hint.yml +++ /dev/null @@ -1,98 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: findOneAndReplace-hint -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.3.1 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name findOneAndReplace_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'FindOneAndReplace with hint string' - operations: - - - object: *collection0 - name: findOneAndReplace - arguments: - filter: &filter - _id: 1 - replacement: &replacement - x: 33 - hint: _id_ - expectResult: &result - _id: 1 - x: 11 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - query: *filter - update: *replacement - hint: _id_ - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 33 - - - _id: 2 - x: 22 - - - description: 'FindOneAndReplace with hint document' - operations: - - - object: *collection0 - name: findOneAndReplace - arguments: - filter: *filter - replacement: *replacement - hint: - _id: 1 - expectResult: *result - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - query: *filter - update: *replacement - hint: - _id: 1 - outcome: *outcome diff --git a/testdata/crud/unified/findOneAndReplace-let.json b/testdata/crud/unified/findOneAndReplace-let.json deleted file mode 100644 index 5e5de44b31..0000000000 --- a/testdata/crud/unified/findOneAndReplace-let.json +++ /dev/null @@ -1,197 +0,0 @@ -{ - "description": "findOneAndReplace-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "findOneAndReplace with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "replacement": { - "x": "x" - }, - "let": { - "id": 1 - } - }, - "expectResult": { - "_id": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "update": { - "x": "x" - }, - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": "x" - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "findOneAndReplace with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "replacement": { - "x": "x" - }, - "let": { - "id": 1 - } - }, - "expectError": { - "errorContains": "field 'let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "update": { - "x": "x" - }, - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndReplace-let.yml b/testdata/crud/unified/findOneAndReplace-let.yml deleted file mode 100644 index 3ee1b7b672..0000000000 --- a/testdata/crud/unified/findOneAndReplace-let.yml +++ /dev/null @@ -1,94 +0,0 @@ -description: "findOneAndReplace-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "findOneAndReplace with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: findOneAndReplace - object: *collection0 - arguments: - filter: &filter - $expr: - $eq: [ "$_id", "$$id" ] - replacement: &replacement - x: "x" - let: &let0 - id: 1 - expectResult: - _id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter - update: *replacement - let: *let0 - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: "x" } - - { _id: 2 } - - - description: "findOneAndReplace with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "4.2.0" - maxServerVersion: "4.4.99" - operations: - - name: findOneAndReplace - object: *collection0 - arguments: - filter: &filter1 - $expr: - $eq: [ "$_id", "$$id" ] - replacement: &replacement1 - x: "x" - let: &let1 - id: 1 - expectError: - # This error message is consistent between 4.2.x and 4.4.x servers. - # Older servers return a different error message. - errorContains: "field 'let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter1 - update: *replacement1 - let: *let1 - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } diff --git a/testdata/crud/unified/findOneAndUpdate-comment.json b/testdata/crud/unified/findOneAndUpdate-comment.json deleted file mode 100644 index 9f042fdc13..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-comment.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "description": "findOneAndUpdate-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "findOneAndUpdate with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "x": 5 - } - } - ], - "comment": "comment" - }, - "expectResult": { - "_id": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": [ - { - "$set": { - "x": 5 - } - } - ], - "comment": "comment" - } - } - } - ] - } - ] - }, - { - "description": "findOneAndUpdate with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "x": 5 - } - } - ], - "comment": { - "key": "value" - } - }, - "expectResult": { - "_id": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": [ - { - "$set": { - "x": 5 - } - } - ], - "comment": { - "key": "value" - } - } - } - } - ] - } - ] - }, - { - "description": "findOneAndUpdate with comment - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "x": 5 - } - } - ], - "comment": "comment" - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": [ - { - "$set": { - "x": 5 - } - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/testdata/crud/unified/findOneAndUpdate-comment.yml b/testdata/crud/unified/findOneAndUpdate-comment.yml deleted file mode 100644 index 66d2d099c1..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-comment.yml +++ /dev/null @@ -1,95 +0,0 @@ -description: "findOneAndUpdate-comment" -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "findOneAndUpdate with string comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: &filter - _id: 1 - update: &update - - $set: {x: 5 } - comment: "comment" - expectResult: - _id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter - update: *update - comment: "comment" - - - description: "findOneAndUpdate with document comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: &filter - _id: 1 - update: &update - - $set: {x: 5 } - comment: &comment { key: "value"} - expectResult: - _id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter - update: *update - comment: *comment - - - description: "findOneAndUpdate with comment - pre 4.4" - runOnRequirements: - - minServerVersion: "4.2.0" # findAndModify option validation was introduced in 4.2 - maxServerVersion: "4.2.99" - operations: - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: *filter - update: *update - comment: "comment" - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter - update: *update - comment: "comment" - outcome: *initialData diff --git a/testdata/crud/unified/findOneAndUpdate-dots_and_dollars.json b/testdata/crud/unified/findOneAndUpdate-dots_and_dollars.json deleted file mode 100644 index 40eb547392..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-dots_and_dollars.json +++ /dev/null @@ -1,380 +0,0 @@ -{ - "description": "findOneAndUpdate-dots_and_dollars", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {} - } - ] - } - ], - "tests": [ - { - "description": "Updating document to set top-level dollar-prefixed key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ] - }, - "expectResult": { - "_id": 1, - "foo": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ], - "new": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {}, - "$a": 1 - } - ] - } - ] - }, - { - "description": "Updating document to set top-level dotted key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ] - }, - "expectResult": { - "_id": 1, - "foo": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ], - "new": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {}, - "a.b": 1 - } - ] - } - ] - }, - { - "description": "Updating document to set dollar-prefixed key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ] - }, - "expectResult": { - "_id": 1, - "foo": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ], - "new": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": { - "$a": 1 - } - } - ] - } - ] - }, - { - "description": "Updating document to set dotted key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ] - }, - "expectResult": { - "_id": 1, - "foo": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "_id": 1 - }, - "update": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ], - "new": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": { - "a.b": 1 - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndUpdate-dots_and_dollars.yml b/testdata/crud/unified/findOneAndUpdate-dots_and_dollars.yml deleted file mode 100644 index 69b46a15bc..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-dots_and_dollars.yml +++ /dev/null @@ -1,127 +0,0 @@ -description: "findOneAndUpdate-dots_and_dollars" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - &initialDocument { _id: 1, foo: {} } - -tests: - - description: "Updating document to set top-level dollar-prefixed key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: { _id: 1 } - update: &dollarPrefixedKey - - { $replaceWith: { $setField: { field: { $literal: $a }, value: 1, input: $$ROOT } } } - expectResult: *initialDocument - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: { _id: 1 } - update: *dollarPrefixedKey - new: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {}, $a: 1 } - - - description: "Updating document to set top-level dotted key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: { _id: 1 } - update: &dottedKey - - { $replaceWith: { $setField: { field: { $literal: a.b }, value: 1, input: $$ROOT } } } - expectResult: *initialDocument - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: { _id: 1 } - update: *dottedKey - new: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {}, a.b: 1 } - - - description: "Updating document to set dollar-prefixed key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: { _id: 1 } - update: &dollarPrefixedKeyInEmbedded - - { $set: { foo: { $setField: { field: { $literal: $a }, value: 1, input: $foo } } } } - expectResult: *initialDocument - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: { _id: 1 } - update: *dollarPrefixedKeyInEmbedded - new: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: { $a: 1 } } - - - description: "Updating document to set dotted key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: { _id: 1 } - update: &dottedKeyInEmbedded - - { $set: { foo: { $setField: { field: { $literal: a.b }, value: 1, input: $foo } } } } - expectResult: *initialDocument - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: { _id: 1 } - update: *dottedKeyInEmbedded - new: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: { a.b: 1 } } diff --git a/testdata/crud/unified/findOneAndUpdate-errorResponse.json b/testdata/crud/unified/findOneAndUpdate-errorResponse.json deleted file mode 100644 index 5023a450f3..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-errorResponse.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "description": "findOneAndUpdate-errorResponse", - "schemaVersion": "1.12", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": "foo" - } - ] - } - ], - "tests": [ - { - "description": "findOneAndUpdate DuplicateKey error is accessible", - "runOnRequirements": [ - { - "minServerVersion": "4.2" - } - ], - "operations": [ - { - "name": "createIndex", - "object": "collection0", - "arguments": { - "keys": { - "x": 1 - }, - "unique": true - } - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$set": { - "x": "foo" - } - }, - "upsert": true - }, - "expectError": { - "errorCode": 11000, - "errorResponse": { - "keyPattern": { - "x": 1 - }, - "keyValue": { - "x": "foo" - } - } - } - } - ] - }, - { - "description": "findOneAndUpdate document validation errInfo is accessible", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "modifyCollection", - "object": "database0", - "arguments": { - "collection": "test", - "validator": { - "x": { - "$type": "string" - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - }, - "expectError": { - "errorCode": 121, - "errorResponse": { - "errInfo": { - "failingDocumentId": 1, - "details": { - "$$type": "object" - } - } - } - } - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndUpdate-errorResponse.yml b/testdata/crud/unified/findOneAndUpdate-errorResponse.yml deleted file mode 100644 index 8faed76809..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-errorResponse.yml +++ /dev/null @@ -1,69 +0,0 @@ -description: "findOneAndUpdate-errorResponse" - -schemaVersion: "1.12" - -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: "foo" } - -tests: - - description: "findOneAndUpdate DuplicateKey error is accessible" - runOnRequirements: - - minServerVersion: "4.2" # SERVER-37124 - operations: - - name: createIndex - object: *collection0 - arguments: - keys: { x: 1 } - unique: true - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: { _id: 2 } - update: { $set: { x: "foo" } } - upsert: true - expectError: - errorCode: 11000 # DuplicateKey - errorResponse: - keyPattern: { x: 1 } - keyValue: { x: "foo" } - - - description: "findOneAndUpdate document validation errInfo is accessible" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: modifyCollection - object: *database0 - arguments: - collection: *collection0Name - validator: - x: { $type: "string" } - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { x: 1 } } - expectError: - errorCode: 121 # DocumentValidationFailure - errorResponse: - # Avoid asserting the exact contents of errInfo as it may vary by - # server version. Likewise, this is why drivers do not model the - # document. The following is sufficient to test that validation - # details are accessible. See SERVER-20547 for more context. - errInfo: - failingDocumentId: 1 - details: { $$type: "object" } diff --git a/testdata/crud/unified/findOneAndUpdate-hint-clientError.json b/testdata/crud/unified/findOneAndUpdate-hint-clientError.json deleted file mode 100644 index d0b51313c9..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-hint-clientError.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "description": "findOneAndUpdate-hint-clientError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "maxServerVersion": "4.0.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "findOneAndUpdate_hint" - } - } - ], - "initialData": [ - { - "collectionName": "findOneAndUpdate_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "FindOneAndUpdate with hint string unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "findOneAndUpdate_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "FindOneAndUpdate with hint document unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "findOneAndUpdate_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndUpdate-hint-clientError.yml b/testdata/crud/unified/findOneAndUpdate-hint-clientError.yml deleted file mode 100644 index 5ad4f07ccf..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-hint-clientError.yml +++ /dev/null @@ -1,84 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: findOneAndUpdate-hint-clientError -schemaVersion: '1.0' -runOnRequirements: - - - maxServerVersion: 4.0.99 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name findOneAndUpdate_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'FindOneAndUpdate with hint string unsupported (client-side error)' - operations: - - - object: *collection0 - name: findOneAndUpdate - arguments: - filter: &filter - _id: 1 - update: &update - $inc: - x: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'FindOneAndUpdate with hint document unsupported (client-side error)' - operations: - - - object: *collection0 - name: findOneAndUpdate - arguments: - filter: *filter - update: *update - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/findOneAndUpdate-hint-serverError.json b/testdata/crud/unified/findOneAndUpdate-hint-serverError.json deleted file mode 100644 index 99fd9938f8..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-hint-serverError.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "description": "findOneAndUpdate-hint-serverError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.3.0" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "findOneAndUpdate_hint" - } - } - ], - "initialData": [ - { - "collectionName": "findOneAndUpdate_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "FindOneAndUpdate with hint string unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "findOneAndUpdate_hint", - "query": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "findOneAndUpdate_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "FindOneAndUpdate with hint document unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "findOneAndUpdate_hint", - "query": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "findOneAndUpdate_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndUpdate-hint-serverError.yml b/testdata/crud/unified/findOneAndUpdate-hint-serverError.yml deleted file mode 100644 index f6b4f8d623..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-hint-serverError.yml +++ /dev/null @@ -1,100 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: findOneAndUpdate-hint-serverError -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.2.0 - maxServerVersion: 4.3.0 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name findOneAndUpdate_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'FindOneAndUpdate with hint string unsupported (server-side error)' - operations: - - - object: *collection0 - name: findOneAndUpdate - arguments: - filter: &filter - _id: 1 - update: &update - $inc: - x: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - query: *filter - update: *update - hint: _id_ - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'FindOneAndUpdate with hint document unsupported (server-side error)' - operations: - - - object: *collection0 - name: findOneAndUpdate - arguments: - filter: *filter - update: *update - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - query: *filter - update: *update - hint: - _id: 1 - outcome: *outcome diff --git a/testdata/crud/unified/findOneAndUpdate-hint.json b/testdata/crud/unified/findOneAndUpdate-hint.json deleted file mode 100644 index 5be6d2b3e8..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-hint.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "description": "findOneAndUpdate-hint", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "findOneAndUpdate_hint" - } - } - ], - "initialData": [ - { - "collectionName": "findOneAndUpdate_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "FindOneAndUpdate with hint string", - "operations": [ - { - "object": "collection0", - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - }, - "expectResult": { - "_id": 1, - "x": 11 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "findOneAndUpdate_hint", - "query": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "findOneAndUpdate_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "FindOneAndUpdate with hint document", - "operations": [ - { - "object": "collection0", - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectResult": { - "_id": 1, - "x": 11 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "findOneAndUpdate_hint", - "query": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "findOneAndUpdate_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndUpdate-hint.yml b/testdata/crud/unified/findOneAndUpdate-hint.yml deleted file mode 100644 index 5e835faa9e..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-hint.yml +++ /dev/null @@ -1,99 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: findOneAndUpdate-hint -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.3.1 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name findOneAndUpdate_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'FindOneAndUpdate with hint string' - operations: - - - object: *collection0 - name: findOneAndUpdate - arguments: - filter: &filter - _id: 1 - update: &update - $inc: - x: 1 - hint: _id_ - expectResult: &result - _id: 1 - x: 11 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - query: *filter - update: *update - hint: _id_ - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 12 - - - _id: 2 - x: 22 - - - description: 'FindOneAndUpdate with hint document' - operations: - - - object: *collection0 - name: findOneAndUpdate - arguments: - filter: *filter - update: *update - hint: - _id: 1 - expectResult: *result - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - query: *filter - update: *update - hint: - _id: 1 - outcome: *outcome diff --git a/testdata/crud/unified/findOneAndUpdate-let.json b/testdata/crud/unified/findOneAndUpdate-let.json deleted file mode 100644 index 74d7d0e58b..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-let.json +++ /dev/null @@ -1,217 +0,0 @@ -{ - "description": "findOneAndUpdate-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "findOneAndUpdate with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "update": [ - { - "$set": { - "x": "$$x" - } - } - ], - "let": { - "id": 1, - "x": "foo" - } - }, - "expectResult": { - "_id": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "update": [ - { - "$set": { - "x": "$$x" - } - } - ], - "let": { - "id": 1, - "x": "foo" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": "foo" - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "findOneAndUpdate with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "update": [ - { - "$set": { - "x": "$$x" - } - } - ], - "let": { - "id": 1, - "x": "foo" - } - }, - "expectError": { - "errorContains": "field 'let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "coll0", - "query": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "update": [ - { - "$set": { - "x": "$$x" - } - } - ], - "let": { - "id": 1, - "x": "foo" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/findOneAndUpdate-let.yml b/testdata/crud/unified/findOneAndUpdate-let.yml deleted file mode 100644 index 761001db9e..0000000000 --- a/testdata/crud/unified/findOneAndUpdate-let.yml +++ /dev/null @@ -1,96 +0,0 @@ -description: "findOneAndUpdate-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "findOneAndUpdate with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: &filter - $expr: - $eq: [ "$_id", "$$id" ] - update: &update - - $set: {x: "$$x" } - let: &let0 - id: 1 - x: "foo" - expectResult: - _id: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter - update: *update - let: *let0 - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: "foo" } - - { _id: 2 } - - - description: "findOneAndUpdate with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "4.2.0" - maxServerVersion: "4.4.99" - operations: - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: &filter1 - $expr: - $eq: [ "$_id", "$$id" ] - update: &update1 - - $set: {x: "$$x"} - let: &let1 - id: 1 - x: "foo" - expectError: - # This error message is consistent between 4.2.x and 4.4.x servers. - # Older servers return a different error message. - errorContains: "field 'let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - findAndModify: *collection0Name - query: *filter1 - update: *update1 - let: *let1 - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } diff --git a/testdata/crud/unified/insertMany-comment.json b/testdata/crud/unified/insertMany-comment.json deleted file mode 100644 index 2b4c80b3f0..0000000000 --- a/testdata/crud/unified/insertMany-comment.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "description": "insertMany-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "insertMany with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - } - ], - "comment": "comment" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 2, - "x": 22 - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "insertMany with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - } - ], - "comment": { - "key": "value" - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 2, - "x": 22 - } - ], - "comment": { - "key": "value" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "insertMany with comment - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - } - ], - "comment": "comment" - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 2, - "x": 22 - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/insertMany-comment.yml b/testdata/crud/unified/insertMany-comment.yml deleted file mode 100644 index 4b51584df2..0000000000 --- a/testdata/crud/unified/insertMany-comment.yml +++ /dev/null @@ -1,93 +0,0 @@ -description: "insertMany-comment" -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - -tests: - - description: "insertMany with string comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: insertMany - object: *collection0 - arguments: - documents: - - &document { _id: 2, x: 22 } - comment: "comment" - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *document - comment: "comment" - outcome: &outcome - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - - description: "insertMany with document comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: insertMany - object: *collection0 - arguments: - documents: - - *document - comment: &comment { key: "value" } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *document - comment: *comment - outcome: *outcome - - - description: "insertMany with comment - pre 4.4" - runOnRequirements: - - minServerVersion: "3.4.0" - maxServerVersion: "4.2.99" - operations: - - name: insertMany - object: *collection0 - arguments: - documents: - - *document - comment: "comment" - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *document - comment: "comment" - outcome: *initialData diff --git a/testdata/crud/unified/insertMany-dots_and_dollars.json b/testdata/crud/unified/insertMany-dots_and_dollars.json deleted file mode 100644 index eed8997df9..0000000000 --- a/testdata/crud/unified/insertMany-dots_and_dollars.json +++ /dev/null @@ -1,338 +0,0 @@ -{ - "description": "insertMany-dots_and_dollars", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Inserting document with top-level dollar-prefixed key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "documents": [ - { - "_id": 1, - "$a": 1 - } - ] - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedIds": { - "$$unsetOrMatches": { - "0": 1 - } - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "$a": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "$a": 1 - } - ] - } - ] - }, - { - "description": "Inserting document with top-level dollar-prefixed key on pre-5.0 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "4.99" - } - ], - "operations": [ - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "documents": [ - { - "_id": 1, - "$a": 1 - } - ] - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "$a": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [] - } - ] - }, - { - "description": "Inserting document with top-level dotted key", - "operations": [ - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "documents": [ - { - "_id": 1, - "a.b": 1 - } - ] - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedIds": { - "$$unsetOrMatches": { - "0": 1 - } - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "a.b": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a.b": 1 - } - ] - } - ] - }, - { - "description": "Inserting document with dollar-prefixed key in embedded doc", - "operations": [ - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "documents": [ - { - "_id": 1, - "a": { - "$b": 1 - } - } - ] - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedIds": { - "$$unsetOrMatches": { - "0": 1 - } - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "a": { - "$b": 1 - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "$b": 1 - } - } - ] - } - ] - }, - { - "description": "Inserting document with dotted key in embedded doc", - "operations": [ - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "documents": [ - { - "_id": 1, - "a": { - "b.c": 1 - } - } - ] - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedIds": { - "$$unsetOrMatches": { - "0": 1 - } - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "a": { - "b.c": 1 - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "b.c": 1 - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/insertMany-dots_and_dollars.yml b/testdata/crud/unified/insertMany-dots_and_dollars.yml deleted file mode 100644 index 913a55e4c0..0000000000 --- a/testdata/crud/unified/insertMany-dots_and_dollars.yml +++ /dev/null @@ -1,128 +0,0 @@ -description: "insertMany-dots_and_dollars" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: "Inserting document with top-level dollar-prefixed key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: insertMany - object: *collection0 - arguments: - documents: - - &dollarPrefixedKey { _id: 1, $a: 1 } - expectResult: &insertResult - # InsertManyResult is optional because all of its fields are optional - $$unsetOrMatches: { insertedIds: { $$unsetOrMatches: { 0: 1 } } } - expectEvents: &expectEventsDollarPrefixedKey - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dollarPrefixedKey - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dollarPrefixedKey - - - description: "Inserting document with top-level dollar-prefixed key on pre-5.0 server yields server-side error" - runOnRequirements: - - maxServerVersion: "4.99" - operations: - - name: insertMany - object: *collection0 - arguments: - documents: - - *dollarPrefixedKey - expectError: - isClientError: false - expectEvents: *expectEventsDollarPrefixedKey - outcome: *initialData - - - description: "Inserting document with top-level dotted key" - operations: - - name: insertMany - object: *collection0 - arguments: - documents: - - &dottedKey { _id: 1, a.b: 1 } - expectResult: *insertResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dottedKey - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKey - - - description: "Inserting document with dollar-prefixed key in embedded doc" - operations: - - name: insertMany - object: *collection0 - arguments: - documents: - - &dollarPrefixedKeyInEmbedded { _id: 1, a: { $b: 1 } } - expectResult: *insertResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dollarPrefixedKeyInEmbedded - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dollarPrefixedKeyInEmbedded - - - description: "Inserting document with dotted key in embedded doc" - operations: - - name: insertMany - object: *collection0 - arguments: - documents: - - &dottedKeyInEmbedded { _id: 1, a: { b.c: 1 } } - expectResult: *insertResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dottedKeyInEmbedded - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKeyInEmbedded diff --git a/testdata/crud/unified/insertOne-comment.json b/testdata/crud/unified/insertOne-comment.json deleted file mode 100644 index dbd83d9f64..0000000000 --- a/testdata/crud/unified/insertOne-comment.json +++ /dev/null @@ -1,220 +0,0 @@ -{ - "description": "insertOne-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "insertOne with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 2, - "x": 22 - }, - "comment": "comment" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 2, - "x": 22 - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "insertOne with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 2, - "x": 22 - }, - "comment": { - "key": "value" - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 2, - "x": 22 - } - ], - "comment": { - "key": "value" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "insertOne with comment - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 2, - "x": 22 - }, - "comment": "comment" - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 2, - "x": 22 - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/insertOne-comment.yml b/testdata/crud/unified/insertOne-comment.yml deleted file mode 100644 index 34d57c65ec..0000000000 --- a/testdata/crud/unified/insertOne-comment.yml +++ /dev/null @@ -1,92 +0,0 @@ -description: "insertOne-comment" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - -tests: - - description: "insertOne with string comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: insertOne - object: *collection0 - arguments: - document: &document { _id: 2, x: 22 } - comment: "comment" - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *document - comment: "comment" - outcome: &outcome - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - - description: "insertOne with document comment" - runOnRequirements: - - minServerVersion: "3.4.0" - - minServerVersion: "4.4" - operations: - - name: insertOne - object: *collection0 - arguments: - document: *document - comment: &comment { key: "value" } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *document - comment: *comment - outcome: *outcome - - - description: "insertOne with comment - pre 4.4" - runOnRequirements: - - minServerVersion: "3.4.0" - maxServerVersion: "4.2.99" - operations: - - name: insertOne - object: *collection0 - arguments: - document: *document - comment: "comment" - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *document - comment: "comment" - outcome: *initialData diff --git a/testdata/crud/unified/insertOne-dots_and_dollars.json b/testdata/crud/unified/insertOne-dots_and_dollars.json deleted file mode 100644 index fdc17af2e8..0000000000 --- a/testdata/crud/unified/insertOne-dots_and_dollars.json +++ /dev/null @@ -1,614 +0,0 @@ -{ - "description": "insertOne-dots_and_dollars", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - }, - { - "collection": { - "id": "collection1", - "database": "database0", - "collectionName": "coll1", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Inserting document with top-level dollar-prefixed key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "$a": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "$a": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "$a": 1 - } - ] - } - ] - }, - { - "description": "Inserting document with top-level dollar-prefixed key on pre-5.0 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "4.99" - } - ], - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "$a": 1 - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "$a": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [] - } - ] - }, - { - "description": "Inserting document with top-level dotted key", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a.b": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "a.b": 1 - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a.b": 1 - } - ] - } - ] - }, - { - "description": "Inserting document with dollar-prefixed key in embedded doc", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": { - "$b": 1 - } - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "a": { - "$b": 1 - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "$b": 1 - } - } - ] - } - ] - }, - { - "description": "Inserting document with dotted key in embedded doc", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": { - "b.c": 1 - } - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "a": { - "b.c": 1 - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "b.c": 1 - } - } - ] - } - ] - }, - { - "description": "Inserting document with dollar-prefixed key in _id yields server-side error", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": { - "$a": 1 - } - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": { - "$a": 1 - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [] - } - ] - }, - { - "description": "Inserting document with dotted key in _id on 3.6+ server", - "runOnRequirements": [ - { - "minServerVersion": "3.6" - } - ], - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": { - "a.b": 1 - } - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": { - "a.b": 1 - } - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": { - "a.b": 1 - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": { - "a.b": 1 - } - } - ] - } - ] - }, - { - "description": "Inserting document with dotted key in _id on pre-3.6 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "3.4.99" - } - ], - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": { - "a.b": 1 - } - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": { - "a.b": 1 - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [] - } - ] - }, - { - "description": "Inserting document with DBRef-like keys", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": { - "$db": "foo" - } - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1, - "a": { - "$db": "foo" - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "$db": "foo" - } - } - ] - } - ] - }, - { - "description": "Unacknowledged write using dollar-prefixed or dotted keys may be silently rejected on pre-5.0 server", - "runOnRequirements": [ - { - "maxServerVersion": "4.99" - } - ], - "operations": [ - { - "name": "insertOne", - "object": "collection1", - "arguments": { - "document": { - "_id": { - "$a": 1 - } - } - }, - "expectResult": { - "$$unsetOrMatches": { - "acknowledged": { - "$$unsetOrMatches": false - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll1", - "documents": [ - { - "_id": { - "$a": 1 - } - } - ], - "writeConcern": { - "w": 0 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [] - } - ] - } - ] -} diff --git a/testdata/crud/unified/insertOne-dots_and_dollars.yml b/testdata/crud/unified/insertOne-dots_and_dollars.yml deleted file mode 100644 index f255b52413..0000000000 --- a/testdata/crud/unified/insertOne-dots_and_dollars.yml +++ /dev/null @@ -1,238 +0,0 @@ -description: "insertOne-dots_and_dollars" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - - collection: - id: &collection1 collection1 - database: *database0 - collectionName: &collection1Name coll1 - collectionOptions: - writeConcern: { w: 0 } - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: "Inserting document with top-level dollar-prefixed key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: insertOne - object: *collection0 - arguments: - document: &dollarPrefixedKey { _id: 1, $a: 1 } - expectResult: &insertResult - # InsertOneResult is optional because all of its fields are optional - $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 1 } } - expectEvents: &expectEventsDollarPrefixedKey - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dollarPrefixedKey - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dollarPrefixedKey - - - description: "Inserting document with top-level dollar-prefixed key on pre-5.0 server yields server-side error" - runOnRequirements: - - maxServerVersion: "4.99" - operations: - - name: insertOne - object: *collection0 - arguments: - document: *dollarPrefixedKey - expectError: - isClientError: false - expectEvents: *expectEventsDollarPrefixedKey - outcome: *initialData - - - description: "Inserting document with top-level dotted key" - operations: - - name: insertOne - object: *collection0 - arguments: - document: &dottedKey { _id: 1, a.b: 1 } - expectResult: *insertResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dottedKey - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKey - - - description: "Inserting document with dollar-prefixed key in embedded doc" - operations: - - name: insertOne - object: *collection0 - arguments: - document: &dollarPrefixedKeyInEmbedded { _id: 1, a: { $b: 1 } } - expectResult: *insertResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dollarPrefixedKeyInEmbedded - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dollarPrefixedKeyInEmbedded - - - description: "Inserting document with dotted key in embedded doc" - operations: - - name: insertOne - object: *collection0 - arguments: - document: &dottedKeyInEmbedded { _id: 1, a: { b.c: 1 } } - expectResult: *insertResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dottedKeyInEmbedded - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKeyInEmbedded - - - description: "Inserting document with dollar-prefixed key in _id yields server-side error" - # Note: 5.0+ did not remove restrictions on dollar-prefixed keys in _id documents - operations: - - name: insertOne - object: *collection0 - arguments: - document: &dollarPrefixedKeyInId { _id: { $a: 1 } } - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dollarPrefixedKeyInId - outcome: *initialData - - - description: "Inserting document with dotted key in _id on 3.6+ server" - runOnRequirements: - - minServerVersion: "3.6" - operations: - - name: insertOne - object: *collection0 - arguments: - document: &dottedKeyInId { _id: { a.b: 1 } } - expectResult: - # InsertOneResult is optional because all of its fields are optional - $$unsetOrMatches: { insertedId: { $$unsetOrMatches: { a.b: 1 } } } - expectEvents: &expectEventsDottedKeyInId - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dottedKeyInId - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKeyInId - - - description: "Inserting document with dotted key in _id on pre-3.6 server yields server-side error" - runOnRequirements: - - maxServerVersion: "3.4.99" - operations: - - name: insertOne - object: *collection0 - arguments: - document: *dottedKeyInId - expectError: - isClientError: false - expectEvents: *expectEventsDottedKeyInId - outcome: *initialData - - - description: "Inserting document with DBRef-like keys" - operations: - - name: insertOne - object: *collection0 - arguments: - # Note: an incomplete DBRef document may cause issues loading the test - # file with an Extended JSON parser, since the presence of one DBRef - # key may cause the parser to require others and/or enforce expected - # types (e.g. $ref and $db must be strings). - # - # Using "$db" here works for libmongoc so long as it's a string type; - # however, neither $ref nor $id would be accepted on their own. - # - # See https://github.com/mongodb/specifications/blob/master/source/extended-json.rst#parsers - document: &dbrefLikeKey { _id: 1, a: { $db: "foo" } } - expectResult: *insertResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *dbrefLikeKey - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dbrefLikeKey - - - description: "Unacknowledged write using dollar-prefixed or dotted keys may be silently rejected on pre-5.0 server" - runOnRequirements: - - maxServerVersion: "4.99" - operations: - - name: insertOne - object: *collection1 - arguments: - document: *dollarPrefixedKeyInId - expectResult: - # InsertOneResult is optional because all of its fields are optional - $$unsetOrMatches: { acknowledged: { $$unsetOrMatches: false } } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection1Name - documents: - - *dollarPrefixedKeyInId - writeConcern: { w: 0 } - outcome: *initialData diff --git a/testdata/crud/unified/insertOne-errorResponse.json b/testdata/crud/unified/insertOne-errorResponse.json deleted file mode 100644 index 04ea6a7451..0000000000 --- a/testdata/crud/unified/insertOne-errorResponse.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "description": "insertOne-errorResponse", - "schemaVersion": "1.12", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "tests": [ - { - "description": "insert operations support errorResponse assertions", - "runOnRequirements": [ - { - "minServerVersion": "4.0.0", - "topologies": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.2.0", - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 8 - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1 - } - }, - "expectError": { - "errorCode": 8, - "errorResponse": { - "code": 8 - } - } - } - ] - } - ] -} diff --git a/testdata/crud/unified/insertOne-errorResponse.yml b/testdata/crud/unified/insertOne-errorResponse.yml deleted file mode 100644 index b14caa1737..0000000000 --- a/testdata/crud/unified/insertOne-errorResponse.yml +++ /dev/null @@ -1,46 +0,0 @@ -description: "insertOne-errorResponse" - -schemaVersion: "1.12" - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -tests: - # Some drivers may still need to skip this test because the CRUD spec does not - # prescribe how drivers should formulate a WriteException beyond collecting a - # write or write concern error. - - description: "insert operations support errorResponse assertions" - runOnRequirements: - - minServerVersion: "4.0.0" - topologies: [ single, replicaset ] - - minServerVersion: "4.2.0" - topologies: [ sharded ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - errorCode: &errorCode 8 # UnknownError - - name: insertOne - object: *collection0 - arguments: - document: { _id: 1 } - expectError: - errorCode: *errorCode - errorResponse: - code: *errorCode diff --git a/testdata/crud/unified/replaceOne-comment.json b/testdata/crud/unified/replaceOne-comment.json deleted file mode 100644 index 4b6f2ae9a0..0000000000 --- a/testdata/crud/unified/replaceOne-comment.json +++ /dev/null @@ -1,230 +0,0 @@ -{ - "description": "replaceOne-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "ReplaceOne with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 22 - }, - "comment": "comment" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "x": 22 - } - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 22 - } - ] - } - ] - }, - { - "description": "ReplaceOne with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 22 - }, - "comment": { - "key": "value" - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "x": 22 - } - } - ], - "comment": { - "key": "value" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 22 - } - ] - } - ] - }, - { - "description": "ReplaceOne with comment - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 22 - }, - "comment": "comment" - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "x": 22 - } - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/replaceOne-comment.yml b/testdata/crud/unified/replaceOne-comment.yml deleted file mode 100644 index 3fe1f0d0fe..0000000000 --- a/testdata/crud/unified/replaceOne-comment.yml +++ /dev/null @@ -1,99 +0,0 @@ -description: "replaceOne-comment" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - -tests: - - description: "ReplaceOne with string comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: replaceOne - object: *collection0 - arguments: - filter: &filter { _id: 1 } - replacement: &replacement { x: 22 } - comment: "comment" - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *replacement - comment: "comment" - outcome: &outcome - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 22 } - - - description: "ReplaceOne with document comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: replaceOne - object: *collection0 - arguments: - filter: *filter - replacement: *replacement - comment: &comment { key: "value" } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *replacement - comment: *comment - outcome: *outcome - - - description: "ReplaceOne with comment - pre 4.4" - runOnRequirements: - - minServerVersion: "3.4.0" - maxServerVersion: "4.2.99" - operations: - - name: replaceOne - object: *collection0 - arguments: - filter: *filter - replacement: *replacement - comment: "comment" - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *replacement - comment: "comment" - outcome: *initialData diff --git a/testdata/crud/unified/replaceOne-dots_and_dollars.json b/testdata/crud/unified/replaceOne-dots_and_dollars.json deleted file mode 100644 index d5003dc5ea..0000000000 --- a/testdata/crud/unified/replaceOne-dots_and_dollars.json +++ /dev/null @@ -1,567 +0,0 @@ -{ - "description": "replaceOne-dots_and_dollars", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - }, - { - "collection": { - "id": "collection1", - "database": "database0", - "collectionName": "coll1", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ], - "tests": [ - { - "description": "Replacing document with top-level dotted key on 3.6+ server", - "runOnRequirements": [ - { - "minServerVersion": "3.6" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a.b": 1 - } - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a.b": 1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a.b": 1 - } - ] - } - ] - }, - { - "description": "Replacing document with top-level dotted key on pre-3.6 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "3.4.99" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a.b": 1 - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a.b": 1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Replacing document with dollar-prefixed key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "$b": 1 - } - } - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a": { - "$b": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "$b": 1 - } - } - ] - } - ] - }, - { - "description": "Replacing document with dollar-prefixed key in embedded doc on pre-5.0 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "4.99" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "$b": 1 - } - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a": { - "$b": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Replacing document with dotted key in embedded doc on 3.6+ server", - "runOnRequirements": [ - { - "minServerVersion": "3.6" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "b.c": 1 - } - } - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a": { - "b.c": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "a": { - "b.c": 1 - } - } - ] - } - ] - }, - { - "description": "Replacing document with dotted key in embedded doc on pre-3.6 server yields server-side error", - "runOnRequirements": [ - { - "maxServerVersion": "3.4.99" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "b.c": 1 - } - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a": { - "b.c": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Unacknowledged write using dollar-prefixed or dotted keys may be silently rejected on pre-5.0 server", - "runOnRequirements": [ - { - "maxServerVersion": "4.99" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection1", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "a": { - "$b": 1 - } - } - }, - "expectResult": { - "acknowledged": { - "$$unsetOrMatches": false - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll1", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "_id": 1, - "a": { - "$b": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "writeConcern": { - "w": 0 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/replaceOne-dots_and_dollars.yml b/testdata/crud/unified/replaceOne-dots_and_dollars.yml deleted file mode 100644 index b834e22205..0000000000 --- a/testdata/crud/unified/replaceOne-dots_and_dollars.yml +++ /dev/null @@ -1,180 +0,0 @@ -description: "replaceOne-dots_and_dollars" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - - collection: - id: &collection1 collection1 - database: *database0 - collectionName: &collection1Name coll1 - collectionOptions: - writeConcern: { w: 0 } - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - -tests: - - description: "Replacing document with top-level dotted key on 3.6+ server" - runOnRequirements: - - minServerVersion: "3.6" - operations: - - name: replaceOne - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: &dottedKey { _id: 1, a.b: 1 } - expectResult: &replaceResult - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectEvents: &expectEventsDottedKey - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dottedKey - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKey - - - description: "Replacing document with top-level dotted key on pre-3.6 server yields server-side error" - runOnRequirements: - - maxServerVersion: "3.4.99" - operations: - - name: replaceOne - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: *dottedKey - expectError: - isClientError: false - expectEvents: *expectEventsDottedKey - outcome: *initialData - - - description: "Replacing document with dollar-prefixed key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: replaceOne - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: &dollarPrefixedKeyInEmbedded { _id: 1, a: { $b: 1 } } - expectResult: *replaceResult - expectEvents: &expectEventsDollarPrefixedKeyInEmbedded - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dollarPrefixedKeyInEmbedded - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dollarPrefixedKeyInEmbedded - - - description: "Replacing document with dollar-prefixed key in embedded doc on pre-5.0 server yields server-side error" - runOnRequirements: - - maxServerVersion: "4.99" - operations: - - name: replaceOne - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: *dollarPrefixedKeyInEmbedded - expectError: - isClientError: false - expectEvents: *expectEventsDollarPrefixedKeyInEmbedded - outcome: *initialData - - - description: "Replacing document with dotted key in embedded doc on 3.6+ server" - runOnRequirements: - - minServerVersion: "3.6" - operations: - - name: replaceOne - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: &dottedKeyInEmbedded { _id: 1, a: { b.c: 1 } } - expectResult: *replaceResult - expectEvents: &expectEventsDottedKeyInEmbedded - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dottedKeyInEmbedded - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - *dottedKeyInEmbedded - - - description: "Replacing document with dotted key in embedded doc on pre-3.6 server yields server-side error" - runOnRequirements: - - maxServerVersion: "3.4.99" - operations: - - name: replaceOne - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: *dottedKeyInEmbedded - expectError: - isClientError: false - expectEvents: *expectEventsDottedKeyInEmbedded - outcome: *initialData - - - description: "Unacknowledged write using dollar-prefixed or dotted keys may be silently rejected on pre-5.0 server" - runOnRequirements: - - maxServerVersion: "4.99" - operations: - - name: replaceOne - object: *collection1 - arguments: - filter: { _id: 1 } - replacement: *dollarPrefixedKeyInEmbedded - expectResult: - acknowledged: { $$unsetOrMatches: false } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection1Name - updates: - - q: { _id: 1 } - u: *dollarPrefixedKeyInEmbedded - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - writeConcern: { w: 0 } - outcome: *initialData diff --git a/testdata/crud/unified/replaceOne-hint.json b/testdata/crud/unified/replaceOne-hint.json deleted file mode 100644 index 6926e9d8df..0000000000 --- a/testdata/crud/unified/replaceOne-hint.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "description": "replaceOne-hint", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_replaceone_hint" - } - } - ], - "initialData": [ - { - "collectionName": "test_replaceone_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "ReplaceOne with hint string", - "operations": [ - { - "object": "collection0", - "name": "replaceOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "replacement": { - "x": 111 - }, - "hint": "_id_" - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_replaceone_hint", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "x": 111 - }, - "hint": "_id_", - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_replaceone_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 111 - } - ] - } - ] - }, - { - "description": "ReplaceOne with hint document", - "operations": [ - { - "object": "collection0", - "name": "replaceOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "replacement": { - "x": 111 - }, - "hint": { - "_id": 1 - } - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_replaceone_hint", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "x": 111 - }, - "hint": { - "_id": 1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_replaceone_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 111 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/replaceOne-hint.yml b/testdata/crud/unified/replaceOne-hint.yml deleted file mode 100644 index 8a28be9825..0000000000 --- a/testdata/crud/unified/replaceOne-hint.yml +++ /dev/null @@ -1,108 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: replaceOne-hint -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.2.0 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_replaceone_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'ReplaceOne with hint string' - operations: - - - object: *collection0 - name: replaceOne - arguments: - filter: &filter - _id: - $gt: 1 - replacement: &replacement - x: 111 - hint: _id_ - expectResult: &result - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *filter - u: *replacement - hint: _id_ - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 111 - - - description: 'ReplaceOne with hint document' - operations: - - - object: *collection0 - name: replaceOne - arguments: - filter: *filter - replacement: *replacement - hint: - _id: 1 - expectResult: *result - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *filter - u: *replacement - hint: - _id: 1 - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: *outcome diff --git a/testdata/crud/unified/replaceOne-let.json b/testdata/crud/unified/replaceOne-let.json deleted file mode 100644 index e7a7ee65a5..0000000000 --- a/testdata/crud/unified/replaceOne-let.json +++ /dev/null @@ -1,219 +0,0 @@ -{ - "description": "replaceOne-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "ReplaceOne with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "replacement": { - "x": "foo" - }, - "let": { - "id": 1 - } - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "u": { - "x": "foo" - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": "foo" - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "ReplaceOne with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "replacement": { - "x": "foo" - }, - "let": { - "id": 1 - } - }, - "expectError": { - "errorContains": "'update.let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "u": { - "x": "foo" - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "let": { - "id": 1 - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/replaceOne-let.yml b/testdata/crud/unified/replaceOne-let.yml deleted file mode 100644 index fda5bb6744..0000000000 --- a/testdata/crud/unified/replaceOne-let.yml +++ /dev/null @@ -1,98 +0,0 @@ -description: "replaceOne-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "ReplaceOne with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: replaceOne - object: *collection0 - arguments: - filter: &filter - $expr: - $eq: [ "$_id", "$$id" ] - replacement: &replacement - x: "foo" - let: &let - id: 1 - expectResult: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *replacement - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - let: *let - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: "foo" } - - { _id: 2 } - - - description: "ReplaceOne with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "3.6.0" - maxServerVersion: "4.4.99" - operations: - - name: replaceOne - object: *collection0 - arguments: - filter: *filter - replacement: *replacement - let: *let - expectError: - errorContains: "'update.let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *replacement - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - let: *let - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } diff --git a/testdata/crud/unified/replaceOne-sort.json b/testdata/crud/unified/replaceOne-sort.json deleted file mode 100644 index cf2271dda5..0000000000 --- a/testdata/crud/unified/replaceOne-sort.json +++ /dev/null @@ -1,232 +0,0 @@ -{ - "description": "replaceOne-sort", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "ReplaceOne with sort option", - "runOnRequirements": [ - { - "minServerVersion": "8.0" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "sort": { - "_id": -1 - }, - "replacement": { - "x": 1 - } - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "x": 1 - }, - "sort": { - "_id": -1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 1 - }, - "commandName": "update" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 1 - } - ] - } - ] - }, - { - "description": "replaceOne with sort option unsupported (server-side error)", - "runOnRequirements": [ - { - "maxServerVersion": "7.99" - } - ], - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "sort": { - "_id": -1 - }, - "replacement": { - "x": 1 - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "x": 1 - }, - "sort": { - "_id": -1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/replaceOne-sort.yml b/testdata/crud/unified/replaceOne-sort.yml deleted file mode 100644 index 3395b795e8..0000000000 --- a/testdata/crud/unified/replaceOne-sort.yml +++ /dev/null @@ -1,94 +0,0 @@ -description: replaceOne-sort - -schemaVersion: "1.0" - -createEntities: - - client: - id: client0 - observeEvents: [ commandStartedEvent, commandSucceededEvent ] - - database: - id: database0 - client: client0 - databaseName: crud-tests - - collection: - id: collection0 - database: database0 - collectionName: coll0 - -initialData: - - collectionName: coll0 - databaseName: crud-tests - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: ReplaceOne with sort option - runOnRequirements: - - minServerVersion: "8.0" - operations: - - name: replaceOne - object: collection0 - arguments: - filter: { _id: { $gt: 1 } } - sort: { _id: -1 } - replacement: { x: 1 } - expectResult: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - update: coll0 - updates: - - q: { _id: { $gt: 1 } } - u: { x: 1 } - sort: { _id: -1 } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - commandSucceededEvent: - reply: { ok: 1, n: 1 } - commandName: update - outcome: - - collectionName: coll0 - databaseName: crud-tests - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 1 } - - - description: replaceOne with sort option unsupported (server-side error) - runOnRequirements: - - maxServerVersion: "7.99" - operations: - - name: replaceOne - object: collection0 - arguments: - filter: { _id: { $gt: 1 } } - sort: { _id: -1 } - replacement: { x: 1 } - expectError: - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - update: coll0 - updates: - - q: { _id: { $gt: 1 } } - u: { x: 1 } - sort: { _id: -1 } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: coll0 - databaseName: crud-tests - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } diff --git a/testdata/crud/unified/replaceOne-validation.json b/testdata/crud/unified/replaceOne-validation.json deleted file mode 100644 index 6f5b173e02..0000000000 --- a/testdata/crud/unified/replaceOne-validation.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "description": "replaceOne-validation", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "ReplaceOne prohibits atomic modifiers", - "operations": [ - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "$set": { - "x": 22 - } - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/replaceOne-validation.yml b/testdata/crud/unified/replaceOne-validation.yml deleted file mode 100644 index db5a2a6666..0000000000 --- a/testdata/crud/unified/replaceOne-validation.yml +++ /dev/null @@ -1,37 +0,0 @@ -description: "replaceOne-validation" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - -tests: - - description: "ReplaceOne prohibits atomic modifiers" - operations: - - name: replaceOne - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: { $set: { x: 22 } } - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] - outcome: *initialData diff --git a/testdata/crud/unified/unacknowledged-bulkWrite-delete-hint-clientError.json b/testdata/crud/unified/unacknowledged-bulkWrite-delete-hint-clientError.json deleted file mode 100644 index dbaa2e84f4..0000000000 --- a/testdata/crud/unified/unacknowledged-bulkWrite-delete-hint-clientError.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "description": "unacknowledged-bulkWrite-delete-hint-clientError", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "BulkWrite_delete_hint", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "BulkWrite_delete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "tests": [ - { - "description": "Unacknowledged bulkWrite deleteOne with hints fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteOne": { - "filter": { - "_id": 1 - }, - "hint": "_id_" - } - }, - { - "deleteOne": { - "filter": { - "_id": 2 - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "BulkWrite_delete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "Unacknowledged bulkWrite deleteMany with hints fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteMany": { - "filter": { - "_id": { - "$lt": 3 - } - }, - "hint": "_id_" - } - }, - { - "deleteMany": { - "filter": { - "_id": { - "$gte": 4 - } - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "BulkWrite_delete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/unacknowledged-bulkWrite-delete-hint-clientError.yml b/testdata/crud/unified/unacknowledged-bulkWrite-delete-hint-clientError.yml deleted file mode 100644 index 3aaa182436..0000000000 --- a/testdata/crud/unified/unacknowledged-bulkWrite-delete-hint-clientError.yml +++ /dev/null @@ -1,112 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: unacknowledged-bulkWrite-delete-hint-clientError -schemaVersion: '1.0' -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name BulkWrite_delete_hint - collectionOptions: - writeConcern: { w: 0 } -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 -tests: - - - description: 'Unacknowledged bulkWrite deleteOne with hints fails with client-side error' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - deleteOne: - filter: &deleteOne_filter1 - _id: 1 - hint: &hint_string _id_ - - - deleteOne: - filter: &deleteOne_filter2 - _id: 2 - hint: &hint_doc - _id: 1 - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 - - - description: 'Unacknowledged bulkWrite deleteMany with hints fails with client-side error' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - deleteMany: - filter: &deleteMany_filter1 - _id: - $lt: 3 - hint: *hint_string - - - deleteMany: - filter: &deleteMany_filter2 - _id: - $gte: 4 - hint: *hint_doc - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/unacknowledged-bulkWrite-update-hint-clientError.json b/testdata/crud/unified/unacknowledged-bulkWrite-update-hint-clientError.json deleted file mode 100644 index 858967b90c..0000000000 --- a/testdata/crud/unified/unacknowledged-bulkWrite-update-hint-clientError.json +++ /dev/null @@ -1,284 +0,0 @@ -{ - "description": "unacknowledged-bulkWrite-update-hint-clientError", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "Bulkwrite_update_hint", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "Bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "tests": [ - { - "description": "Unacknowledged bulkWrite updateOne with hints fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - } - }, - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "Bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "Unacknowledged bulkWrite updateMany with hints fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": { - "_id": { - "$lt": 3 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - } - }, - { - "updateMany": { - "filter": { - "_id": { - "$lt": 3 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "Bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "Unacknowledged bulkWrite replaceOne with hints fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "replaceOne": { - "filter": { - "_id": 3 - }, - "replacement": { - "x": 333 - }, - "hint": "_id_" - } - }, - { - "replaceOne": { - "filter": { - "_id": 4 - }, - "replacement": { - "x": 444 - }, - "hint": { - "_id": 1 - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "Bulkwrite_update_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/unacknowledged-bulkWrite-update-hint-clientError.yml b/testdata/crud/unified/unacknowledged-bulkWrite-update-hint-clientError.yml deleted file mode 100644 index 95620f097a..0000000000 --- a/testdata/crud/unified/unacknowledged-bulkWrite-update-hint-clientError.yml +++ /dev/null @@ -1,147 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: unacknowledged-bulkWrite-update-hint-clientError -schemaVersion: '1.0' -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name Bulkwrite_update_hint - collectionOptions: - writeConcern: { w: 0 } -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 -tests: - - - description: 'Unacknowledged bulkWrite updateOne with hints fails with client-side error' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateOne: - filter: &updateOne_filter - _id: 1 - update: &updateOne_update - $inc: - x: 1 - hint: &hint_string _id_ - - - updateOne: - filter: *updateOne_filter - update: *updateOne_update - hint: &hint_doc - _id: 1 - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - _id: 4 - x: 44 - - - description: 'Unacknowledged bulkWrite updateMany with hints fails with client-side error' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateMany: - filter: &updateMany_filter - _id: - $lt: 3 - update: &updateMany_update - $inc: - x: 1 - hint: *hint_string - - - updateMany: - filter: *updateMany_filter - update: *updateMany_update - hint: *hint_doc - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome - - - description: 'Unacknowledged bulkWrite replaceOne with hints fails with client-side error' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - replaceOne: - filter: - _id: 3 - replacement: - x: 333 - hint: *hint_string - - - replaceOne: - filter: - _id: 4 - replacement: - x: 444 - hint: *hint_doc - ordered: true - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/unacknowledged-deleteMany-hint-clientError.json b/testdata/crud/unified/unacknowledged-deleteMany-hint-clientError.json deleted file mode 100644 index c5d9f6af36..0000000000 --- a/testdata/crud/unified/unacknowledged-deleteMany-hint-clientError.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "description": "unacknowledged-deleteMany-hint-clientError", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "DeleteMany_hint", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "DeleteMany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "Unacknowledged deleteMany with hint string fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "deleteMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "DeleteMany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "Unacknowledged deleteMany with hint document fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "deleteMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "DeleteMany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/unacknowledged-deleteMany-hint-clientError.yml b/testdata/crud/unified/unacknowledged-deleteMany-hint-clientError.yml deleted file mode 100644 index 7acbbc7ca8..0000000000 --- a/testdata/crud/unified/unacknowledged-deleteMany-hint-clientError.yml +++ /dev/null @@ -1,86 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: unacknowledged-deleteMany-hint-clientError -schemaVersion: '1.0' -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name DeleteMany_hint - collectionOptions: - writeConcern: { w: 0 } -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 -tests: - - - description: 'Unacknowledged deleteMany with hint string fails with client-side error' - operations: - - - object: *collection0 - name: deleteMany - arguments: - filter: &filter - _id: - $gt: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - description: 'Unacknowledged deleteMany with hint document fails with client-side error' - operations: - - - object: *collection0 - name: deleteMany - arguments: - filter: *filter - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/unacknowledged-deleteOne-hint-clientError.json b/testdata/crud/unified/unacknowledged-deleteOne-hint-clientError.json deleted file mode 100644 index 177ad889bb..0000000000 --- a/testdata/crud/unified/unacknowledged-deleteOne-hint-clientError.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "description": "unacknowledged-deleteOne-hint-clientError", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "DeleteOne_hint", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "DeleteOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "Unacknowledged deleteOne with hint string fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "DeleteOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "Unacknowledged deleteOne with hint document fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "DeleteOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/unacknowledged-deleteOne-hint-clientError.yml b/testdata/crud/unified/unacknowledged-deleteOne-hint-clientError.yml deleted file mode 100644 index 996dad6cac..0000000000 --- a/testdata/crud/unified/unacknowledged-deleteOne-hint-clientError.yml +++ /dev/null @@ -1,79 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: unacknowledged-deleteOne-hint-clientError -schemaVersion: '1.0' -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name DeleteOne_hint - collectionOptions: - writeConcern: { w: 0 } -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'Unacknowledged deleteOne with hint string fails with client-side error' - operations: - - - object: *collection0 - name: deleteOne - arguments: - filter: &filter - _id: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'Unacknowledged deleteOne with hint document fails with client-side error' - operations: - - - object: *collection0 - name: deleteOne - arguments: - filter: *filter - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/unacknowledged-findOneAndDelete-hint-clientError.json b/testdata/crud/unified/unacknowledged-findOneAndDelete-hint-clientError.json deleted file mode 100644 index 6ee59cdf64..0000000000 --- a/testdata/crud/unified/unacknowledged-findOneAndDelete-hint-clientError.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "description": "unacknowledged-findOneAndDelete-hint-clientError", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "findOneAndDelete_hint", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "findOneAndDelete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "Unacknowledged findOneAndDelete with hint string fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "findOneAndDelete", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "findOneAndDelete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "Unacknowledged findOneAndDelete with hint document fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "findOneAndDelete", - "arguments": { - "filter": { - "_id": 1 - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "findOneAndDelete_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/unacknowledged-findOneAndDelete-hint-clientError.yml b/testdata/crud/unified/unacknowledged-findOneAndDelete-hint-clientError.yml deleted file mode 100644 index 7a619d30a0..0000000000 --- a/testdata/crud/unified/unacknowledged-findOneAndDelete-hint-clientError.yml +++ /dev/null @@ -1,90 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: unacknowledged-findOneAndDelete-hint-clientError -schemaVersion: '1.0' -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name findOneAndDelete_hint - collectionOptions: - writeConcern: { w: 0 } -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'Unacknowledged findOneAndDelete with hint string fails with client-side error' - operations: - - - object: *collection0 - name: findOneAndDelete - arguments: - filter: &filter - _id: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'Unacknowledged findOneAndDelete with hint document fails with client-side error' - operations: - - - object: *collection0 - name: findOneAndDelete - arguments: - filter: &filter - _id: 1 - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 diff --git a/testdata/crud/unified/unacknowledged-findOneAndReplace-hint-clientError.json b/testdata/crud/unified/unacknowledged-findOneAndReplace-hint-clientError.json deleted file mode 100644 index 15ca773228..0000000000 --- a/testdata/crud/unified/unacknowledged-findOneAndReplace-hint-clientError.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "description": "unacknowledged-findOneAndReplace-hint-clientError", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "FindOneAndReplace_hint", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "FindOneAndReplace_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "Unacknowledged findOneAndReplace with hint string fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 33 - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "FindOneAndReplace_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "Unacknowledged findOneAndReplace with hint document fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 33 - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "FindOneAndReplace_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/unacknowledged-findOneAndReplace-hint-clientError.yml b/testdata/crud/unified/unacknowledged-findOneAndReplace-hint-clientError.yml deleted file mode 100644 index cbd12dac98..0000000000 --- a/testdata/crud/unified/unacknowledged-findOneAndReplace-hint-clientError.yml +++ /dev/null @@ -1,82 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: unacknowledged-findOneAndReplace-hint-clientError -schemaVersion: '1.0' -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name FindOneAndReplace_hint - collectionOptions: - writeConcern: { w: 0 } -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'Unacknowledged findOneAndReplace with hint string fails with client-side error' - operations: - - - object: *collection0 - name: findOneAndReplace - arguments: - filter: &filter - _id: 1 - replacement: &replacement - x: 33 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'Unacknowledged findOneAndReplace with hint document fails with client-side error' - operations: - - - object: *collection0 - name: findOneAndReplace - arguments: - filter: *filter - replacement: *replacement - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/unacknowledged-findOneAndUpdate-hint-clientError.json b/testdata/crud/unified/unacknowledged-findOneAndUpdate-hint-clientError.json deleted file mode 100644 index e18767f8b2..0000000000 --- a/testdata/crud/unified/unacknowledged-findOneAndUpdate-hint-clientError.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "description": "unacknowledged-findOneAndUpdate-hint-clientError", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "FindOneAndUpdate_hint", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "FindOneAndUpdate_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "Unacknowledged findOneAndUpdate with hint string fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "FindOneAndUpdate_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "Unacknowledged findOneAndUpdate with hint document fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "FindOneAndUpdate_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/unacknowledged-findOneAndUpdate-hint-clientError.yml b/testdata/crud/unified/unacknowledged-findOneAndUpdate-hint-clientError.yml deleted file mode 100644 index b9cd0229cb..0000000000 --- a/testdata/crud/unified/unacknowledged-findOneAndUpdate-hint-clientError.yml +++ /dev/null @@ -1,83 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: unacknowledged-findOneAndUpdate-hint-clientError -schemaVersion: '1.0' -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name FindOneAndUpdate_hint - collectionOptions: - writeConcern: { w: 0 } -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'Unacknowledged findOneAndUpdate with hint string fails with client-side error' - operations: - - - object: *collection0 - name: findOneAndUpdate - arguments: - filter: &filter - _id: 1 - update: &update - $inc: - x: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'Unacknowledged findOneAndUpdate with hint document fails with client-side error' - operations: - - - object: *collection0 - name: findOneAndUpdate - arguments: - filter: *filter - update: *update - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/unacknowledged-replaceOne-hint-clientError.json b/testdata/crud/unified/unacknowledged-replaceOne-hint-clientError.json deleted file mode 100644 index 52ec59d0c0..0000000000 --- a/testdata/crud/unified/unacknowledged-replaceOne-hint-clientError.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "description": "unacknowledged-replaceOne-hint-clientError", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "ReplaceOne_hint", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "ReplaceOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "Unacknowledged ReplaceOne with hint string fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "replaceOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "replacement": { - "x": 111 - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "ReplaceOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "Unacknowledged ReplaceOne with hint document fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "replaceOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "replacement": { - "x": 111 - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "ReplaceOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/unacknowledged-replaceOne-hint-clientError.yml b/testdata/crud/unified/unacknowledged-replaceOne-hint-clientError.yml deleted file mode 100644 index 710cd424b1..0000000000 --- a/testdata/crud/unified/unacknowledged-replaceOne-hint-clientError.yml +++ /dev/null @@ -1,83 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: unacknowledged-replaceOne-hint-clientError -schemaVersion: '1.0' -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name ReplaceOne_hint - collectionOptions: - writeConcern: { w: 0 } -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'Unacknowledged ReplaceOne with hint string fails with client-side error' - operations: - - - object: *collection0 - name: replaceOne - arguments: - filter: &filter - _id: - $gt: 1 - replacement: &replacement - x: 111 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'Unacknowledged ReplaceOne with hint document fails with client-side error' - operations: - - - object: *collection0 - name: replaceOne - arguments: - filter: *filter - replacement: *replacement - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/unacknowledged-updateMany-hint-clientError.json b/testdata/crud/unified/unacknowledged-updateMany-hint-clientError.json deleted file mode 100644 index 6199dfa2be..0000000000 --- a/testdata/crud/unified/unacknowledged-updateMany-hint-clientError.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "description": "unacknowledged-updateMany-hint-clientError", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "Updatemany_hint", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "Updatemany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "Unacknowledged updateMany with hint string fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "updateMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "Updatemany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "Unacknowledged updateMany with hint document fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "updateMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "Updatemany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/unacknowledged-updateMany-hint-clientError.yml b/testdata/crud/unified/unacknowledged-updateMany-hint-clientError.yml deleted file mode 100644 index 1594c7cd44..0000000000 --- a/testdata/crud/unified/unacknowledged-updateMany-hint-clientError.yml +++ /dev/null @@ -1,90 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: unacknowledged-updateMany-hint-clientError -schemaVersion: '1.0' -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name Updatemany_hint - collectionOptions: - writeConcern: { w: 0 } -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 -tests: - - - description: 'Unacknowledged updateMany with hint string fails with client-side error' - operations: - - - object: *collection0 - name: updateMany - arguments: - filter: &filter - _id: - $gt: 1 - update: &update - $inc: - x: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - description: 'Unacknowledged updateMany with hint document fails with client-side error' - operations: - - - object: *collection0 - name: updateMany - arguments: - filter: *filter - update: *update - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/unacknowledged-updateOne-hint-clientError.json b/testdata/crud/unified/unacknowledged-updateOne-hint-clientError.json deleted file mode 100644 index 3828a9e8df..0000000000 --- a/testdata/crud/unified/unacknowledged-updateOne-hint-clientError.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "unacknowledged-updateOne-hint-clientError", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "UpdateOne_hint", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - } - } - } - ], - "initialData": [ - { - "collectionName": "UpdateOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "Unacknowledged updateOne with hint string fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "updateOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "UpdateOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "Unacknowledged updateOne with hint document fails with client-side error", - "operations": [ - { - "object": "collection0", - "name": "updateOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "UpdateOne_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/unacknowledged-updateOne-hint-clientError.yml b/testdata/crud/unified/unacknowledged-updateOne-hint-clientError.yml deleted file mode 100644 index 49126ea006..0000000000 --- a/testdata/crud/unified/unacknowledged-updateOne-hint-clientError.yml +++ /dev/null @@ -1,84 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: unacknowledged-updateOne-hint-clientError -schemaVersion: '1.0' -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name UpdateOne_hint - collectionOptions: - writeConcern: { w: 0 } -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'Unacknowledged updateOne with hint string fails with client-side error' - operations: - - - object: *collection0 - name: updateOne - arguments: - filter: &filter - _id: - $gt: 1 - update: &update - $inc: - x: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'Unacknowledged updateOne with hint document fails with client-side error' - operations: - - - object: *collection0 - name: updateOne - arguments: - filter: *filter - update: *update - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/updateMany-comment.json b/testdata/crud/unified/updateMany-comment.json deleted file mode 100644 index 88b8b67f5a..0000000000 --- a/testdata/crud/unified/updateMany-comment.json +++ /dev/null @@ -1,254 +0,0 @@ -{ - "description": "updateMany-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "UpdateMany with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 22 - } - }, - "comment": "comment" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$set": { - "x": 22 - } - }, - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 22 - } - ] - } - ] - }, - { - "description": "UpdateMany with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 22 - } - }, - "comment": { - "key": "value" - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$set": { - "x": 22 - } - }, - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "comment": { - "key": "value" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 22 - } - ] - } - ] - }, - { - "description": "UpdateMany with comment - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 22 - } - }, - "comment": "comment" - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$set": { - "x": 22 - } - }, - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateMany-comment.yml b/testdata/crud/unified/updateMany-comment.yml deleted file mode 100644 index 4c6fbacd77..0000000000 --- a/testdata/crud/unified/updateMany-comment.yml +++ /dev/null @@ -1,104 +0,0 @@ -description: "updateMany-comment" -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - -tests: - - description: "UpdateMany with string comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: updateMany - object: *collection0 - arguments: - filter: &filter { _id: 1 } - update: &update { $set: {x: 22} } - comment: "comment" - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *update - multi: true - upsert: { $$unsetOrMatches: false } - comment: "comment" - outcome: &outcome - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 22 } - - - description: "UpdateMany with document comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: updateMany - object: *collection0 - arguments: - filter: *filter - update: *update - comment: &comment { key: "value" } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *update - multi: true - upsert: { $$unsetOrMatches: false } - comment: *comment - outcome: *outcome - - - description: "UpdateMany with comment - pre 4.4" - runOnRequirements: - - minServerVersion: "3.4.0" - maxServerVersion: "4.2.99" - operations: - - name: updateMany - object: *collection0 - arguments: - filter: *filter - update: *update - comment: "comment" - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *update - multi: true - upsert: { $$unsetOrMatches: false } - comment: "comment" - outcome: *initialData diff --git a/testdata/crud/unified/updateMany-dots_and_dollars.json b/testdata/crud/unified/updateMany-dots_and_dollars.json deleted file mode 100644 index 5d3b9d0453..0000000000 --- a/testdata/crud/unified/updateMany-dots_and_dollars.json +++ /dev/null @@ -1,404 +0,0 @@ -{ - "description": "updateMany-dots_and_dollars", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {} - } - ] - } - ], - "tests": [ - { - "description": "Updating document to set top-level dollar-prefixed key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ] - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {}, - "$a": 1 - } - ] - } - ] - }, - { - "description": "Updating document to set top-level dotted key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ] - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {}, - "a.b": 1 - } - ] - } - ] - }, - { - "description": "Updating document to set dollar-prefixed key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ] - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": { - "$a": 1 - } - } - ] - } - ] - }, - { - "description": "Updating document to set dotted key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ] - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": { - "a.b": 1 - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateMany-dots_and_dollars.yml b/testdata/crud/unified/updateMany-dots_and_dollars.yml deleted file mode 100644 index 6c9da82a5a..0000000000 --- a/testdata/crud/unified/updateMany-dots_and_dollars.yml +++ /dev/null @@ -1,138 +0,0 @@ -description: "updateMany-dots_and_dollars" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {} } - -tests: - - description: "Updating document to set top-level dollar-prefixed key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: updateMany - object: *collection0 - arguments: - filter: { _id: 1 } - update: &dollarPrefixedKey - - { $replaceWith: { $setField: { field: { $literal: $a }, value: 1, input: $$ROOT } } } - expectResult: &updateResult - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dollarPrefixedKey - multi: true - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {}, $a: 1 } - - - description: "Updating document to set top-level dotted key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: updateMany - object: *collection0 - arguments: - filter: { _id: 1 } - update: &dottedKey - - { $replaceWith: { $setField: { field: { $literal: a.b }, value: 1, input: $$ROOT } } } - expectResult: *updateResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dottedKey - multi: true - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {}, a.b: 1 } - - - description: "Updating document to set dollar-prefixed key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: updateMany - object: *collection0 - arguments: - filter: { _id: 1 } - update: &dollarPrefixedKeyInEmbedded - - { $set: { foo: { $setField: { field: { $literal: $a }, value: 1, input: $foo } } } } - expectResult: *updateResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dollarPrefixedKeyInEmbedded - multi: true - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: { $a: 1 } } - - - description: "Updating document to set dotted key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: updateMany - object: *collection0 - arguments: - filter: { _id: 1 } - update: &dottedKeyInEmbedded - - { $set: { foo: { $setField: { field: { $literal: a.b }, value: 1, input: $foo } } } } - expectResult: *updateResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dottedKeyInEmbedded - multi: true - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: { a.b: 1 } } diff --git a/testdata/crud/unified/updateMany-hint-clientError.json b/testdata/crud/unified/updateMany-hint-clientError.json deleted file mode 100644 index 5da878e293..0000000000 --- a/testdata/crud/unified/updateMany-hint-clientError.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "description": "updateMany-hint-clientError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "maxServerVersion": "3.3.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_updatemany_hint" - } - } - ], - "initialData": [ - { - "collectionName": "test_updatemany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "UpdateMany with hint string unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "updateMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "test_updatemany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "UpdateMany with hint document unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "updateMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "test_updatemany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateMany-hint-clientError.yml b/testdata/crud/unified/updateMany-hint-clientError.yml deleted file mode 100644 index 9734078ce3..0000000000 --- a/testdata/crud/unified/updateMany-hint-clientError.yml +++ /dev/null @@ -1,91 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: updateMany-hint-clientError -schemaVersion: '1.0' -runOnRequirements: - - - maxServerVersion: 3.3.99 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_updatemany_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 -tests: - - - description: 'UpdateMany with hint string unsupported (client-side error)' - operations: - - - object: *collection0 - name: updateMany - arguments: - filter: &filter - _id: - $gt: 1 - update: &update - $inc: - x: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - description: 'UpdateMany with hint document unsupported (client-side error)' - operations: - - - object: *collection0 - name: updateMany - arguments: - filter: *filter - update: *update - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/updateMany-hint-serverError.json b/testdata/crud/unified/updateMany-hint-serverError.json deleted file mode 100644 index c81f36b13c..0000000000 --- a/testdata/crud/unified/updateMany-hint-serverError.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "description": "updateMany-hint-serverError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.1.9" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_updatemany_hint" - } - } - ], - "initialData": [ - { - "collectionName": "test_updatemany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "UpdateMany with hint string unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "updateMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_updatemany_hint", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "hint": "_id_", - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_updatemany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "UpdateMany with hint document unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "updateMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_updatemany_hint", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "hint": { - "_id": 1 - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_updatemany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateMany-hint-serverError.yml b/testdata/crud/unified/updateMany-hint-serverError.yml deleted file mode 100644 index 03b803bdde..0000000000 --- a/testdata/crud/unified/updateMany-hint-serverError.yml +++ /dev/null @@ -1,115 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: updateMany-hint-serverError -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 3.4.0 - maxServerVersion: 4.1.9 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_updatemany_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 -tests: - - - description: 'UpdateMany with hint string unsupported (server-side error)' - operations: - - - object: *collection0 - name: updateMany - arguments: - filter: &filter - _id: - $gt: 1 - update: &update - $inc: - x: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *filter - u: *update - multi: true - hint: _id_ - upsert: { $$unsetOrMatches: false } - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 - - - description: 'UpdateMany with hint document unsupported (server-side error)' - operations: - - - object: *collection0 - name: updateMany - arguments: - filter: *filter - update: *update - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *filter - u: *update - multi: true - hint: - _id: 1 - upsert: { $$unsetOrMatches: false } - outcome: *outcome diff --git a/testdata/crud/unified/updateMany-hint.json b/testdata/crud/unified/updateMany-hint.json deleted file mode 100644 index 929be52994..0000000000 --- a/testdata/crud/unified/updateMany-hint.json +++ /dev/null @@ -1,219 +0,0 @@ -{ - "description": "updateMany-hint", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_updatemany_hint" - } - } - ], - "initialData": [ - { - "collectionName": "test_updatemany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "UpdateMany with hint string", - "operations": [ - { - "object": "collection0", - "name": "updateMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - }, - "expectResult": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_updatemany_hint", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "hint": "_id_", - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_updatemany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 34 - } - ] - } - ] - }, - { - "description": "UpdateMany with hint document", - "operations": [ - { - "object": "collection0", - "name": "updateMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectResult": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_updatemany_hint", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "hint": { - "_id": 1 - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_updatemany_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 34 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateMany-hint.yml b/testdata/crud/unified/updateMany-hint.yml deleted file mode 100644 index 8b6c228f4d..0000000000 --- a/testdata/crud/unified/updateMany-hint.yml +++ /dev/null @@ -1,115 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: updateMany-hint -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.2.0 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_updatemany_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - _id: 3 - x: 33 -tests: - - - description: 'UpdateMany with hint string' - operations: - - - object: *collection0 - name: updateMany - arguments: - filter: &filter - _id: - $gt: 1 - update: &update - $inc: - x: 1 - hint: _id_ - expectResult: &result - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *filter - u: *update - multi: true - hint: _id_ - upsert: { $$unsetOrMatches: false } - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 23 - - - _id: 3 - x: 34 - - - description: 'UpdateMany with hint document' - operations: - - - object: *collection0 - name: updateMany - arguments: - filter: *filter - update: *update - hint: - _id: 1 - expectResult: *result - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *filter - u: *update - multi: true - hint: - _id: 1 - upsert: { $$unsetOrMatches: false } - outcome: *outcome diff --git a/testdata/crud/unified/updateMany-let.json b/testdata/crud/unified/updateMany-let.json deleted file mode 100644 index cff3bd4c79..0000000000 --- a/testdata/crud/unified/updateMany-let.json +++ /dev/null @@ -1,249 +0,0 @@ -{ - "description": "updateMany-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2, - "name": "name" - }, - { - "_id": 3, - "name": "name" - } - ] - } - ], - "tests": [ - { - "description": "updateMany with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$name", - "$$name" - ] - } - }, - "update": [ - { - "$set": { - "x": "$$x", - "y": "$$y" - } - } - ], - "let": { - "name": "name", - "x": "foo", - "y": { - "$literal": "bar" - } - } - }, - "expectResult": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "$expr": { - "$eq": [ - "$name", - "$$name" - ] - } - }, - "u": [ - { - "$set": { - "x": "$$x", - "y": "$$y" - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "let": { - "name": "name", - "x": "foo", - "y": { - "$literal": "bar" - } - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2, - "name": "name", - "x": "foo", - "y": "bar" - }, - { - "_id": 3, - "name": "name", - "x": "foo", - "y": "bar" - } - ] - } - ] - }, - { - "description": "updateMany with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "x": "$$x" - } - } - ], - "let": { - "x": "foo" - } - }, - "expectError": { - "errorContains": "'update.let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$set": { - "x": "$$x" - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "let": { - "x": "foo" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2, - "name": "name" - }, - { - "_id": 3, - "name": "name" - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateMany-let.yml b/testdata/crud/unified/updateMany-let.yml deleted file mode 100644 index 402000967b..0000000000 --- a/testdata/crud/unified/updateMany-let.yml +++ /dev/null @@ -1,107 +0,0 @@ -description: "updateMany-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2, name: "name" } - - { _id: 3, name: "name" } - - -tests: - - description: "updateMany with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: updateMany - object: *collection0 - arguments: - filter: &filter - $expr: - $eq: [ "$name", "$$name" ] - update: &update - - $set: {x: "$$x", y: "$$y" } - let: &let0 - name: name - x: foo - y: { $literal: "bar" } - expectResult: - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *update - multi: true - upsert: { $$unsetOrMatches: false } - let: *let0 - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2, name: "name", x: "foo", y: "bar" } - - { _id: 3, name: "name", x: "foo", y: "bar" } - - - description: "updateMany with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "4.2.0" - maxServerVersion: "4.4.99" - operations: - - name: updateMany - object: *collection0 - arguments: - filter: &filter1 - _id: 1 - update: &update1 - - $set: {x: "$$x"} - let: &let1 - x: foo - expectError: - errorContains: "'update.let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter1 - u: *update1 - multi: true - upsert: { $$unsetOrMatches: false } - let: *let1 - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2, name: "name" } - - { _id: 3, name: "name" } diff --git a/testdata/crud/unified/updateMany-validation.json b/testdata/crud/unified/updateMany-validation.json deleted file mode 100644 index e3e46a1384..0000000000 --- a/testdata/crud/unified/updateMany-validation.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "description": "updateMany-validation", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "UpdateMany requires atomic modifiers", - "operations": [ - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "x": 44 - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateMany-validation.yml b/testdata/crud/unified/updateMany-validation.yml deleted file mode 100644 index 4e86eff1f3..0000000000 --- a/testdata/crud/unified/updateMany-validation.yml +++ /dev/null @@ -1,39 +0,0 @@ -description: "updateMany-validation" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "UpdateMany requires atomic modifiers" - operations: - - name: updateMany - object: *collection0 - arguments: - filter: { _id: { $gt: 1 } } - update: { x: 44 } - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] - outcome: *initialData diff --git a/testdata/crud/unified/updateOne-comment.json b/testdata/crud/unified/updateOne-comment.json deleted file mode 100644 index f4ee74db38..0000000000 --- a/testdata/crud/unified/updateOne-comment.json +++ /dev/null @@ -1,260 +0,0 @@ -{ - "description": "updateOne-comment", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "UpdateOne with string comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 22 - } - }, - "comment": "comment" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$set": { - "x": 22 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 22 - } - ] - } - ] - }, - { - "description": "UpdateOne with document comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 22 - } - }, - "comment": { - "key": "value" - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$set": { - "x": 22 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "comment": { - "key": "value" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 22 - } - ] - } - ] - }, - { - "description": "UpdateOne with comment - pre 4.4", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 22 - } - }, - "comment": "comment" - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$set": { - "x": 22 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "comment": "comment" - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateOne-comment.yml b/testdata/crud/unified/updateOne-comment.yml deleted file mode 100644 index a176d620eb..0000000000 --- a/testdata/crud/unified/updateOne-comment.yml +++ /dev/null @@ -1,104 +0,0 @@ -description: "updateOne-comment" -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - -tests: - - description: "UpdateOne with string comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: updateOne - object: *collection0 - arguments: - filter: &filter { _id: 1 } - update: &update { $set: {x: 22} } - comment: "comment" - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *update - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - comment: "comment" - outcome: &outcome - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 22 } - - - description: "UpdateOne with document comment" - runOnRequirements: - - minServerVersion: "4.4" - operations: - - name: updateOne - object: *collection0 - arguments: - filter: *filter - update: *update - comment: &comment { key: "value" } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *update - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - comment: *comment - outcome: *outcome - - - description: "UpdateOne with comment - pre 4.4" - runOnRequirements: - - minServerVersion: "3.4.0" - maxServerVersion: "4.2.99" - operations: - - name: updateOne - object: *collection0 - arguments: - filter: *filter - update: *update - comment: "comment" - expectError: - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *update - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - comment: "comment" - outcome: *initialData diff --git a/testdata/crud/unified/updateOne-dots_and_dollars.json b/testdata/crud/unified/updateOne-dots_and_dollars.json deleted file mode 100644 index 798d522cba..0000000000 --- a/testdata/crud/unified/updateOne-dots_and_dollars.json +++ /dev/null @@ -1,412 +0,0 @@ -{ - "description": "updateOne-dots_and_dollars", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {} - } - ] - } - ], - "tests": [ - { - "description": "Updating document to set top-level dollar-prefixed key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ] - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {}, - "$a": 1 - } - ] - } - ] - }, - { - "description": "Updating document to set top-level dotted key on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ] - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$replaceWith": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$$ROOT" - } - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": {}, - "a.b": 1 - } - ] - } - ] - }, - { - "description": "Updating document to set dollar-prefixed key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ] - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "$a" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": { - "$a": 1 - } - } - ] - } - ] - }, - { - "description": "Updating document to set dotted key in embedded doc on 5.0+ server", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ] - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$set": { - "foo": { - "$setField": { - "field": { - "$literal": "a.b" - }, - "value": 1, - "input": "$foo" - } - } - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "foo": { - "a.b": 1 - } - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateOne-dots_and_dollars.yml b/testdata/crud/unified/updateOne-dots_and_dollars.yml deleted file mode 100644 index 9ff8a38d73..0000000000 --- a/testdata/crud/unified/updateOne-dots_and_dollars.yml +++ /dev/null @@ -1,138 +0,0 @@ -description: "updateOne-dots_and_dollars" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {} } - -tests: - - description: "Updating document to set top-level dollar-prefixed key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: &dollarPrefixedKey - - { $replaceWith: { $setField: { field: { $literal: $a }, value: 1, input: $$ROOT } } } - expectResult: &updateResult - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dollarPrefixedKey - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {}, $a: 1 } - - - description: "Updating document to set top-level dotted key on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: &dottedKey - - { $replaceWith: { $setField: { field: { $literal: a.b }, value: 1, input: $$ROOT } } } - expectResult: *updateResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dottedKey - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: {}, a.b: 1 } - - - description: "Updating document to set dollar-prefixed key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: &dollarPrefixedKeyInEmbedded - - { $set: { foo: { $setField: { field: { $literal: $a }, value: 1, input: $foo } } } } - expectResult: *updateResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dollarPrefixedKeyInEmbedded - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: { $a: 1 } } - - - description: "Updating document to set dotted key in embedded doc on 5.0+ server" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: &dottedKeyInEmbedded - - { $set: { foo: { $setField: { field: { $literal: a.b }, value: 1, input: $foo } } } } - expectResult: *updateResult - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - q: { _id: 1 } - u: *dottedKeyInEmbedded - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, foo: { a.b: 1 } } diff --git a/testdata/crud/unified/updateOne-errorResponse.json b/testdata/crud/unified/updateOne-errorResponse.json deleted file mode 100644 index 0ceddbc4fc..0000000000 --- a/testdata/crud/unified/updateOne-errorResponse.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "description": "updateOne-errorResponse", - "schemaVersion": "1.12", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "tests": [ - { - "description": "update operations support errorResponse assertions", - "runOnRequirements": [ - { - "minServerVersion": "4.0.0", - "topologies": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.2.0", - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 8 - } - } - } - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - }, - "expectError": { - "errorCode": 8, - "errorResponse": { - "code": 8 - } - } - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateOne-errorResponse.yml b/testdata/crud/unified/updateOne-errorResponse.yml deleted file mode 100644 index 6d42195b0b..0000000000 --- a/testdata/crud/unified/updateOne-errorResponse.yml +++ /dev/null @@ -1,47 +0,0 @@ -description: "updateOne-errorResponse" - -schemaVersion: "1.12" - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -tests: - # Some drivers may still need to skip this test because the CRUD spec does not - # prescribe how drivers should formulate a WriteException beyond collecting a - # write or write concern error. - - description: "update operations support errorResponse assertions" - runOnRequirements: - - minServerVersion: "4.0.0" - topologies: [ single, replicaset ] - - minServerVersion: "4.2.0" - topologies: [ sharded ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ update ] - errorCode: &errorCode 8 # UnknownError - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $set: { x: 1 } } - expectError: - errorCode: *errorCode - errorResponse: - code: *errorCode diff --git a/testdata/crud/unified/updateOne-hint-clientError.json b/testdata/crud/unified/updateOne-hint-clientError.json deleted file mode 100644 index d4f1a53430..0000000000 --- a/testdata/crud/unified/updateOne-hint-clientError.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "updateOne-hint-clientError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "maxServerVersion": "3.3.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_updateone_hint" - } - } - ], - "initialData": [ - { - "collectionName": "test_updateone_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "UpdateOne with hint string unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "updateOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "test_updateone_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "UpdateOne with hint document unsupported (client-side error)", - "operations": [ - { - "object": "collection0", - "name": "updateOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "test_updateone_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateOne-hint-clientError.yml b/testdata/crud/unified/updateOne-hint-clientError.yml deleted file mode 100644 index 87b4444c3a..0000000000 --- a/testdata/crud/unified/updateOne-hint-clientError.yml +++ /dev/null @@ -1,85 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: updateOne-hint-clientError -schemaVersion: '1.0' -runOnRequirements: - - - maxServerVersion: 3.3.99 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_updateone_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'UpdateOne with hint string unsupported (client-side error)' - operations: - - - object: *collection0 - name: updateOne - arguments: - filter: &filter - _id: - $gt: 1 - update: &update - $inc: - x: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'UpdateOne with hint document unsupported (client-side error)' - operations: - - - object: *collection0 - name: updateOne - arguments: - filter: *filter - update: *update - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: [] - outcome: *outcome diff --git a/testdata/crud/unified/updateOne-hint-serverError.json b/testdata/crud/unified/updateOne-hint-serverError.json deleted file mode 100644 index 05fb033319..0000000000 --- a/testdata/crud/unified/updateOne-hint-serverError.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "description": "updateOne-hint-serverError", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "3.4.0", - "maxServerVersion": "4.1.9" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_updateone_hint" - } - } - ], - "initialData": [ - { - "collectionName": "test_updateone_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "UpdateOne with hint string unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "updateOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_updateone_hint", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_", - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_updateone_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "UpdateOne with hint document unsupported (server-side error)", - "operations": [ - { - "object": "collection0", - "name": "updateOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_updateone_hint", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_updateone_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateOne-hint-serverError.yml b/testdata/crud/unified/updateOne-hint-serverError.yml deleted file mode 100644 index 0b804d05a7..0000000000 --- a/testdata/crud/unified/updateOne-hint-serverError.yml +++ /dev/null @@ -1,109 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: updateOne-hint-serverError -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 3.4.0 - maxServerVersion: 4.1.9 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_updateone_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'UpdateOne with hint string unsupported (server-side error)' - operations: - - - object: *collection0 - name: updateOne - arguments: - filter: &filter - _id: - $gt: 1 - update: &update - $inc: - x: 1 - hint: _id_ - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *filter - u: *update - hint: _id_ - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 - - - description: 'UpdateOne with hint document unsupported (server-side error)' - operations: - - - object: *collection0 - name: updateOne - arguments: - filter: *filter - update: *update - hint: - _id: 1 - expectError: - isError: true - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *filter - u: *update - hint: - _id: 1 - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: *outcome diff --git a/testdata/crud/unified/updateOne-hint.json b/testdata/crud/unified/updateOne-hint.json deleted file mode 100644 index 484e00757d..0000000000 --- a/testdata/crud/unified/updateOne-hint.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "description": "updateOne-hint", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-v2" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test_updateone_hint" - } - } - ], - "initialData": [ - { - "collectionName": "test_updateone_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "UpdateOne with hint string", - "operations": [ - { - "object": "collection0", - "name": "updateOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_" - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_updateone_hint", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "hint": "_id_", - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_updateone_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 23 - } - ] - } - ] - }, - { - "description": "UpdateOne with hint document", - "operations": [ - { - "object": "collection0", - "name": "updateOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - } - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test_updateone_hint", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "hint": { - "_id": 1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test_updateone_hint", - "databaseName": "crud-v2", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 23 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateOne-hint.yml b/testdata/crud/unified/updateOne-hint.yml deleted file mode 100644 index 8f5d1460a2..0000000000 --- a/testdata/crud/unified/updateOne-hint.yml +++ /dev/null @@ -1,109 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: updateOne-hint -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.2.0 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-v2 - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test_updateone_hint -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 22 -tests: - - - description: 'UpdateOne with hint string' - operations: - - - object: *collection0 - name: updateOne - arguments: - filter: &filter - _id: - $gt: 1 - update: &update - $inc: - x: 1 - hint: _id_ - expectResult: &result - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *filter - u: *update - hint: _id_ - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: &outcome - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 11 - - - _id: 2 - x: 23 - - - description: 'UpdateOne with hint document' - operations: - - - object: *collection0 - name: updateOne - arguments: - filter: *filter - update: *update - hint: - _id: 1 - expectResult: *result - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: *filter - u: *update - hint: - _id: 1 - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: *outcome diff --git a/testdata/crud/unified/updateOne-let.json b/testdata/crud/unified/updateOne-let.json deleted file mode 100644 index e43b979358..0000000000 --- a/testdata/crud/unified/updateOne-let.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "description": "updateOne-let", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "UpdateOne with let option", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "update": [ - { - "$set": { - "x": "$$x" - } - } - ], - "let": { - "id": 1, - "x": "foo" - } - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "$expr": { - "$eq": [ - "$_id", - "$$id" - ] - } - }, - "u": [ - { - "$set": { - "x": "$$x" - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "let": { - "id": 1, - "x": "foo" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": "foo" - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "UpdateOne with let option unsupported (server-side error)", - "runOnRequirements": [ - { - "minServerVersion": "4.2.0", - "maxServerVersion": "4.4.99" - } - ], - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$set": { - "x": "$$x" - } - } - ], - "let": { - "x": "foo" - } - }, - "expectError": { - "errorContains": "'update.let' is an unknown field", - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$set": { - "x": "$$x" - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "let": { - "x": "foo" - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateOne-let.yml b/testdata/crud/unified/updateOne-let.yml deleted file mode 100644 index 0044fdac66..0000000000 --- a/testdata/crud/unified/updateOne-let.yml +++ /dev/null @@ -1,102 +0,0 @@ -description: "updateOne-let" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "UpdateOne with let option" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: updateOne - object: *collection0 - arguments: - filter: &filter - $expr: - $eq: [ "$_id", "$$id" ] - update: &update - - $set: {x: "$$x" } - let: &let0 - id: 1 - x: "foo" - expectResult: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter - u: *update - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - let: *let0 - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: "foo" } - - { _id: 2 } - - - description: "UpdateOne with let option unsupported (server-side error)" - runOnRequirements: - - minServerVersion: "4.2.0" - maxServerVersion: "4.4.99" - operations: - - name: updateOne - object: *collection0 - arguments: - filter: &filter1 - _id: 1 - update: &update1 - - $set: {x: "$$x"} - let: &let1 - x: foo - expectError: - errorContains: "'update.let' is an unknown field" - isClientError: false - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - update: *collection0Name - updates: - - - q: *filter1 - u: *update1 - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - let: *let1 - outcome: - - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } diff --git a/testdata/crud/unified/updateOne-sort.json b/testdata/crud/unified/updateOne-sort.json deleted file mode 100644 index 8fe4f50b94..0000000000 --- a/testdata/crud/unified/updateOne-sort.json +++ /dev/null @@ -1,240 +0,0 @@ -{ - "description": "updateOne-sort", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "UpdateOne with sort option", - "runOnRequirements": [ - { - "minServerVersion": "8.0" - } - ], - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "sort": { - "_id": -1 - }, - "update": { - "$inc": { - "x": 1 - } - } - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "sort": { - "_id": -1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "n": 1 - }, - "commandName": "update" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 34 - } - ] - } - ] - }, - { - "description": "updateOne with sort option unsupported (server-side error)", - "runOnRequirements": [ - { - "maxServerVersion": "7.99" - } - ], - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "sort": { - "_id": -1 - }, - "update": { - "$inc": { - "x": 1 - } - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "coll0", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "sort": { - "_id": -1 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateOne-sort.yml b/testdata/crud/unified/updateOne-sort.yml deleted file mode 100644 index a278575fa5..0000000000 --- a/testdata/crud/unified/updateOne-sort.yml +++ /dev/null @@ -1,96 +0,0 @@ -description: updateOne-sort - -schemaVersion: "1.0" - -createEntities: - - client: - id: client0 - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - database: - id: database0 - client: client0 - databaseName: crud-tests - - collection: - id: collection0 - database: database0 - collectionName: coll0 - -initialData: - - collectionName: coll0 - databaseName: crud-tests - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: UpdateOne with sort option - runOnRequirements: - - minServerVersion: "8.0" - operations: - - name: updateOne - object: collection0 - arguments: - filter: { _id: { $gt: 1 } } - sort: { _id: -1 } - update: { $inc: { x: 1 } } - expectResult: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - update: coll0 - updates: - - q: { _id: { $gt: 1 } } - u: { $inc: { x: 1 } } - sort: { _id: -1 } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - - commandSucceededEvent: - reply: { ok: 1, n: 1 } - commandName: update - outcome: - - collectionName: coll0 - databaseName: crud-tests - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 34 } - - - description: updateOne with sort option unsupported (server-side error) - runOnRequirements: - - maxServerVersion: "7.99" - operations: - - name: updateOne - object: collection0 - arguments: - filter: { _id: { $gt: 1 } } - sort: { _id: -1 } - update: { $inc: { x: 1 } } - expectError: - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - update: coll0 - updates: - - q: { _id: { $gt: 1 } } - u: { $inc: { x: 1 } } - sort: { _id: -1 } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - outcome: - - collectionName: coll0 - databaseName: crud-tests - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } diff --git a/testdata/crud/unified/updateOne-validation.json b/testdata/crud/unified/updateOne-validation.json deleted file mode 100644 index 1464642c59..0000000000 --- a/testdata/crud/unified/updateOne-validation.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "description": "updateOne-validation", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "UpdateOne requires atomic modifiers", - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "x": 22 - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateOne-validation.yml b/testdata/crud/unified/updateOne-validation.yml deleted file mode 100644 index b6f49a6568..0000000000 --- a/testdata/crud/unified/updateOne-validation.yml +++ /dev/null @@ -1,37 +0,0 @@ -description: "updateOne-validation" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: &initialData - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - -tests: - - description: "UpdateOne requires atomic modifiers" - operations: - - name: updateOne - object: *collection0 - arguments: - filter: { _id: 1 } - update: { x: 22 } - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] - outcome: *initialData diff --git a/testdata/crud/unified/updateWithPipelines.json b/testdata/crud/unified/updateWithPipelines.json deleted file mode 100644 index 164f2f6a19..0000000000 --- a/testdata/crud/unified/updateWithPipelines.json +++ /dev/null @@ -1,494 +0,0 @@ -{ - "description": "updateWithPipelines", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.1.11" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 1, - "y": 1, - "t": { - "u": { - "v": 1 - } - } - }, - { - "_id": 2, - "x": 2, - "y": 1 - } - ] - } - ], - "tests": [ - { - "description": "UpdateOne using pipelines", - "operations": [ - { - "object": "collection0", - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$replaceRoot": { - "newRoot": "$t" - } - }, - { - "$addFields": { - "foo": 1 - } - } - ] - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$replaceRoot": { - "newRoot": "$t" - } - }, - { - "$addFields": { - "foo": 1 - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - }, - "commandName": "update", - "databaseName": "crud-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "u": { - "v": 1 - }, - "foo": 1 - }, - { - "_id": 2, - "x": 2, - "y": 1 - } - ] - } - ] - }, - { - "description": "UpdateMany using pipelines", - "operations": [ - { - "object": "collection0", - "name": "updateMany", - "arguments": { - "filter": {}, - "update": [ - { - "$project": { - "x": 1 - } - }, - { - "$addFields": { - "foo": 1 - } - } - ] - }, - "expectResult": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": {}, - "u": [ - { - "$project": { - "x": 1 - } - }, - { - "$addFields": { - "foo": 1 - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - }, - "commandName": "update", - "databaseName": "crud-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 1, - "foo": 1 - }, - { - "_id": 2, - "x": 2, - "foo": 1 - } - ] - } - ] - }, - { - "description": "FindOneAndUpdate using pipelines", - "operations": [ - { - "object": "collection0", - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$project": { - "x": 1 - } - }, - { - "$addFields": { - "foo": 1 - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "test", - "update": [ - { - "$project": { - "x": 1 - } - }, - { - "$addFields": { - "foo": 1 - } - } - ] - }, - "commandName": "findAndModify", - "databaseName": "crud-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 1, - "foo": 1 - }, - { - "_id": 2, - "x": 2, - "y": 1 - } - ] - } - ] - }, - { - "description": "UpdateOne in bulk write using pipelines", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": [ - { - "$replaceRoot": { - "newRoot": "$t" - } - }, - { - "$addFields": { - "foo": 1 - } - } - ] - } - } - ] - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": [ - { - "$replaceRoot": { - "newRoot": "$t" - } - }, - { - "$addFields": { - "foo": 1 - } - } - ], - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - }, - "commandName": "update", - "databaseName": "crud-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "u": { - "v": 1 - }, - "foo": 1 - }, - { - "_id": 2, - "x": 2, - "y": 1 - } - ] - } - ] - }, - { - "description": "UpdateMany in bulk write using pipelines", - "operations": [ - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "updateMany": { - "filter": {}, - "update": [ - { - "$project": { - "x": 1 - } - }, - { - "$addFields": { - "foo": 1 - } - } - ] - } - } - ] - }, - "expectResult": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": {}, - "u": [ - { - "$project": { - "x": 1 - } - }, - { - "$addFields": { - "foo": 1 - } - } - ], - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ] - }, - "commandName": "update", - "databaseName": "crud-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 1, - "foo": 1 - }, - { - "_id": 2, - "x": 2, - "foo": 1 - } - ] - } - ] - } - ] -} diff --git a/testdata/crud/unified/updateWithPipelines.yml b/testdata/crud/unified/updateWithPipelines.yml deleted file mode 100644 index 30666e31dd..0000000000 --- a/testdata/crud/unified/updateWithPipelines.yml +++ /dev/null @@ -1,299 +0,0 @@ -# This file was created automatically using mongodb-spec-converter. -# Please review the generated file, then remove this notice. - -description: updateWithPipelines -schemaVersion: '1.0' -runOnRequirements: - - - minServerVersion: 4.1.11 -createEntities: - - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - - database: - id: &database0 database0 - client: client0 - databaseName: &database_name crud-tests - - - collection: - id: &collection0 collection0 - database: database0 - collectionName: &collection_name test -initialData: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 1 - 'y': 1 - t: - u: - v: 1 - - - _id: 2 - x: 2 - 'y': 1 -tests: - - - description: 'UpdateOne using pipelines' - operations: - - - object: *collection0 - name: updateOne - arguments: - filter: - _id: 1 - update: - - - $replaceRoot: - newRoot: $t - - - $addFields: - foo: 1 - expectResult: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: - _id: 1 - u: - - { $replaceRoot: { newRoot: $t } } - - { $addFields: { foo: 1 } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - commandName: update - databaseName: *database_name - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - u: - v: 1 - foo: 1 - - - _id: 2 - x: 2 - 'y': 1 - - - description: 'UpdateMany using pipelines' - operations: - - - object: *collection0 - name: updateMany - arguments: - filter: { } - update: - - - $project: - x: 1 - - - $addFields: - foo: 1 - expectResult: - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: { } - u: - - { $project: { x: 1 } } - - { $addFields: { foo: 1 } } - multi: true - upsert: { $$unsetOrMatches: false } - commandName: update - databaseName: *database_name - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 1 - foo: 1 - - - _id: 2 - x: 2 - foo: 1 - - - description: 'FindOneAndUpdate using pipelines' - operations: - - - object: *collection0 - name: findOneAndUpdate - arguments: - filter: - _id: 1 - update: - - - $project: - x: 1 - - - $addFields: - foo: 1 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - findAndModify: *collection_name - update: - - - $project: - x: 1 - - - $addFields: - foo: 1 - commandName: findAndModify - databaseName: *database_name - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 1 - foo: 1 - - - _id: 2 - x: 2 - 'y': 1 - - - description: 'UpdateOne in bulk write using pipelines' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateOne: - filter: - _id: 1 - update: - - - $replaceRoot: - newRoot: $t - - - $addFields: - foo: 1 - expectResult: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: - _id: 1 - u: - - { $replaceRoot: { newRoot: $t } } - - { $addFields: { foo: 1 } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - commandName: update - databaseName: *database_name - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - u: - v: 1 - foo: 1 - - - _id: 2 - x: 2 - 'y': 1 - - - description: 'UpdateMany in bulk write using pipelines' - operations: - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - updateMany: - filter: { } - update: - - - $project: - x: 1 - - - $addFields: - foo: 1 - expectResult: - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - expectEvents: - - - client: *client0 - events: - - - commandStartedEvent: - command: - update: *collection_name - updates: - - - q: { } - u: - - { $project: { x: 1 } } - - { $addFields: { foo: 1 } } - multi: true - upsert: { $$unsetOrMatches: false } - commandName: update - databaseName: *database_name - outcome: - - - collectionName: *collection_name - databaseName: *database_name - documents: - - - _id: 1 - x: 1 - foo: 1 - - - _id: 2 - x: 2 - foo: 1 diff --git a/testdata/crud/v1/read/aggregate-collation.json b/testdata/crud/v1/read/aggregate-collation.json deleted file mode 100644 index d958e447bf..0000000000 --- a/testdata/crud/v1/read/aggregate-collation.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": "ping" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "Aggregate with collation", - "operation": { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "x": "PING" - } - } - ], - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": [ - { - "_id": 1, - "x": "ping" - } - ] - } - } - ] -} diff --git a/testdata/crud/v1/read/aggregate-collation.yml b/testdata/crud/v1/read/aggregate-collation.yml deleted file mode 100644 index 924192a6e5..0000000000 --- a/testdata/crud/v1/read/aggregate-collation.yml +++ /dev/null @@ -1,18 +0,0 @@ -data: - - {_id: 1, x: 'ping'} -minServerVersion: '3.4' -serverless: 'forbid' - -tests: - - - description: "Aggregate with collation" - operation: - name: aggregate - arguments: - pipeline: - - $match: - x: 'PING' - collation: { locale: 'en_US', strength: 2 } # https://www.mongodb.com/docs/manual/reference/collation/#collation-document - outcome: - result: - - {_id: 1, x: 'ping'} diff --git a/testdata/crud/v1/read/aggregate-out.json b/testdata/crud/v1/read/aggregate-out.json deleted file mode 100644 index c195e163e0..0000000000 --- a/testdata/crud/v1/read/aggregate-out.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "minServerVersion": "2.6", - "serverless": "forbid", - "tests": [ - { - "description": "Aggregate with $out", - "operation": { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "other_test_collection" - } - ], - "batchSize": 2 - } - }, - "outcome": { - "collection": { - "name": "other_test_collection", - "data": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "Aggregate with $out and batch size of 0", - "operation": { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "other_test_collection" - } - ], - "batchSize": 0 - } - }, - "outcome": { - "collection": { - "name": "other_test_collection", - "data": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/read/aggregate-out.yml b/testdata/crud/v1/read/aggregate-out.yml deleted file mode 100644 index d6688dd08d..0000000000 --- a/testdata/crud/v1/read/aggregate-out.yml +++ /dev/null @@ -1,44 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} -minServerVersion: '2.6' -serverless: 'forbid' - -tests: - - - description: "Aggregate with $out" - operation: - name: aggregate - arguments: - pipeline: - - $sort: {x: 1} - - $match: - _id: {$gt: 1} - - $out: "other_test_collection" - batchSize: 2 - - outcome: - collection: - name: "other_test_collection" - data: - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - - description: "Aggregate with $out and batch size of 0" - operation: - name: aggregate - arguments: - pipeline: - - $sort: {x: 1} - - $match: - _id: {$gt: 1} - - $out: "other_test_collection" - batchSize: 0 - - outcome: - collection: - name: "other_test_collection" - data: - - {_id: 2, x: 22} - - {_id: 3, x: 33} diff --git a/testdata/crud/v1/read/aggregate.json b/testdata/crud/v1/read/aggregate.json deleted file mode 100644 index 797a922395..0000000000 --- a/testdata/crud/v1/read/aggregate.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "Aggregate with multiple stages", - "operation": { - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "batchSize": 2 - } - }, - "outcome": { - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - ] -} diff --git a/testdata/crud/v1/read/aggregate.yml b/testdata/crud/v1/read/aggregate.yml deleted file mode 100644 index 98b69445c2..0000000000 --- a/testdata/crud/v1/read/aggregate.yml +++ /dev/null @@ -1,21 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "Aggregate with multiple stages" - operation: - name: aggregate - arguments: - pipeline: - - $sort: {x: 1} - - $match: - _id: {$gt: 1} - batchSize: 2 - - outcome: - result: - - {_id: 2, x: 22} - - {_id: 3, x: 33} diff --git a/testdata/crud/v1/read/count-collation.json b/testdata/crud/v1/read/count-collation.json deleted file mode 100644 index 7d61508493..0000000000 --- a/testdata/crud/v1/read/count-collation.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": "PING" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "Count documents with collation", - "operation": { - "name": "countDocuments", - "arguments": { - "filter": { - "x": "ping" - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": 1 - } - }, - { - "description": "Deprecated count with collation", - "operation": { - "name": "count", - "arguments": { - "filter": { - "x": "ping" - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": 1 - } - } - ] -} diff --git a/testdata/crud/v1/read/count-collation.yml b/testdata/crud/v1/read/count-collation.yml deleted file mode 100644 index fd1c29a07e..0000000000 --- a/testdata/crud/v1/read/count-collation.yml +++ /dev/null @@ -1,26 +0,0 @@ -data: - - {_id: 1, x: 'PING'} -minServerVersion: '3.4' -serverless: 'forbid' - -tests: - - - description: "Count documents with collation" - operation: - name: countDocuments - arguments: - filter: { x: 'ping' } - collation: { locale: 'en_US', strength: 2 } # https://www.mongodb.com/docs/manual/reference/collation/#collation-document - - outcome: - result: 1 - - - description: "Deprecated count with collation" - operation: - name: count - arguments: - filter: { x: 'ping' } - collation: { locale: 'en_US', strength: 2 } - - outcome: - result: 1 diff --git a/testdata/crud/v1/read/count-empty.json b/testdata/crud/v1/read/count-empty.json deleted file mode 100644 index 2b8627e0c6..0000000000 --- a/testdata/crud/v1/read/count-empty.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "data": [], - "tests": [ - { - "description": "Estimated document count with empty collection", - "operation": { - "name": "estimatedDocumentCount", - "arguments": {} - }, - "outcome": { - "result": 0 - } - }, - { - "description": "Count documents with empty collection", - "operation": { - "name": "countDocuments", - "arguments": { - "filter": {} - } - }, - "outcome": { - "result": 0 - } - }, - { - "description": "Deprecated count with empty collection", - "operation": { - "name": "count", - "arguments": { - "filter": {} - } - }, - "outcome": { - "result": 0 - } - } - ] -} diff --git a/testdata/crud/v1/read/count-empty.yml b/testdata/crud/v1/read/count-empty.yml deleted file mode 100644 index 83098ec18f..0000000000 --- a/testdata/crud/v1/read/count-empty.yml +++ /dev/null @@ -1,29 +0,0 @@ -data: [] - -tests: - - - description: "Estimated document count with empty collection" - operation: - name: estimatedDocumentCount - arguments: { } - - outcome: - result: 0 - - - description: "Count documents with empty collection" - operation: - name: countDocuments - arguments: - filter: { } - - outcome: - result: 0 - - - description: "Deprecated count with empty collection" - operation: - name: count - arguments: - filter: { } - - outcome: - result: 0 diff --git a/testdata/crud/v1/read/count.json b/testdata/crud/v1/read/count.json deleted file mode 100644 index 9642b2fbd0..0000000000 --- a/testdata/crud/v1/read/count.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "Estimated document count", - "operation": { - "name": "estimatedDocumentCount", - "arguments": {} - }, - "outcome": { - "result": 3 - } - }, - { - "description": "Count documents without a filter", - "operation": { - "name": "countDocuments", - "arguments": { - "filter": {} - } - }, - "outcome": { - "result": 3 - } - }, - { - "description": "Count documents with a filter", - "operation": { - "name": "countDocuments", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - } - } - }, - "outcome": { - "result": 2 - } - }, - { - "description": "Count documents with skip and limit", - "operation": { - "name": "countDocuments", - "arguments": { - "filter": {}, - "skip": 1, - "limit": 3 - } - }, - "outcome": { - "result": 2 - } - }, - { - "description": "Deprecated count without a filter", - "operation": { - "name": "count", - "arguments": { - "filter": {} - } - }, - "outcome": { - "result": 3 - } - }, - { - "description": "Deprecated count with a filter", - "operation": { - "name": "count", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - } - } - }, - "outcome": { - "result": 2 - } - }, - { - "description": "Deprecated count with skip and limit", - "operation": { - "name": "count", - "arguments": { - "filter": {}, - "skip": 1, - "limit": 3 - } - }, - "outcome": { - "result": 2 - } - } - ] -} diff --git a/testdata/crud/v1/read/count.yml b/testdata/crud/v1/read/count.yml deleted file mode 100644 index 33d380b7d5..0000000000 --- a/testdata/crud/v1/read/count.yml +++ /dev/null @@ -1,74 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "Estimated document count" - operation: - name: estimatedDocumentCount - arguments: { } - - outcome: - result: 3 - - - description: "Count documents without a filter" - operation: - name: countDocuments - arguments: - filter: { } - - outcome: - result: 3 - - - description: "Count documents with a filter" - operation: - name: countDocuments - arguments: - filter: - _id: {$gt: 1} - - outcome: - result: 2 - - - description: "Count documents with skip and limit" - operation: - name: countDocuments - arguments: - filter: {} - skip: 1 - limit: 3 - - outcome: - result: 2 - - - description: "Deprecated count without a filter" - operation: - name: count - arguments: - filter: { } - - outcome: - result: 3 - - - description: "Deprecated count with a filter" - operation: - name: count - arguments: - filter: - _id: {$gt: 1} - - outcome: - result: 2 - - - description: "Deprecated count with skip and limit" - operation: - name: count - arguments: - filter: {} - skip: 1 - limit: 3 - - outcome: - result: 2 diff --git a/testdata/crud/v1/read/distinct-collation.json b/testdata/crud/v1/read/distinct-collation.json deleted file mode 100644 index 984991a43b..0000000000 --- a/testdata/crud/v1/read/distinct-collation.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "string": "PING" - }, - { - "_id": 2, - "string": "ping" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "Distinct with a collation", - "operation": { - "name": "distinct", - "arguments": { - "fieldName": "string", - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": [ - "PING" - ] - } - } - ] -} diff --git a/testdata/crud/v1/read/distinct-collation.yml b/testdata/crud/v1/read/distinct-collation.yml deleted file mode 100644 index 8785f29d4b..0000000000 --- a/testdata/crud/v1/read/distinct-collation.yml +++ /dev/null @@ -1,18 +0,0 @@ -data: - - {_id: 1, string: 'PING'} - - {_id: 2, string: 'ping'} -minServerVersion: '3.4' -serverless: 'forbid' - -tests: - - - description: "Distinct with a collation" - operation: - name: distinct - arguments: - fieldName: "string" - collation: { locale: 'en_US', strength: 2 } # https://www.mongodb.com/docs/manual/reference/collation/#collation-document - - outcome: - result: - - 'PING' diff --git a/testdata/crud/v1/read/distinct.json b/testdata/crud/v1/read/distinct.json deleted file mode 100644 index a57ee36a83..0000000000 --- a/testdata/crud/v1/read/distinct.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "Distinct without a filter", - "operation": { - "name": "distinct", - "arguments": { - "fieldName": "x", - "filter": {} - } - }, - "outcome": { - "result": [ - 11, - 22, - 33 - ] - } - }, - { - "description": "Distinct with a filter", - "operation": { - "name": "distinct", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - } - }, - "outcome": { - "result": [ - 22, - 33 - ] - } - } - ] -} diff --git a/testdata/crud/v1/read/distinct.yml b/testdata/crud/v1/read/distinct.yml deleted file mode 100644 index aefc7e0fdf..0000000000 --- a/testdata/crud/v1/read/distinct.yml +++ /dev/null @@ -1,32 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "Distinct without a filter" - operation: - name: distinct - arguments: - fieldName: "x" - filter: {} - - outcome: - result: - - 11 - - 22 - - 33 - - - description: "Distinct with a filter" - operation: - name: distinct - arguments: - fieldName: "x" - filter: - _id: {$gt: 1} - - outcome: - result: - - 22 - - 33 \ No newline at end of file diff --git a/testdata/crud/v1/read/find-collation.json b/testdata/crud/v1/read/find-collation.json deleted file mode 100644 index 4e56c05253..0000000000 --- a/testdata/crud/v1/read/find-collation.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": "ping" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "Find with a collation", - "operation": { - "name": "find", - "arguments": { - "filter": { - "x": "PING" - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": [ - { - "_id": 1, - "x": "ping" - } - ] - } - } - ] -} diff --git a/testdata/crud/v1/read/find-collation.yml b/testdata/crud/v1/read/find-collation.yml deleted file mode 100644 index 1ecc491546..0000000000 --- a/testdata/crud/v1/read/find-collation.yml +++ /dev/null @@ -1,16 +0,0 @@ -data: - - {_id: 1, x: 'ping'} -minServerVersion: '3.4' -serverless: 'forbid' - -tests: - - - description: "Find with a collation" - operation: - name: "find" - arguments: - filter: {x: 'PING'} - collation: { locale: 'en_US', strength: 2 } # https://www.mongodb.com/docs/manual/reference/collation/#collation-document - outcome: - result: - - {_id: 1, x: 'ping'} diff --git a/testdata/crud/v1/read/find.json b/testdata/crud/v1/read/find.json deleted file mode 100644 index 3597e37be6..0000000000 --- a/testdata/crud/v1/read/find.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ], - "tests": [ - { - "description": "Find with filter", - "operation": { - "name": "find", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - "outcome": { - "result": [ - { - "_id": 1, - "x": 11 - } - ] - } - }, - { - "description": "Find with filter, sort, skip, and limit", - "operation": { - "name": "find", - "arguments": { - "filter": { - "_id": { - "$gt": 2 - } - }, - "sort": { - "_id": 1 - }, - "skip": 2, - "limit": 2 - } - }, - "outcome": { - "result": [ - { - "_id": 5, - "x": 55 - } - ] - } - }, - { - "description": "Find with limit, sort, and batchsize", - "operation": { - "name": "find", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4, - "batchSize": 2 - } - }, - "outcome": { - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - } - ] -} diff --git a/testdata/crud/v1/read/find.yml b/testdata/crud/v1/read/find.yml deleted file mode 100644 index 25099df7f1..0000000000 --- a/testdata/crud/v1/read/find.yml +++ /dev/null @@ -1,49 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 44} - - {_id: 5, x: 55} - -tests: - - - description: "Find with filter" - operation: - name: "find" - arguments: - filter: {_id: 1} - - outcome: - result: - - {_id: 1, x: 11} - - - - description: "Find with filter, sort, skip, and limit" - operation: - name: "find" - arguments: - filter: - _id: {$gt: 2} - sort: {_id: 1} - skip: 2 - limit: 2 - - outcome: - result: - - {_id: 5, x: 55} - - - description: "Find with limit, sort, and batchsize" - operation: - name: "find" - arguments: - filter: {} - sort: {_id: 1} - limit: 4 - batchSize: 2 - - outcome: - result: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 44} diff --git a/testdata/crud/v1/write/bulkWrite-arrayFilters.json b/testdata/crud/v1/write/bulkWrite-arrayFilters.json deleted file mode 100644 index 99e73f5d75..0000000000 --- a/testdata/crud/v1/write/bulkWrite-arrayFilters.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - } - ], - "minServerVersion": "3.5.6", - "tests": [ - { - "description": "BulkWrite with arrayFilters", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 3 - } - ] - } - }, - { - "name": "updateMany", - "arguments": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 1 - } - ] - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": {}, - "matchedCount": 3, - "modifiedCount": 3, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "y": [ - { - "b": 2 - }, - { - "b": 2 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 2 - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/bulkWrite-arrayFilters.yml b/testdata/crud/v1/write/bulkWrite-arrayFilters.yml deleted file mode 100644 index 1089f08c09..0000000000 --- a/testdata/crud/v1/write/bulkWrite-arrayFilters.yml +++ /dev/null @@ -1,45 +0,0 @@ -data: - - {_id: 1, y: [{b: 3}, {b: 1}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} - -minServerVersion: '3.5.6' - -tests: - - - description: "BulkWrite with arrayFilters" - operation: - name: "bulkWrite" - arguments: - requests: - - - # UpdateOne when one document matches arrayFilters - name: "updateOne" - arguments: - filter: {} - update: - $set: {"y.$[i].b": 2} - arrayFilters: - - {i.b: 3} - - - # UpdateMany when multiple documents match arrayFilters - name: "updateMany" - arguments: - filter: {} - update: - $set: {"y.$[i].b": 2} - arrayFilters: - - {i.b: 1} - options: { ordered: true } - outcome: - result: - deletedCount: 0 - insertedCount: 0 - insertedIds: {} - matchedCount: 3 - modifiedCount: 3 - upsertedCount: 0 - upsertedIds: {} - collection: - data: - - {_id: 1, y: [{b: 2}, {b: 2}]} - - {_id: 2, y: [{b: 0}, {b: 2}]} diff --git a/testdata/crud/v1/write/bulkWrite-collation.json b/testdata/crud/v1/write/bulkWrite-collation.json deleted file mode 100644 index bc90aa8172..0000000000 --- a/testdata/crud/v1/write/bulkWrite-collation.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "ping" - }, - { - "_id": 3, - "x": "pINg" - }, - { - "_id": 4, - "x": "pong" - }, - { - "_id": 5, - "x": "pONg" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "BulkWrite with delete operations and collation", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "deleteOne", - "arguments": { - "filter": { - "x": "PING" - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "x": "PING" - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - { - "name": "deleteMany", - "arguments": { - "filter": { - "x": "PONG" - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 4, - "insertedCount": 0, - "insertedIds": {}, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - } - ] - } - } - }, - { - "description": "BulkWrite with update operations and collation", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "updateMany", - "arguments": { - "filter": { - "x": "ping" - }, - "update": { - "$set": { - "x": "PONG" - } - }, - "collation": { - "locale": "en_US", - "strength": 3 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "x": "ping" - }, - "update": { - "$set": { - "x": "PONG" - } - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - { - "name": "replaceOne", - "arguments": { - "filter": { - "x": "ping" - }, - "replacement": { - "_id": 6, - "x": "ping" - }, - "upsert": true, - "collation": { - "locale": "en_US", - "strength": 3 - } - } - }, - { - "name": "updateMany", - "arguments": { - "filter": { - "x": "pong" - }, - "update": { - "$set": { - "x": "PONG" - } - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": {}, - "matchedCount": 6, - "modifiedCount": 4, - "upsertedCount": 1, - "upsertedIds": { - "2": 6 - } - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "PONG" - }, - { - "_id": 3, - "x": "PONG" - }, - { - "_id": 4, - "x": "PONG" - }, - { - "_id": 5, - "x": "PONG" - }, - { - "_id": 6, - "x": "ping" - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/bulkWrite-collation.yml b/testdata/crud/v1/write/bulkWrite-collation.yml deleted file mode 100644 index 75ab468a5e..0000000000 --- a/testdata/crud/v1/write/bulkWrite-collation.yml +++ /dev/null @@ -1,102 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 'ping'} - - {_id: 3, x: 'pINg'} - - {_id: 4, x: 'pong'} - - {_id: 5, x: 'pONg'} - -minServerVersion: '3.4' -serverless: 'forbid' - -# See: https://www.mongodb.com/docs/manual/reference/collation/#collation-document -tests: - - - description: "BulkWrite with delete operations and collation" - operation: - name: "bulkWrite" - arguments: - requests: - - - # matches two documents but deletes one - name: "deleteOne" - arguments: - filter: { x: "PING" } - collation: { locale: "en_US", strength: 2 } - - - # matches the remaining document and deletes it - name: "deleteOne" - arguments: - filter: { x: "PING" } - collation: { locale: "en_US", strength: 2 } - - - # matches two documents and deletes them - name: "deleteMany" - arguments: - filter: { x: "PONG" } - collation: { locale: "en_US", strength: 2 } - options: { ordered: true } - outcome: - result: - deletedCount: 4 - insertedCount: 0 - insertedIds: {} - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: {} - collection: - data: - - {_id: 1, x: 11 } - - - description: "BulkWrite with update operations and collation" - operation: - name: "bulkWrite" - arguments: - requests: - - - # matches only one document due to strength and updates - name: "updateMany" - arguments: - filter: { x: "ping" } - update: { $set: { x: "PONG" } } - collation: { locale: "en_US", strength: 3 } - - - # matches one document and updates - name: "updateOne" - arguments: - filter: { x: "ping" } - update: { $set: { x: "PONG" } } - collation: { locale: "en_US", strength: 2 } - - - # matches no document due to strength and upserts - name: "replaceOne" - arguments: - filter: { x: "ping" } - replacement: { _id: 6, x: "ping" } - upsert: true - collation: { locale: "en_US", strength: 3 } - - - # matches two documents and updates - name: "updateMany" - arguments: - filter: { x: "pong" } - update: { $set: { x: "PONG" } } - collation: { locale: "en_US", strength: 2 } - options: { ordered: true } - outcome: - result: - deletedCount: 0 - insertedCount: 0 - insertedIds: {} - matchedCount: 6 - modifiedCount: 4 - upsertedCount: 1 - upsertedIds: { 2: 6 } - collection: - data: - - {_id: 1, x: 11 } - - {_id: 2, x: "PONG" } - - {_id: 3, x: "PONG" } - - {_id: 4, x: "PONG" } - - {_id: 5, x: "PONG" } - - {_id: 6, x: "ping" } diff --git a/testdata/crud/v1/write/bulkWrite.json b/testdata/crud/v1/write/bulkWrite.json deleted file mode 100644 index dc00da28ad..0000000000 --- a/testdata/crud/v1/write/bulkWrite.json +++ /dev/null @@ -1,778 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "minServerVersion": "2.6", - "tests": [ - { - "description": "BulkWrite with deleteOne operations", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 3 - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 2 - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 1, - "insertedCount": 0, - "insertedIds": {}, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - } - ] - } - } - }, - { - "description": "BulkWrite with deleteMany operations", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "deleteMany", - "arguments": { - "filter": { - "x": { - "$lt": 11 - } - } - } - }, - { - "name": "deleteMany", - "arguments": { - "filter": { - "x": { - "$lte": 22 - } - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 2, - "insertedCount": 0, - "insertedIds": {}, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [] - } - } - }, - { - "description": "BulkWrite with insertOne operations", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 4, - "x": 44 - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 0, - "insertedCount": 2, - "insertedIds": { - "0": 3, - "1": 4 - }, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - } - }, - { - "description": "BulkWrite with replaceOne operations", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 3 - }, - "replacement": { - "x": 33 - } - } - }, - { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 12 - } - } - }, - { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 3 - }, - "replacement": { - "x": 33 - }, - "upsert": true - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": {}, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 1, - "upsertedIds": { - "2": 3 - } - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "BulkWrite with updateOne operations", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 0 - }, - "update": { - "$set": { - "x": 0 - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 11 - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 3 - }, - "update": { - "$set": { - "x": 33 - } - }, - "upsert": true - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": {}, - "matchedCount": 2, - "modifiedCount": 1, - "upsertedCount": 1, - "upsertedIds": { - "3": 3 - } - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "BulkWrite with updateMany operations", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "updateMany", - "arguments": { - "filter": { - "x": { - "$lt": 11 - } - }, - "update": { - "$set": { - "x": 0 - } - } - } - }, - { - "name": "updateMany", - "arguments": { - "filter": { - "x": { - "$lte": 22 - } - }, - "update": { - "$unset": { - "y": 1 - } - } - } - }, - { - "name": "updateMany", - "arguments": { - "filter": { - "x": { - "$lte": 22 - } - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "updateMany", - "arguments": { - "filter": { - "_id": 3 - }, - "update": { - "$set": { - "x": 33 - } - }, - "upsert": true - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": {}, - "matchedCount": 4, - "modifiedCount": 2, - "upsertedCount": 1, - "upsertedIds": { - "3": 3 - } - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "BulkWrite with mixed ordered operations", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "updateMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 4, - "x": 44 - } - } - }, - { - "name": "deleteMany", - "arguments": { - "filter": { - "x": { - "$nin": [ - 24, - 34 - ] - } - } - } - }, - { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 4 - }, - "replacement": { - "_id": 4, - "x": 44 - }, - "upsert": true - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 2, - "insertedCount": 2, - "insertedIds": { - "0": 3, - "3": 4 - }, - "matchedCount": 3, - "modifiedCount": 3, - "upsertedCount": 1, - "upsertedIds": { - "5": 4 - } - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 24 - }, - { - "_id": 3, - "x": 34 - }, - { - "_id": 4, - "x": 44 - } - ] - } - } - }, - { - "description": "BulkWrite with mixed unordered operations", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 3 - }, - "replacement": { - "_id": 3, - "x": 33 - }, - "upsert": true - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "options": { - "ordered": false - } - } - }, - "outcome": { - "result": { - "deletedCount": 1, - "insertedCount": 0, - "insertedIds": {}, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 1, - "upsertedIds": { - "0": 3 - } - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "BulkWrite continue-on-error behavior with unordered (preexisting duplicate key)", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 4, - "x": 44 - } - } - } - ], - "options": { - "ordered": false - } - } - }, - "outcome": { - "error": true, - "result": { - "deletedCount": 0, - "insertedCount": 2, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - } - }, - { - "description": "BulkWrite continue-on-error behavior with unordered (duplicate key in requests)", - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 4, - "x": 44 - } - } - } - ], - "options": { - "ordered": false - } - } - }, - "outcome": { - "error": true, - "result": { - "deletedCount": 0, - "insertedCount": 2, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/bulkWrite.yml b/testdata/crud/v1/write/bulkWrite.yml deleted file mode 100644 index 988bdf4d45..0000000000 --- a/testdata/crud/v1/write/bulkWrite.yml +++ /dev/null @@ -1,401 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - -minServerVersion: '2.6' - -tests: - - - description: "BulkWrite with deleteOne operations" - operation: - name: "bulkWrite" - arguments: - # Note: as in the "DeleteOne when many documents match" test in - # deleteOne.yml, we omit a deleteOne operation that might match - # multiple documents as that would hinder our ability to assert - # the final state of the collection under test. - requests: - - - # does not match an existing document - name: "deleteOne" - arguments: - filter: { _id: 3 } - - - # deletes the matched document - name: "deleteOne" - arguments: - filter: { _id: 2 } - options: { ordered: true } - outcome: - result: - deletedCount: 1 - insertedCount: 0 - insertedIds: {} - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: {} - collection: - data: - - {_id: 1, x: 11 } - - - description: "BulkWrite with deleteMany operations" - operation: - name: "bulkWrite" - arguments: - requests: - - - # does not match any existing documents - name: "deleteMany" - arguments: - filter: { x: { $lt: 11 } } - - - # deletes the matched documents - name: "deleteMany" - arguments: - filter: { x: { $lte: 22 } } - options: { ordered: true } - outcome: - result: - deletedCount: 2 - insertedCount: 0 - insertedIds: {} - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: {} - collection: - data: [] - - - description: "BulkWrite with insertOne operations" - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - - - name: "insertOne" - arguments: - document: { _id: 4, x: 44 } - options: { ordered: true } - outcome: - result: - deletedCount: 0 - insertedCount: 2 - insertedIds: { 0: 3, 1: 4 } - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: {} - collection: - data: - - {_id: 1, x: 11 } - - {_id: 2, x: 22 } - - {_id: 3, x: 33 } - - {_id: 4, x: 44 } - - - description: "BulkWrite with replaceOne operations" - operation: - name: "bulkWrite" - arguments: - # Note: as in the "ReplaceOne when many documents match" test in - # replaceOne.yml, we omit a replaceOne operation that might - # match multiple documents as that would hinder our ability to - # assert the final state of the collection under test. - requests: - - - # does not match an existing document - name: "replaceOne" - arguments: - filter: { _id: 3 } - replacement: { x: 33 } - - - # modifies the matched document - name: "replaceOne" - arguments: - filter: { _id: 1 } - replacement: { x: 12 } - - - # does not match an existing document and upserts - name: "replaceOne" - arguments: - filter: { _id: 3 } - replacement: { x: 33 } - upsert: true - options: { ordered: true } - outcome: - result: - deletedCount: 0 - insertedCount: 0 - insertedIds: {} - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 1 - upsertedIds: { 2: 3 } - collection: - data: - - {_id: 1, x: 12 } - - {_id: 2, x: 22 } - - {_id: 3, x: 33 } - - - description: "BulkWrite with updateOne operations" - operation: - name: "bulkWrite" - arguments: - # Note: as in the "UpdateOne when many documents match" test in - # updateOne.yml, we omit an updateOne operation that might match - # multiple documents as that would hinder our ability to assert - # the final state of the collection under test. - requests: - - - # does not match an existing document - name: "updateOne" - arguments: - filter: { _id: 0 } - update: { $set: { x: 0 } } - - - # does not modify the matched document - name: "updateOne" - arguments: - filter: { _id: 1 } - update: { $set: { x: 11 } } - - - # modifies the matched document - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - - - # does not match an existing document and upserts - name: "updateOne" - arguments: - filter: { _id: 3 } - update: { $set: { x: 33 } } - upsert: true - options: { ordered: true } - outcome: - result: - deletedCount: 0 - insertedCount: 0 - insertedIds: {} - matchedCount: 2 - modifiedCount: 1 - upsertedCount: 1 - upsertedIds: { 3: 3 } - collection: - data: - - {_id: 1, x: 11 } - - {_id: 2, x: 23 } - - {_id: 3, x: 33 } - - - description: "BulkWrite with updateMany operations" - operation: - name: "bulkWrite" - arguments: - requests: - - - # does not match any existing documents - name: "updateMany" - arguments: - filter: { x: { $lt: 11 } } - update: { $set: { x: 0 } } - - - # does not modify the matched documents - name: "updateMany" - arguments: - filter: { x: { $lte: 22 } } - update: { $unset: { y: 1 } } - - - # modifies the matched documents - name: "updateMany" - arguments: - filter: { x: { $lte: 22 } } - update: { $inc: { x: 1 } } - - - # does not match any existing documents and upserts - name: "updateMany" - arguments: - filter: { _id: 3 } - update: { $set: { x: 33 } } - upsert: true - options: { ordered: true } - outcome: - result: - deletedCount: 0 - insertedCount: 0 - insertedIds: {} - matchedCount: 4 - modifiedCount: 2 - upsertedCount: 1 - upsertedIds: { 3: 3 } - collection: - data: - - {_id: 1, x: 12 } - - {_id: 2, x: 23 } - - {_id: 3, x: 33 } - - - description: "BulkWrite with mixed ordered operations" - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - - - name: "updateMany" - arguments: - filter: { _id: { $gt: 1 } } - update: { $inc: { x: 1 } } - - - name: "insertOne" - arguments: - document: { _id: 4, x: 44 } - - - name: "deleteMany" - arguments: - filter: { x: { $nin: [ 24, 34 ] } } - - - name: "replaceOne" - arguments: - filter: { _id: 4 } - replacement: { _id: 4, x: 44 } - upsert: true - options: { ordered: true } - outcome: - result: - deletedCount: 2 - insertedCount: 2 - insertedIds: { 0: 3, 3: 4 } - matchedCount: 3 - modifiedCount: 3 - upsertedCount: 1 - upsertedIds: { 5: 4 } - collection: - data: - - {_id: 2, x: 24 } - - {_id: 3, x: 34 } - - {_id: 4, x: 44 } - - - description: "BulkWrite with mixed unordered operations" - operation: - name: "bulkWrite" - arguments: - # We omit inserting multiple documents and updating documents - # that may not exist at the start of this test as we cannot - # assume the order in which the operations will execute. - requests: - - - name: "replaceOne" - arguments: - filter: { _id: 3 } - replacement: { _id: 3, x: 33 } - upsert: true - - - name: "deleteOne" - arguments: - filter: { _id: 1 } - - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - options: { ordered: false } - outcome: - result: - deletedCount: 1 - insertedCount: 0 - insertedIds: {} - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 1 - upsertedIds: { 0: 3 } - collection: - data: - - {_id: 2, x: 23 } - - {_id: 3, x: 33 } - - - description: "BulkWrite continue-on-error behavior with unordered (preexisting duplicate key)" - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "insertOne" - arguments: - document: { _id: 2, x: 22 } - - - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - - - name: "insertOne" - arguments: - document: { _id: 4, x: 44 } - options: { ordered: false } - outcome: - error: true - result: - deletedCount: 0 - insertedCount: 2 - # Since the map of insertedIds is generated before execution it - # could indicate inserts that did not actually succeed. We omit - # this field rather than expect drivers to provide an accurate - # map filtered by write errors. - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - - description: "BulkWrite continue-on-error behavior with unordered (duplicate key in requests)" - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - - - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - - - name: "insertOne" - arguments: - document: { _id: 4, x: 44 } - options: { ordered: false } - outcome: - error: true - result: - deletedCount: 0 - insertedCount: 2 - # Since the map of insertedIds is generated before execution it - # could indicate inserts that did not actually succeed. We omit - # this field rather than expect drivers to provide an accurate - # map filtered by write errors. - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } diff --git a/testdata/crud/v1/write/deleteMany-collation.json b/testdata/crud/v1/write/deleteMany-collation.json deleted file mode 100644 index fce75e488a..0000000000 --- a/testdata/crud/v1/write/deleteMany-collation.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "ping" - }, - { - "_id": 3, - "x": "pINg" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "DeleteMany when many documents match with collation", - "operation": { - "name": "deleteMany", - "arguments": { - "filter": { - "x": "PING" - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": { - "deletedCount": 2 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/deleteMany-collation.yml b/testdata/crud/v1/write/deleteMany-collation.yml deleted file mode 100644 index 65a49b7fda..0000000000 --- a/testdata/crud/v1/write/deleteMany-collation.yml +++ /dev/null @@ -1,23 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 'ping'} - - {_id: 3, x: 'pINg'} -minServerVersion: '3.4' -serverless: 'forbid' - -tests: - - - description: "DeleteMany when many documents match with collation" - operation: - name: "deleteMany" - arguments: - filter: - x: 'PING' - collation: { locale: 'en_US', strength: 2 } # https://www.mongodb.com/docs/manual/reference/collation/#collation-document - - outcome: - result: - deletedCount: 2 - collection: - data: - - {_id: 1, x: 11} diff --git a/testdata/crud/v1/write/deleteMany.json b/testdata/crud/v1/write/deleteMany.json deleted file mode 100644 index 7eee85e77f..0000000000 --- a/testdata/crud/v1/write/deleteMany.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "DeleteMany when many documents match", - "operation": { - "name": "deleteMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - } - } - }, - "outcome": { - "result": { - "deletedCount": 2 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - } - ] - } - } - }, - { - "description": "DeleteMany when no document matches", - "operation": { - "name": "deleteMany", - "arguments": { - "filter": { - "_id": 4 - } - } - }, - "outcome": { - "result": { - "deletedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/deleteMany.yml b/testdata/crud/v1/write/deleteMany.yml deleted file mode 100644 index e776c82f9a..0000000000 --- a/testdata/crud/v1/write/deleteMany.yml +++ /dev/null @@ -1,35 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "DeleteMany when many documents match" - operation: - name: "deleteMany" - arguments: - filter: - _id: {$gt: 1} - - outcome: - result: - deletedCount: 2 - collection: - data: - - {_id: 1, x: 11} - - - description: "DeleteMany when no document matches" - operation: - name: "deleteMany" - arguments: - filter: {_id: 4} - - outcome: - result: - deletedCount: 0 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} diff --git a/testdata/crud/v1/write/deleteOne-collation.json b/testdata/crud/v1/write/deleteOne-collation.json deleted file mode 100644 index 9bcef411ef..0000000000 --- a/testdata/crud/v1/write/deleteOne-collation.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "ping" - }, - { - "_id": 3, - "x": "pINg" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "DeleteOne when many documents matches with collation", - "operation": { - "name": "deleteOne", - "arguments": { - "filter": { - "x": "PING" - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": { - "deletedCount": 1 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 3, - "x": "pINg" - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/deleteOne-collation.yml b/testdata/crud/v1/write/deleteOne-collation.yml deleted file mode 100644 index ce335bf3de..0000000000 --- a/testdata/crud/v1/write/deleteOne-collation.yml +++ /dev/null @@ -1,23 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 'ping'} - - {_id: 3, x: 'pINg'} -minServerVersion: '3.4' -serverless: 'forbid' - -tests: - - - description: "DeleteOne when many documents matches with collation" - operation: - name: "deleteOne" - arguments: - filter: {x: 'PING'} - collation: { locale: 'en_US', strength: 2 } # https://www.mongodb.com/docs/manual/reference/collation/#collation-document - - outcome: - result: - deletedCount: 1 - collection: - data: - - {_id: 1, x: 11} - - {_id: 3, x: 'pINg'} diff --git a/testdata/crud/v1/write/deleteOne.json b/testdata/crud/v1/write/deleteOne.json deleted file mode 100644 index a1106deae3..0000000000 --- a/testdata/crud/v1/write/deleteOne.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "DeleteOne when many documents match", - "operation": { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - } - } - }, - "outcome": { - "result": { - "deletedCount": 1 - } - } - }, - { - "description": "DeleteOne when one document matches", - "operation": { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 2 - } - } - }, - "outcome": { - "result": { - "deletedCount": 1 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "DeleteOne when no documents match", - "operation": { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 4 - } - } - }, - "outcome": { - "result": { - "deletedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/deleteOne.yml b/testdata/crud/v1/write/deleteOne.yml deleted file mode 100644 index 2d8a90779f..0000000000 --- a/testdata/crud/v1/write/deleteOne.yml +++ /dev/null @@ -1,48 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "DeleteOne when many documents match" - operation: - name: "deleteOne" - arguments: - filter: - _id: {$gt: 1} - - outcome: - result: - deletedCount: 1 - # can't verify collection because we don't have a way - # of knowing which document gets deleted. - - - description: "DeleteOne when one document matches" - operation: - name: "deleteOne" - arguments: - filter: {_id: 2} - - outcome: - result: - deletedCount: 1 - collection: - data: - - {_id: 1, x: 11} - - {_id: 3, x: 33} - - - description: "DeleteOne when no documents match" - operation: - name: "deleteOne" - arguments: - filter: {_id: 4} - - outcome: - result: - deletedCount: 0 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} diff --git a/testdata/crud/v1/write/findOneAndDelete-collation.json b/testdata/crud/v1/write/findOneAndDelete-collation.json deleted file mode 100644 index 32480da842..0000000000 --- a/testdata/crud/v1/write/findOneAndDelete-collation.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "ping" - }, - { - "_id": 3, - "x": "pINg" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "FindOneAndDelete when one document matches with collation", - "operation": { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "_id": 2, - "x": "PING" - }, - "projection": { - "x": 1, - "_id": 0 - }, - "sort": { - "x": 1 - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": { - "x": "ping" - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 3, - "x": "pINg" - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/findOneAndDelete-collation.yml b/testdata/crud/v1/write/findOneAndDelete-collation.yml deleted file mode 100644 index 720ecb2f81..0000000000 --- a/testdata/crud/v1/write/findOneAndDelete-collation.yml +++ /dev/null @@ -1,24 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 'ping'} - - {_id: 3, x: 'pINg'} -minServerVersion: '3.4' -serverless: 'forbid' - -tests: - - - description: "FindOneAndDelete when one document matches with collation" - operation: - name: findOneAndDelete - arguments: - filter: {_id: 2, x: 'PING'} - projection: {x: 1, _id: 0} - sort: {x: 1} - collation: { locale: 'en_US', strength: 2 } # https://www.mongodb.com/docs/manual/reference/collation/#collation-document - - outcome: - result: {x: 'ping'} - collection: - data: - - {_id: 1, x: 11} - - {_id: 3, x: 'pINg'} diff --git a/testdata/crud/v1/write/findOneAndDelete.json b/testdata/crud/v1/write/findOneAndDelete.json deleted file mode 100644 index e424e2aad1..0000000000 --- a/testdata/crud/v1/write/findOneAndDelete.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "FindOneAndDelete when many documents match", - "operation": { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "projection": { - "x": 1, - "_id": 0 - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "x": 22 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndDelete when one document matches", - "operation": { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "_id": 2 - }, - "projection": { - "x": 1, - "_id": 0 - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "x": 22 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndDelete when no documents match", - "operation": { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "_id": 4 - }, - "projection": { - "x": 1, - "_id": 0 - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": null, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/findOneAndDelete.yml b/testdata/crud/v1/write/findOneAndDelete.yml deleted file mode 100644 index a485ee46a5..0000000000 --- a/testdata/crud/v1/write/findOneAndDelete.yml +++ /dev/null @@ -1,53 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "FindOneAndDelete when many documents match" - operation: - name: findOneAndDelete - arguments: - filter: - _id: {$gt: 1} - projection: {x: 1, _id: 0} - sort: {x: 1} - - outcome: - result: {x: 22} - collection: - data: - - {_id: 1, x: 11} - - {_id: 3, x: 33} - - - description: "FindOneAndDelete when one document matches" - operation: - name: findOneAndDelete - arguments: - filter: {_id: 2} - projection: {x: 1, _id: 0} - sort: {x: 1} - - outcome: - result: {x: 22} - collection: - data: - - {_id: 1, x: 11} - - {_id: 3, x: 33} - - - description: "FindOneAndDelete when no documents match" - operation: - name: findOneAndDelete - arguments: - filter: {_id: 4} - projection: {x: 1, _id: 0} - sort: {x: 1} - - outcome: - result: null - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} \ No newline at end of file diff --git a/testdata/crud/v1/write/findOneAndReplace-collation.json b/testdata/crud/v1/write/findOneAndReplace-collation.json deleted file mode 100644 index 9b3c25005b..0000000000 --- a/testdata/crud/v1/write/findOneAndReplace-collation.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "ping" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "FindOneAndReplace when one document matches with collation returning the document after modification", - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "x": "PING" - }, - "replacement": { - "x": "pong" - }, - "projection": { - "x": 1, - "_id": 0 - }, - "returnDocument": "After", - "sort": { - "x": 1 - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": { - "x": "pong" - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "pong" - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/findOneAndReplace-collation.yml b/testdata/crud/v1/write/findOneAndReplace-collation.yml deleted file mode 100644 index f132b1211d..0000000000 --- a/testdata/crud/v1/write/findOneAndReplace-collation.yml +++ /dev/null @@ -1,25 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 'ping'} -minServerVersion: '3.4' -serverless: 'forbid' - -tests: - - - description: "FindOneAndReplace when one document matches with collation returning the document after modification" - operation: - name: findOneAndReplace - arguments: - filter: {x: 'PING'} - replacement: {x: 'pong'} - projection: {x: 1, _id: 0} - returnDocument: After - sort: {x: 1} - collation: { locale: 'en_US', strength: 2 } # https://www.mongodb.com/docs/manual/reference/collation/#collation-document - - outcome: - result: {x: 'pong'} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 'pong'} diff --git a/testdata/crud/v1/write/findOneAndReplace-upsert.json b/testdata/crud/v1/write/findOneAndReplace-upsert.json deleted file mode 100644 index 0f07bf9c18..0000000000 --- a/testdata/crud/v1/write/findOneAndReplace-upsert.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "minServerVersion": "2.6", - "tests": [ - { - "description": "FindOneAndReplace when no documents match without id specified with upsert returning the document before modification", - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 4 - }, - "replacement": { - "x": 44 - }, - "projection": { - "x": 1, - "_id": 0 - }, - "upsert": true - } - }, - "outcome": { - "result": null, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - } - }, - { - "description": "FindOneAndReplace when no documents match without id specified with upsert returning the document after modification", - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 4 - }, - "replacement": { - "x": 44 - }, - "projection": { - "x": 1, - "_id": 0 - }, - "returnDocument": "After", - "sort": { - "x": 1 - }, - "upsert": true - } - }, - "outcome": { - "result": { - "x": 44 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - } - }, - { - "description": "FindOneAndReplace when no documents match with id specified with upsert returning the document before modification", - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 4 - }, - "replacement": { - "_id": 4, - "x": 44 - }, - "projection": { - "x": 1, - "_id": 0 - }, - "upsert": true - } - }, - "outcome": { - "result": null, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - } - }, - { - "description": "FindOneAndReplace when no documents match with id specified with upsert returning the document after modification", - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 4 - }, - "replacement": { - "_id": 4, - "x": 44 - }, - "projection": { - "x": 1, - "_id": 0 - }, - "returnDocument": "After", - "sort": { - "x": 1 - }, - "upsert": true - } - }, - "outcome": { - "result": { - "x": 44 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/findOneAndReplace-upsert.yml b/testdata/crud/v1/write/findOneAndReplace-upsert.yml deleted file mode 100644 index 2bd64c94ec..0000000000 --- a/testdata/crud/v1/write/findOneAndReplace-upsert.yml +++ /dev/null @@ -1,91 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} -minServerVersion: '2.6' - -tests: - - - description: "FindOneAndReplace when no documents match without id specified with upsert returning the document before modification" - operation: - name: findOneAndReplace - arguments: - filter: {_id: 4} - replacement: {x: 44} - projection: {x: 1, _id: 0} - # Omit the sort option as it has no effect when no documents - # match and would only cause an inconsistent return value on - # pre-3.0 servers when combined with returnDocument "before" - # (see: SERVER-17650). - upsert: true - - outcome: - result: null - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 44} - - - description: "FindOneAndReplace when no documents match without id specified with upsert returning the document after modification" - operation: - name: findOneAndReplace - arguments: - filter: {_id: 4} - replacement: {x: 44} - projection: {x: 1, _id: 0} - returnDocument: After - sort: {x: 1} - upsert: true - - outcome: - result: {x: 44} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 44} - - - description: "FindOneAndReplace when no documents match with id specified with upsert returning the document before modification" - operation: - name: findOneAndReplace - arguments: - filter: {_id: 4} - replacement: {_id: 4, x: 44} - projection: {x: 1, _id: 0} - # Omit the sort option as it has no effect when no documents - # match and would only cause an inconsistent return value on - # pre-3.0 servers when combined with returnDocument "before" - # (see: SERVER-17650). - upsert: true - - outcome: - result: null - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 44} - - - description: "FindOneAndReplace when no documents match with id specified with upsert returning the document after modification" - operation: - name: findOneAndReplace - arguments: - filter: {_id: 4} - replacement: {_id: 4, x: 44} - projection: {x: 1, _id: 0} - returnDocument: After - sort: {x: 1} - upsert: true - - outcome: - result: {x: 44} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 44} diff --git a/testdata/crud/v1/write/findOneAndReplace.json b/testdata/crud/v1/write/findOneAndReplace.json deleted file mode 100644 index 70e5c3df4e..0000000000 --- a/testdata/crud/v1/write/findOneAndReplace.json +++ /dev/null @@ -1,273 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "FindOneAndReplace when many documents match returning the document before modification", - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "replacement": { - "x": 32 - }, - "projection": { - "x": 1, - "_id": 0 - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "x": 22 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 32 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndReplace when many documents match returning the document after modification", - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "replacement": { - "x": 32 - }, - "projection": { - "x": 1, - "_id": 0 - }, - "returnDocument": "After", - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "x": 32 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 32 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndReplace when one document matches returning the document before modification", - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 2 - }, - "replacement": { - "x": 32 - }, - "projection": { - "x": 1, - "_id": 0 - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "x": 22 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 32 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndReplace when one document matches returning the document after modification", - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 2 - }, - "replacement": { - "x": 32 - }, - "projection": { - "x": 1, - "_id": 0 - }, - "returnDocument": "After", - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "x": 32 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 32 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndReplace when no documents match returning the document before modification", - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 4 - }, - "replacement": { - "x": 44 - }, - "projection": { - "x": 1, - "_id": 0 - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": null, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndReplace when no documents match returning the document after modification", - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 4 - }, - "replacement": { - "x": 44 - }, - "projection": { - "x": 1, - "_id": 0 - }, - "returnDocument": "After", - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": null, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/findOneAndReplace.yml b/testdata/crud/v1/write/findOneAndReplace.yml deleted file mode 100644 index c121418b78..0000000000 --- a/testdata/crud/v1/write/findOneAndReplace.yml +++ /dev/null @@ -1,113 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "FindOneAndReplace when many documents match returning the document before modification" - operation: - name: findOneAndReplace - arguments: - filter: - _id: {$gt: 1} - replacement: {x: 32} - projection: {x: 1, _id: 0} - sort: {x: 1} - - outcome: - result: {x: 22} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 32} - - {_id: 3, x: 33} - - - description: "FindOneAndReplace when many documents match returning the document after modification" - operation: - name: findOneAndReplace - arguments: - filter: - _id: {$gt: 1} - replacement: {x: 32} - projection: {x: 1, _id: 0} - returnDocument: After - sort: {x: 1} - - outcome: - result: {x: 32} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 32} - - {_id: 3, x: 33} - - - description: "FindOneAndReplace when one document matches returning the document before modification" - operation: - name: findOneAndReplace - arguments: - filter: {_id: 2} - replacement: {x: 32} - projection: {x: 1, _id: 0} - sort: {x: 1} - - outcome: - result: {x: 22} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 32} - - {_id: 3, x: 33} - - - description: "FindOneAndReplace when one document matches returning the document after modification" - operation: - name: findOneAndReplace - arguments: - filter: {_id: 2} - replacement: {x: 32} - projection: {x: 1, _id: 0} - returnDocument: After - sort: {x: 1} - - outcome: - result: {x: 32} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 32} - - {_id: 3, x: 33} - - - description: "FindOneAndReplace when no documents match returning the document before modification" - operation: - name: findOneAndReplace - arguments: - filter: {_id: 4} - replacement: {x: 44} - projection: {x: 1, _id: 0} - sort: {x: 1} - - outcome: - result: null - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - - description: "FindOneAndReplace when no documents match returning the document after modification" - operation: - name: findOneAndReplace - arguments: - filter: {_id: 4} - replacement: {x: 44} - projection: {x: 1, _id: 0} - returnDocument: After - sort: {x: 1} - - outcome: - result: null - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} diff --git a/testdata/crud/v1/write/findOneAndUpdate-arrayFilters.json b/testdata/crud/v1/write/findOneAndUpdate-arrayFilters.json deleted file mode 100644 index 1aa13b863e..0000000000 --- a/testdata/crud/v1/write/findOneAndUpdate-arrayFilters.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - } - ], - "minServerVersion": "3.5.6", - "tests": [ - { - "description": "FindOneAndUpdate when no document matches arrayFilters", - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 4 - } - ] - } - }, - "outcome": { - "result": { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - } - ] - } - } - }, - { - "description": "FindOneAndUpdate when one document matches arrayFilters", - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 3 - } - ] - } - }, - "outcome": { - "result": { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "y": [ - { - "b": 2 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - } - ] - } - } - }, - { - "description": "FindOneAndUpdate when multiple documents match arrayFilters", - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 1 - } - ] - } - }, - "outcome": { - "result": { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 2 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/findOneAndUpdate-arrayFilters.yml b/testdata/crud/v1/write/findOneAndUpdate-arrayFilters.yml deleted file mode 100644 index 7665ad0c59..0000000000 --- a/testdata/crud/v1/write/findOneAndUpdate-arrayFilters.yml +++ /dev/null @@ -1,69 +0,0 @@ -data: - - {_id: 1, y: [{b: 3}, {b: 1}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} -minServerVersion: '3.5.6' - -tests: - - - description: "FindOneAndUpdate when no document matches arrayFilters" - operation: - name: findOneAndUpdate - arguments: - filter: {} - update: - $set: {"y.$[i].b": 2} - arrayFilters: - - {i.b: 4} - - outcome: - result: - _id: 1 - y: - - {b: 3} - - {b: 1} - collection: - data: - - {_id: 1, y: [{b: 3}, {b: 1}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} - - - description: "FindOneAndUpdate when one document matches arrayFilters" - operation: - name: findOneAndUpdate - arguments: - filter: {} - update: - $set: {"y.$[i].b": 2} - arrayFilters: - - {i.b: 3} - - outcome: - result: - _id: 1 - y: - - {b: 3} - - {b: 1} - collection: - data: - - {_id: 1, y: [{b: 2}, {b: 1}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} - - - description: "FindOneAndUpdate when multiple documents match arrayFilters" - operation: - name: findOneAndUpdate - arguments: - filter: {} - update: - $set: {"y.$[i].b": 2} - arrayFilters: - - {i.b: 1} - - outcome: - result: - _id: 1 - y: - - {b: 3} - - {b: 1} - collection: - data: - - {_id: 1, y: [{b: 3}, {b: 2}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} diff --git a/testdata/crud/v1/write/findOneAndUpdate-collation.json b/testdata/crud/v1/write/findOneAndUpdate-collation.json deleted file mode 100644 index 8abab7bd6b..0000000000 --- a/testdata/crud/v1/write/findOneAndUpdate-collation.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "ping" - }, - { - "_id": 3, - "x": "pINg" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "FindOneAndUpdate when many documents match with collation returning the document before modification", - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "x": "PING" - }, - "update": { - "$set": { - "x": "pong" - } - }, - "projection": { - "x": 1, - "_id": 0 - }, - "sort": { - "_id": 1 - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": { - "x": "ping" - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "pong" - }, - { - "_id": 3, - "x": "pINg" - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/findOneAndUpdate-collation.yml b/testdata/crud/v1/write/findOneAndUpdate-collation.yml deleted file mode 100644 index 5a110b01bf..0000000000 --- a/testdata/crud/v1/write/findOneAndUpdate-collation.yml +++ /dev/null @@ -1,28 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 'ping'} - - {_id: 3, x: 'pINg'} -minServerVersion: '3.4' -serverless: 'forbid' - -tests: - - - description: "FindOneAndUpdate when many documents match with collation returning the document before modification" - operation: - name: findOneAndUpdate - arguments: - filter: - x: 'PING' - update: - $set: {x: 'pong'} - projection: {x: 1, _id: 0} - sort: {_id: 1} - collation: { locale: 'en_US', strength: 2 } # https://www.mongodb.com/docs/manual/reference/collation/#collation-document - - outcome: - result: {x: 'ping'} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 'pong'} - - {_id: 3, x: 'pINg'} diff --git a/testdata/crud/v1/write/findOneAndUpdate.json b/testdata/crud/v1/write/findOneAndUpdate.json deleted file mode 100644 index 6da8325273..0000000000 --- a/testdata/crud/v1/write/findOneAndUpdate.json +++ /dev/null @@ -1,379 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "FindOneAndUpdate when many documents match returning the document before modification", - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "projection": { - "x": 1, - "_id": 0 - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "x": 22 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndUpdate when many documents match returning the document after modification", - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - }, - "projection": { - "x": 1, - "_id": 0 - }, - "returnDocument": "After", - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "x": 23 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndUpdate when one document matches returning the document before modification", - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "projection": { - "x": 1, - "_id": 0 - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "x": 22 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndUpdate when one document matches returning the document after modification", - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "projection": { - "x": 1, - "_id": 0 - }, - "returnDocument": "After", - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "x": 23 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndUpdate when no documents match returning the document before modification", - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "projection": { - "x": 1, - "_id": 0 - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": null, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndUpdate when no documents match with upsert returning the document before modification", - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "projection": { - "x": 1, - "_id": 0 - }, - "upsert": true - } - }, - "outcome": { - "result": null, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 1 - } - ] - } - } - }, - { - "description": "FindOneAndUpdate when no documents match returning the document after modification", - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "projection": { - "x": 1, - "_id": 0 - }, - "returnDocument": "After", - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": null, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "FindOneAndUpdate when no documents match with upsert returning the document after modification", - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "projection": { - "x": 1, - "_id": 0 - }, - "returnDocument": "After", - "sort": { - "x": 1 - }, - "upsert": true - } - }, - "outcome": { - "result": { - "x": 1 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/findOneAndUpdate.yml b/testdata/crud/v1/write/findOneAndUpdate.yml deleted file mode 100644 index bed02f146a..0000000000 --- a/testdata/crud/v1/write/findOneAndUpdate.yml +++ /dev/null @@ -1,163 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "FindOneAndUpdate when many documents match returning the document before modification" - operation: - name: findOneAndUpdate - arguments: - filter: - _id: {$gt: 1} - update: - $inc: {x: 1} - projection: {x: 1, _id: 0} - sort: {x: 1} - - outcome: - result: {x: 22} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 23} - - {_id: 3, x: 33} - - - description: "FindOneAndUpdate when many documents match returning the document after modification" - operation: - name: findOneAndUpdate - arguments: - filter: - _id: {$gt: 1} - update: - $inc: {x: 1} - projection: {x: 1, _id: 0} - returnDocument: After - sort: {x: 1} - - outcome: - result: {x: 23} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 23} - - {_id: 3, x: 33} - - - description: "FindOneAndUpdate when one document matches returning the document before modification" - operation: - name: findOneAndUpdate - arguments: - filter: {_id: 2} - update: - $inc: {x: 1} - projection: {x: 1, _id: 0} - sort: {x: 1} - - outcome: - result: {x: 22} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 23} - - {_id: 3, x: 33} - - - description: "FindOneAndUpdate when one document matches returning the document after modification" - operation: - name: findOneAndUpdate - arguments: - filter: {_id: 2} - update: - $inc: {x: 1} - projection: {x: 1, _id: 0} - returnDocument: After - sort: {x: 1} - - outcome: - result: {x: 23} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 23} - - {_id: 3, x: 33} - - - description: "FindOneAndUpdate when no documents match returning the document before modification" - operation: - name: findOneAndUpdate - arguments: - filter: {_id: 4} - update: - $inc: {x: 1} - projection: {x: 1, _id: 0} - sort: {x: 1} - - outcome: - result: null - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - - description: "FindOneAndUpdate when no documents match with upsert returning the document before modification" - operation: - name: findOneAndUpdate - arguments: - filter: {_id: 4} - update: - $inc: {x: 1} - projection: {x: 1, _id: 0} - # Omit the sort option as it has no effect when no documents - # match and would only cause an inconsistent return value on - # pre-3.0 servers when combined with returnDocument "before" - # (see: SERVER-17650). - upsert: true - - outcome: - result: null - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 1} - - - description: "FindOneAndUpdate when no documents match returning the document after modification" - operation: - name: findOneAndUpdate - arguments: - filter: {_id: 4} - update: - $inc: {x: 1} - projection: {x: 1, _id: 0} - returnDocument: After - sort: {x: 1} - - outcome: - result: null - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - - description: "FindOneAndUpdate when no documents match with upsert returning the document after modification" - operation: - name: findOneAndUpdate - arguments: - filter: {_id: 4} - update: - $inc: {x: 1} - projection: {x: 1, _id: 0} - returnDocument: After - sort: {x: 1} - upsert: true - - outcome: - result: {x: 1} - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 1} \ No newline at end of file diff --git a/testdata/crud/v1/write/insertMany.json b/testdata/crud/v1/write/insertMany.json deleted file mode 100644 index 6a2e5261b7..0000000000 --- a/testdata/crud/v1/write/insertMany.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - } - ], - "tests": [ - { - "description": "InsertMany with non-existing documents", - "operation": { - "name": "insertMany", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "insertedIds": { - "0": 2, - "1": 3 - } - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertMany continue-on-error behavior with unordered (preexisting duplicate key)", - "operation": { - "name": "insertMany", - "arguments": { - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "options": { - "ordered": false - } - } - }, - "outcome": { - "error": true, - "result": { - "deletedCount": 0, - "insertedCount": 2, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertMany continue-on-error behavior with unordered (duplicate key in requests)", - "operation": { - "name": "insertMany", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "options": { - "ordered": false - } - } - }, - "outcome": { - "error": true, - "result": { - "deletedCount": 0, - "insertedCount": 2, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/insertMany.yml b/testdata/crud/v1/write/insertMany.yml deleted file mode 100644 index f76e4af68d..0000000000 --- a/testdata/crud/v1/write/insertMany.yml +++ /dev/null @@ -1,77 +0,0 @@ -data: - - {_id: 1, x: 11} - -tests: - - - description: "InsertMany with non-existing documents" - operation: - name: "insertMany" - arguments: - documents: - - {_id: 2, x: 22} - - {_id: 3, x: 33} - options: { ordered: true } - outcome: - result: - insertedIds: { 0: 2, 1: 3 } - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - - description: "InsertMany continue-on-error behavior with unordered (preexisting duplicate key)" - operation: - name: "insertMany" - arguments: - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - options: { ordered: false } - outcome: - error: true - result: - deletedCount: 0 - insertedCount: 2 - # Since the map of insertedIds is generated before execution it - # could indicate inserts that did not actually succeed. We omit - # this field rather than expect drivers to provide an accurate - # map filtered by write errors. - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertMany continue-on-error behavior with unordered (duplicate key in requests)" - operation: - name: "insertMany" - arguments: - documents: - - { _id: 2, x: 22 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - options: { ordered: false } - outcome: - error: true - result: - deletedCount: 0 - insertedCount: 2 - # Since the map of insertedIds is generated before execution it - # could indicate inserts that did not actually succeed. We omit - # this field rather than expect drivers to provide an accurate - # map filtered by write errors. - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } diff --git a/testdata/crud/v1/write/insertOne.json b/testdata/crud/v1/write/insertOne.json deleted file mode 100644 index 525de75e07..0000000000 --- a/testdata/crud/v1/write/insertOne.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - } - ], - "tests": [ - { - "description": "InsertOne with a non-existing document", - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - }, - "outcome": { - "result": { - "insertedId": 2 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/insertOne.yml b/testdata/crud/v1/write/insertOne.yml deleted file mode 100644 index 8d65499d9b..0000000000 --- a/testdata/crud/v1/write/insertOne.yml +++ /dev/null @@ -1,18 +0,0 @@ -data: - - {_id: 1, x: 11} - -tests: - - - description: "InsertOne with a non-existing document" - operation: - name: "insertOne" - arguments: - document: {_id: 2, x: 22} - - outcome: - result: - insertedId: 2 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} \ No newline at end of file diff --git a/testdata/crud/v1/write/replaceOne-collation.json b/testdata/crud/v1/write/replaceOne-collation.json deleted file mode 100644 index fa4cbe9970..0000000000 --- a/testdata/crud/v1/write/replaceOne-collation.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "ping" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "ReplaceOne when one document matches with collation", - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "x": "PING" - }, - "replacement": { - "_id": 2, - "x": "pong" - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "pong" - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/replaceOne-collation.yml b/testdata/crud/v1/write/replaceOne-collation.yml deleted file mode 100644 index cad343caa1..0000000000 --- a/testdata/crud/v1/write/replaceOne-collation.yml +++ /dev/null @@ -1,25 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 'ping'} -minServerVersion: '3.4' -serverless: 'forbid' - -tests: - - - description: "ReplaceOne when one document matches with collation" - operation: - name: "replaceOne" - arguments: - filter: {x: 'PING'} - replacement: {_id: 2, x: 'pong'} - collation: {locale: 'en_US', strength: 2} # https://www.mongodb.com/docs/manual/reference/collation/#collation-document - - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 'pong'} diff --git a/testdata/crud/v1/write/replaceOne.json b/testdata/crud/v1/write/replaceOne.json deleted file mode 100644 index 101af25c7c..0000000000 --- a/testdata/crud/v1/write/replaceOne.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "minServerVersion": "2.6", - "tests": [ - { - "description": "ReplaceOne when many documents match", - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "replacement": { - "x": 111 - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - }, - { - "description": "ReplaceOne when one document matches", - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 111 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "ReplaceOne when no documents match", - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 4 - }, - "replacement": { - "_id": 4, - "x": 1 - } - } - }, - "outcome": { - "result": { - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "ReplaceOne with upsert when no documents match without an id specified", - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 4 - }, - "replacement": { - "x": 1 - }, - "upsert": true - } - }, - "outcome": { - "result": { - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 1, - "upsertedId": 4 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 1 - } - ] - } - } - }, - { - "description": "ReplaceOne with upsert when no documents match with an id specified", - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 4 - }, - "replacement": { - "_id": 4, - "x": 1 - }, - "upsert": true - } - }, - "outcome": { - "result": { - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 1, - "upsertedId": 4 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/replaceOne.yml b/testdata/crud/v1/write/replaceOne.yml deleted file mode 100644 index 4bccd36008..0000000000 --- a/testdata/crud/v1/write/replaceOne.yml +++ /dev/null @@ -1,102 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} -minServerVersion: '2.6' - -tests: - - - description: "ReplaceOne when many documents match" - operation: - name: "replaceOne" - arguments: - filter: - _id: {$gt: 1} - replacement: {x: 111} - - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - # Can't verify collection data because we don't have a way of - # knowing which document gets updated. - - - description: "ReplaceOne when one document matches" - operation: - name: "replaceOne" - arguments: - filter: {_id: 1} - replacement: {_id: 1, x: 111} - - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - {_id: 1, x: 111} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - - description: "ReplaceOne when no documents match" - operation: - name: "replaceOne" - arguments: - filter: {_id: 4} - replacement: {_id: 4, x: 1} - - outcome: - result: - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - - description: "ReplaceOne with upsert when no documents match without an id specified" - operation: - name: "replaceOne" - arguments: - filter: {_id: 4} - replacement: {x: 1} - upsert: true - - outcome: - result: - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 1 - upsertedId: 4 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 1} - - - - description: "ReplaceOne with upsert when no documents match with an id specified" - operation: - name: "replaceOne" - arguments: - filter: {_id: 4} - replacement: {_id: 4, x: 1} - upsert: true - - outcome: - result: - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 1 - upsertedId: 4 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 1} diff --git a/testdata/crud/v1/write/updateMany-arrayFilters.json b/testdata/crud/v1/write/updateMany-arrayFilters.json deleted file mode 100644 index ae4c123ea5..0000000000 --- a/testdata/crud/v1/write/updateMany-arrayFilters.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - } - ], - "minServerVersion": "3.5.6", - "tests": [ - { - "description": "UpdateMany when no documents match arrayFilters", - "operation": { - "name": "updateMany", - "arguments": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 4 - } - ] - } - }, - "outcome": { - "result": { - "matchedCount": 2, - "modifiedCount": 0, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - } - ] - } - } - }, - { - "description": "UpdateMany when one document matches arrayFilters", - "operation": { - "name": "updateMany", - "arguments": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 3 - } - ] - } - }, - "outcome": { - "result": { - "matchedCount": 2, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "y": [ - { - "b": 2 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - } - ] - } - } - }, - { - "description": "UpdateMany when multiple documents match arrayFilters", - "operation": { - "name": "updateMany", - "arguments": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 1 - } - ] - } - }, - "outcome": { - "result": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 2 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 2 - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/updateMany-arrayFilters.yml b/testdata/crud/v1/write/updateMany-arrayFilters.yml deleted file mode 100644 index 3cfee56924..0000000000 --- a/testdata/crud/v1/write/updateMany-arrayFilters.yml +++ /dev/null @@ -1,66 +0,0 @@ -data: - - {_id: 1, y: [{b: 3}, {b: 1}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} -minServerVersion: '3.5.6' - -tests: - - - description: "UpdateMany when no documents match arrayFilters" - operation: - name: "updateMany" - arguments: - filter: {} - update: - $set: {"y.$[i].b": 2} - arrayFilters: - - {i.b: 4} - - outcome: - result: - matchedCount: 2 - modifiedCount: 0 - upsertedCount: 0 - collection: - data: - - {_id: 1, y: [{b: 3}, {b: 1}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} - - - description: "UpdateMany when one document matches arrayFilters" - operation: - name: "updateMany" - arguments: - filter: {} - update: - $set: {"y.$[i].b": 2} - arrayFilters: - - {i.b: 3} - - outcome: - result: - matchedCount: 2 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - {_id: 1, y: [{b: 2}, {b: 1}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} - - - description: "UpdateMany when multiple documents match arrayFilters" - operation: - name: "updateMany" - arguments: - filter: {} - update: - $set: {"y.$[i].b": 2} - arrayFilters: - - {i.b: 1} - - outcome: - result: - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - collection: - data: - - {_id: 1, y: [{b: 3}, {b: 2}]} - - {_id: 2, y: [{b: 0}, {b: 2}]} diff --git a/testdata/crud/v1/write/updateMany-collation.json b/testdata/crud/v1/write/updateMany-collation.json deleted file mode 100644 index 8becfd806b..0000000000 --- a/testdata/crud/v1/write/updateMany-collation.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "ping" - }, - { - "_id": 3, - "x": "pINg" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "UpdateMany when many documents match with collation", - "operation": { - "name": "updateMany", - "arguments": { - "filter": { - "x": "ping" - }, - "update": { - "$set": { - "x": "pong" - } - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "pong" - }, - { - "_id": 3, - "x": "pong" - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/updateMany-collation.yml b/testdata/crud/v1/write/updateMany-collation.yml deleted file mode 100644 index b373789649..0000000000 --- a/testdata/crud/v1/write/updateMany-collation.yml +++ /dev/null @@ -1,29 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 'ping'} - - {_id: 3, x: 'pINg'} -minServerVersion: '3.4' -serverless: 'forbid' - -tests: - - - description: "UpdateMany when many documents match with collation" - operation: - name: "updateMany" - arguments: - filter: - x: 'ping' - update: - $set: {x: 'pong'} - collation: { locale: 'en_US', strength: 2 } # https://www.mongodb.com/docs/manual/reference/collation/#collation-document - - outcome: - result: - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 'pong'} - - {_id: 3, x: 'pong'} diff --git a/testdata/crud/v1/write/updateMany.json b/testdata/crud/v1/write/updateMany.json deleted file mode 100644 index a3c339987d..0000000000 --- a/testdata/crud/v1/write/updateMany.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "minServerVersion": "2.6", - "tests": [ - { - "description": "UpdateMany when many documents match", - "operation": { - "name": "updateMany", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "result": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 34 - } - ] - } - } - }, - { - "description": "UpdateMany when one document matches", - "operation": { - "name": "updateMany", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "UpdateMany when no documents match", - "operation": { - "name": "updateMany", - "arguments": { - "filter": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "result": { - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "UpdateMany with upsert when no documents match", - "operation": { - "name": "updateMany", - "arguments": { - "filter": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "upsert": true - } - }, - "outcome": { - "result": { - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 1, - "upsertedId": 4 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/updateMany.yml b/testdata/crud/v1/write/updateMany.yml deleted file mode 100644 index a0eb62ba83..0000000000 --- a/testdata/crud/v1/write/updateMany.yml +++ /dev/null @@ -1,87 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} -minServerVersion: '2.6' - -tests: - - - description: "UpdateMany when many documents match" - operation: - name: "updateMany" - arguments: - filter: - _id: {$gt: 1} - update: - $inc: {x: 1} - - outcome: - result: - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 23} - - {_id: 3, x: 34} - - - description: "UpdateMany when one document matches" - operation: - name: "updateMany" - arguments: - filter: {_id: 1} - update: - $inc: {x: 1} - - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - {_id: 1, x: 12} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - - description: "UpdateMany when no documents match" - operation: - name: "updateMany" - arguments: - filter: {_id: 4} - update: - $inc: {x: 1} - - outcome: - result: - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - - description: "UpdateMany with upsert when no documents match" - operation: - name: "updateMany" - arguments: - filter: {_id: 4} - update: - $inc: {x: 1} - upsert: true - - outcome: - result: - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 1 - upsertedId: 4 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 1} diff --git a/testdata/crud/v1/write/updateOne-arrayFilters.json b/testdata/crud/v1/write/updateOne-arrayFilters.json deleted file mode 100644 index 087ed4b82f..0000000000 --- a/testdata/crud/v1/write/updateOne-arrayFilters.json +++ /dev/null @@ -1,395 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - }, - { - "_id": 3, - "y": [ - { - "b": 5, - "c": [ - { - "d": 2 - }, - { - "d": 1 - } - ] - } - ] - } - ], - "minServerVersion": "3.5.6", - "tests": [ - { - "description": "UpdateOne when no document matches arrayFilters", - "operation": { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 4 - } - ] - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 0, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - }, - { - "_id": 3, - "y": [ - { - "b": 5, - "c": [ - { - "d": 2 - }, - { - "d": 1 - } - ] - } - ] - } - ] - } - } - }, - { - "description": "UpdateOne when one document matches arrayFilters", - "operation": { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 3 - } - ] - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "y": [ - { - "b": 2 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - }, - { - "_id": 3, - "y": [ - { - "b": 5, - "c": [ - { - "d": 2 - }, - { - "d": 1 - } - ] - } - ] - } - ] - } - } - }, - { - "description": "UpdateOne when multiple documents match arrayFilters", - "operation": { - "name": "updateOne", - "arguments": { - "filter": {}, - "update": { - "$set": { - "y.$[i].b": 2 - } - }, - "arrayFilters": [ - { - "i.b": 1 - } - ] - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 2 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - }, - { - "_id": 3, - "y": [ - { - "b": 5, - "c": [ - { - "d": 2 - }, - { - "d": 1 - } - ] - } - ] - } - ] - } - } - }, - { - "description": "UpdateOne when no documents match multiple arrayFilters", - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 3 - }, - "update": { - "$set": { - "y.$[i].c.$[j].d": 0 - } - }, - "arrayFilters": [ - { - "i.b": 5 - }, - { - "j.d": 3 - } - ] - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 0, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - }, - { - "_id": 3, - "y": [ - { - "b": 5, - "c": [ - { - "d": 2 - }, - { - "d": 1 - } - ] - } - ] - } - ] - } - } - }, - { - "description": "UpdateOne when one document matches multiple arrayFilters", - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 3 - }, - "update": { - "$set": { - "y.$[i].c.$[j].d": 0 - } - }, - "arrayFilters": [ - { - "i.b": 5 - }, - { - "j.d": 1 - } - ] - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "y": [ - { - "b": 3 - }, - { - "b": 1 - } - ] - }, - { - "_id": 2, - "y": [ - { - "b": 0 - }, - { - "b": 1 - } - ] - }, - { - "_id": 3, - "y": [ - { - "b": 5, - "c": [ - { - "d": 2 - }, - { - "d": 0 - } - ] - } - ] - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/updateOne-arrayFilters.yml b/testdata/crud/v1/write/updateOne-arrayFilters.yml deleted file mode 100644 index a35e15c687..0000000000 --- a/testdata/crud/v1/write/updateOne-arrayFilters.yml +++ /dev/null @@ -1,114 +0,0 @@ -data: - - {_id: 1, y: [{b: 3}, {b: 1}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} - - {_id: 3, y: [{b: 5, c: [{d: 2}, {d: 1}] }]} -minServerVersion: '3.5.6' - -tests: - - - description: "UpdateOne when no document matches arrayFilters" - operation: - name: "updateOne" - arguments: - filter: {} - update: - $set: {"y.$[i].b": 2} - arrayFilters: - - {i.b: 4} - - outcome: - result: - matchedCount: 1 - modifiedCount: 0 - upsertedCount: 0 - collection: - data: - - {_id: 1, y: [{b: 3}, {b: 1}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} - - {_id: 3, y: [{b: 5, c: [{d: 2}, {d: 1}] }]} - - - description: "UpdateOne when one document matches arrayFilters" - operation: - name: "updateOne" - arguments: - filter: {} - update: - $set: {"y.$[i].b": 2} - arrayFilters: - - {i.b: 3} - - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - {_id: 1, y: [{b: 2}, {b: 1}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} - - {_id: 3, y: [{b: 5, c: [{d: 2}, {d: 1}] }]} - - - description: "UpdateOne when multiple documents match arrayFilters" - operation: - name: "updateOne" - arguments: - filter: {} - update: - $set: {"y.$[i].b": 2} - arrayFilters: - - {i.b: 1} - - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - {_id: 1, y: [{b: 3}, {b: 2}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} - - {_id: 3, y: [{b: 5, c: [{d: 2}, {d: 1}] }]} - - - description: "UpdateOne when no documents match multiple arrayFilters" - operation: - name: "updateOne" - arguments: - filter: {_id: 3} - update: - $set: {"y.$[i].c.$[j].d": 0} - arrayFilters: - - {i.b: 5} - - {j.d: 3} - - outcome: - result: - matchedCount: 1 - modifiedCount: 0 - upsertedCount: 0 - collection: - data: - - {_id: 1, y: [{b: 3}, {b: 1}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} - - {_id: 3, y: [{b: 5, c: [{d: 2}, {d: 1}] }]} - - - description: "UpdateOne when one document matches multiple arrayFilters" - operation: - name: "updateOne" - arguments: - filter: {_id: 3} - update: - $set: {"y.$[i].c.$[j].d": 0} - arrayFilters: - - {i.b: 5} - - {j.d: 1} - - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - {_id: 1, y: [{b: 3}, {b: 1}]} - - {_id: 2, y: [{b: 0}, {b: 1}]} - - {_id: 3, y: [{b: 5, c: [{d: 2}, {d: 0}] }]} diff --git a/testdata/crud/v1/write/updateOne-collation.json b/testdata/crud/v1/write/updateOne-collation.json deleted file mode 100644 index 3afdb83e0f..0000000000 --- a/testdata/crud/v1/write/updateOne-collation.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "ping" - } - ], - "minServerVersion": "3.4", - "serverless": "forbid", - "tests": [ - { - "description": "UpdateOne when one document matches with collation", - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "x": "PING" - }, - "update": { - "$set": { - "x": "pong" - } - }, - "collation": { - "locale": "en_US", - "strength": 2 - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": "pong" - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/updateOne-collation.yml b/testdata/crud/v1/write/updateOne-collation.yml deleted file mode 100644 index c20087176e..0000000000 --- a/testdata/crud/v1/write/updateOne-collation.yml +++ /dev/null @@ -1,26 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 'ping'} -minServerVersion: '3.4' -serverless: 'forbid' - -tests: - - - description: "UpdateOne when one document matches with collation" - operation: - name: "updateOne" - arguments: - filter: {x: 'PING'} - update: - $set: {x: 'pong'} - collation: { locale: 'en_US', strength: 2} # https://www.mongodb.com/docs/manual/reference/collation/#collation-document - - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 'pong'} diff --git a/testdata/crud/v1/write/updateOne.json b/testdata/crud/v1/write/updateOne.json deleted file mode 100644 index 76d2086bdb..0000000000 --- a/testdata/crud/v1/write/updateOne.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "minServerVersion": "2.6", - "tests": [ - { - "description": "UpdateOne when many documents match", - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - } - }, - { - "description": "UpdateOne when one document matches", - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "UpdateOne when no documents match", - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "result": { - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "UpdateOne with upsert when no documents match", - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "upsert": true - } - }, - "outcome": { - "result": { - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 1, - "upsertedId": 4 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/crud/v1/write/updateOne.yml b/testdata/crud/v1/write/updateOne.yml deleted file mode 100644 index 223532feac..0000000000 --- a/testdata/crud/v1/write/updateOne.yml +++ /dev/null @@ -1,84 +0,0 @@ -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} -minServerVersion: '2.6' - -tests: - - - description: "UpdateOne when many documents match" - operation: - name: "updateOne" - arguments: - filter: - _id: {$gt: 1} - update: - $inc: {x: 1} - - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - # Can't verify collection data because we don't have a way of - # knowing which document gets updated. - - - description: "UpdateOne when one document matches" - operation: - name: "updateOne" - arguments: - filter: {_id: 1} - update: - $inc: {x: 1} - - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - {_id: 1, x: 12} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - - description: "UpdateOne when no documents match" - operation: - name: "updateOne" - arguments: - filter: {_id: 4} - update: - $inc: {x: 1} - - outcome: - result: - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - - description: "UpdateOne with upsert when no documents match" - operation: - name: "updateOne" - arguments: - filter: {_id: 4} - update: - $inc: {x: 1} - upsert: true - - outcome: - result: - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 1 - upsertedId: 4 - collection: - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 1} diff --git a/testdata/gridfs/delete.json b/testdata/gridfs/delete.json deleted file mode 100644 index 7a4ec27f88..0000000000 --- a/testdata/gridfs/delete.json +++ /dev/null @@ -1,799 +0,0 @@ -{ - "description": "gridfs-delete", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "gridfs-tests" - } - }, - { - "bucket": { - "id": "bucket0", - "database": "database0" - } - }, - { - "collection": { - "id": "bucket0_files_collection", - "database": "database0", - "collectionName": "fs.files" - } - }, - { - "collection": { - "id": "bucket0_chunks_collection", - "database": "database0", - "collectionName": "fs.chunks" - } - } - ], - "initialData": [ - { - "collectionName": "fs.files", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "d41d8cd98f00b204e9800998ecf8427e", - "filename": "length-0", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "d41d8cd98f00b204e9800998ecf8427e", - "filename": "length-0-with-empty-chunk", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "length": 2, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "c700ed4fdb1d27055aa3faa2c2432283", - "filename": "length-2", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000004" - }, - "length": 8, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "dd254cdc958e53abaa67da9f797125f5", - "filename": "length-8", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - } - ] - }, - { - "collectionName": "fs.chunks", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "files_id": { - "$oid": "000000000000000000000002" - }, - "n": 0, - "data": { - "$binary": { - "base64": "", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "files_id": { - "$oid": "000000000000000000000003" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESI=", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "files_id": { - "$oid": "000000000000000000000004" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000004" - }, - "files_id": { - "$oid": "000000000000000000000004" - }, - "n": 1, - "data": { - "$binary": { - "base64": "VWZ3iA==", - "subType": "00" - } - } - } - ] - } - ], - "tests": [ - { - "description": "delete when length is 0", - "operations": [ - { - "name": "delete", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "outcome": [ - { - "collectionName": "fs.files", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000002" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "d41d8cd98f00b204e9800998ecf8427e", - "filename": "length-0-with-empty-chunk", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "length": 2, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "c700ed4fdb1d27055aa3faa2c2432283", - "filename": "length-2", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000004" - }, - "length": 8, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "dd254cdc958e53abaa67da9f797125f5", - "filename": "length-8", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - } - ] - }, - { - "collectionName": "fs.chunks", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "files_id": { - "$oid": "000000000000000000000002" - }, - "n": 0, - "data": { - "$binary": { - "base64": "", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "files_id": { - "$oid": "000000000000000000000003" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESI=", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "files_id": { - "$oid": "000000000000000000000004" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000004" - }, - "files_id": { - "$oid": "000000000000000000000004" - }, - "n": 1, - "data": { - "$binary": { - "base64": "VWZ3iA==", - "subType": "00" - } - } - } - ] - } - ] - }, - { - "description": "delete when length is 0 and there is one extra empty chunk", - "operations": [ - { - "name": "delete", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000002" - } - } - } - ], - "outcome": [ - { - "collectionName": "fs.files", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "d41d8cd98f00b204e9800998ecf8427e", - "filename": "length-0", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "length": 2, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "c700ed4fdb1d27055aa3faa2c2432283", - "filename": "length-2", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000004" - }, - "length": 8, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "dd254cdc958e53abaa67da9f797125f5", - "filename": "length-8", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - } - ] - }, - { - "collectionName": "fs.chunks", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000002" - }, - "files_id": { - "$oid": "000000000000000000000003" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESI=", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "files_id": { - "$oid": "000000000000000000000004" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000004" - }, - "files_id": { - "$oid": "000000000000000000000004" - }, - "n": 1, - "data": { - "$binary": { - "base64": "VWZ3iA==", - "subType": "00" - } - } - } - ] - } - ] - }, - { - "description": "delete when length is 8", - "operations": [ - { - "name": "delete", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000004" - } - } - } - ], - "outcome": [ - { - "collectionName": "fs.files", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "d41d8cd98f00b204e9800998ecf8427e", - "filename": "length-0", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "d41d8cd98f00b204e9800998ecf8427e", - "filename": "length-0-with-empty-chunk", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "length": 2, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "c700ed4fdb1d27055aa3faa2c2432283", - "filename": "length-2", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - } - ] - }, - { - "collectionName": "fs.chunks", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "files_id": { - "$oid": "000000000000000000000002" - }, - "n": 0, - "data": { - "$binary": { - "base64": "", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "files_id": { - "$oid": "000000000000000000000003" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESI=", - "subType": "00" - } - } - } - ] - } - ] - }, - { - "description": "delete when files entry does not exist", - "operations": [ - { - "name": "delete", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000000" - } - }, - "expectError": { - "isError": true - } - } - ], - "outcome": [ - { - "collectionName": "fs.files", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "d41d8cd98f00b204e9800998ecf8427e", - "filename": "length-0", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "d41d8cd98f00b204e9800998ecf8427e", - "filename": "length-0-with-empty-chunk", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "length": 2, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "c700ed4fdb1d27055aa3faa2c2432283", - "filename": "length-2", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000004" - }, - "length": 8, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "dd254cdc958e53abaa67da9f797125f5", - "filename": "length-8", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - } - ] - }, - { - "collectionName": "fs.chunks", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "files_id": { - "$oid": "000000000000000000000002" - }, - "n": 0, - "data": { - "$binary": { - "base64": "", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "files_id": { - "$oid": "000000000000000000000003" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESI=", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "files_id": { - "$oid": "000000000000000000000004" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000004" - }, - "files_id": { - "$oid": "000000000000000000000004" - }, - "n": 1, - "data": { - "$binary": { - "base64": "VWZ3iA==", - "subType": "00" - } - } - } - ] - } - ] - }, - { - "description": "delete when files entry does not exist and there are orphaned chunks", - "operations": [ - { - "name": "deleteOne", - "object": "bucket0_files_collection", - "arguments": { - "filter": { - "_id": { - "$oid": "000000000000000000000004" - } - } - }, - "expectResult": { - "deletedCount": 1 - } - }, - { - "name": "delete", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000004" - } - }, - "expectError": { - "isError": true - } - } - ], - "outcome": [ - { - "collectionName": "fs.files", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "d41d8cd98f00b204e9800998ecf8427e", - "filename": "length-0", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "d41d8cd98f00b204e9800998ecf8427e", - "filename": "length-0-with-empty-chunk", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "length": 2, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "c700ed4fdb1d27055aa3faa2c2432283", - "filename": "length-2", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - } - ] - }, - { - "collectionName": "fs.chunks", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "files_id": { - "$oid": "000000000000000000000002" - }, - "n": 0, - "data": { - "$binary": { - "base64": "", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "files_id": { - "$oid": "000000000000000000000003" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESI=", - "subType": "00" - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/gridfs/delete.yml b/testdata/gridfs/delete.yml deleted file mode 100644 index b300cad1bc..0000000000 --- a/testdata/gridfs/delete.yml +++ /dev/null @@ -1,198 +0,0 @@ -description: "gridfs-delete" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name gridfs-tests - - bucket: - id: &bucket0 bucket0 - database: *database0 - - collection: - id: &bucket0_files_collection bucket0_files_collection - database: *database0 - collectionName: &bucket0_files_collectionName fs.files - - collection: - id: &bucket0_chunks_collection bucket0_chunks_collection - database: *database0 - collectionName: &bucket0_chunks_collectionName fs.chunks - -initialData: - - collectionName: *bucket0_files_collectionName - databaseName: *database0Name - documents: - - &file1 - _id: { "$oid": "000000000000000000000001" } - length: 0 - chunkSize: 4 - uploadDate: { "$date": "1970-01-01T00:00:00.000Z" } - md5: "d41d8cd98f00b204e9800998ecf8427e" - filename: "length-0" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - &file2 - _id: { "$oid": "000000000000000000000002" } - length: 0 - chunkSize: 4 - uploadDate: { "$date": "1970-01-01T00:00:00.000Z" } - md5: "d41d8cd98f00b204e9800998ecf8427e" - filename: "length-0-with-empty-chunk" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - &file3 - _id: { "$oid": "000000000000000000000003" } - length: 2 - chunkSize: 4 - uploadDate: { "$date": "1970-01-01T00:00:00.000Z" } - md5: "c700ed4fdb1d27055aa3faa2c2432283" - filename: "length-2" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - &file4 - _id: { "$oid": "000000000000000000000004" } - length: 8 - chunkSize: 4 - uploadDate: { "$date": "1970-01-01T00:00:00.000Z" } - md5: "dd254cdc958e53abaa67da9f797125f5" - filename: "length-8" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - collectionName: *bucket0_chunks_collectionName - databaseName: *database0Name - documents: - - &file2_chunk0 - _id: { "$oid": "000000000000000000000001" } - files_id: { "$oid": "000000000000000000000002" } - n: 0 - data: { "$binary": { "base64": "", "subType": "00" } } - - &file3_chunk0 - _id: { "$oid": "000000000000000000000002" } - files_id: { "$oid": "000000000000000000000003" } - n: 0 - data: { "$binary": { "base64": "ESI=", "subType": "00" } } # hex: 1122 - - &file4_chunk0 - _id: { "$oid": "000000000000000000000003" } - files_id: { "$oid": "000000000000000000000004" } - n: 0 - data: { "$binary": { "base64": "ESIzRA==", "subType": "00" } } # hex: 11223344 - - &file4_chunk1 - _id: { "$oid": "000000000000000000000004" } - files_id: { "$oid": "000000000000000000000004" } - n: 1 - data: { "$binary": { "base64": "VWZ3iA==", "subType": "00" } } # hex: 55667788 - -tests: - - description: "delete when length is 0" - operations: - - name: delete - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000001" } - outcome: - - collectionName: *bucket0_files_collectionName - databaseName: *database0Name - documents: - - *file2 - - *file3 - - *file4 - - collectionName: *bucket0_chunks_collectionName - databaseName: *database0Name - documents: - - *file2_chunk0 - - *file3_chunk0 - - *file4_chunk0 - - *file4_chunk1 - - description: "delete when length is 0 and there is one extra empty chunk" - operations: - - name: delete - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000002" } - outcome: - - collectionName: *bucket0_files_collectionName - databaseName: *database0Name - documents: - - *file1 - - *file3 - - *file4 - - collectionName: *bucket0_chunks_collectionName - databaseName: *database0Name - documents: - - *file3_chunk0 - - *file4_chunk0 - - *file4_chunk1 - - description: "delete when length is 8" - operations: - - name: delete - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000004" } - outcome: - - collectionName: *bucket0_files_collectionName - databaseName: *database0Name - documents: - - *file1 - - *file2 - - *file3 - - collectionName: *bucket0_chunks_collectionName - databaseName: *database0Name - documents: - - *file2_chunk0 - - *file3_chunk0 - - description: "delete when files entry does not exist" - operations: - - name: delete - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000000" } - expectError: { isError: true } # FileNotFound - outcome: - - collectionName: *bucket0_files_collectionName - databaseName: *database0Name - documents: - - *file1 - - *file2 - - *file3 - - *file4 - - collectionName: *bucket0_chunks_collectionName - databaseName: *database0Name - documents: - - *file2_chunk0 - - *file3_chunk0 - - *file4_chunk0 - - *file4_chunk1 - - description: "delete when files entry does not exist and there are orphaned chunks" - operations: - - name: deleteOne - object: *bucket0_files_collection - arguments: - filter: - _id: { $oid: "000000000000000000000004" } - expectResult: - deletedCount: 1 - - name: delete - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000004" } - expectError: { isError: true } # FileNotFound - outcome: - - collectionName: *bucket0_files_collectionName - databaseName: *database0Name - documents: - - *file1 - - *file2 - - *file3 - # Orphaned chunks are still deleted even if fs.files - - collectionName: *bucket0_chunks_collectionName - databaseName: *database0Name - documents: - - *file2_chunk0 - - *file3_chunk0 diff --git a/testdata/gridfs/download.json b/testdata/gridfs/download.json deleted file mode 100644 index 48d3246218..0000000000 --- a/testdata/gridfs/download.json +++ /dev/null @@ -1,558 +0,0 @@ -{ - "description": "gridfs-download", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "gridfs-tests" - } - }, - { - "bucket": { - "id": "bucket0", - "database": "database0" - } - }, - { - "collection": { - "id": "bucket0_files_collection", - "database": "database0", - "collectionName": "fs.files" - } - }, - { - "collection": { - "id": "bucket0_chunks_collection", - "database": "database0", - "collectionName": "fs.chunks" - } - } - ], - "initialData": [ - { - "collectionName": "fs.files", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "d41d8cd98f00b204e9800998ecf8427e", - "filename": "length-0", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "d41d8cd98f00b204e9800998ecf8427e", - "filename": "length-0-with-empty-chunk", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "length": 2, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "c700ed4fdb1d27055aa3faa2c2432283", - "filename": "length-2", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000004" - }, - "length": 8, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "dd254cdc958e53abaa67da9f797125f5", - "filename": "length-8", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000005" - }, - "length": 10, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "57d83cd477bfb1ccd975ab33d827a92b", - "filename": "length-10", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000006" - }, - "length": 2, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "c700ed4fdb1d27055aa3faa2c2432283", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - } - ] - }, - { - "collectionName": "fs.chunks", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "files_id": { - "$oid": "000000000000000000000002" - }, - "n": 0, - "data": { - "$binary": { - "base64": "", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "files_id": { - "$oid": "000000000000000000000003" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESI=", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "files_id": { - "$oid": "000000000000000000000004" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000004" - }, - "files_id": { - "$oid": "000000000000000000000004" - }, - "n": 1, - "data": { - "$binary": { - "base64": "VWZ3iA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000005" - }, - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000006" - }, - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 1, - "data": { - "$binary": { - "base64": "VWZ3iA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000007" - }, - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 2, - "data": { - "$binary": { - "base64": "mao=", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000008" - }, - "files_id": { - "$oid": "000000000000000000000006" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESI=", - "subType": "00" - } - } - } - ] - } - ], - "tests": [ - { - "description": "download when length is zero", - "operations": [ - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - }, - "expectResult": { - "$$matchesHexBytes": "" - } - } - ] - }, - { - "description": "download when length is zero and there is one empty chunk", - "operations": [ - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000002" - } - }, - "expectResult": { - "$$matchesHexBytes": "" - } - } - ] - }, - { - "description": "download when there is one chunk", - "operations": [ - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000003" - } - }, - "expectResult": { - "$$matchesHexBytes": "1122" - } - } - ] - }, - { - "description": "download when there are two chunks", - "operations": [ - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000004" - } - }, - "expectResult": { - "$$matchesHexBytes": "1122334455667788" - } - } - ] - }, - { - "description": "download when there are three chunks", - "operations": [ - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - } - }, - "expectResult": { - "$$matchesHexBytes": "112233445566778899aa" - } - } - ] - }, - { - "description": "download when files entry does not exist", - "operations": [ - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000000" - } - }, - "expectError": { - "isError": true - } - } - ] - }, - { - "description": "download when an intermediate chunk is missing", - "operations": [ - { - "name": "deleteOne", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": { - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 1 - } - }, - "expectResult": { - "deletedCount": 1 - } - }, - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - } - }, - "expectError": { - "isError": true - } - } - ] - }, - { - "description": "download when final chunk is missing", - "operations": [ - { - "name": "deleteOne", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": { - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 2 - } - }, - "expectResult": { - "deletedCount": 1 - } - }, - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - } - }, - "expectError": { - "isError": true - } - } - ] - }, - { - "description": "download when an intermediate chunk is the wrong size", - "operations": [ - { - "name": "bulkWrite", - "object": "bucket0_chunks_collection", - "arguments": { - "requests": [ - { - "updateOne": { - "filter": { - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 1 - }, - "update": { - "$set": { - "data": { - "$binary": { - "base64": "VWZ3", - "subType": "00" - } - } - } - } - } - }, - { - "updateOne": { - "filter": { - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 2 - }, - "update": { - "$set": { - "data": { - "$binary": { - "base64": "iJmq", - "subType": "00" - } - } - } - } - } - } - ] - }, - "expectResult": { - "matchedCount": 2, - "modifiedCount": 2 - } - }, - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - } - }, - "expectError": { - "isError": true - } - } - ] - }, - { - "description": "download when final chunk is the wrong size", - "operations": [ - { - "name": "updateOne", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": { - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 2 - }, - "update": { - "$set": { - "data": { - "$binary": { - "base64": "mQ==", - "subType": "00" - } - } - } - } - }, - "expectResult": { - "matchedCount": 1, - "modifiedCount": 1 - } - }, - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - } - }, - "expectError": { - "isError": true - } - } - ] - }, - { - "description": "download legacy file with no name", - "operations": [ - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000006" - } - }, - "expectResult": { - "$$matchesHexBytes": "1122" - } - } - ] - } - ] -} diff --git a/testdata/gridfs/download.yml b/testdata/gridfs/download.yml deleted file mode 100644 index 3da5ee950f..0000000000 --- a/testdata/gridfs/download.yml +++ /dev/null @@ -1,241 +0,0 @@ -description: "gridfs-download" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name gridfs-tests - - bucket: - id: &bucket0 bucket0 - database: *database0 - - collection: - id: &bucket0_files_collection bucket0_files_collection - database: *database0 - collectionName: &bucket0_files_collectionName fs.files - - collection: - id: &bucket0_chunks_collection bucket0_chunks_collection - database: *database0 - collectionName: &bucket0_chunks_collectionName fs.chunks - -initialData: - - collectionName: *bucket0_files_collectionName - databaseName: *database0Name - documents: - - _id: { "$oid": "000000000000000000000001" } - length: 0 - chunkSize: 4 - uploadDate: { "$date": "1970-01-01T00:00:00.000Z" } - md5: "d41d8cd98f00b204e9800998ecf8427e" - filename: "length-0" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - _id: { "$oid": "000000000000000000000002" } - length: 0 - chunkSize: 4 - uploadDate: { "$date": "1970-01-01T00:00:00.000Z" } - md5: "d41d8cd98f00b204e9800998ecf8427e" - filename: "length-0-with-empty-chunk" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - _id: { "$oid": "000000000000000000000003" } - length: 2 - chunkSize: 4 - uploadDate: { "$date": "1970-01-01T00:00:00.000Z" } - md5: "c700ed4fdb1d27055aa3faa2c2432283" - filename: "length-2" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - _id: { "$oid": "000000000000000000000004" } - length: 8 - chunkSize: 4 - uploadDate: { "$date": "1970-01-01T00:00:00.000Z" } - md5: "dd254cdc958e53abaa67da9f797125f5" - filename: "length-8" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - _id: { "$oid": "000000000000000000000005" } - length: 10 - chunkSize: 4 - uploadDate: { "$date": "1970-01-01T00:00:00.000Z" } - md5: "57d83cd477bfb1ccd975ab33d827a92b" - filename: "length-10" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - _id: { "$oid": "000000000000000000000006" } - length: 2 - chunkSize: 4 - uploadDate: { "$date": "1970-01-01T00:00:00.000Z" } - md5: "c700ed4fdb1d27055aa3faa2c2432283" - # filename is intentionally omitted - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - collectionName: *bucket0_chunks_collectionName - databaseName: *database0Name - documents: - - _id: { "$oid": "000000000000000000000001" } - files_id: { "$oid": "000000000000000000000002" } - n: 0 - data: { "$binary": { "base64": "", "subType": "00" } } - - _id: { "$oid": "000000000000000000000002" } - files_id: { "$oid": "000000000000000000000003" } - n: 0 - data: { "$binary": { "base64": "ESI=", "subType": "00" } } # hex: 1122 - - _id: { "$oid": "000000000000000000000003" } - files_id: { "$oid": "000000000000000000000004" } - n: 0 - data: { "$binary": { "base64": "ESIzRA==", "subType": "00" } } # hex: 11223344 - - _id: { "$oid": "000000000000000000000004" } - files_id: { "$oid": "000000000000000000000004" } - n: 1 - data: { "$binary": { "base64": "VWZ3iA==", "subType": "00" } } # hex: 55667788 - - _id: { "$oid": "000000000000000000000005" } - files_id: { "$oid": "000000000000000000000005" } - n: 0 - data: { "$binary": { "base64": "ESIzRA==", "subType": "00" } } # hex: 11223344 - - _id: { "$oid": "000000000000000000000006" } - files_id: { "$oid": "000000000000000000000005" } - n: 1 - data: { "$binary": { "base64": "VWZ3iA==", "subType": "00" } } # hex: 55667788 - - _id: { "$oid": "000000000000000000000007" } - files_id: { "$oid": "000000000000000000000005" } - n: 2 - data: { "$binary" : { "base64": "mao=", "subType" : "00" } } # hex: 99aa - - _id: { "$oid": "000000000000000000000008" } - files_id: { "$oid": "000000000000000000000006" } - n: 0 - data: { "$binary": { "base64": "ESI=", "subType": "00" } } # hex: 1122 - -tests: - - description: "download when length is zero" - operations: - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000001" } - expectResult: { $$matchesHexBytes: "" } - - description: "download when length is zero and there is one empty chunk" - operations: - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000002" } - expectResult: { $$matchesHexBytes: "" } - - description: "download when there is one chunk" - operations: - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000003" } - expectResult: { $$matchesHexBytes: "1122" } - - description: "download when there are two chunks" - operations: - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000004" } - expectResult: { $$matchesHexBytes: "1122334455667788" } - - description: "download when there are three chunks" - operations: - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000005" } - expectResult: { $$matchesHexBytes: "112233445566778899aa" } - - description: "download when files entry does not exist" - operations: - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000000" } - expectError: { isError: true } # FileNotFound - - description: "download when an intermediate chunk is missing" - operations: - - name: deleteOne - object: *bucket0_chunks_collection - arguments: - filter: - files_id: { $oid: "000000000000000000000005" } - n: 1 - expectResult: - deletedCount: 1 - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000005" } - expectError: { isError: true } # ChunkIsMissing - - description: "download when final chunk is missing" - operations: - - name: deleteOne - object: *bucket0_chunks_collection - arguments: - filter: - files_id: { $oid: "000000000000000000000005" } - n: 2 - expectResult: - deletedCount: 1 - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000005" } - expectError: { isError: true } # ChunkIsMissing - - description: "download when an intermediate chunk is the wrong size" - operations: - - name: bulkWrite - object: *bucket0_chunks_collection - arguments: - requests: - - updateOne: - filter: - files_id: { $oid: "000000000000000000000005" } - n: 1 - update: - $set: { data: { "$binary": { "base64": "VWZ3", "subType": "00" } } } # hex: 556677 - - updateOne: - filter: - files_id: { $oid: "000000000000000000000005" } - n: 2 - update: - $set: { data: { "$binary": { "base64": "iJmq", "subType": "00" } } } # hex: 8899aa - expectResult: - matchedCount: 2 - modifiedCount: 2 - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000005" } - expectError: { isError: true } # ChunkIsWrongSize - - description: "download when final chunk is the wrong size" - operations: - - name: updateOne - object: *bucket0_chunks_collection - arguments: - filter: - files_id: { $oid: "000000000000000000000005" } - n: 2 - update: - $set: { data: { "$binary": { "base64": "mQ==", "subType": "00" } } } # hex: 99 - expectResult: - matchedCount: 1 - modifiedCount: 1 - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000005" } - expectError: { isError: true } # ChunkIsWrongSize - - description: "download legacy file with no name" - operations: - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000006" } - expectResult: { $$matchesHexBytes: "1122" } diff --git a/testdata/gridfs/downloadByName.json b/testdata/gridfs/downloadByName.json deleted file mode 100644 index cd44663957..0000000000 --- a/testdata/gridfs/downloadByName.json +++ /dev/null @@ -1,330 +0,0 @@ -{ - "description": "gridfs-downloadByName", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "gridfs-tests" - } - }, - { - "bucket": { - "id": "bucket0", - "database": "database0" - } - }, - { - "collection": { - "id": "bucket0_files_collection", - "database": "database0", - "collectionName": "fs.files" - } - }, - { - "collection": { - "id": "bucket0_chunks_collection", - "database": "database0", - "collectionName": "fs.chunks" - } - } - ], - "initialData": [ - { - "collectionName": "fs.files", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "47ed733b8d10be225eceba344d533586", - "filename": "abc", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-02T00:00:00.000Z" - }, - "md5": "b15835f133ff2e27c7cb28117bfae8f4", - "filename": "abc", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-03T00:00:00.000Z" - }, - "md5": "eccbc87e4b5ce2fe28308fd9f2a7baf3", - "filename": "abc", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000004" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-04T00:00:00.000Z" - }, - "md5": "f623e75af30e62bbd73d6df5b50bb7b5", - "filename": "abc", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - }, - { - "_id": { - "$oid": "000000000000000000000005" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-05T00:00:00.000Z" - }, - "md5": "4c614360da93c0a041b22e537de151eb", - "filename": "abc", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - } - ] - }, - { - "collectionName": "fs.chunks", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "files_id": { - "$oid": "000000000000000000000001" - }, - "n": 0, - "data": { - "$binary": { - "base64": "EQ==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000002" - }, - "files_id": { - "$oid": "000000000000000000000002" - }, - "n": 0, - "data": { - "$binary": { - "base64": "Ig==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000003" - }, - "files_id": { - "$oid": "000000000000000000000003" - }, - "n": 0, - "data": { - "$binary": { - "base64": "Mw==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000004" - }, - "files_id": { - "$oid": "000000000000000000000004" - }, - "n": 0, - "data": { - "$binary": { - "base64": "RA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000005" - }, - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 0, - "data": { - "$binary": { - "base64": "VQ==", - "subType": "00" - } - } - } - ] - } - ], - "tests": [ - { - "description": "downloadByName defaults to latest revision (-1)", - "operations": [ - { - "name": "downloadByName", - "object": "bucket0", - "arguments": { - "filename": "abc" - }, - "expectResult": { - "$$matchesHexBytes": "55" - } - } - ] - }, - { - "description": "downloadByName when revision is 0", - "operations": [ - { - "name": "downloadByName", - "object": "bucket0", - "arguments": { - "filename": "abc", - "revision": 0 - }, - "expectResult": { - "$$matchesHexBytes": "11" - } - } - ] - }, - { - "description": "downloadByName when revision is 1", - "operations": [ - { - "name": "downloadByName", - "object": "bucket0", - "arguments": { - "filename": "abc", - "revision": 1 - }, - "expectResult": { - "$$matchesHexBytes": "22" - } - } - ] - }, - { - "description": "downloadByName when revision is 2", - "operations": [ - { - "name": "downloadByName", - "object": "bucket0", - "arguments": { - "filename": "abc", - "revision": 2 - }, - "expectResult": { - "$$matchesHexBytes": "33" - } - } - ] - }, - { - "description": "downloadByName when revision is -2", - "operations": [ - { - "name": "downloadByName", - "object": "bucket0", - "arguments": { - "filename": "abc", - "revision": -2 - }, - "expectResult": { - "$$matchesHexBytes": "44" - } - } - ] - }, - { - "description": "downloadByName when revision is -1", - "operations": [ - { - "name": "downloadByName", - "object": "bucket0", - "arguments": { - "filename": "abc", - "revision": -1 - }, - "expectResult": { - "$$matchesHexBytes": "55" - } - } - ] - }, - { - "description": "downloadByName when files entry does not exist", - "operations": [ - { - "name": "downloadByName", - "object": "bucket0", - "arguments": { - "filename": "xyz" - }, - "expectError": { - "isError": true - } - } - ] - }, - { - "description": "downloadByName when revision does not exist", - "operations": [ - { - "name": "downloadByName", - "object": "bucket0", - "arguments": { - "filename": "abc", - "revision": 999 - }, - "expectError": { - "isError": true - } - } - ] - } - ] -} diff --git a/testdata/gridfs/downloadByName.yml b/testdata/gridfs/downloadByName.yml deleted file mode 100644 index 6dfc602b66..0000000000 --- a/testdata/gridfs/downloadByName.yml +++ /dev/null @@ -1,159 +0,0 @@ -description: "gridfs-downloadByName" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name gridfs-tests - - bucket: - id: &bucket0 bucket0 - database: *database0 - - collection: - id: &bucket0_files_collection bucket0_files_collection - database: *database0 - collectionName: &bucket0_files_collectionName fs.files - - collection: - id: &bucket0_chunks_collection bucket0_chunks_collection - database: *database0 - collectionName: &bucket0_chunks_collectionName fs.chunks - -initialData: - - collectionName: *bucket0_files_collectionName - databaseName: *database0Name - documents: - - _id: { $oid: "000000000000000000000001" } - length: 1 - chunkSize: 4 - uploadDate: { $date: "1970-01-01T00:00:00.000Z" } - md5: "47ed733b8d10be225eceba344d533586" - filename: "abc" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - _id: { $oid: "000000000000000000000002" } - length: 1 - chunkSize: 4 - uploadDate: { $date: "1970-01-02T00:00:00.000Z" } - md5: "b15835f133ff2e27c7cb28117bfae8f4" - filename: "abc" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - _id: { $oid: "000000000000000000000003" } - length: 1 - chunkSize: 4 - uploadDate: { $date: "1970-01-03T00:00:00.000Z" } - md5: "eccbc87e4b5ce2fe28308fd9f2a7baf3" - filename: "abc" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - _id: { $oid: "000000000000000000000004" } - length: 1 - chunkSize: 4 - uploadDate: { $date: "1970-01-04T00:00:00.000Z" } - md5: "f623e75af30e62bbd73d6df5b50bb7b5" - filename: "abc" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - _id: { $oid: "000000000000000000000005" } - length: 1 - chunkSize: 4 - uploadDate: { $date: "1970-01-05T00:00:00.000Z" } - md5: "4c614360da93c0a041b22e537de151eb" - filename: "abc" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - collectionName: *bucket0_chunks_collectionName - databaseName: *database0Name - documents: - - _id: { $oid: "000000000000000000000001" } - files_id: { $oid: "000000000000000000000001" } - n: 0 - data: { "$binary": { "base64": "EQ==", "subType": "00" } } # hex: 11 - - _id: { $oid: "000000000000000000000002" } - files_id: { $oid: "000000000000000000000002" } - n: 0 - data: { "$binary": { "base64": "Ig==", "subType": "00" } } # hex: 22 - - _id: { $oid: "000000000000000000000003" } - files_id: { $oid: "000000000000000000000003" } - n: 0 - data: { "$binary": { "base64": "Mw==", "subType": "00" } } # hex: 33 - - _id: { $oid: "000000000000000000000004" } - files_id: { $oid: "000000000000000000000004" } - n: 0 - data: { "$binary": { "base64": "RA==", "subType": "00" } } # hex: 44 - - _id: { $oid: "000000000000000000000005" } - files_id: { $oid: "000000000000000000000005" } - n: 0 - data: { "$binary": { "base64": "VQ==", "subType": "00" } } # hex: 55 - -tests: - - description: "downloadByName defaults to latest revision (-1)" - operations: - - name: downloadByName - object: *bucket0 - arguments: - filename: "abc" - expectResult: { $$matchesHexBytes: "55" } - - description: "downloadByName when revision is 0" - operations: - - name: downloadByName - object: *bucket0 - arguments: - filename: "abc" - revision: 0 - expectResult: { $$matchesHexBytes: "11" } - - description: "downloadByName when revision is 1" - operations: - - name: downloadByName - object: *bucket0 - arguments: - filename: "abc" - revision: 1 - expectResult: { $$matchesHexBytes: "22" } - - description: "downloadByName when revision is 2" - operations: - - name: downloadByName - object: *bucket0 - arguments: - filename: "abc" - revision: 2 - expectResult: { $$matchesHexBytes: "33" } - - description: "downloadByName when revision is -2" - operations: - - name: downloadByName - object: *bucket0 - arguments: - filename: "abc" - revision: -2 - expectResult: { $$matchesHexBytes: "44" } - - description: "downloadByName when revision is -1" - operations: - - name: downloadByName - object: *bucket0 - arguments: - filename: "abc" - revision: -1 - expectResult: { $$matchesHexBytes: "55" } - - description: "downloadByName when files entry does not exist" - operations: - - name: downloadByName - object: *bucket0 - arguments: - filename: "xyz" - expectError: { isError: true } # FileNotFound - - description: "downloadByName when revision does not exist" - operations: - - name: downloadByName - object: *bucket0 - arguments: - filename: "abc" - revision: 999 - expectError: { isError: true } # RevisionNotFound diff --git a/testdata/gridfs/upload-disableMD5.json b/testdata/gridfs/upload-disableMD5.json deleted file mode 100644 index d5a9d6f4ab..0000000000 --- a/testdata/gridfs/upload-disableMD5.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "description": "gridfs-upload-disableMD5", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "gridfs-tests" - } - }, - { - "bucket": { - "id": "bucket0", - "database": "database0" - } - }, - { - "collection": { - "id": "bucket0_files_collection", - "database": "database0", - "collectionName": "fs.files" - } - }, - { - "collection": { - "id": "bucket0_chunks_collection", - "database": "database0", - "collectionName": "fs.chunks" - } - } - ], - "initialData": [ - { - "collectionName": "fs.files", - "databaseName": "gridfs-tests", - "documents": [] - }, - { - "collectionName": "fs.chunks", - "databaseName": "gridfs-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "upload when length is 0 sans MD5", - "operations": [ - { - "name": "upload", - "object": "bucket0", - "arguments": { - "filename": "filename", - "source": { - "$$hexBytes": "" - }, - "chunkSizeBytes": 4, - "disableMD5": true - }, - "expectResult": { - "$$type": "objectId" - }, - "saveResultAsEntity": "uploadedObjectId" - }, - { - "name": "find", - "object": "bucket0_files_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$$type": "date" - }, - "md5": { - "$$exists": false - }, - "filename": "filename" - } - ] - }, - { - "name": "find", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": {} - }, - "expectResult": [] - } - ] - }, - { - "description": "upload when length is 1 sans MD5", - "operations": [ - { - "name": "upload", - "object": "bucket0", - "arguments": { - "filename": "filename", - "source": { - "$$hexBytes": "11" - }, - "chunkSizeBytes": 4, - "disableMD5": true - }, - "expectResult": { - "$$type": "objectId" - }, - "saveResultAsEntity": "uploadedObjectId" - }, - { - "name": "find", - "object": "bucket0_files_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$$type": "date" - }, - "md5": { - "$$exists": false - }, - "filename": "filename" - } - ] - }, - { - "name": "find", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$type": "objectId" - }, - "files_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "n": 0, - "data": { - "$binary": { - "base64": "EQ==", - "subType": "00" - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/gridfs/upload-disableMD5.yml b/testdata/gridfs/upload-disableMD5.yml deleted file mode 100644 index 4f77f5a1a2..0000000000 --- a/testdata/gridfs/upload-disableMD5.yml +++ /dev/null @@ -1,92 +0,0 @@ -description: "gridfs-upload-disableMD5" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name gridfs-tests - - bucket: - id: &bucket0 bucket0 - database: *database0 - - collection: - id: &bucket0_files_collection bucket0_files_collection - database: *database0 - collectionName: &bucket0_files_collectionName fs.files - - collection: - id: &bucket0_chunks_collection bucket0_chunks_collection - database: *database0 - collectionName: &bucket0_chunks_collectionName fs.chunks - -initialData: - - collectionName: *bucket0_files_collectionName - databaseName: *database0Name - documents: [] - - collectionName: *bucket0_chunks_collectionName - databaseName: *database0Name - documents: [] - -# Note: these tests utilize the transitional "disableMD5" option. Drivers that -# do not support the option should skip this file. -tests: - - description: "upload when length is 0 sans MD5" - operations: - - name: upload - object: *bucket0 - arguments: - filename: "filename" - source: { $$hexBytes: "" } - chunkSizeBytes: 4 - disableMD5: true - expectResult: { $$type: objectId } - saveResultAsEntity: &uploadedObjectId uploadedObjectId - - name: find - object: *bucket0_files_collection - arguments: - filter: {} - expectResult: - - _id: { $$matchesEntity: *uploadedObjectId } - length: 0 - chunkSize: 4 - uploadDate: { $$type: date } - md5: { $$exists: false } - filename: filename - - name: find - object: *bucket0_chunks_collection - arguments: - filter: {} - expectResult: [] - - description: "upload when length is 1 sans MD5" - operations: - - name: upload - object: *bucket0 - arguments: - filename: "filename" - source: { $$hexBytes: "11" } - chunkSizeBytes: 4 - disableMD5: true - expectResult: { $$type: objectId } - saveResultAsEntity: *uploadedObjectId - - name: find - object: *bucket0_files_collection - arguments: - filter: {} - expectResult: - - _id: { $$matchesEntity: *uploadedObjectId } - length: 1 - chunkSize: 4 - uploadDate: { $$type: date } - md5: { $$exists: false } - filename: filename - - name: find - object: *bucket0_chunks_collection - arguments: - filter: {} - expectResult: - - _id: { $$type: objectId } - files_id: { $$matchesEntity: *uploadedObjectId } - n: 0 - data: { $binary: { base64: "EQ==", subType: "00" } } # hex 11 diff --git a/testdata/gridfs/upload.json b/testdata/gridfs/upload.json deleted file mode 100644 index 97e18d2bc2..0000000000 --- a/testdata/gridfs/upload.json +++ /dev/null @@ -1,616 +0,0 @@ -{ - "description": "gridfs-upload", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "gridfs-tests" - } - }, - { - "bucket": { - "id": "bucket0", - "database": "database0" - } - }, - { - "collection": { - "id": "bucket0_files_collection", - "database": "database0", - "collectionName": "fs.files" - } - }, - { - "collection": { - "id": "bucket0_chunks_collection", - "database": "database0", - "collectionName": "fs.chunks" - } - } - ], - "initialData": [ - { - "collectionName": "fs.files", - "databaseName": "gridfs-tests", - "documents": [] - }, - { - "collectionName": "fs.chunks", - "databaseName": "gridfs-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "upload when length is 0", - "operations": [ - { - "name": "upload", - "object": "bucket0", - "arguments": { - "filename": "filename", - "source": { - "$$hexBytes": "" - }, - "chunkSizeBytes": 4 - }, - "expectResult": { - "$$type": "objectId" - }, - "saveResultAsEntity": "uploadedObjectId" - }, - { - "name": "find", - "object": "bucket0_files_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "length": 0, - "chunkSize": 4, - "uploadDate": { - "$$type": "date" - }, - "md5": { - "$$unsetOrMatches": "d41d8cd98f00b204e9800998ecf8427e" - }, - "filename": "filename" - } - ] - }, - { - "name": "find", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": {} - }, - "expectResult": [] - } - ] - }, - { - "description": "upload when length is 1", - "operations": [ - { - "name": "upload", - "object": "bucket0", - "arguments": { - "filename": "filename", - "source": { - "$$hexBytes": "11" - }, - "chunkSizeBytes": 4 - }, - "expectResult": { - "$$type": "objectId" - }, - "saveResultAsEntity": "uploadedObjectId" - }, - { - "name": "find", - "object": "bucket0_files_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$$type": "date" - }, - "md5": { - "$$unsetOrMatches": "47ed733b8d10be225eceba344d533586" - }, - "filename": "filename" - } - ] - }, - { - "name": "find", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$type": "objectId" - }, - "files_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "n": 0, - "data": { - "$binary": { - "base64": "EQ==", - "subType": "00" - } - } - } - ] - } - ] - }, - { - "description": "upload when length is 3", - "operations": [ - { - "name": "upload", - "object": "bucket0", - "arguments": { - "filename": "filename", - "source": { - "$$hexBytes": "112233" - }, - "chunkSizeBytes": 4 - }, - "expectResult": { - "$$type": "objectId" - }, - "saveResultAsEntity": "uploadedObjectId" - }, - { - "name": "find", - "object": "bucket0_files_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "length": 3, - "chunkSize": 4, - "uploadDate": { - "$$type": "date" - }, - "md5": { - "$$unsetOrMatches": "bafae3a174ab91fc70db7a6aa50f4f52" - }, - "filename": "filename" - } - ] - }, - { - "name": "find", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$type": "objectId" - }, - "files_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIz", - "subType": "00" - } - } - } - ] - } - ] - }, - { - "description": "upload when length is 4", - "operations": [ - { - "name": "upload", - "object": "bucket0", - "arguments": { - "filename": "filename", - "source": { - "$$hexBytes": "11223344" - }, - "chunkSizeBytes": 4 - }, - "expectResult": { - "$$type": "objectId" - }, - "saveResultAsEntity": "uploadedObjectId" - }, - { - "name": "find", - "object": "bucket0_files_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "length": 4, - "chunkSize": 4, - "uploadDate": { - "$$type": "date" - }, - "md5": { - "$$unsetOrMatches": "7e7c77cff5705d1f7574a25ef6662117" - }, - "filename": "filename" - } - ] - }, - { - "name": "find", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$type": "objectId" - }, - "files_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - } - ] - } - ] - }, - { - "description": "upload when length is 5", - "operations": [ - { - "name": "upload", - "object": "bucket0", - "arguments": { - "filename": "filename", - "source": { - "$$hexBytes": "1122334455" - }, - "chunkSizeBytes": 4 - }, - "expectResult": { - "$$type": "objectId" - }, - "saveResultAsEntity": "uploadedObjectId" - }, - { - "name": "find", - "object": "bucket0_files_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "length": 5, - "chunkSize": 4, - "uploadDate": { - "$$type": "date" - }, - "md5": { - "$$unsetOrMatches": "283d4fea5dded59cf837d3047328f5af" - }, - "filename": "filename" - } - ] - }, - { - "name": "find", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": {}, - "sort": { - "n": 1 - } - }, - "expectResult": [ - { - "_id": { - "$$type": "objectId" - }, - "files_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - }, - { - "_id": { - "$$type": "objectId" - }, - "files_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "n": 1, - "data": { - "$binary": { - "base64": "VQ==", - "subType": "00" - } - } - } - ] - } - ] - }, - { - "description": "upload when length is 8", - "operations": [ - { - "name": "upload", - "object": "bucket0", - "arguments": { - "filename": "filename", - "source": { - "$$hexBytes": "1122334455667788" - }, - "chunkSizeBytes": 4 - }, - "expectResult": { - "$$type": "objectId" - }, - "saveResultAsEntity": "uploadedObjectId" - }, - { - "name": "find", - "object": "bucket0_files_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "length": 8, - "chunkSize": 4, - "uploadDate": { - "$$type": "date" - }, - "md5": { - "$$unsetOrMatches": "dd254cdc958e53abaa67da9f797125f5" - }, - "filename": "filename" - } - ] - }, - { - "name": "find", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": {}, - "sort": { - "n": 1 - } - }, - "expectResult": [ - { - "_id": { - "$$type": "objectId" - }, - "files_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - }, - { - "_id": { - "$$type": "objectId" - }, - "files_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "n": 1, - "data": { - "$binary": { - "base64": "VWZ3iA==", - "subType": "00" - } - } - } - ] - } - ] - }, - { - "description": "upload when contentType is provided", - "operations": [ - { - "name": "upload", - "object": "bucket0", - "arguments": { - "filename": "filename", - "source": { - "$$hexBytes": "11" - }, - "chunkSizeBytes": 4, - "contentType": "image/jpeg" - }, - "expectResult": { - "$$type": "objectId" - }, - "saveResultAsEntity": "uploadedObjectId" - }, - { - "name": "find", - "object": "bucket0_files_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$$type": "date" - }, - "md5": { - "$$unsetOrMatches": "47ed733b8d10be225eceba344d533586" - }, - "filename": "filename", - "contentType": "image/jpeg" - } - ] - }, - { - "name": "find", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$type": "objectId" - }, - "files_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "n": 0, - "data": { - "$binary": { - "base64": "EQ==", - "subType": "00" - } - } - } - ] - } - ] - }, - { - "description": "upload when metadata is provided", - "operations": [ - { - "name": "upload", - "object": "bucket0", - "arguments": { - "filename": "filename", - "source": { - "$$hexBytes": "11" - }, - "chunkSizeBytes": 4, - "metadata": { - "x": 1 - } - }, - "expectResult": { - "$$type": "objectId" - }, - "saveResultAsEntity": "uploadedObjectId" - }, - { - "name": "find", - "object": "bucket0_files_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$$type": "date" - }, - "md5": { - "$$unsetOrMatches": "47ed733b8d10be225eceba344d533586" - }, - "filename": "filename", - "metadata": { - "x": 1 - } - } - ] - }, - { - "name": "find", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": { - "$$type": "objectId" - }, - "files_id": { - "$$matchesEntity": "uploadedObjectId" - }, - "n": 0, - "data": { - "$binary": { - "base64": "EQ==", - "subType": "00" - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/gridfs/upload.yml b/testdata/gridfs/upload.yml deleted file mode 100644 index 27f3186fc4..0000000000 --- a/testdata/gridfs/upload.yml +++ /dev/null @@ -1,288 +0,0 @@ -description: "gridfs-upload" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name gridfs-tests - - bucket: - id: &bucket0 bucket0 - database: *database0 - - collection: - id: &bucket0_files_collection bucket0_files_collection - database: *database0 - collectionName: &bucket0_files_collectionName fs.files - - collection: - id: &bucket0_chunks_collection bucket0_chunks_collection - database: *database0 - collectionName: &bucket0_chunks_collectionName fs.chunks - -initialData: - - collectionName: *bucket0_files_collectionName - databaseName: *database0Name - documents: [] - - collectionName: *bucket0_chunks_collectionName - databaseName: *database0Name - documents: [] - -# Note: Uploaded files and chunks include ObjectIds, which we cannot match with -# "outcome" since it does not allow operators. Instead, these tests will use -# find operations to assert the contents of uploaded files and chunks. -tests: - - description: "upload when length is 0" - operations: - - name: upload - object: *bucket0 - arguments: - filename: "filename" - source: { $$hexBytes: "" } - chunkSizeBytes: 4 - expectResult: { $$type: objectId } - saveResultAsEntity: &uploadedObjectId uploadedObjectId - - name: find - object: *bucket0_files_collection - arguments: - filter: {} - expectResult: - - _id: { $$matchesEntity: *uploadedObjectId } - length: 0 - chunkSize: 4 - uploadDate: { $$type: date } - # The md5 field is deprecated so some drivers do not calculate it when uploading files. - md5: { $$unsetOrMatches: "d41d8cd98f00b204e9800998ecf8427e" } - filename: filename - - name: find - object: *bucket0_chunks_collection - arguments: - filter: {} - expectResult: [] - - description: "upload when length is 1" - operations: - - name: upload - object: *bucket0 - arguments: - filename: "filename" - source: { $$hexBytes: "11" } - chunkSizeBytes: 4 - expectResult: { $$type: objectId } - saveResultAsEntity: *uploadedObjectId - - name: find - object: *bucket0_files_collection - arguments: - filter: {} - expectResult: - - _id: { $$matchesEntity: *uploadedObjectId } - length: 1 - chunkSize: 4 - uploadDate: { $$type: date } - md5: { $$unsetOrMatches: "47ed733b8d10be225eceba344d533586" } - filename: filename - - name: find - object: *bucket0_chunks_collection - arguments: - filter: {} - expectResult: - - _id: { $$type: objectId } - files_id: { $$matchesEntity: *uploadedObjectId } - n: 0 - data: { $binary: { base64: "EQ==", subType: "00" } } # hex 11 - - description: "upload when length is 3" - operations: - - name: upload - object: *bucket0 - arguments: - filename: "filename" - source: { $$hexBytes: "112233" } - chunkSizeBytes: 4 - expectResult: { $$type: objectId } - saveResultAsEntity: *uploadedObjectId - - name: find - object: *bucket0_files_collection - arguments: - filter: {} - expectResult: - - _id: { $$matchesEntity: *uploadedObjectId } - length: 3 - chunkSize: 4 - uploadDate: { $$type: date } - md5: { $$unsetOrMatches: "bafae3a174ab91fc70db7a6aa50f4f52" } - filename: filename - - name: find - object: *bucket0_chunks_collection - arguments: - filter: {} - expectResult: - - _id: { $$type: objectId } - files_id: { $$matchesEntity: *uploadedObjectId } - n: 0 - data: { $binary: { base64: "ESIz", subType: "00" } } # hex 112233 - - description: "upload when length is 4" - operations: - - name: upload - object: *bucket0 - arguments: - filename: "filename" - source: { $$hexBytes: "11223344" } - chunkSizeBytes: 4 - expectResult: { $$type: objectId } - saveResultAsEntity: *uploadedObjectId - - name: find - object: *bucket0_files_collection - arguments: - filter: {} - expectResult: - - _id: { $$matchesEntity: *uploadedObjectId } - length: 4 - chunkSize: 4 - uploadDate: { $$type: date } - md5: { $$unsetOrMatches: "7e7c77cff5705d1f7574a25ef6662117" } - filename: filename - - name: find - object: *bucket0_chunks_collection - arguments: - filter: {} - expectResult: - - _id: { $$type: objectId } - files_id: { $$matchesEntity: *uploadedObjectId } - n: 0 - data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex 11223344 - - description: "upload when length is 5" - operations: - - name: upload - object: *bucket0 - arguments: - filename: filename - source: { $$hexBytes: "1122334455" } - chunkSizeBytes: 4 - expectResult: { $$type: objectId } - saveResultAsEntity: *uploadedObjectId - - name: find - object: *bucket0_files_collection - arguments: - filter: {} - expectResult: - - _id: { $$matchesEntity: *uploadedObjectId } - length: 5 - chunkSize: 4 - uploadDate: { $$type: date } - md5: { $$unsetOrMatches: "283d4fea5dded59cf837d3047328f5af" } - filename: filename - - name: find - object: *bucket0_chunks_collection - arguments: - filter: {} - # Sort to ensure chunks are returned in a deterministic order - sort: { n: 1 } - expectResult: - - _id: { $$type: objectId } - files_id: { $$matchesEntity: *uploadedObjectId } - n: 0 - data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex 11223344 - - _id: { $$type: objectId } - files_id: { $$matchesEntity: *uploadedObjectId } - n: 1 - data: { $binary: { base64: "VQ==", subType: "00" } } # hex 55 - - description: "upload when length is 8" - operations: - - name: upload - object: *bucket0 - arguments: - filename: filename - source: { $$hexBytes: "1122334455667788" } - chunkSizeBytes: 4 - expectResult: { $$type: objectId } - saveResultAsEntity: *uploadedObjectId - - name: find - object: *bucket0_files_collection - arguments: - filter: {} - expectResult: - - _id: { $$matchesEntity: *uploadedObjectId } - length: 8 - chunkSize: 4 - uploadDate: { $$type: date } - md5: { $$unsetOrMatches: "dd254cdc958e53abaa67da9f797125f5" } - filename: filename - - name: find - object: *bucket0_chunks_collection - arguments: - filter: {} - # Sort to ensure chunks are returned in a deterministic order - sort: { n: 1 } - expectResult: - - _id: { $$type: objectId } - files_id: { $$matchesEntity: *uploadedObjectId } - n: 0 - data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex 11223344 - - _id: { $$type: objectId } - files_id: { $$matchesEntity: *uploadedObjectId } - n: 1 - data: { $binary: { base64: "VWZ3iA==", subType: "00" } } # hex 55667788 - - description: "upload when contentType is provided" - operations: - - name: upload - object: *bucket0 - arguments: - filename: "filename" - source: { $$hexBytes: "11" } - chunkSizeBytes: 4 - contentType: "image/jpeg" - expectResult: { $$type: objectId } - saveResultAsEntity: *uploadedObjectId - - name: find - object: *bucket0_files_collection - arguments: - filter: {} - expectResult: - - _id: { $$matchesEntity: *uploadedObjectId } - length: 1 - chunkSize: 4 - uploadDate: { $$type: date } - md5: { $$unsetOrMatches: "47ed733b8d10be225eceba344d533586" } - filename: filename - contentType: "image/jpeg" - - name: find - object: *bucket0_chunks_collection - arguments: - filter: {} - expectResult: - - _id: { $$type: objectId } - files_id: { $$matchesEntity: *uploadedObjectId } - n: 0 - data: { $binary: { base64: "EQ==", subType: "00" } } # hex 11 - - description: "upload when metadata is provided" - operations: - - name: upload - object: *bucket0 - arguments: - filename: "filename" - source: { $$hexBytes: "11" } - chunkSizeBytes: 4 - metadata: { x: 1 } - expectResult: { $$type: objectId } - saveResultAsEntity: *uploadedObjectId - - name: find - object: *bucket0_files_collection - arguments: - filter: {} - expectResult: - - _id: { $$matchesEntity: *uploadedObjectId } - length: 1 - chunkSize: 4 - uploadDate: { $$type: date } - md5: { $$unsetOrMatches: "47ed733b8d10be225eceba344d533586" } - filename: filename - metadata: { x: 1 } - - name: find - object: *bucket0_chunks_collection - arguments: - filter: {} - expectResult: - - _id: { $$type: objectId } - files_id: { $$matchesEntity: *uploadedObjectId } - n: 0 - data: { $binary: { base64: "EQ==", subType: "00" } } # hex 11 diff --git a/testdata/index-management/createSearchIndex.json b/testdata/index-management/createSearchIndex.json deleted file mode 100644 index f4f2a6c661..0000000000 --- a/testdata/index-management/createSearchIndex.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "description": "createSearchIndex", - "schemaVersion": "1.4", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - } - ], - "runOnRequirements": [ - { - "minServerVersion": "7.0.5", - "maxServerVersion": "7.0.99", - "topologies": [ - "replicaset", - "load-balanced", - "sharded" - ], - "serverless": "forbid" - }, - { - "minServerVersion": "7.2.0", - "topologies": [ - "replicaset", - "load-balanced", - "sharded" - ], - "serverless": "forbid" - } - ], - "tests": [ - { - "description": "no name provided for an index definition", - "operations": [ - { - "name": "createSearchIndex", - "object": "collection0", - "arguments": { - "model": { - "definition": { - "mappings": { - "dynamic": true - } - }, - "type": "search" - } - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "createSearchIndexes": "collection0", - "indexes": [ - { - "definition": { - "mappings": { - "dynamic": true - } - }, - "type": "search" - } - ], - "$db": "database0" - } - } - } - ] - } - ] - }, - { - "description": "name provided for an index definition", - "operations": [ - { - "name": "createSearchIndex", - "object": "collection0", - "arguments": { - "model": { - "definition": { - "mappings": { - "dynamic": true - } - }, - "name": "test index", - "type": "search" - } - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "createSearchIndexes": "collection0", - "indexes": [ - { - "definition": { - "mappings": { - "dynamic": true - } - }, - "name": "test index", - "type": "search" - } - ], - "$db": "database0" - } - } - } - ] - } - ] - }, - { - "description": "create a vector search index", - "operations": [ - { - "name": "createSearchIndex", - "object": "collection0", - "arguments": { - "model": { - "definition": { - "fields": [ - { - "type": "vector", - "path": "plot_embedding", - "numDimensions": 1536, - "similarity": "euclidean" - } - ] - }, - "name": "test index", - "type": "vectorSearch" - } - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "createSearchIndexes": "collection0", - "indexes": [ - { - "definition": { - "fields": [ - { - "type": "vector", - "path": "plot_embedding", - "numDimensions": 1536, - "similarity": "euclidean" - } - ] - }, - "name": "test index", - "type": "vectorSearch" - } - ], - "$db": "database0" - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/index-management/createSearchIndex.yml b/testdata/index-management/createSearchIndex.yml deleted file mode 100644 index 8d05ee5042..0000000000 --- a/testdata/index-management/createSearchIndex.yml +++ /dev/null @@ -1,92 +0,0 @@ -description: "createSearchIndex" -schemaVersion: "1.4" -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - -runOnRequirements: - # Skip server versions without fix of SERVER-83107 to avoid error message "BSON field 'createSearchIndexes.indexes.type' is an unknown field." - # SERVER-83107 was not backported to 7.1. - - minServerVersion: "7.0.5" - maxServerVersion: "7.0.99" - topologies: [ replicaset, load-balanced, sharded ] - serverless: forbid - - minServerVersion: "7.2.0" - topologies: [ replicaset, load-balanced, sharded ] - serverless: forbid - -tests: - - description: "no name provided for an index definition" - operations: - - name: createSearchIndex - object: *collection0 - arguments: - model: { definition: &definition { mappings: { dynamic: true } } , type: 'search' } - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - createSearchIndexes: *collection0 - indexes: [ { definition: *definition, type: 'search'} ] - $db: *database0 - - - description: "name provided for an index definition" - operations: - - name: createSearchIndex - object: *collection0 - arguments: - model: { definition: &definition { mappings: { dynamic: true } } , name: 'test index', type: 'search' } - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - createSearchIndexes: *collection0 - indexes: [ { definition: *definition, name: 'test index', type: 'search' } ] - $db: *database0 - - - description: "create a vector search index" - operations: - - name: createSearchIndex - object: *collection0 - arguments: - model: { definition: &definition { fields: [ {"type": "vector", "path": "plot_embedding", "numDimensions": 1536, "similarity": "euclidean"} ] } - , name: 'test index', type: 'vectorSearch' } - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - createSearchIndexes: *collection0 - indexes: [ { definition: *definition, name: 'test index', type: 'vectorSearch' } ] - $db: *database0 diff --git a/testdata/index-management/createSearchIndexes.json b/testdata/index-management/createSearchIndexes.json deleted file mode 100644 index 01300b1b7f..0000000000 --- a/testdata/index-management/createSearchIndexes.json +++ /dev/null @@ -1,248 +0,0 @@ -{ - "description": "createSearchIndexes", - "schemaVersion": "1.4", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - } - ], - "runOnRequirements": [ - { - "minServerVersion": "7.0.5", - "maxServerVersion": "7.0.99", - "topologies": [ - "replicaset", - "load-balanced", - "sharded" - ], - "serverless": "forbid" - }, - { - "minServerVersion": "7.2.0", - "topologies": [ - "replicaset", - "load-balanced", - "sharded" - ], - "serverless": "forbid" - } - ], - "tests": [ - { - "description": "empty index definition array", - "operations": [ - { - "name": "createSearchIndexes", - "object": "collection0", - "arguments": { - "models": [] - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "createSearchIndexes": "collection0", - "indexes": [], - "$db": "database0" - } - } - } - ] - } - ] - }, - { - "description": "no name provided for an index definition", - "operations": [ - { - "name": "createSearchIndexes", - "object": "collection0", - "arguments": { - "models": [ - { - "definition": { - "mappings": { - "dynamic": true - } - }, - "type": "search" - } - ] - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "createSearchIndexes": "collection0", - "indexes": [ - { - "definition": { - "mappings": { - "dynamic": true - } - }, - "type": "search" - } - ], - "$db": "database0" - } - } - } - ] - } - ] - }, - { - "description": "name provided for an index definition", - "operations": [ - { - "name": "createSearchIndexes", - "object": "collection0", - "arguments": { - "models": [ - { - "definition": { - "mappings": { - "dynamic": true - } - }, - "name": "test index", - "type": "search" - } - ] - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "createSearchIndexes": "collection0", - "indexes": [ - { - "definition": { - "mappings": { - "dynamic": true - } - }, - "name": "test index", - "type": "search" - } - ], - "$db": "database0" - } - } - } - ] - } - ] - }, - { - "description": "create a vector search index", - "operations": [ - { - "name": "createSearchIndexes", - "object": "collection0", - "arguments": { - "models": [ - { - "definition": { - "fields": [ - { - "type": "vector", - "path": "plot_embedding", - "numDimensions": 1536, - "similarity": "euclidean" - } - ] - }, - "name": "test index", - "type": "vectorSearch" - } - ] - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "createSearchIndexes": "collection0", - "indexes": [ - { - "definition": { - "fields": [ - { - "type": "vector", - "path": "plot_embedding", - "numDimensions": 1536, - "similarity": "euclidean" - } - ] - }, - "name": "test index", - "type": "vectorSearch" - } - ], - "$db": "database0" - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/index-management/createSearchIndexes.yml b/testdata/index-management/createSearchIndexes.yml deleted file mode 100644 index 56ee5ff208..0000000000 --- a/testdata/index-management/createSearchIndexes.yml +++ /dev/null @@ -1,114 +0,0 @@ -description: "createSearchIndexes" -schemaVersion: "1.4" -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - -runOnRequirements: - # Skip server versions without fix of SERVER-83107 to avoid error message "BSON field 'createSearchIndexes.indexes.type' is an unknown field." - # SERVER-83107 was not backported to 7.1. - - minServerVersion: "7.0.5" - maxServerVersion: "7.0.99" - topologies: [ replicaset, load-balanced, sharded ] - serverless: forbid - - minServerVersion: "7.2.0" - topologies: [ replicaset, load-balanced, sharded ] - serverless: forbid - -tests: - - description: "empty index definition array" - operations: - - name: createSearchIndexes - object: *collection0 - arguments: - models: [] - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - createSearchIndexes: *collection0 - indexes: [] - $db: *database0 - - - - description: "no name provided for an index definition" - operations: - - name: createSearchIndexes - object: *collection0 - arguments: - models: [ { definition: &definition { mappings: { dynamic: true } } , type: 'search' } ] - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - createSearchIndexes: *collection0 - indexes: [ { definition: *definition, type: 'search'} ] - $db: *database0 - - - description: "name provided for an index definition" - operations: - - name: createSearchIndexes - object: *collection0 - arguments: - models: [ { definition: &definition { mappings: { dynamic: true } } , name: 'test index' , type: 'search' } ] - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - createSearchIndexes: *collection0 - indexes: [ { definition: *definition, name: 'test index', type: 'search' } ] - $db: *database0 - - - description: "create a vector search index" - operations: - - name: createSearchIndexes - object: *collection0 - arguments: - models: [ { definition: &definition { fields: [ {"type": "vector", "path": "plot_embedding", "numDimensions": 1536, "similarity": "euclidean"} ] }, - name: 'test index' , type: 'vectorSearch' } ] - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - createSearchIndexes: *collection0 - indexes: [ { definition: *definition, name: 'test index', type: 'vectorSearch' } ] - $db: *database0 diff --git a/testdata/index-management/dropSearchIndex.json b/testdata/index-management/dropSearchIndex.json deleted file mode 100644 index d8957a2227..0000000000 --- a/testdata/index-management/dropSearchIndex.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "description": "dropSearchIndex", - "schemaVersion": "1.4", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - } - ], - "runOnRequirements": [ - { - "minServerVersion": "7.0.0", - "topologies": [ - "replicaset", - "load-balanced", - "sharded" - ], - "serverless": "forbid" - } - ], - "tests": [ - { - "description": "sends the correct command", - "operations": [ - { - "name": "dropSearchIndex", - "object": "collection0", - "arguments": { - "name": "test index" - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "dropSearchIndex": "collection0", - "name": "test index", - "$db": "database0" - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/index-management/dropSearchIndex.yml b/testdata/index-management/dropSearchIndex.yml deleted file mode 100644 index 8a8e829454..0000000000 --- a/testdata/index-management/dropSearchIndex.yml +++ /dev/null @@ -1,43 +0,0 @@ -description: "dropSearchIndex" -schemaVersion: "1.4" -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - -runOnRequirements: - - minServerVersion: "7.0.0" - topologies: [ replicaset, load-balanced, sharded ] - serverless: forbid - -tests: - - description: "sends the correct command" - operations: - - name: dropSearchIndex - object: *collection0 - arguments: - name: &indexName 'test index' - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - dropSearchIndex: *collection0 - name: *indexName - $db: *database0 diff --git a/testdata/index-management/listSearchIndexes.json b/testdata/index-management/listSearchIndexes.json deleted file mode 100644 index a8cef42f7a..0000000000 --- a/testdata/index-management/listSearchIndexes.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "description": "listSearchIndexes", - "schemaVersion": "1.4", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - } - ], - "runOnRequirements": [ - { - "minServerVersion": "7.0.0", - "topologies": [ - "replicaset", - "load-balanced", - "sharded" - ], - "serverless": "forbid" - } - ], - "tests": [ - { - "description": "when no name is provided, it does not populate the filter", - "operations": [ - { - "name": "listSearchIndexes", - "object": "collection0", - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "pipeline": [ - { - "$listSearchIndexes": {} - } - ] - } - } - } - ] - } - ] - }, - { - "description": "when a name is provided, it is present in the filter", - "operations": [ - { - "name": "listSearchIndexes", - "object": "collection0", - "arguments": { - "name": "test index" - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "pipeline": [ - { - "$listSearchIndexes": { - "name": "test index" - } - } - ], - "$db": "database0" - } - } - } - ] - } - ] - }, - { - "description": "aggregation cursor options are supported", - "operations": [ - { - "name": "listSearchIndexes", - "object": "collection0", - "arguments": { - "name": "test index", - "aggregationOptions": { - "batchSize": 10 - } - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "cursor": { - "batchSize": 10 - }, - "pipeline": [ - { - "$listSearchIndexes": { - "name": "test index" - } - } - ], - "$db": "database0" - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/index-management/listSearchIndexes.yml b/testdata/index-management/listSearchIndexes.yml deleted file mode 100644 index f05a368585..0000000000 --- a/testdata/index-management/listSearchIndexes.yml +++ /dev/null @@ -1,88 +0,0 @@ -description: "listSearchIndexes" -schemaVersion: "1.4" -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - -runOnRequirements: - - minServerVersion: "7.0.0" - topologies: [ replicaset, load-balanced, sharded ] - serverless: forbid - -tests: - - description: "when no name is provided, it does not populate the filter" - operations: - - name: listSearchIndexes - object: *collection0 - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0 - pipeline: - - $listSearchIndexes: {} - - - description: "when a name is provided, it is present in the filter" - operations: - - name: listSearchIndexes - object: *collection0 - arguments: - name: &indexName "test index" - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0 - pipeline: - - $listSearchIndexes: { name: *indexName } - $db: *database0 - - - description: aggregation cursor options are supported - operations: - - name: listSearchIndexes - object: *collection0 - arguments: - name: &indexName "test index" - aggregationOptions: - batchSize: 10 - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0 - cursor: { batchSize: 10 } - pipeline: - - $listSearchIndexes: { name: *indexName } - $db: *database0 diff --git a/testdata/index-management/searchIndexIgnoresReadWriteConcern.json b/testdata/index-management/searchIndexIgnoresReadWriteConcern.json deleted file mode 100644 index edf71b7b7e..0000000000 --- a/testdata/index-management/searchIndexIgnoresReadWriteConcern.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "description": "search index operations ignore read and write concern", - "schemaVersion": "1.4", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "uriOptions": { - "readConcernLevel": "local", - "w": 1 - }, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - } - ], - "runOnRequirements": [ - { - "minServerVersion": "7.0.0", - "topologies": [ - "replicaset", - "load-balanced", - "sharded" - ], - "serverless": "forbid" - } - ], - "tests": [ - { - "description": "createSearchIndex ignores read and write concern", - "operations": [ - { - "name": "createSearchIndex", - "object": "collection0", - "arguments": { - "model": { - "definition": { - "mappings": { - "dynamic": true - } - } - } - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "createSearchIndexes": "collection0", - "indexes": [ - { - "definition": { - "mappings": { - "dynamic": true - } - } - } - ], - "$db": "database0", - "writeConcern": { - "$$exists": false - }, - "readConcern": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "createSearchIndexes ignores read and write concern", - "operations": [ - { - "name": "createSearchIndexes", - "object": "collection0", - "arguments": { - "models": [] - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "createSearchIndexes": "collection0", - "indexes": [], - "$db": "database0", - "writeConcern": { - "$$exists": false - }, - "readConcern": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "dropSearchIndex ignores read and write concern", - "operations": [ - { - "name": "dropSearchIndex", - "object": "collection0", - "arguments": { - "name": "test index" - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "dropSearchIndex": "collection0", - "name": "test index", - "$db": "database0", - "writeConcern": { - "$$exists": false - }, - "readConcern": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "listSearchIndexes ignores read and write concern", - "operations": [ - { - "name": "listSearchIndexes", - "object": "collection0", - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "pipeline": [ - { - "$listSearchIndexes": {} - } - ], - "writeConcern": { - "$$exists": false - }, - "readConcern": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "updateSearchIndex ignores the read and write concern", - "operations": [ - { - "name": "updateSearchIndex", - "object": "collection0", - "arguments": { - "name": "test index", - "definition": {} - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "updateSearchIndex": "collection0", - "name": "test index", - "definition": {}, - "$db": "database0", - "writeConcern": { - "$$exists": false - }, - "readConcern": { - "$$exists": false - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/index-management/searchIndexIgnoresReadWriteConcern.yml b/testdata/index-management/searchIndexIgnoresReadWriteConcern.yml deleted file mode 100644 index 73fef27de5..0000000000 --- a/testdata/index-management/searchIndexIgnoresReadWriteConcern.yml +++ /dev/null @@ -1,146 +0,0 @@ -description: "search index operations ignore read and write concern" -schemaVersion: "1.4" -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - # Set a non-default read and write concern. - uriOptions: - readConcernLevel: local - w: 1 - observeEvents: - - commandStartedEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - -runOnRequirements: - - minServerVersion: "7.0.0" - topologies: [ replicaset, load-balanced, sharded ] - serverless: forbid - -tests: - - description: "createSearchIndex ignores read and write concern" - operations: - - name: createSearchIndex - object: *collection0 - arguments: - model: { definition: &definition { mappings: { dynamic: true } } } - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - createSearchIndexes: *collection0 - indexes: [ { definition: *definition } ] - $db: *database0 - # Expect no writeConcern or readConcern to be sent. - writeConcern: { $$exists: false } - readConcern: { $$exists: false } - - - description: "createSearchIndexes ignores read and write concern" - operations: - - name: createSearchIndexes - object: *collection0 - arguments: - models: [] - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - createSearchIndexes: *collection0 - indexes: [] - $db: *database0 - # Expect no writeConcern or readConcern to be sent. - writeConcern: { $$exists: false } - readConcern: { $$exists: false } - - - description: "dropSearchIndex ignores read and write concern" - operations: - - name: dropSearchIndex - object: *collection0 - arguments: - name: &indexName 'test index' - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - dropSearchIndex: *collection0 - name: *indexName - $db: *database0 - # Expect no writeConcern or readConcern to be sent. - writeConcern: { $$exists: false } - readConcern: { $$exists: false } - - - description: "listSearchIndexes ignores read and write concern" - operations: - - name: listSearchIndexes - object: *collection0 - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0 - pipeline: - - $listSearchIndexes: {} - # Expect no writeConcern or readConcern to be sent. - writeConcern: { $$exists: false } - readConcern: { $$exists: false } - - - description: "updateSearchIndex ignores the read and write concern" - operations: - - name: updateSearchIndex - object: *collection0 - arguments: - name: &indexName 'test index' - definition: &definition {} - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - updateSearchIndex: *collection0 - name: *indexName - definition: *definition - $db: *database0 - # Expect no writeConcern or readConcern to be sent. - writeConcern: { $$exists: false } - readConcern: { $$exists: false } diff --git a/testdata/index-management/updateSearchIndex.json b/testdata/index-management/updateSearchIndex.json deleted file mode 100644 index 76a5962146..0000000000 --- a/testdata/index-management/updateSearchIndex.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "description": "updateSearchIndex", - "schemaVersion": "1.4", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - } - ], - "runOnRequirements": [ - { - "minServerVersion": "7.0.0", - "topologies": [ - "replicaset", - "load-balanced", - "sharded" - ], - "serverless": "forbid" - } - ], - "tests": [ - { - "description": "sends the correct command", - "operations": [ - { - "name": "updateSearchIndex", - "object": "collection0", - "arguments": { - "name": "test index", - "definition": {} - }, - "expectError": { - "isError": true, - "errorContains": "Atlas" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "updateSearchIndex": "collection0", - "name": "test index", - "definition": {}, - "$db": "database0" - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/index-management/updateSearchIndex.yml b/testdata/index-management/updateSearchIndex.yml deleted file mode 100644 index c16697ddc5..0000000000 --- a/testdata/index-management/updateSearchIndex.yml +++ /dev/null @@ -1,45 +0,0 @@ -description: "updateSearchIndex" -schemaVersion: "1.4" -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: *database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: *collection0 - -runOnRequirements: - - minServerVersion: "7.0.0" - topologies: [ replicaset, load-balanced, sharded ] - serverless: forbid - -tests: - - description: "sends the correct command" - operations: - - name: updateSearchIndex - object: *collection0 - arguments: - name: &indexName 'test index' - definition: &definition {} - expectError: - # This test always errors in a non-Atlas environment. The test functions as a unit test by asserting - # that the driver constructs and sends the correct command. - # The expected error message was changed in SERVER-83003. Check for the substring "Atlas" shared by both error messages. - isError: true - errorContains: Atlas - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - updateSearchIndex: *collection0 - name: *indexName - definition: *definition - $db: *database0 diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-directConnection.json b/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-directConnection.json deleted file mode 100644 index 8e459115c1..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-directConnection.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "uri": "mongodb+srv://test24.test.build.10gen.cc/?directConnection=false", - "seeds": [ - "localhost.test.build.10gen.cc:8000" - ], - "hosts": [ - "localhost.test.build.10gen.cc:8000" - ], - "options": { - "loadBalanced": true, - "ssl": true, - "directConnection": false - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-directConnection.yml b/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-directConnection.yml deleted file mode 100644 index 7a77944a30..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-directConnection.yml +++ /dev/null @@ -1,14 +0,0 @@ -# The TXT record for test24.test.build.10gen.cc contains loadBalanced=true. -# DRIVERS-1721 introduced this test as passing. -uri: "mongodb+srv://test24.test.build.10gen.cc/?directConnection=false" -seeds: - - localhost.test.build.10gen.cc:8000 -hosts: - # In LB mode, the driver does not do server discovery, so the hostname does - # not get resolved to localhost:8000. - - localhost.test.build.10gen.cc:8000 -options: - loadBalanced: true - ssl: true - directConnection: false -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-no-results.json b/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-no-results.json deleted file mode 100644 index 7f49416aa3..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-no-results.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test4.test.build.10gen.cc/?loadBalanced=true", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because no SRV records are present for this URI." -} diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-no-results.yml b/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-no-results.yml deleted file mode 100644 index ee716e593e..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-no-results.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test4.test.build.10gen.cc/?loadBalanced=true" -seeds: [] -hosts: [] -error: true -comment: Should fail because no SRV records are present for this URI. diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-replicaSet-errors.json b/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-replicaSet-errors.json deleted file mode 100644 index 2133dee532..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-replicaSet-errors.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test24.test.build.10gen.cc/?replicaSet=replset", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because loadBalanced=true is incompatible with replicaSet" -} diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-replicaSet-errors.yml b/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-replicaSet-errors.yml deleted file mode 100644 index 896f7de7b5..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-replicaSet-errors.yml +++ /dev/null @@ -1,6 +0,0 @@ -# The TXT record for test24.test.build.10gen.cc contains loadBalanced=true. -uri: "mongodb+srv://test24.test.build.10gen.cc/?replicaSet=replset" -seeds: [] -hosts: [] -error: true -comment: Should fail because loadBalanced=true is incompatible with replicaSet diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-multiple-hosts.json b/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-multiple-hosts.json deleted file mode 100644 index f425c06b30..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-multiple-hosts.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test1.test.build.10gen.cc/?loadBalanced=true", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because loadBalanced is true but the SRV record resolves to multiple hosts" -} diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-multiple-hosts.yml b/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-multiple-hosts.yml deleted file mode 100644 index c8276c1b7e..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-multiple-hosts.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test1.test.build.10gen.cc/?loadBalanced=true" -seeds: [] -hosts: [] -error: true -comment: Should fail because loadBalanced is true but the SRV record resolves to multiple hosts diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-txt.json b/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-txt.json deleted file mode 100644 index 39bff5a23b..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-txt.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "uri": "mongodb+srv://test24.test.build.10gen.cc/", - "seeds": [ - "localhost.test.build.10gen.cc:8000" - ], - "hosts": [ - "localhost.test.build.10gen.cc:8000" - ], - "options": { - "loadBalanced": true, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-txt.yml b/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-txt.yml deleted file mode 100644 index c373192f01..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-txt.yml +++ /dev/null @@ -1,11 +0,0 @@ -uri: "mongodb+srv://test24.test.build.10gen.cc/" -seeds: - - localhost.test.build.10gen.cc:8000 -hosts: - # In LB mode, the driver does not do server discovery, so the hostname does - # not get resolved to localhost:8000. - - localhost.test.build.10gen.cc:8000 -options: - loadBalanced: true - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.json b/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.json deleted file mode 100644 index 593a521c26..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test24.test.build.10gen.cc/?srvMaxHosts=1", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because positive integer for srvMaxHosts conflicts with loadBalanced=true (TXT)" -} diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.yml b/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.yml deleted file mode 100644 index 01379cd205..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test24.test.build.10gen.cc/?srvMaxHosts=1" -seeds: [] -hosts: [] -error: true -comment: Should fail because positive integer for srvMaxHosts conflicts with loadBalanced=true (TXT) diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true.json b/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true.json deleted file mode 100644 index d03a174b1e..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test3.test.build.10gen.cc/?loadBalanced=true&srvMaxHosts=1", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because positive integer for srvMaxHosts conflicts with loadBalanced=true" -} diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true.yml b/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true.yml deleted file mode 100644 index 1175225c7a..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test3.test.build.10gen.cc/?loadBalanced=true&srvMaxHosts=1" -seeds: [] -hosts: [] -error: true -comment: Should fail because positive integer for srvMaxHosts conflicts with loadBalanced=true diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-zero-txt.json b/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-zero-txt.json deleted file mode 100644 index 474a314fd7..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-zero-txt.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "uri": "mongodb+srv://test24.test.build.10gen.cc/?srvMaxHosts=0", - "seeds": [ - "localhost.test.build.10gen.cc:8000" - ], - "hosts": [ - "localhost.test.build.10gen.cc:8000" - ], - "options": { - "loadBalanced": true, - "srvMaxHosts": 0, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-zero-txt.yml b/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-zero-txt.yml deleted file mode 100644 index f223a8d558..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-zero-txt.yml +++ /dev/null @@ -1,11 +0,0 @@ -# loadBalanced=true (TXT) is permitted because srvMaxHosts is non-positive -uri: "mongodb+srv://test24.test.build.10gen.cc/?srvMaxHosts=0" -seeds: - - localhost.test.build.10gen.cc:8000 -hosts: - - localhost.test.build.10gen.cc:8000 -options: - loadBalanced: true - srvMaxHosts: 0 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-zero.json b/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-zero.json deleted file mode 100644 index dfc90dc96d..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-zero.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "uri": "mongodb+srv://test23.test.build.10gen.cc/?loadBalanced=true&srvMaxHosts=0", - "seeds": [ - "localhost.test.build.10gen.cc:8000" - ], - "hosts": [ - "localhost.test.build.10gen.cc:8000" - ], - "options": { - "loadBalanced": true, - "srvMaxHosts": 0, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-zero.yml b/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-zero.yml deleted file mode 100644 index f8343e0e3e..0000000000 --- a/testdata/initial-dns-seedlist-discovery/load-balanced/srvMaxHosts-zero.yml +++ /dev/null @@ -1,11 +0,0 @@ -# loadBalanced=true is permitted because srvMaxHosts is non-positive -uri: "mongodb+srv://test23.test.build.10gen.cc/?loadBalanced=true&srvMaxHosts=0" -seeds: - - localhost.test.build.10gen.cc:8000 -hosts: - - localhost.test.build.10gen.cc:8000 -options: - loadBalanced: true - srvMaxHosts: 0 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/direct-connection-false.json b/testdata/initial-dns-seedlist-discovery/replica-set/direct-connection-false.json deleted file mode 100644 index 3f14ff94e7..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/direct-connection-false.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "uri": "mongodb+srv://test3.test.build.10gen.cc/?directConnection=false", - "seeds": [ - "localhost.test.build.10gen.cc:27017" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "ssl": true, - "directConnection": false - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/direct-connection-false.yml b/testdata/initial-dns-seedlist-discovery/replica-set/direct-connection-false.yml deleted file mode 100644 index 21de8dc771..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/direct-connection-false.yml +++ /dev/null @@ -1,11 +0,0 @@ -uri: "mongodb+srv://test3.test.build.10gen.cc/?directConnection=false" -seeds: - - localhost.test.build.10gen.cc:27017 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - ssl: true - directConnection: false -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/direct-connection-true.json b/testdata/initial-dns-seedlist-discovery/replica-set/direct-connection-true.json deleted file mode 100644 index ace6700106..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/direct-connection-true.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test3.test.build.10gen.cc/?directConnection=true", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because directConnection=true is incompatible with SRV URIs." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/direct-connection-true.yml b/testdata/initial-dns-seedlist-discovery/replica-set/direct-connection-true.yml deleted file mode 100644 index 923e4e6753..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/direct-connection-true.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test3.test.build.10gen.cc/?directConnection=true" -seeds: [] -hosts: [] -error: true -comment: Should fail because directConnection=true is incompatible with SRV URIs. diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/encoded-userinfo-and-db.json b/testdata/initial-dns-seedlist-discovery/replica-set/encoded-userinfo-and-db.json deleted file mode 100644 index 4493628be9..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/encoded-userinfo-and-db.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "uri": "mongodb+srv://b*b%40f3tt%3D:%244to%40L8%3DMC@test3.test.build.10gen.cc/mydb%3F?replicaSet=repl0", - "seeds": [ - "localhost.test.build.10gen.cc:27017" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "replicaSet": "repl0", - "ssl": true - }, - "parsed_options": { - "user": "b*b@f3tt=", - "password": "$4to@L8=MC", - "db": "mydb?" - }, - "ping": false, - "comment": "Encoded user, pass, and DB parse correctly" -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/encoded-userinfo-and-db.yml b/testdata/initial-dns-seedlist-discovery/replica-set/encoded-userinfo-and-db.yml deleted file mode 100644 index 4b25a46db5..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/encoded-userinfo-and-db.yml +++ /dev/null @@ -1,19 +0,0 @@ -uri: "mongodb+srv://b*b%40f3tt%3D:%244to%40L8%3DMC@test3.test.build.10gen.cc/mydb%3F?replicaSet=repl0" -seeds: - - localhost.test.build.10gen.cc:27017 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - replicaSet: repl0 - ssl: true -parsed_options: - user: "b*b@f3tt=" - password: "$4to@L8=MC" - db: "mydb?" -# Don't run a ping for URIs that include userinfo. Ping doesn't require authentication, so missing -# userinfo isn't a problem, but some drivers will fail handshake on a connection if userinfo is -# provided but incorrect. -ping: false -comment: Encoded user, pass, and DB parse correctly diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/loadBalanced-false-txt.json b/testdata/initial-dns-seedlist-discovery/replica-set/loadBalanced-false-txt.json deleted file mode 100644 index 682d32a742..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/loadBalanced-false-txt.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "uri": "mongodb+srv://test21.test.build.10gen.cc/", - "seeds": [ - "localhost.test.build.10gen.cc:27017" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "loadBalanced": false, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/loadBalanced-false-txt.yml b/testdata/initial-dns-seedlist-discovery/replica-set/loadBalanced-false-txt.yml deleted file mode 100644 index c7e31da131..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/loadBalanced-false-txt.yml +++ /dev/null @@ -1,11 +0,0 @@ -uri: "mongodb+srv://test21.test.build.10gen.cc/" -seeds: - - localhost.test.build.10gen.cc:27017 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - loadBalanced: false - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/longer-parent-in-return.json b/testdata/initial-dns-seedlist-discovery/replica-set/longer-parent-in-return.json deleted file mode 100644 index ebe3fe1e77..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/longer-parent-in-return.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "uri": "mongodb+srv://test18.test.build.10gen.cc/?replicaSet=repl0", - "seeds": [ - "localhost.sub.test.build.10gen.cc:27017" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "replicaSet": "repl0", - "ssl": true - }, - "ping": true, - "comment": "Is correct, as returned host name shared the URI root \"test.build.10gen.cc\"." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/longer-parent-in-return.yml b/testdata/initial-dns-seedlist-discovery/replica-set/longer-parent-in-return.yml deleted file mode 100644 index 92b54ae57f..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/longer-parent-in-return.yml +++ /dev/null @@ -1,12 +0,0 @@ -uri: "mongodb+srv://test18.test.build.10gen.cc/?replicaSet=repl0" -seeds: - - localhost.sub.test.build.10gen.cc:27017 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - replicaSet: repl0 - ssl: true -ping: true -comment: Is correct, as returned host name shared the URI root "test.build.10gen.cc". diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/misformatted-option.json b/testdata/initial-dns-seedlist-discovery/replica-set/misformatted-option.json deleted file mode 100644 index 3c8c29ace6..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/misformatted-option.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test8.test.build.10gen.cc/", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because the options in the TXT record are incorrectly formatted (misses value)." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/misformatted-option.yml b/testdata/initial-dns-seedlist-discovery/replica-set/misformatted-option.yml deleted file mode 100644 index 9669772cb3..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/misformatted-option.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test8.test.build.10gen.cc/" -seeds: [] -hosts: [] -error: true -comment: Should fail because the options in the TXT record are incorrectly formatted (misses value). diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/no-results.json b/testdata/initial-dns-seedlist-discovery/replica-set/no-results.json deleted file mode 100644 index c1dc02d281..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/no-results.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test4.test.build.10gen.cc/", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because no SRV records are present for this URI." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/no-results.yml b/testdata/initial-dns-seedlist-discovery/replica-set/no-results.yml deleted file mode 100644 index e09bd060c2..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/no-results.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test4.test.build.10gen.cc/" -seeds: [] -hosts: [] -error: true -comment: Should fail because no SRV records are present for this URI. diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/not-enough-parts.json b/testdata/initial-dns-seedlist-discovery/replica-set/not-enough-parts.json deleted file mode 100644 index 7cfce2ec57..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/not-enough-parts.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://10gen.cc/", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because host in URI does not have {hostname}, {domainname} and {tld}." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/not-enough-parts.yml b/testdata/initial-dns-seedlist-discovery/replica-set/not-enough-parts.yml deleted file mode 100644 index b36fa4a5de..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/not-enough-parts.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://10gen.cc/" -seeds: [] -hosts: [] -error: true -comment: Should fail because host in URI does not have {hostname}, {domainname} and {tld}. diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/one-result-default-port.json b/testdata/initial-dns-seedlist-discovery/replica-set/one-result-default-port.json deleted file mode 100644 index 9f7733de80..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/one-result-default-port.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "uri": "mongodb+srv://test3.test.build.10gen.cc/?replicaSet=repl0", - "seeds": [ - "localhost.test.build.10gen.cc:27017" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "replicaSet": "repl0", - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/one-result-default-port.yml b/testdata/initial-dns-seedlist-discovery/replica-set/one-result-default-port.yml deleted file mode 100644 index 748d4634ea..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/one-result-default-port.yml +++ /dev/null @@ -1,11 +0,0 @@ -uri: "mongodb+srv://test3.test.build.10gen.cc/?replicaSet=repl0" -seeds: - - localhost.test.build.10gen.cc:27017 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - replicaSet: repl0 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/one-txt-record-multiple-strings.json b/testdata/initial-dns-seedlist-discovery/replica-set/one-txt-record-multiple-strings.json deleted file mode 100644 index 1d740b1b59..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/one-txt-record-multiple-strings.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "uri": "mongodb+srv://test11.test.build.10gen.cc/", - "seeds": [ - "localhost.test.build.10gen.cc:27017" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "replicaSet": "repl0", - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/one-txt-record-multiple-strings.yml b/testdata/initial-dns-seedlist-discovery/replica-set/one-txt-record-multiple-strings.yml deleted file mode 100644 index 2f353ffb74..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/one-txt-record-multiple-strings.yml +++ /dev/null @@ -1,11 +0,0 @@ -uri: "mongodb+srv://test11.test.build.10gen.cc/" -seeds: - - localhost.test.build.10gen.cc:27017 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - replicaSet: repl0 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/one-txt-record.json b/testdata/initial-dns-seedlist-discovery/replica-set/one-txt-record.json deleted file mode 100644 index ecdb0a7e2a..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/one-txt-record.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "uri": "mongodb+srv://test5.test.build.10gen.cc/", - "seeds": [ - "localhost.test.build.10gen.cc:27017" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "replicaSet": "repl0", - "authSource": "thisDB", - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/one-txt-record.yml b/testdata/initial-dns-seedlist-discovery/replica-set/one-txt-record.yml deleted file mode 100644 index 3bc0f0405c..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/one-txt-record.yml +++ /dev/null @@ -1,12 +0,0 @@ -uri: "mongodb+srv://test5.test.build.10gen.cc/" -seeds: - - localhost.test.build.10gen.cc:27017 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - replicaSet: repl0 - authSource: thisDB - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch1.json b/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch1.json deleted file mode 100644 index 8d0147a48b..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test14.test.build.10gen.cc/", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because returned host name's part \"not-test\" mismatches URI parent part \"test\"." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch1.yml b/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch1.yml deleted file mode 100644 index e35dfdf6d5..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch1.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test14.test.build.10gen.cc/" -seeds: [] -hosts: [] -error: true -comment: Should fail because returned host name's part "not-test" mismatches URI parent part "test". diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch2.json b/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch2.json deleted file mode 100644 index 996249eb99..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test15.test.build.10gen.cc/", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because returned host name's part \"not-build\" mismatches URI parent part \"build\"." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch2.yml b/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch2.yml deleted file mode 100644 index 595e5493c4..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch2.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test15.test.build.10gen.cc/" -seeds: [] -hosts: [] -error: true -comment: Should fail because returned host name's part "not-build" mismatches URI parent part "build". diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch3.json b/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch3.json deleted file mode 100644 index 69e724af6c..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch3.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test16.test.build.10gen.cc/", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because returned host name's part \"not-10gen\" mismatches URI parent part \"10gen\"." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch3.yml b/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch3.yml deleted file mode 100644 index 64ca2e708d..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch3.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test16.test.build.10gen.cc/" -seeds: [] -hosts: [] -error: true -comment: Should fail because returned host name's part "not-10gen" mismatches URI parent part "10gen". diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch4.json b/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch4.json deleted file mode 100644 index 254168e34c..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch4.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test17.test.build.10gen.cc/", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because returned host name's TLD \"not-cc\" mismatches URI TLD \"cc\"." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch4.yml b/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch4.yml deleted file mode 100644 index 226d6fa3bc..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch4.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test17.test.build.10gen.cc/" -seeds: [] -hosts: [] -error: true -comment: Should fail because returned host name's TLD "not-cc" mismatches URI TLD "cc". diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch5.json b/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch5.json deleted file mode 100644 index 92c024b4f3..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch5.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test19.test.build.10gen.cc/", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because one of the returned host names' domain name parts \"evil\" mismatches \"test\"." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch5.yml b/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch5.yml deleted file mode 100644 index 1ed2bda4eb..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch5.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test19.test.build.10gen.cc/" -seeds: [] -hosts: [] -error: true -comment: Should fail because one of the returned host names' domain name parts "evil" mismatches "test". diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/returned-parent-too-short.json b/testdata/initial-dns-seedlist-discovery/replica-set/returned-parent-too-short.json deleted file mode 100644 index 676eb0c0d0..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/returned-parent-too-short.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test13.test.build.10gen.cc/", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because returned host name's parent (build.10gen.cc) misses \"test.\"" -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/returned-parent-too-short.yml b/testdata/initial-dns-seedlist-discovery/replica-set/returned-parent-too-short.yml deleted file mode 100644 index 397aec8953..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/returned-parent-too-short.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test13.test.build.10gen.cc/" -seeds: [] -hosts: [] -error: true -comment: Should fail because returned host name's parent (build.10gen.cc) misses "test." diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/returned-parent-wrong.json b/testdata/initial-dns-seedlist-discovery/replica-set/returned-parent-wrong.json deleted file mode 100644 index 3aabfd8196..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/returned-parent-wrong.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test12.test.build.10gen.cc/", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because returned host name is too short and mismatches a parent." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/returned-parent-wrong.yml b/testdata/initial-dns-seedlist-discovery/replica-set/returned-parent-wrong.yml deleted file mode 100644 index 1fc3867a0e..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/returned-parent-wrong.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test12.test.build.10gen.cc/" -seeds: [] -hosts: [] -error: true -comment: Should fail because returned host name is too short and mismatches a parent. diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srv-service-name.json b/testdata/initial-dns-seedlist-discovery/replica-set/srv-service-name.json deleted file mode 100644 index e320c2ca3e..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srv-service-name.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "uri": "mongodb+srv://test22.test.build.10gen.cc/?srvServiceName=customname", - "seeds": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "ssl": true, - "srvServiceName": "customname" - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srv-service-name.yml b/testdata/initial-dns-seedlist-discovery/replica-set/srv-service-name.yml deleted file mode 100644 index 3bf9c2c676..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srv-service-name.yml +++ /dev/null @@ -1,12 +0,0 @@ -uri: "mongodb+srv://test22.test.build.10gen.cc/?srvServiceName=customname" -seeds: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - ssl: true - srvServiceName: "customname" -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet-txt.json b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet-txt.json deleted file mode 100644 index 6de1e37fa5..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet-txt.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test5.test.build.10gen.cc/?srvMaxHosts=1", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because positive integer for srvMaxHosts conflicts with replicaSet option (TXT)" -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet-txt.yml b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet-txt.yml deleted file mode 100644 index 3ea5f3a47b..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet-txt.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test5.test.build.10gen.cc/?srvMaxHosts=1" -seeds: [] -hosts: [] -error: true -comment: Should fail because positive integer for srvMaxHosts conflicts with replicaSet option (TXT) diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet.json b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet.json deleted file mode 100644 index f968757502..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test1.test.build.10gen.cc/?replicaSet=repl0&srvMaxHosts=1", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because positive integer for srvMaxHosts conflicts with replicaSet option" -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet.yml b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet.yml deleted file mode 100644 index f67f114c23..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test1.test.build.10gen.cc/?replicaSet=repl0&srvMaxHosts=1" -seeds: [] -hosts: [] -error: true -comment: Should fail because positive integer for srvMaxHosts conflicts with replicaSet option diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-equal_to_srv_records.json b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-equal_to_srv_records.json deleted file mode 100644 index 70edacfd06..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-equal_to_srv_records.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2", - "numSeeds": 2, - "seeds": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "srvMaxHosts": 2, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-equal_to_srv_records.yml b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-equal_to_srv_records.yml deleted file mode 100644 index b483279614..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-equal_to_srv_records.yml +++ /dev/null @@ -1,17 +0,0 @@ -# When srvMaxHosts equals the number of SRV records, all hosts are added to the -# seed list. -# -# The replicaSet URI option is omitted to avoid a URI validation error. -uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2" -numSeeds: 2 -seeds: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - srvMaxHosts: 2 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-greater_than_srv_records.json b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-greater_than_srv_records.json deleted file mode 100644 index 72540ed408..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-greater_than_srv_records.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=3", - "seeds": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "srvMaxHosts": 3, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-greater_than_srv_records.yml b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-greater_than_srv_records.yml deleted file mode 100644 index 363dd4fd8b..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-greater_than_srv_records.yml +++ /dev/null @@ -1,16 +0,0 @@ -# When srvMaxHosts is greater than the number of SRV records, all hosts are -# added to the seed list. -# -# The replicaSet URI option is omitted to avoid a URI validation error. -uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=3" -seeds: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - srvMaxHosts: 3 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-less_than_srv_records.json b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-less_than_srv_records.json deleted file mode 100644 index a9d6dd6fd9..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-less_than_srv_records.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=1", - "numSeeds": 1, - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "srvMaxHosts": 1, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-less_than_srv_records.yml b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-less_than_srv_records.yml deleted file mode 100644 index 1143ab375f..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-less_than_srv_records.yml +++ /dev/null @@ -1,16 +0,0 @@ -# When srvMaxHosts is less than the number of SRV records, a random subset of -# hosts are added to the seed list. We cannot anticipate which hosts will be -# selected, so this test uses numSeeds instead of seeds. Since this is a replica -# set, all hosts should ultimately be discovered by SDAM. -# -# The replicaSet URI option is omitted to avoid a URI validation error. -uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=1" -numSeeds: 1 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - srvMaxHosts: 1 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-zero-txt.json b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-zero-txt.json deleted file mode 100644 index e232edb9eb..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-zero-txt.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "uri": "mongodb+srv://test5.test.build.10gen.cc/?srvMaxHosts=0", - "seeds": [ - "localhost.test.build.10gen.cc:27017" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "authSource": "thisDB", - "replicaSet": "repl0", - "srvMaxHosts": 0, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-zero-txt.yml b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-zero-txt.yml deleted file mode 100644 index 81e92a09b1..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-zero-txt.yml +++ /dev/null @@ -1,16 +0,0 @@ -# When srvMaxHosts is zero, all hosts are added to the seed list. -# -# replicaSet (TXT) is permitted because srvMaxHosts is non-positive. -uri: "mongodb+srv://test5.test.build.10gen.cc/?srvMaxHosts=0" -seeds: - - localhost.test.build.10gen.cc:27017 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - authSource: thisDB - replicaSet: repl0 - srvMaxHosts: 0 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-zero.json b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-zero.json deleted file mode 100644 index 3421a35a3d..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-zero.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "uri": "mongodb+srv://test1.test.build.10gen.cc/?replicaSet=repl0&srvMaxHosts=0", - "seeds": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "replicaSet": "repl0", - "srvMaxHosts": 0, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-zero.yml b/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-zero.yml deleted file mode 100644 index d095b6d677..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/srvMaxHosts-zero.yml +++ /dev/null @@ -1,16 +0,0 @@ -# When srvMaxHosts is zero, all hosts are added to the seed list. -# -# replicaSet is permitted because srvMaxHosts is non-positive. -uri: "mongodb+srv://test1.test.build.10gen.cc/?replicaSet=repl0&srvMaxHosts=0" -seeds: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - replicaSet: repl0 - srvMaxHosts: 0 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/two-results-default-port.json b/testdata/initial-dns-seedlist-discovery/replica-set/two-results-default-port.json deleted file mode 100644 index 43efcc6310..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/two-results-default-port.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "uri": "mongodb+srv://test1.test.build.10gen.cc/?replicaSet=repl0", - "seeds": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "replicaSet": "repl0", - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/two-results-default-port.yml b/testdata/initial-dns-seedlist-discovery/replica-set/two-results-default-port.yml deleted file mode 100644 index c3f7156dc7..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/two-results-default-port.yml +++ /dev/null @@ -1,12 +0,0 @@ -uri: "mongodb+srv://test1.test.build.10gen.cc/?replicaSet=repl0" -seeds: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - replicaSet: repl0 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/two-results-nonstandard-port.json b/testdata/initial-dns-seedlist-discovery/replica-set/two-results-nonstandard-port.json deleted file mode 100644 index f6e8e415a7..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/two-results-nonstandard-port.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "uri": "mongodb+srv://test2.test.build.10gen.cc/?replicaSet=repl0", - "seeds": [ - "localhost.test.build.10gen.cc:27018", - "localhost.test.build.10gen.cc:27019" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "replicaSet": "repl0", - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/two-results-nonstandard-port.yml b/testdata/initial-dns-seedlist-discovery/replica-set/two-results-nonstandard-port.yml deleted file mode 100644 index fe66308111..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/two-results-nonstandard-port.yml +++ /dev/null @@ -1,12 +0,0 @@ -uri: "mongodb+srv://test2.test.build.10gen.cc/?replicaSet=repl0" -seeds: - - localhost.test.build.10gen.cc:27018 - - localhost.test.build.10gen.cc:27019 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - replicaSet: repl0 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/two-txt-records.json b/testdata/initial-dns-seedlist-discovery/replica-set/two-txt-records.json deleted file mode 100644 index f0654ef6cb..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/two-txt-records.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test6.test.build.10gen.cc/", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because there are two TXT records." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/two-txt-records.yml b/testdata/initial-dns-seedlist-discovery/replica-set/two-txt-records.yml deleted file mode 100644 index c6093613d4..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/two-txt-records.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test6.test.build.10gen.cc/" -seeds: [] -hosts: [] -error: true -comment: Should fail because there are two TXT records. diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-not-allowed-option.json b/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-not-allowed-option.json deleted file mode 100644 index 2a5cf2f007..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-not-allowed-option.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test10.test.build.10gen.cc/?replicaSet=repl0", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because socketTimeoutMS is not an allowed option." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-not-allowed-option.yml b/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-not-allowed-option.yml deleted file mode 100644 index f4ff1cfd15..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-not-allowed-option.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test10.test.build.10gen.cc/?replicaSet=repl0" -seeds: [] -hosts: [] -error: true -comment: Should fail because socketTimeoutMS is not an allowed option. diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-ssl-option.json b/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-ssl-option.json deleted file mode 100644 index 3d84cfe446..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-ssl-option.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "uri": "mongodb+srv://test5.test.build.10gen.cc/?ssl=false", - "seeds": [ - "localhost.test.build.10gen.cc:27017" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "replicaSet": "repl0", - "authSource": "thisDB", - "ssl": false - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-ssl-option.yml b/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-ssl-option.yml deleted file mode 100644 index 8d1a46c396..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-ssl-option.yml +++ /dev/null @@ -1,12 +0,0 @@ -uri: "mongodb+srv://test5.test.build.10gen.cc/?ssl=false" -seeds: - - localhost.test.build.10gen.cc:27017 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - replicaSet: repl0 - authSource: thisDB - ssl: false -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-uri-option.json b/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-uri-option.json deleted file mode 100644 index 1a5a240680..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-uri-option.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "uri": "mongodb+srv://test5.test.build.10gen.cc/?authSource=otherDB", - "seeds": [ - "localhost.test.build.10gen.cc:27017" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "replicaSet": "repl0", - "authSource": "otherDB", - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-uri-option.yml b/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-uri-option.yml deleted file mode 100644 index 200ac6803e..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-uri-option.yml +++ /dev/null @@ -1,12 +0,0 @@ -uri: "mongodb+srv://test5.test.build.10gen.cc/?authSource=otherDB" -seeds: - - localhost.test.build.10gen.cc:27017 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - replicaSet: repl0 - authSource: otherDB - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-unallowed-option.json b/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-unallowed-option.json deleted file mode 100644 index 0d333a459d..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-unallowed-option.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test7.test.build.10gen.cc/", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because \"ssl\" is not an allowed option." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-unallowed-option.yml b/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-unallowed-option.yml deleted file mode 100644 index ba3877ee9f..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/txt-record-with-unallowed-option.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test7.test.build.10gen.cc/" -seeds: [] -hosts: [] -error: true -comment: Should fail because "ssl" is not an allowed option. diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-admin-database.json b/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-admin-database.json deleted file mode 100644 index c5513a0dad..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-admin-database.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "uri": "mongodb+srv://test1.test.build.10gen.cc/adminDB?replicaSet=repl0", - "seeds": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "replicaSet": "repl0", - "ssl": true - }, - "parsed_options": { - "auth_database": "adminDB" - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-admin-database.yml b/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-admin-database.yml deleted file mode 100644 index 012e9a023e..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-admin-database.yml +++ /dev/null @@ -1,14 +0,0 @@ -uri: "mongodb+srv://test1.test.build.10gen.cc/adminDB?replicaSet=repl0" -seeds: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - replicaSet: repl0 - ssl: true -parsed_options: - auth_database: adminDB -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-auth.json b/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-auth.json deleted file mode 100644 index 872f997cc7..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-auth.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "uri": "mongodb+srv://auser:apass@test1.test.build.10gen.cc/?replicaSet=repl0", - "seeds": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "replicaSet": "repl0", - "ssl": true - }, - "parsed_options": { - "user": "auser", - "password": "apass" - }, - "ping": false, - "comment": "Should preserve auth credentials" -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-auth.yml b/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-auth.yml deleted file mode 100644 index 95f9b96426..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-auth.yml +++ /dev/null @@ -1,19 +0,0 @@ -uri: "mongodb+srv://auser:apass@test1.test.build.10gen.cc/?replicaSet=repl0" -seeds: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - replicaSet: repl0 - ssl: true -parsed_options: - user: auser - password: apass -# Don't run a ping for URIs that include userinfo. Ping doesn't require authentication, so missing -# userinfo isn't a problem, but some drivers will fail handshake on a connection if userinfo is -# provided but incorrect. -ping: false -comment: Should preserve auth credentials diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-port.json b/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-port.json deleted file mode 100644 index b981e2a1bf..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-port.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test5.test.build.10gen.cc:8123/?replicaSet=repl0", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because the mongodb+srv URI includes a port." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-port.yml b/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-port.yml deleted file mode 100644 index f1944dcdd9..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-port.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test5.test.build.10gen.cc:8123/?replicaSet=repl0" -seeds: [] -hosts: [] -error: true -comment: Should fail because the mongodb+srv URI includes a port. diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-two-hosts.json b/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-two-hosts.json deleted file mode 100644 index 5261a39cfa..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-two-hosts.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "uri": "mongodb+srv://test5.test.build.10gen.cc,test6.test.build.10gen.cc/?replicaSet=repl0", - "seeds": [], - "hosts": [], - "error": true, - "comment": "Should fail because the mongodb+srv URI includes two host names." -} diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-two-hosts.yml b/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-two-hosts.yml deleted file mode 100644 index 3b2189d48b..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-two-hosts.yml +++ /dev/null @@ -1,5 +0,0 @@ -uri: "mongodb+srv://test5.test.build.10gen.cc,test6.test.build.10gen.cc/?replicaSet=repl0" -seeds: [] -hosts: [] -error: true -comment: Should fail because the mongodb+srv URI includes two host names. diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-uppercase-hostname.json b/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-uppercase-hostname.json deleted file mode 100644 index decc83ce10..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-uppercase-hostname.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "uri": "mongodb+srv://TEST1.TEST.BUILD.10GEN.CC", - "seeds": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "hosts": [ - "localhost:27017", - "localhost:27018", - "localhost:27019" - ], - "options": { - "ssl": true - }, - "ping": true -} \ No newline at end of file diff --git a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-uppercase-hostname.yml b/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-uppercase-hostname.yml deleted file mode 100644 index a0e06c466c..0000000000 --- a/testdata/initial-dns-seedlist-discovery/replica-set/uri-with-uppercase-hostname.yml +++ /dev/null @@ -1,11 +0,0 @@ -uri: "mongodb+srv://TEST1.TEST.BUILD.10GEN.CC" -seeds: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -hosts: - - localhost:27017 - - localhost:27018 - - localhost:27019 -options: - ssl: true -ping: true \ No newline at end of file diff --git a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-equal_to_srv_records.json b/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-equal_to_srv_records.json deleted file mode 100644 index 7d2f9a6bf8..0000000000 --- a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-equal_to_srv_records.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2", - "numSeeds": 2, - "seeds": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "hosts": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "options": { - "srvMaxHosts": 2, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-equal_to_srv_records.yml b/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-equal_to_srv_records.yml deleted file mode 100644 index 84aeac9aec..0000000000 --- a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-equal_to_srv_records.yml +++ /dev/null @@ -1,14 +0,0 @@ -# When srvMaxHosts equals the number of SRV records, all hosts are added to the -# seed list. -uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2" -numSeeds: 2 -seeds: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -hosts: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -options: - srvMaxHosts: 2 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-greater_than_srv_records.json b/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-greater_than_srv_records.json deleted file mode 100644 index 452c7b54db..0000000000 --- a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-greater_than_srv_records.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=3", - "seeds": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "hosts": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "options": { - "srvMaxHosts": 3, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-greater_than_srv_records.yml b/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-greater_than_srv_records.yml deleted file mode 100644 index 8195fd0d33..0000000000 --- a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-greater_than_srv_records.yml +++ /dev/null @@ -1,13 +0,0 @@ -# When srvMaxHosts is greater than the number of SRV records, all hosts are -# added to the seed list. -uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=3" -seeds: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -hosts: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -options: - srvMaxHosts: 3 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-less_than_srv_records.json b/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-less_than_srv_records.json deleted file mode 100644 index cd3bf65117..0000000000 --- a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-less_than_srv_records.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=1", - "numSeeds": 1, - "numHosts": 1, - "options": { - "srvMaxHosts": 1, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-less_than_srv_records.yml b/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-less_than_srv_records.yml deleted file mode 100644 index e33429b67a..0000000000 --- a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-less_than_srv_records.yml +++ /dev/null @@ -1,11 +0,0 @@ -# When srvMaxHosts is less than the number of SRV records, a random subset of -# hosts are added to the seed list. We cannot anticipate which hosts will be -# selected, so this test uses numSeeds and numHosts instead of seeds and hosts, -# respectively. -uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=1" -numSeeds: 1 -numHosts: 1 -options: - srvMaxHosts: 1 - ssl: true -ping: true diff --git a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-zero.json b/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-zero.json deleted file mode 100644 index f289628c9c..0000000000 --- a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-zero.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=0", - "seeds": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "hosts": [ - "localhost.test.build.10gen.cc:27017", - "localhost.test.build.10gen.cc:27018" - ], - "options": { - "srvMaxHosts": 0, - "ssl": true - }, - "ping": true -} diff --git a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-zero.yml b/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-zero.yml deleted file mode 100644 index 5692ed09b8..0000000000 --- a/testdata/initial-dns-seedlist-discovery/sharded/srvMaxHosts-zero.yml +++ /dev/null @@ -1,12 +0,0 @@ -# When srvMaxHosts is zero, all hosts are added to the seed list. -uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=0" -seeds: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -hosts: - - localhost.test.build.10gen.cc:27017 - - localhost.test.build.10gen.cc:27018 -options: - srvMaxHosts: 0 - ssl: true -ping: true diff --git a/testdata/load-balancers/cursors.json b/testdata/load-balancers/cursors.json deleted file mode 100644 index 6eddc0ebc8..0000000000 --- a/testdata/load-balancers/cursors.json +++ /dev/null @@ -1,1238 +0,0 @@ -{ - "description": "cursors are correctly pinned to connections for load-balanced clusters", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent", - "connectionReadyEvent", - "connectionClosedEvent", - "connectionCheckedOutEvent", - "connectionCheckedInEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0Name" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - }, - { - "collection": { - "id": "collection1", - "database": "database0", - "collectionName": "coll1" - } - }, - { - "collection": { - "id": "collection2", - "database": "database0", - "collectionName": "coll2" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "database0Name", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - }, - { - "collectionName": "coll1", - "databaseName": "database0Name", - "documents": [] - }, - { - "collectionName": "coll2", - "databaseName": "database0Name", - "documents": [] - } - ], - "tests": [ - { - "description": "no connection is pinned if all documents are returned in the initial batch", - "operations": [ - { - "name": "createFindCursor", - "object": "collection0", - "arguments": { - "filter": {} - }, - "saveResultAsEntity": "cursor0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": {} - }, - "commandName": "find" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursor": { - "id": 0, - "firstBatch": { - "$$type": "array" - }, - "ns": { - "$$type": "string" - } - } - }, - "commandName": "find" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connections are returned when the cursor is drained", - "operations": [ - { - "name": "createFindCursor", - "object": "collection0", - "arguments": { - "filter": {}, - "batchSize": 2 - }, - "saveResultAsEntity": "cursor0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectResult": { - "_id": 1 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectResult": { - "_id": 2 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectResult": { - "_id": 3 - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - }, - { - "name": "close", - "object": "cursor0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": {}, - "batchSize": 2 - }, - "commandName": "find" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursor": { - "id": { - "$$type": "long" - }, - "firstBatch": { - "$$type": "array" - }, - "ns": { - "$$type": "string" - } - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": "long" - }, - "collection": "coll0" - }, - "commandName": "getMore" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursor": { - "id": 0, - "ns": { - "$$type": "string" - }, - "nextBatch": { - "$$type": "array" - } - } - }, - "commandName": "getMore" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connections are returned to the pool when the cursor is closed", - "operations": [ - { - "name": "createFindCursor", - "object": "collection0", - "arguments": { - "filter": {}, - "batchSize": 2 - }, - "saveResultAsEntity": "cursor0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "close", - "object": "cursor0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": {}, - "batchSize": 2 - }, - "commandName": "find" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursor": { - "id": { - "$$type": "long" - }, - "firstBatch": { - "$$type": "array" - }, - "ns": { - "$$type": "string" - } - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "commandName": "killCursors" - } - }, - { - "commandSucceededEvent": { - "commandName": "killCursors" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connections are not returned after an network error during getMore", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "closeConnection": true - } - } - } - }, - { - "name": "createFindCursor", - "object": "collection0", - "arguments": { - "filter": {}, - "batchSize": 2 - }, - "saveResultAsEntity": "cursor0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectResult": { - "_id": 1 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectResult": { - "_id": 2 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectError": { - "isClientError": true - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "close", - "object": "cursor0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": {}, - "batchSize": 2 - }, - "commandName": "find" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursor": { - "id": { - "$$type": "long" - }, - "firstBatch": { - "$$type": "array" - }, - "ns": { - "$$type": "string" - } - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": "long" - }, - "collection": "coll0" - }, - "commandName": "getMore" - } - }, - { - "commandFailedEvent": { - "commandName": "getMore" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionClosedEvent": { - "reason": "error" - } - } - ] - } - ] - }, - { - "description": "pinned connections are returned after a network error during a killCursors request", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "killCursors" - ], - "closeConnection": true - } - } - } - }, - { - "name": "createFindCursor", - "object": "collection0", - "arguments": { - "filter": {}, - "batchSize": 2 - }, - "saveResultAsEntity": "cursor0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "close", - "object": "cursor0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": {}, - "batchSize": 2 - }, - "commandName": "find" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursor": { - "id": { - "$$type": "long" - }, - "firstBatch": { - "$$type": "array" - }, - "ns": { - "$$type": "string" - } - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "commandName": "killCursors" - } - }, - { - "commandFailedEvent": { - "commandName": "killCursors" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionClosedEvent": { - "reason": "error" - } - } - ] - } - ] - }, - { - "description": "pinned connections are not returned to the pool after a non-network error on getMore", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "getMore" - ], - "errorCode": 7 - } - } - } - }, - { - "name": "createFindCursor", - "object": "collection0", - "arguments": { - "filter": {}, - "batchSize": 2 - }, - "saveResultAsEntity": "cursor0" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectResult": { - "_id": 1 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectResult": { - "_id": 2 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectError": { - "errorCode": 7 - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "close", - "object": "cursor0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": {}, - "batchSize": 2 - }, - "commandName": "find" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursor": { - "id": { - "$$type": "long" - }, - "firstBatch": { - "$$type": "array" - }, - "ns": { - "$$type": "string" - } - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": "long" - }, - "collection": "coll0" - }, - "commandName": "getMore" - } - }, - { - "commandFailedEvent": { - "commandName": "getMore" - } - }, - { - "commandStartedEvent": { - "commandName": "killCursors" - } - }, - { - "commandSucceededEvent": { - "commandName": "killCursors" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "aggregate pins the cursor to a connection", - "operations": [ - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [], - "batchSize": 2 - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll0", - "cursor": { - "batchSize": 2 - } - }, - "commandName": "aggregate" - } - }, - { - "commandSucceededEvent": { - "commandName": "aggregate" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": "long" - }, - "collection": "coll0" - }, - "commandName": "getMore" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursor": { - "id": 0, - "ns": { - "$$type": "string" - }, - "nextBatch": { - "$$type": "array" - } - } - }, - "commandName": "getMore" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "listCollections pins the cursor to a connection", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "listCollections", - "object": "database0", - "arguments": { - "filter": {}, - "batchSize": 2 - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "listCollections": 1, - "cursor": { - "batchSize": 2 - } - }, - "commandName": "listCollections", - "databaseName": "database0Name" - } - }, - { - "commandSucceededEvent": { - "commandName": "listCollections" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": "long" - }, - "collection": { - "$$type": "string" - } - }, - "commandName": "getMore" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursor": { - "id": 0, - "ns": { - "$$type": "string" - }, - "nextBatch": { - "$$type": "array" - } - } - }, - "commandName": "getMore" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "listIndexes pins the cursor to a connection", - "operations": [ - { - "name": "createIndex", - "object": "collection0", - "arguments": { - "keys": { - "x": 1 - }, - "name": "x_1" - } - }, - { - "name": "createIndex", - "object": "collection0", - "arguments": { - "keys": { - "y": 1 - }, - "name": "y_1" - } - }, - { - "name": "listIndexes", - "object": "collection0", - "arguments": { - "batchSize": 2 - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "createIndexes": "coll0", - "indexes": [ - { - "name": "x_1", - "key": { - "x": 1 - } - } - ] - }, - "commandName": "createIndexes" - } - }, - { - "commandSucceededEvent": { - "commandName": "createIndexes" - } - }, - { - "commandStartedEvent": { - "command": { - "createIndexes": "coll0", - "indexes": [ - { - "name": "y_1", - "key": { - "y": 1 - } - } - ] - }, - "commandName": "createIndexes" - } - }, - { - "commandSucceededEvent": { - "commandName": "createIndexes" - } - }, - { - "commandStartedEvent": { - "command": { - "listIndexes": "coll0", - "cursor": { - "batchSize": 2 - } - }, - "commandName": "listIndexes", - "databaseName": "database0Name" - } - }, - { - "commandSucceededEvent": { - "commandName": "listIndexes" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": "long" - }, - "collection": "coll0" - }, - "commandName": "getMore" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursor": { - "id": 0, - "ns": { - "$$type": "string" - }, - "nextBatch": { - "$$type": "array" - } - } - }, - "commandName": "getMore" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "change streams pin to a connection", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "close", - "object": "changeStream0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "aggregate" - } - }, - { - "commandSucceededEvent": { - "commandName": "aggregate" - } - }, - { - "commandStartedEvent": { - "commandName": "killCursors" - } - }, - { - "commandSucceededEvent": { - "commandName": "killCursors" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - } - ] -} diff --git a/testdata/load-balancers/cursors.yml b/testdata/load-balancers/cursors.yml deleted file mode 100644 index b99f4a26bd..0000000000 --- a/testdata/load-balancers/cursors.yml +++ /dev/null @@ -1,507 +0,0 @@ -description: cursors are correctly pinned to connections for load-balanced clusters - -schemaVersion: '1.3' - -runOnRequirements: - - topologies: [ load-balanced ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - connectionReadyEvent - - connectionClosedEvent - - connectionCheckedOutEvent - - connectionCheckedInEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0Name - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - - collection: - id: &collection1 collection1 - database: *database0 - collectionName: &collection1Name coll1 - - collection: - id: &collection2 collection2 - database: *database0 - collectionName: &collection2Name coll2 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - - { _id: 3 } - - collectionName: *collection1Name - databaseName: *database0Name - documents: [] - - collectionName: *collection2Name - databaseName: *database0Name - documents: [] - -tests: - - description: no connection is pinned if all documents are returned in the initial batch - operations: - - name: createFindCursor - object: *collection0 - arguments: - filter: {} - saveResultAsEntity: &cursor0 cursor0 - - &assertConnectionNotPinned - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client0 - connections: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: {} - commandName: find - - commandSucceededEvent: - reply: - cursor: - id: 0 - firstBatch: { $$type: array } - ns: { $$type: string } - commandName: find - - client: *client0 - eventType: cmap - events: - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: pinned connections are returned when the cursor is drained - operations: - - &createAndSaveCursor - name: createFindCursor - object: *collection0 - arguments: - filter: {} - batchSize: 2 - saveResultAsEntity: &cursor0 cursor0 - - &assertConnectionPinned - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client0 - connections: 1 - - name: iterateUntilDocumentOrError - object: *cursor0 - expectResult: { _id: 1 } - - name: iterateUntilDocumentOrError - object: *cursor0 - expectResult: { _id: 2 } - - name: iterateUntilDocumentOrError - object: *cursor0 - expectResult: { _id: 3 } - - *assertConnectionNotPinned - - &closeCursor - name: close - object: *cursor0 - expectEvents: - - client: *client0 - events: - - &findWithBatchSizeStarted - commandStartedEvent: - command: - find: *collection0Name - filter: {} - batchSize: 2 - commandName: find - - &findWithBatchSizeSucceeded - commandSucceededEvent: - reply: - cursor: - id: { $$type: long } - firstBatch: { $$type: array } - ns: { $$type: string } - commandName: find - - &getMoreStarted - commandStartedEvent: - command: - getMore: { $$type: long } - collection: *collection0Name - commandName: getMore - - &getMoreSucceeded - commandSucceededEvent: - reply: - cursor: - id: 0 - ns: { $$type: string } - nextBatch: { $$type: array } - commandName: getMore - - client: *client0 - eventType: cmap - events: - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: pinned connections are returned to the pool when the cursor is closed - operations: - - *createAndSaveCursor - - *assertConnectionPinned - - *closeCursor - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *findWithBatchSizeStarted - - *findWithBatchSizeSucceeded - - &killCursorsStarted - commandStartedEvent: - commandName: killCursors - - &killCursorsSucceeded - commandSucceededEvent: - commandName: killCursors - - client: *client0 - eventType: cmap - events: - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - # If a network error occurs during a getMore request, the connection must remain pinned. and drivers must not - # attempt to send a killCursors command when the cursor is closed because the connection is no longer valid. - - description: pinned connections are not returned after an network error during getMore - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - closeConnection: true - - *createAndSaveCursor - - *assertConnectionPinned - - name: iterateUntilDocumentOrError - object: *cursor0 - expectResult: - _id: 1 - - name: iterateUntilDocumentOrError - object: *cursor0 - expectResult: - _id: 2 - # Third next() call should perform a getMore. - - name: iterateUntilDocumentOrError - object: *cursor0 - expectError: - # Network errors are considered client-side errors per the unified test format spec. - isClientError: true - - *assertConnectionPinned - - *closeCursor # Execute a close operation to actually release the connection. - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *findWithBatchSizeStarted - - *findWithBatchSizeSucceeded - - *getMoreStarted - - &getMoreFailed - commandFailedEvent: - commandName: getMore - - client: *client0 - eventType: cmap - events: - # Events to set the failpoint. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for the find command + getMore. - - connectionCheckedOutEvent: {} - # Events for the close() operation. - - connectionCheckedInEvent: {} - - connectionClosedEvent: - reason: error - - - description: pinned connections are returned after a network error during a killCursors request - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ killCursors ] - closeConnection: true - - *createAndSaveCursor - - *assertConnectionPinned - - *closeCursor - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *findWithBatchSizeStarted - - *findWithBatchSizeSucceeded - - *killCursorsStarted - - commandFailedEvent: - commandName: killCursors - - client: *client0 - eventType: cmap - events: - # Events to set the failpoint. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for the find command + killCursors. - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - connectionClosedEvent: - reason: error - - - description: pinned connections are not returned to the pool after a non-network error on getMore - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ getMore ] - errorCode: &hostNotFoundCode 7 # This is not a state change error code, so it should not cause SDAM changes. - - *createAndSaveCursor - - name: iterateUntilDocumentOrError - object: *cursor0 - expectResult: - _id: 1 - - name: iterateUntilDocumentOrError - object: *cursor0 - expectResult: - _id: 2 - - name: iterateUntilDocumentOrError - object: *cursor0 - expectError: - errorCode: *hostNotFoundCode - - *assertConnectionPinned - - *closeCursor - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *findWithBatchSizeStarted - - *findWithBatchSizeSucceeded - - *getMoreStarted - - *getMoreFailed - - *killCursorsStarted - - *killCursorsSucceeded - - client: *client0 - eventType: cmap - events: - # Events to set the failpoint. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for the find command + getMore + killCursors. - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - # Basic tests for cursor-creating commands besides "find". We don't need to replicate the full set of tests defined - # above for each such command. Instead, only one test is needed per command to ensure that the pinned connection is - # correctly passed down to the server. - # - # Each test creates a cursor with a small batch size and fully iterates it. Because drivers do not publish CMAP - # events when using pinned connections, each test asserts that only one set of ready/checkout/checkin events are - # published. - - - description: aggregate pins the cursor to a connection - operations: - - name: aggregate - object: *collection0 - arguments: - pipeline: [] - batchSize: 2 - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client0 - connections: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection0Name - cursor: - batchSize: 2 - commandName: aggregate - - commandSucceededEvent: - commandName: aggregate - - *getMoreStarted - - *getMoreSucceeded - - client: *client0 - eventType: cmap - events: - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: listCollections pins the cursor to a connection - runOnRequirements: - - serverless: forbid # CLOUDP-98562 listCollections batchSize is ignored on serverless. - operations: - - name: listCollections - object: *database0 - arguments: - filter: {} - batchSize: 2 - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client0 - connections: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - listCollections: 1 - cursor: - batchSize: 2 - commandName: listCollections - databaseName: *database0Name - - commandSucceededEvent: - commandName: listCollections - # Write out the event for getMore rather than using the getMoreStarted anchor because the "collection" field - # is not equal to *collection0Name as the command is not executed against a collection. - - commandStartedEvent: - command: - getMore: { $$type: long } - collection: { $$type: string } - commandName: getMore - - *getMoreSucceeded - - client: *client0 - eventType: cmap - events: - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: listIndexes pins the cursor to a connection - operations: - # There is an automatic index on _id so we create two more indexes to force multiple batches with batchSize=2. - - name: createIndex - object: *collection0 - arguments: - keys: &x1IndexSpec { x: 1 } - name: &x1IndexName x_1 - - name: createIndex - object: *collection0 - arguments: - keys: &y1IndexSpec { y: 1 } - name: &y1IndexName y_1 - - name: listIndexes - object: *collection0 - arguments: - batchSize: 2 - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client0 - connections: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - createIndexes: *collection0Name - indexes: - - name: *x1IndexName - key: *x1IndexSpec - commandName: createIndexes - - commandSucceededEvent: - commandName: createIndexes - - commandStartedEvent: - command: - createIndexes: *collection0Name - indexes: - - name: *y1IndexName - key: *y1IndexSpec - commandName: createIndexes - - commandSucceededEvent: - commandName: createIndexes - - commandStartedEvent: - command: - listIndexes: *collection0Name - cursor: - batchSize: 2 - commandName: listIndexes - databaseName: *database0Name - - commandSucceededEvent: - commandName: listIndexes - - *getMoreStarted - - *getMoreSucceeded - - client: *client0 - eventType: cmap - events: - # Events for first createIndexes. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for second createIndexes. - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for listIndexes and getMore. - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: change streams pin to a connection - runOnRequirements: - - serverless: forbid # Serverless does not support change streams. - operations: - - name: createChangeStream - object: *collection0 - arguments: - pipeline: [] - saveResultAsEntity: &changeStream0 changeStream0 - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client0 - connections: 1 - - name: close - object: *changeStream0 - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client0 - connections: 0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: aggregate - - commandSucceededEvent: - commandName: aggregate - - commandStartedEvent: - commandName: killCursors - - commandSucceededEvent: - commandName: killCursors - - client: *client0 - eventType: cmap - events: - # Events for creating the change stream. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - # Events for closing the change stream. - - connectionCheckedInEvent: {} diff --git a/testdata/load-balancers/event-monitoring.json b/testdata/load-balancers/event-monitoring.json deleted file mode 100644 index 938c70bf38..0000000000 --- a/testdata/load-balancers/event-monitoring.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "description": "monitoring events include correct fields", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "uriOptions": { - "retryReads": false - }, - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent", - "poolClearedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "databaseName": "database0", - "collectionName": "coll0", - "documents": [] - } - ], - "tests": [ - { - "description": "command started and succeeded events include serviceId", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert", - "hasServiceId": true - } - }, - { - "commandSucceededEvent": { - "commandName": "insert", - "hasServiceId": true - } - } - ] - } - ] - }, - { - "description": "command failed events include serviceId", - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "$or": true - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "hasServiceId": true - } - }, - { - "commandFailedEvent": { - "commandName": "find", - "hasServiceId": true - } - } - ] - } - ] - }, - { - "description": "poolClearedEvent events include serviceId", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {} - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "find", - "hasServiceId": true - } - }, - { - "commandFailedEvent": { - "commandName": "find", - "hasServiceId": true - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "poolClearedEvent": { - "hasServiceId": true - } - } - ] - } - ] - } - ] -} diff --git a/testdata/load-balancers/event-monitoring.yml b/testdata/load-balancers/event-monitoring.yml deleted file mode 100644 index 52be457f68..0000000000 --- a/testdata/load-balancers/event-monitoring.yml +++ /dev/null @@ -1,99 +0,0 @@ -description: monitoring events include correct fields - -schemaVersion: '1.3' - -runOnRequirements: - - topologies: [ load-balanced ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - uriOptions: - retryReads: false - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - poolClearedEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: [] - -tests: - - description: command started and succeeded events include serviceId - operations: - - name: insertOne - object: *collection0 - arguments: - document: { x: 1 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: insert - hasServiceId: true - - commandSucceededEvent: - commandName: insert - hasServiceId: true - - - description: command failed events include serviceId - operations: - - name: find - object: *collection0 - arguments: - filter: { $or: true } - expectError: - isError: true - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: find - hasServiceId: true - - commandFailedEvent: - commandName: find - hasServiceId: true - - - description: poolClearedEvent events include serviceId - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [find] - closeConnection: true - - name: find - object: *collection0 - arguments: - filter: {} - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: find - hasServiceId: true - - commandFailedEvent: - commandName: find - hasServiceId: true - - client: *client0 - eventType: cmap - events: - - poolClearedEvent: - hasServiceId: true diff --git a/testdata/load-balancers/lb-connection-establishment.json b/testdata/load-balancers/lb-connection-establishment.json deleted file mode 100644 index 0eaadf30c2..0000000000 --- a/testdata/load-balancers/lb-connection-establishment.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "description": "connection establishment for load-balanced clusters", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "uriOptions": { - "loadBalanced": false - }, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - } - ], - "tests": [ - { - "description": "operations against load balancers fail if URI contains loadBalanced=false", - "skipReason": "servers have not implemented LB support yet so they will not fail the connection handshake in this case", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectError": { - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ] - } - ] -} diff --git a/testdata/load-balancers/lb-connection-establishment.yml b/testdata/load-balancers/lb-connection-establishment.yml deleted file mode 100644 index 46e5d781f3..0000000000 --- a/testdata/load-balancers/lb-connection-establishment.yml +++ /dev/null @@ -1,36 +0,0 @@ -description: connection establishment for load-balanced clusters - -schemaVersion: '1.3' - -runOnRequirements: - - topologies: [ load-balanced ] - -createEntities: - - client: - id: &client0 client0 - uriOptions: - # Explicitly set loadBalanced to false to override the option from the global URI. - loadBalanced: false - observeEvents: - - commandStartedEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0 - -tests: - - description: operations against load balancers fail if URI contains loadBalanced=false - skipReason: servers have not implemented LB support yet so they will not fail the connection handshake in this case - operations: - - name: runCommand - object: *database0 - arguments: - commandName: ping - command: { ping: 1 } - expectError: - isClientError: false - expectEvents: - # No events should be published because the server fails the connection handshake, so the "ping" command is never - # sent. - - client: *client0 - events: [] diff --git a/testdata/load-balancers/non-lb-connection-establishment.json b/testdata/load-balancers/non-lb-connection-establishment.json deleted file mode 100644 index 6aaa7bdf98..0000000000 --- a/testdata/load-balancers/non-lb-connection-establishment.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "description": "connection establishment if loadBalanced is specified for non-load balanced clusters", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "topologies": [ - "single", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "lbTrueClient", - "useMultipleMongoses": false, - "uriOptions": { - "loadBalanced": true - } - } - }, - { - "database": { - "id": "lbTrueDatabase", - "client": "lbTrueClient", - "databaseName": "lbTrueDb" - } - }, - { - "client": { - "id": "lbFalseClient", - "uriOptions": { - "loadBalanced": false - } - } - }, - { - "database": { - "id": "lbFalseDatabase", - "client": "lbFalseClient", - "databaseName": "lbFalseDb" - } - } - ], - "_yamlAnchors": { - "runCommandArguments": [ - { - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - } - } - ] - }, - "tests": [ - { - "description": "operations against non-load balanced clusters fail if URI contains loadBalanced=true", - "operations": [ - { - "name": "runCommand", - "object": "lbTrueDatabase", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectError": { - "errorContains": "Driver attempted to initialize in load balancing mode, but the server does not support this mode" - } - } - ] - }, - { - "description": "operations against non-load balanced clusters succeed if URI contains loadBalanced=false", - "operations": [ - { - "name": "runCommand", - "object": "lbFalseDatabase", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/load-balancers/non-lb-connection-establishment.yml b/testdata/load-balancers/non-lb-connection-establishment.yml deleted file mode 100644 index e805549ac0..0000000000 --- a/testdata/load-balancers/non-lb-connection-establishment.yml +++ /dev/null @@ -1,56 +0,0 @@ -description: connection establishment if loadBalanced is specified for non-load balanced clusters - -schemaVersion: '1.3' - -runOnRequirements: - # Don't run on replica sets because the URI used to configure the clients will contain multiple hosts and the - # replicaSet option, which will cause an error when constructing the lbTrueClient entity. - - topologies: [ single, sharded ] - -createEntities: - - client: - id: &lbTrueClient lbTrueClient - # Restrict to a single mongos to ensure there are not multiple hosts in the URI, which would conflict with - # loadBalanced=true. - useMultipleMongoses: false - uriOptions: - loadBalanced: true - - database: - id: &lbTrueDatabase lbTrueDatabase - client: *lbTrueClient - databaseName: &lbTrueDatabaseName lbTrueDb - - client: - id: &lbFalseClient lbFalseClient - uriOptions: - loadBalanced: false - - database: - id: &lbFalseDatabase lbFalseDatabase - client: *lbFalseClient - databaseName: &lbFalseDatabaseName lbFalseDb - -_yamlAnchors: - runCommandArguments: - - &pingArguments - arguments: - commandName: ping - command: { ping: 1 } - -tests: - # These tests assert that drivers behave correctly if loadBalanced=true/false for non-load balanced clusters. Existing - # spec tests should cover the case where loadBalanced is unset. - - # If the server is not configured to be behind a load balancer and the URI contains loadBalanced=true, the driver - # should error during the connection handshake because the server's hello response does not contain a serviceId field. - - description: operations against non-load balanced clusters fail if URI contains loadBalanced=true - operations: - - name: runCommand - object: *lbTrueDatabase - <<: *pingArguments - expectError: - errorContains: Driver attempted to initialize in load balancing mode, but the server does not support this mode - - - description: operations against non-load balanced clusters succeed if URI contains loadBalanced=false - operations: - - name: runCommand - object: *lbFalseDatabase - <<: *pingArguments diff --git a/testdata/load-balancers/sdam-error-handling.json b/testdata/load-balancers/sdam-error-handling.json deleted file mode 100644 index 083c98e941..0000000000 --- a/testdata/load-balancers/sdam-error-handling.json +++ /dev/null @@ -1,514 +0,0 @@ -{ - "description": "state change errors are correctly handled", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ] - } - ], - "_yamlAnchors": { - "observedEvents": [ - "connectionCreatedEvent", - "connectionReadyEvent", - "connectionCheckedOutEvent", - "connectionCheckOutFailedEvent", - "connectionCheckedInEvent", - "connectionClosedEvent", - "poolClearedEvent" - ] - }, - "createEntities": [ - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "singleClient", - "useMultipleMongoses": false, - "uriOptions": { - "appname": "lbSDAMErrorTestClient", - "retryWrites": false - }, - "observeEvents": [ - "connectionCreatedEvent", - "connectionReadyEvent", - "connectionCheckedOutEvent", - "connectionCheckOutFailedEvent", - "connectionCheckedInEvent", - "connectionClosedEvent", - "poolClearedEvent" - ] - } - }, - { - "database": { - "id": "singleDB", - "client": "singleClient", - "databaseName": "singleDB" - } - }, - { - "collection": { - "id": "singleColl", - "database": "singleDB", - "collectionName": "singleColl" - } - }, - { - "client": { - "id": "multiClient", - "useMultipleMongoses": true, - "uriOptions": { - "retryWrites": false - }, - "observeEvents": [ - "connectionCreatedEvent", - "connectionReadyEvent", - "connectionCheckedOutEvent", - "connectionCheckOutFailedEvent", - "connectionCheckedInEvent", - "connectionClosedEvent", - "poolClearedEvent" - ] - } - }, - { - "database": { - "id": "multiDB", - "client": "multiClient", - "databaseName": "multiDB" - } - }, - { - "collection": { - "id": "multiColl", - "database": "multiDB", - "collectionName": "multiColl" - } - } - ], - "initialData": [ - { - "collectionName": "singleColl", - "databaseName": "singleDB", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - }, - { - "collectionName": "multiColl", - "databaseName": "multiDB", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - ], - "tests": [ - { - "description": "only connections for a specific serviceId are closed when pools are cleared", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "createFindCursor", - "object": "multiColl", - "arguments": { - "filter": {}, - "batchSize": 2 - }, - "saveResultAsEntity": "cursor0" - }, - { - "name": "createFindCursor", - "object": "multiColl", - "arguments": { - "filter": {}, - "batchSize": 2 - }, - "saveResultAsEntity": "cursor1" - }, - { - "name": "close", - "object": "cursor0" - }, - { - "name": "close", - "object": "cursor1" - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "multiClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11600 - } - } - } - }, - { - "name": "insertOne", - "object": "multiColl", - "arguments": { - "document": { - "x": 1 - } - }, - "expectError": { - "errorCode": 11600 - } - }, - { - "name": "insertOne", - "object": "multiColl", - "arguments": { - "document": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "multiClient", - "eventType": "cmap", - "events": [ - { - "connectionCreatedEvent": {} - }, - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCreatedEvent": {} - }, - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "poolClearedEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionClosedEvent": { - "reason": "stale" - } - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "errors during the initial connection hello are ignored", - "runOnRequirements": [ - { - "minServerVersion": "4.9" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "isMaster", - "hello" - ], - "closeConnection": true, - "appName": "lbSDAMErrorTestClient" - } - } - } - }, - { - "name": "insertOne", - "object": "singleColl", - "arguments": { - "document": { - "x": 1 - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "singleClient", - "eventType": "cmap", - "events": [ - { - "connectionCreatedEvent": {} - }, - { - "connectionClosedEvent": { - "reason": "error" - } - }, - { - "connectionCheckOutFailedEvent": { - "reason": "connectionError" - } - } - ] - } - ] - }, - { - "description": "errors during authentication are processed", - "runOnRequirements": [ - { - "auth": true - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "saslContinue" - ], - "closeConnection": true, - "appName": "lbSDAMErrorTestClient" - } - } - } - }, - { - "name": "insertOne", - "object": "singleColl", - "arguments": { - "document": { - "x": 1 - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "singleClient", - "eventType": "cmap", - "events": [ - { - "connectionCreatedEvent": {} - }, - { - "poolClearedEvent": {} - }, - { - "connectionClosedEvent": { - "reason": "error" - } - }, - { - "connectionCheckOutFailedEvent": { - "reason": "connectionError" - } - } - ] - } - ] - }, - { - "description": "stale errors are ignored", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "getMore" - ], - "closeConnection": true - } - } - } - }, - { - "name": "createFindCursor", - "object": "singleColl", - "arguments": { - "filter": {}, - "batchSize": 2 - }, - "saveResultAsEntity": "cursor0" - }, - { - "name": "createFindCursor", - "object": "singleColl", - "arguments": { - "filter": {}, - "batchSize": 2 - }, - "saveResultAsEntity": "cursor1" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectError": { - "isClientError": true - } - }, - { - "name": "close", - "object": "cursor0" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor1" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor1" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor1", - "expectError": { - "isClientError": true - } - }, - { - "name": "close", - "object": "cursor1" - } - ], - "expectEvents": [ - { - "client": "singleClient", - "eventType": "cmap", - "events": [ - { - "connectionCreatedEvent": {} - }, - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCreatedEvent": {} - }, - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "poolClearedEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionClosedEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionClosedEvent": {} - } - ] - } - ] - } - ] -} diff --git a/testdata/load-balancers/sdam-error-handling.yml b/testdata/load-balancers/sdam-error-handling.yml deleted file mode 100644 index fdaba25149..0000000000 --- a/testdata/load-balancers/sdam-error-handling.yml +++ /dev/null @@ -1,274 +0,0 @@ -description: state change errors are correctly handled - -schemaVersion: '1.4' - -runOnRequirements: - - topologies: [ load-balanced ] - -_yamlAnchors: - observedEvents: &observedEvents - - connectionCreatedEvent - - connectionReadyEvent - - connectionCheckedOutEvent - - connectionCheckOutFailedEvent - - connectionCheckedInEvent - - connectionClosedEvent - - poolClearedEvent - -createEntities: - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - - client: - id: &singleClient singleClient - useMultipleMongoses: false - uriOptions: - appname: &singleClientAppName lbSDAMErrorTestClient - retryWrites: false - observeEvents: *observedEvents - - database: - id: &singleDB singleDB - client: *singleClient - databaseName: &singleDBName singleDB - - collection: - id: &singleColl singleColl - database: *singleDB - collectionName: &singleCollName singleColl - - client: - id: &multiClient multiClient - useMultipleMongoses: true - uriOptions: - retryWrites: false - observeEvents: *observedEvents - - database: - id: &multiDB multiDB - client: *multiClient - databaseName: &multiDBName multiDB - - collection: - id: &multiColl multiColl - database: *multiDB - collectionName: &multiCollName multiColl - -initialData: - - collectionName: *singleCollName - databaseName: *singleDBName - documents: - - _id: 1 - - _id: 2 - - _id: 3 - - collectionName: *multiCollName - databaseName: *multiDBName - documents: - - _id: 1 - - _id: 2 - - _id: 3 - -tests: - - description: only connections for a specific serviceId are closed when pools are cleared - runOnRequirements: - # This test assumes that two sequential connections receive different serviceIDs. - # Sequential connections to a serverless instance may receive the same serviceID. - - serverless: forbid - operations: - # Create two cursors to force two connections. - - name: createFindCursor - object: *multiColl - arguments: - filter: {} - batchSize: 2 - saveResultAsEntity: &cursor0 cursor0 - - name: createFindCursor - object: *multiColl - arguments: - filter: {} - batchSize: 2 - saveResultAsEntity: &cursor1 cursor1 - # Close both cursors to return the connections to the pool. - - name: close - object: *cursor0 - - name: close - object: *cursor1 - # Fail an operation with a state change error. - - name: failPoint - object: testRunner - arguments: - client: *multiClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [insert] - errorCode: &errorCode 11600 # InterruptedAtShutdown - - name: insertOne - object: *multiColl - arguments: - document: { x: 1 } - expectError: - errorCode: *errorCode - # Do another operation to ensure the relevant connection has been closed. - - name: insertOne - object: *multiColl - arguments: - document: { x: 1 } - expectEvents: - - client: *multiClient - eventType: cmap - events: - # Create cursors. - - connectionCreatedEvent: {} - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCreatedEvent: {} - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - # Close cursors. - - connectionCheckedInEvent: {} - - connectionCheckedInEvent: {} - # Set failpoint. - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # First insertOne. - - connectionCheckedOutEvent: {} - - poolClearedEvent: {} - - connectionCheckedInEvent: {} - - connectionClosedEvent: - reason: stale - # Second insertOne. - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - # This test uses singleClient to ensure that connection attempts are routed - # to the same mongos on which the failpoint is set. - - description: errors during the initial connection hello are ignored - runOnRequirements: - # Server version 4.9+ is needed to set a fail point on the initial - # connection handshake with the appName filter due to SERVER-49336. - - minServerVersion: '4.9' - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [isMaster, hello] - closeConnection: true - appName: *singleClientAppName - - name: insertOne - object: *singleColl - arguments: - document: { x: 1 } - expectError: - isClientError: true - expectEvents: - - client: *singleClient - eventType: cmap - events: - - connectionCreatedEvent: {} - - connectionClosedEvent: - reason: error - - connectionCheckOutFailedEvent: - reason: connectionError - - - description: errors during authentication are processed - runOnRequirements: - - auth: true - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [saslContinue] - closeConnection: true - appName: *singleClientAppName - - name: insertOne - object: *singleColl - arguments: - document: { x: 1 } - expectError: - isClientError: true - expectEvents: - - client: *singleClient - eventType: cmap - events: - - connectionCreatedEvent: {} - - poolClearedEvent: {} - - connectionClosedEvent: - reason: error - - connectionCheckOutFailedEvent: - reason: connectionError - - - description: stale errors are ignored - operations: - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: [getMore] - closeConnection: true - # Force two connections to be checked out from the pool. - - name: createFindCursor - object: *singleColl - arguments: - filter: {} - batchSize: 2 - saveResultAsEntity: &cursor0 cursor0 - - name: createFindCursor - object: *singleColl - arguments: - filter: {} - batchSize: 2 - saveResultAsEntity: &cursor1 cursor1 - # Iterate cursor0 three times to force a network error. - - name: iterateUntilDocumentOrError - object: *cursor0 - - name: iterateUntilDocumentOrError - object: *cursor0 - - name: iterateUntilDocumentOrError - object: *cursor0 - expectError: - isClientError: true - - name: close - object: *cursor0 - # Iterate cursor1 three times to force a network error. - - name: iterateUntilDocumentOrError - object: *cursor1 - - name: iterateUntilDocumentOrError - object: *cursor1 - - name: iterateUntilDocumentOrError - object: *cursor1 - expectError: - isClientError: true - - name: close - object: *cursor1 - expectEvents: - - client: *singleClient - eventType: cmap - events: - # Events for creating both cursors. - - connectionCreatedEvent: {} - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCreatedEvent: {} - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - # Events for iterating and closing the first cursor. The failed - # getMore should cause a poolClearedEvent to be published. - - poolClearedEvent: {} - - connectionCheckedInEvent: {} - - connectionClosedEvent: {} - # Events for iterating and closing the second cursor. The failed - # getMore should not clear the pool because the connection's - # generation number is stale. - - connectionCheckedInEvent: {} - - connectionClosedEvent: {} diff --git a/testdata/load-balancers/server-selection.json b/testdata/load-balancers/server-selection.json deleted file mode 100644 index 00c7e4c95b..0000000000 --- a/testdata/load-balancers/server-selection.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "description": "server selection for load-balanced clusters", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0Name" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0", - "collectionOptions": { - "readPreference": { - "mode": "secondaryPreferred" - } - } - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "database0Name", - "documents": [] - } - ], - "tests": [ - { - "description": "$readPreference is sent for load-balanced clusters", - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": {}, - "$readPreference": { - "mode": "secondaryPreferred" - } - }, - "commandName": "find", - "databaseName": "database0Name" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/load-balancers/server-selection.yml b/testdata/load-balancers/server-selection.yml deleted file mode 100644 index 5c5c9a9a12..0000000000 --- a/testdata/load-balancers/server-selection.yml +++ /dev/null @@ -1,50 +0,0 @@ -description: server selection for load-balanced clusters - -schemaVersion: '1.3' - -runOnRequirements: - - topologies: [ load-balanced ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - observeEvents: - - commandStartedEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0Name - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - collectionOptions: - readPreference: - # Use secondaryPreferred to ensure that operations can succeed even if the shards are only comprised of one - # server. - mode: &readPrefMode secondaryPreferred - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: $readPreference is sent for load-balanced clusters - operations: - - name: find - object: *collection0 - arguments: - filter: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: {} - $readPreference: - mode: *readPrefMode - commandName: find - databaseName: *database0Name diff --git a/testdata/load-balancers/transactions.json b/testdata/load-balancers/transactions.json deleted file mode 100644 index 8cf24f4ca4..0000000000 --- a/testdata/load-balancers/transactions.json +++ /dev/null @@ -1,1621 +0,0 @@ -{ - "description": "transactions are correctly pinned to connections for load-balanced clusters", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "observeEvents": [ - "commandStartedEvent", - "connectionReadyEvent", - "connectionClosedEvent", - "connectionCheckedOutEvent", - "connectionCheckedInEvent" - ] - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0Name" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "database0Name", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - ], - "_yamlAnchors": { - "documents": [ - { - "_id": 4 - } - ] - }, - "tests": [ - { - "description": "sessions are reused in LB mode", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "assertSameLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ] - }, - { - "description": "all operations go to the same mongos", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - } - ] - } - ] - }, - { - "description": "transaction can be committed multiple times", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connection is not released after a non-transient CRUD error", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 51 - } - } - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - }, - "expectError": { - "errorCode": 51, - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connection is not released after a non-transient commit error", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 51 - } - } - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "commitTransaction", - "object": "session0", - "expectError": { - "errorCode": 51, - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connection is released after a non-transient abort error", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 51 - } - } - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connection is released after a transient non-network CRUD error", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 24 - } - } - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - }, - "expectError": { - "errorCode": 24, - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connection is released after a transient network CRUD error", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - }, - "expectError": { - "isClientError": true, - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionClosedEvent": { - "reason": "error" - } - }, - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connection is released after a transient non-network commit error", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 24 - } - } - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "commitTransaction", - "object": "session0", - "expectError": { - "errorCode": 24, - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connection is released after a transient network commit error", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "closeConnection": true - } - } - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "commitTransaction", - "object": "session0", - "ignoreResultAndError": true - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionClosedEvent": { - "reason": "error" - } - }, - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connection is released after a transient non-network abort error", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 24 - } - } - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connection is released after a transient network abort error", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "closeConnection": true - } - } - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionClosedEvent": { - "reason": "error" - } - }, - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connection is released on successful abort", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connection is returned when a new transaction is started", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - } - ] - } - ] - }, - { - "description": "pinned connection is returned when a non-transaction operation uses the session", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "a connection can be shared by a transaction and a cursor", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "createFindCursor", - "object": "collection0", - "arguments": { - "filter": {}, - "batchSize": 2, - "session": "session0" - }, - "saveResultAsEntity": "cursor0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "close", - "object": "cursor0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "commandName": "killCursors" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - } - ] -} diff --git a/testdata/load-balancers/transactions.yml b/testdata/load-balancers/transactions.yml deleted file mode 100644 index 29cbbee723..0000000000 --- a/testdata/load-balancers/transactions.yml +++ /dev/null @@ -1,598 +0,0 @@ -description: transactions are correctly pinned to connections for load-balanced clusters - -schemaVersion: '1.3' - -runOnRequirements: - - topologies: [ load-balanced ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - observeEvents: - # Do not observe commandSucceededEvent or commandFailedEvent because we cannot guarantee success or failure of - # commands like commitTransaction and abortTransaction in a multi-mongos load-balanced setup. - - commandStartedEvent - - connectionReadyEvent - - connectionClosedEvent - - connectionCheckedOutEvent - - connectionCheckedInEvent - - session: - id: &session0 session0 - client: *client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0Name - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - - { _id: 3 } - -_yamlAnchors: - documents: - - &insertDocument - _id: 4 - -tests: - - description: sessions are reused in LB mode - operations: - - &nonTransactionalInsert - name: insertOne - object: *collection0 - arguments: - document: { x: 1 } - - *nonTransactionalInsert - - name: assertSameLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client0 - - - description: all operations go to the same mongos - operations: - - &startTransaction - name: startTransaction - object: *session0 - - &transactionalInsert - name: insertOne - object: *collection0 - arguments: - document: { x: 1 } - session: *session0 - - &assertConnectionPinned - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client0 - connections: 1 - - *transactionalInsert - - *transactionalInsert - - *transactionalInsert - - *transactionalInsert - - *transactionalInsert - - *assertConnectionPinned - - &commitTransaction - name: commitTransaction - object: *session0 - expectEvents: - - client: *client0 - events: - - &insertStarted - commandStartedEvent: - commandName: insert - - *insertStarted - - *insertStarted - - *insertStarted - - *insertStarted - - *insertStarted - - &commitStarted - commandStartedEvent: - commandName: commitTransaction - - client: *client0 - eventType: cmap - events: - # The connection is never checked back in. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - - description: transaction can be committed multiple times - operations: - - *startTransaction - - *transactionalInsert - - *assertConnectionPinned - - *commitTransaction - - *assertConnectionPinned - - *commitTransaction - - *commitTransaction - - *commitTransaction - - *assertConnectionPinned - expectEvents: - - client: *client0 - events: - - *insertStarted - - *commitStarted - - *commitStarted - - *commitStarted - - *commitStarted - - client: *client0 - eventType: cmap - events: - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - - description: pinned connection is not released after a non-transient CRUD error - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - errorCode: &nonTransientErrorCode 51 # ManualInterventionRequired - - *startTransaction - - name: insertOne - object: *collection0 - arguments: - document: { x: 1 } - session: *session0 - expectError: &nonTransientExpectedError - errorCode: *nonTransientErrorCode - errorLabelsOmit: [ TransientTransactionError ] - - *assertConnectionPinned - expectEvents: - - client: *client0 - events: - - *insertStarted - - client: *client0 - eventType: cmap - events: - # Events for setting the fail point. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for the transactional insert. - - connectionCheckedOutEvent: {} - - - description: pinned connection is not released after a non-transient commit error - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ commitTransaction ] - errorCode: *nonTransientErrorCode - - *startTransaction - - *transactionalInsert - - name: commitTransaction - object: *session0 - expectError: *nonTransientExpectedError - - *assertConnectionPinned - expectEvents: - - client: *client0 - events: - - *insertStarted - - *commitStarted - - client: *client0 - eventType: cmap - events: - # Events for setting the fail point. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for the transactional insert and commit. - - connectionCheckedOutEvent: {} - - # Errors during abort are different than errors during commit and CRUD operations because the pinned connection is - # always released after abort. - - description: pinned connection is released after a non-transient abort error - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ abortTransaction ] - errorCode: &nonTransientErrorCode 51 # ManualInterventionRequired - - *startTransaction - - *transactionalInsert - - name: abortTransaction - object: *session0 - - &assertConnectionNotPinned - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client0 - connections: 0 - expectEvents: - - client: *client0 - events: - - *insertStarted - - &abortStarted - commandStartedEvent: - commandName: abortTransaction - - client: *client0 - eventType: cmap - events: - # Events for setting the fail point. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for the transactional insert and abort. - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: pinned connection is released after a transient non-network CRUD error - runOnRequirements: - - serverless: forbid # (CLOUDP-88216) Serverless does not append error labels to errors triggered by failpoints. - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - errorCode: &transientErrorCode 24 # LockTimeout - - *startTransaction - - <<: *transactionalInsert - expectError: &transientExpectedServerError - errorCode: *transientErrorCode - errorLabelsContain: [ TransientTransactionError ] - - *assertConnectionNotPinned - - name: abortTransaction - object: *session0 - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *insertStarted - - *abortStarted - - client: *client0 - eventType: cmap - events: - # Events for setting the failpoint. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for the insert. - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for abortTransction. - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: pinned connection is released after a transient network CRUD error - runOnRequirements: - - serverless: forbid # (CLOUDP-88216) Serverless does not append error labels to errors triggered by failpoints. - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - closeConnection: true - - *startTransaction - - <<: *transactionalInsert - expectError: &transientExpectedNetworkError - isClientError: true - errorLabelsContain: [ TransientTransactionError ] - - *assertConnectionNotPinned - - name: abortTransaction - object: *session0 - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *insertStarted - - *abortStarted - - client: *client0 - eventType: cmap - events: - # Events for setting the failpoint. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for the insert. - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - connectionClosedEvent: - reason: error - # Events for abortTransaction - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: pinned connection is released after a transient non-network commit error - runOnRequirements: - - serverless: forbid # (CLOUDP-88216) Serverless does not append error labels to errors triggered by failpoints. - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ commitTransaction ] - errorCode: *transientErrorCode - - *startTransaction - - *transactionalInsert - - <<: *commitTransaction - expectError: *transientExpectedServerError - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *insertStarted - - *commitStarted - - client: *client0 - eventType: cmap - events: - # Events for setting the failpoint. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for the insert. - - connectionCheckedOutEvent: {} - # Events for commitTransaction. - - connectionCheckedInEvent: {} - - - description: pinned connection is released after a transient network commit error - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ commitTransaction ] - closeConnection: true - - *startTransaction - - *transactionalInsert - - <<: *commitTransaction - # Ignore the result and error because the operation might fail if it targets a new mongos that isn't aware of - # the transaction or the server-side reaper thread closes the transaction first. We only want to assert that - # the operation is retried, which is done via monitoring expectations, so the exact result/error is not - # necessary. - ignoreResultAndError: true - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *insertStarted - - *commitStarted - # The commit will be automatically retried. - - *commitStarted - - client: *client0 - eventType: cmap - events: - # Events for setting the failpoint. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for the insert. - - connectionCheckedOutEvent: {} - # Events for the first commitTransaction. - - connectionCheckedInEvent: {} - - connectionClosedEvent: - reason: error - # Events for the commitTransaction retry. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: pinned connection is released after a transient non-network abort error - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ abortTransaction ] - errorCode: *transientErrorCode - - *startTransaction - - *transactionalInsert - - name: abortTransaction - object: *session0 - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *insertStarted - - *abortStarted - - client: *client0 - eventType: cmap - events: - # Events for setting the failpoint. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for the insert. - - connectionCheckedOutEvent: {} - # Events for abortTransaction. - - connectionCheckedInEvent: {} - - - description: pinned connection is released after a transient network abort error - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ abortTransaction ] - closeConnection: true - - *startTransaction - - *transactionalInsert - - name: abortTransaction - object: *session0 - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *insertStarted - - *abortStarted - # The abort will be automatically retried. - - *abortStarted - - client: *client0 - eventType: cmap - events: - # Events for setting the failpoint. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - # Events for the insert. - - connectionCheckedOutEvent: {} - # Events for the first abortTransaction. - - connectionCheckedInEvent: {} - - connectionClosedEvent: - reason: error - # Events for the abortTransaction retry. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: pinned connection is released on successful abort - operations: - - *startTransaction - - *transactionalInsert - - name: abortTransaction - object: *session0 - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *insertStarted - - *abortStarted - - client: *client0 - eventType: cmap - events: - # The insert will create and pin a connection. The abort will use it and then unpin. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: pinned connection is returned when a new transaction is started - operations: - - *startTransaction - - *transactionalInsert - - *commitTransaction - - *assertConnectionPinned - - *startTransaction - - *assertConnectionNotPinned # startTransaction will unpin the connection. - - *transactionalInsert - - *assertConnectionPinned # The first operation in the new transaction will pin the connection again. - - *commitTransaction - expectEvents: - - client: *client0 - events: - - *insertStarted - - *commitStarted - - *insertStarted - - *commitStarted - - client: *client0 - eventType: cmap - events: - # Events for the first insert and commit. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - # Events for startTransaction. - - connectionCheckedInEvent: {} - # Events for the second insert and commit. - - connectionCheckedOutEvent: {} - - - description: pinned connection is returned when a non-transaction operation uses the session - operations: - - *startTransaction - - *transactionalInsert - - *commitTransaction - - *assertConnectionPinned - - *transactionalInsert - # The insert is a non-transactional operation that uses the session, so it unpins the connection. - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *insertStarted - - *commitStarted - - *insertStarted - - client: *client0 - eventType: cmap - events: - # Events for the first insert and commit. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - # Events for the second insert. - - connectionCheckedInEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: a connection can be shared by a transaction and a cursor - operations: - - *startTransaction - - *transactionalInsert - - *assertConnectionPinned - - name: createFindCursor - object: *collection0 - arguments: - filter: {} - batchSize: 2 - session: *session0 - saveResultAsEntity: &cursor0 cursor0 - - *assertConnectionPinned - - name: close - object: *cursor0 - - *assertConnectionPinned - # Abort the transaction to ensure that the connection is unpinned. - - name: abortTransaction - object: *session0 - - *assertConnectionNotPinned - expectEvents: - - client: *client0 - events: - - *insertStarted - - commandStartedEvent: - commandName: find - - commandStartedEvent: - commandName: killCursors - - *abortStarted - - client: *client0 - eventType: cmap - events: - # Events for the insert, find, and killCursors. - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - # Events for abortTransaction. - - connectionCheckedInEvent: {} diff --git a/testdata/load-balancers/wait-queue-timeouts.json b/testdata/load-balancers/wait-queue-timeouts.json deleted file mode 100644 index 3dc6e46cff..0000000000 --- a/testdata/load-balancers/wait-queue-timeouts.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "description": "wait queue timeout errors include details about checked out connections", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "uriOptions": { - "maxPoolSize": 1, - "waitQueueTimeoutMS": 50 - }, - "observeEvents": [ - "connectionCheckedOutEvent", - "connectionCheckOutFailedEvent" - ] - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0Name" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "database0Name", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - ], - "tests": [ - { - "description": "wait queue timeout errors include cursor statistics", - "operations": [ - { - "name": "createFindCursor", - "object": "collection0", - "arguments": { - "filter": {}, - "batchSize": 2 - }, - "saveResultAsEntity": "cursor0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - } - }, - "expectError": { - "isClientError": true, - "errorContains": "maxPoolSize: 1, connections in use by cursors: 1, connections in use by transactions: 0, connections in use by other operations: 0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckOutFailedEvent": {} - } - ] - } - ] - }, - { - "description": "wait queue timeout errors include transaction statistics", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - } - }, - "expectError": { - "isClientError": true, - "errorContains": "maxPoolSize: 1, connections in use by cursors: 0, connections in use by transactions: 1, connections in use by other operations: 0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckOutFailedEvent": {} - } - ] - } - ] - } - ] -} diff --git a/testdata/load-balancers/wait-queue-timeouts.yml b/testdata/load-balancers/wait-queue-timeouts.yml deleted file mode 100644 index 9d8c935fea..0000000000 --- a/testdata/load-balancers/wait-queue-timeouts.yml +++ /dev/null @@ -1,82 +0,0 @@ -description: wait queue timeout errors include details about checked out connections - -schemaVersion: '1.3' - -runOnRequirements: - - topologies: [ load-balanced ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - uriOptions: - maxPoolSize: 1 - waitQueueTimeoutMS: 50 - observeEvents: - - connectionCheckedOutEvent - - connectionCheckOutFailedEvent - - session: - id: &session0 session0 - client: *client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0Name - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - _id: 1 - - _id: 2 - - _id: 3 - -tests: - - description: wait queue timeout errors include cursor statistics - operations: - - name: createFindCursor - object: *collection0 - arguments: - filter: {} - batchSize: 2 - saveResultAsEntity: &cursor0 cursor0 - - name: insertOne - object: *collection0 - arguments: - document: { x: 1 } - expectError: - isClientError: true - errorContains: 'maxPoolSize: 1, connections in use by cursors: 1, connections in use by transactions: 0, connections in use by other operations: 0' - expectEvents: - - client: *client0 - eventType: cmap - events: - - connectionCheckedOutEvent: {} - - connectionCheckOutFailedEvent: {} - - - description: wait queue timeout errors include transaction statistics - operations: - - name: startTransaction - object: *session0 - - name: insertOne - object: *collection0 - arguments: - document: { x: 1 } - session: *session0 - - name: insertOne - object: *collection0 - arguments: - document: { x: 1 } - expectError: - isClientError: true - errorContains: 'maxPoolSize: 1, connections in use by cursors: 0, connections in use by transactions: 1, connections in use by other operations: 0' - expectEvents: - - client: *client0 - eventType: cmap - events: - - connectionCheckedOutEvent: {} - - connectionCheckOutFailedEvent: {} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.json b/testdata/max-staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.json deleted file mode 100644 index 5afebbbdcb..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "Nearest" - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.yml b/testdata/max-staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.yml deleted file mode 100644 index 5f9750ef7b..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.yml +++ /dev/null @@ -1,26 +0,0 @@ -# By default, a read preference sets no maximum on staleness. ---- -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: a:27017 - type: RSSecondary - avg_rtt_ms: 50 # Too far. - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1000001"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Very stale. -read_preference: - mode: Nearest -suitable_servers: # Very stale server is fine. -- *1 -- *2 -in_latency_window: -- *2 diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/LastUpdateTime.json b/testdata/max-staleness/ReplicaSetNoPrimary/LastUpdateTime.json deleted file mode 100644 index 492d8a2f62..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/LastUpdateTime.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 1, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 25002, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - }, - { - "address": "c:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 25001, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "maxWireVersion": 6 - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 150 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 1, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 25002, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 1, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/LastUpdateTime.yml b/testdata/max-staleness/ReplicaSetNoPrimary/LastUpdateTime.yml deleted file mode 100644 index 8bb42d8c62..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/LastUpdateTime.yml +++ /dev/null @@ -1,33 +0,0 @@ -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: a:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 1 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - maxWireVersion: 6 - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 50 # Too far. - lastUpdateTime: 25002 # Not used when there's no primary. - lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness. - maxWireVersion: 6 - - &3 - address: c:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 25001 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - maxWireVersion: 6 -read_preference: - mode: Nearest - maxStalenessSeconds: 150 -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/MaxStalenessTooSmall.json b/testdata/max-staleness/ReplicaSetNoPrimary/MaxStalenessTooSmall.json deleted file mode 100644 index 28e5e2aa4a..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/MaxStalenessTooSmall.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "a:27017", - "type": "Unknown" - }, - { - "address": "b:27017", - "type": "Unknown" - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 1 - }, - "error": true -} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/MaxStalenessTooSmall.yml b/testdata/max-staleness/ReplicaSetNoPrimary/MaxStalenessTooSmall.yml deleted file mode 100644 index 575c367b83..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/MaxStalenessTooSmall.yml +++ /dev/null @@ -1,15 +0,0 @@ -# maxStalenessSeconds must be at least 90 seconds, even with no known servers. ---- -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: a:27017 - type: Unknown - - &2 - address: b:27017 - type: Unknown -read_preference: - mode: Nearest - maxStalenessSeconds: 1 # Too small. -error: true diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/Nearest.json b/testdata/max-staleness/ReplicaSetNoPrimary/Nearest.json deleted file mode 100644 index 6602561c1d..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/Nearest.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - }, - { - "address": "c:27017", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "type": "RSSecondary", - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "maxWireVersion": 6 - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 150 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/Nearest.yml b/testdata/max-staleness/ReplicaSetNoPrimary/Nearest.yml deleted file mode 100644 index 7c3fbe5eba..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/Nearest.yml +++ /dev/null @@ -1,33 +0,0 @@ -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: a:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - maxWireVersion: 6 - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 50 # Too far. - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness. - maxWireVersion: 6 - - &3 - address: c:27017 - avg_rtt_ms: 5 - lastUpdateTime: 0 - type: RSSecondary - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - maxWireVersion: 6 -read_preference: - mode: Nearest - maxStalenessSeconds: 150 -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/Nearest2.json b/testdata/max-staleness/ReplicaSetNoPrimary/Nearest2.json deleted file mode 100644 index 16d9a673bd..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/Nearest2.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - }, - { - "address": "c:27017", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "type": "RSSecondary", - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "maxWireVersion": 6 - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 150 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/Nearest2.yml b/testdata/max-staleness/ReplicaSetNoPrimary/Nearest2.yml deleted file mode 100644 index e162f04c93..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/Nearest2.yml +++ /dev/null @@ -1,33 +0,0 @@ -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: a:27017 - type: RSSecondary - avg_rtt_ms: 50 # Too far. - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - maxWireVersion: 6 - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness. - maxWireVersion: 6 - - &3 - address: c:27017 - avg_rtt_ms: 5 - lastUpdateTime: 0 - type: RSSecondary - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - maxWireVersion: 6 -read_preference: - mode: Nearest - maxStalenessSeconds: 150 -suitable_servers: -- *1 -- *2 -in_latency_window: -- *2 diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/NoKnownServers.json b/testdata/max-staleness/ReplicaSetNoPrimary/NoKnownServers.json deleted file mode 100644 index 5905fcbc60..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/NoKnownServers.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "a:27017", - "type": "Unknown" - }, - { - "address": "b:27017", - "type": "Unknown" - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 90 - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/NoKnownServers.yml b/testdata/max-staleness/ReplicaSetNoPrimary/NoKnownServers.yml deleted file mode 100644 index 463bf7d6dc..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/NoKnownServers.yml +++ /dev/null @@ -1,16 +0,0 @@ -# valid maxStalenessSeconds and no known servers results in an empty set of suitable servers ---- -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: a:27017 - type: Unknown - - &2 - address: b:27017 - type: Unknown -read_preference: - mode: Nearest - maxStalenessSeconds: 90 -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred.json b/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred.json deleted file mode 100644 index 7956b8e516..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "PrimaryPreferred", - "maxStalenessSeconds": 90 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred.yml b/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred.yml deleted file mode 100644 index b4706e5523..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Fallback to secondary if no primary. ---- -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: a:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1000001"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Very stale. -read_preference: - mode: PrimaryPreferred - maxStalenessSeconds: 90 -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.json b/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.json deleted file mode 100644 index 453dce6605..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "tokyo" - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "nyc" - } - } - ] - }, - "read_preference": { - "mode": "PrimaryPreferred", - "maxStalenessSeconds": 150, - "tag_sets": [ - { - "data_center": "nyc" - }, - { - "data_center": "tokyo" - } - ] - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "tokyo" - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "tokyo" - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.yml b/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.yml deleted file mode 100644 index cd285d5faf..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.yml +++ /dev/null @@ -1,36 +0,0 @@ -# maxStalenessSeconds is applied before tag sets. With tag sets -# [{data_center: nyc}, {data_center: tokyo}], if the only node in NYC is stale -# then use Tokyo. ---- -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: a:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - maxWireVersion: 6 - tags: - data_center: tokyo # Matches second tag set. - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - maxWireVersion: 6 - tags: - data_center: nyc -read_preference: - mode: PrimaryPreferred - maxStalenessSeconds: 150 - tag_sets: - - data_center: nyc - - data_center: tokyo -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/Secondary.json b/testdata/max-staleness/ReplicaSetNoPrimary/Secondary.json deleted file mode 100644 index b383f275dc..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/Secondary.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "tags": { - "data_center": "tokyo" - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "tags": { - "data_center": "nyc" - } - }, - { - "address": "d:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "tokyo" - } - } - ] - }, - "read_preference": { - "mode": "Secondary", - "maxStalenessSeconds": 150, - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/Secondary.yml b/testdata/max-staleness/ReplicaSetNoPrimary/Secondary.yml deleted file mode 100644 index 88c5ab549d..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/Secondary.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Latest secondary's lastWriteDate is used normally with read preference tags. ---- -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: a:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - tags: - data_center: tokyo # No match, but its lastWriteDate is used in estimate. - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness. - tags: - data_center: nyc - - &3 - address: c:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - tags: - data_center: nyc - - &4 - address: d:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "2"}} - tags: - data_center: tokyo # No match. -read_preference: - mode: Secondary - maxStalenessSeconds: 150 - tag_sets: - - data_center: nyc -suitable_servers: -- *2 -in_latency_window: -- *2 diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/SecondaryPreferred.json b/testdata/max-staleness/ReplicaSetNoPrimary/SecondaryPreferred.json deleted file mode 100644 index 7bce7d0aa4..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/SecondaryPreferred.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "SecondaryPreferred", - "maxStalenessSeconds": 120 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/SecondaryPreferred.yml b/testdata/max-staleness/ReplicaSetNoPrimary/SecondaryPreferred.yml deleted file mode 100644 index 0860a568ea..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/SecondaryPreferred.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Filter out the stale secondary. ---- -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: a:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1000001"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Very stale. -read_preference: - mode: SecondaryPreferred - maxStalenessSeconds: 120 -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.json b/testdata/max-staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.json deleted file mode 100644 index 32c9ca770b..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "tags": { - "data_center": "tokyo" - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "tags": { - "data_center": "nyc" - } - }, - { - "address": "d:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "tokyo" - } - } - ] - }, - "read_preference": { - "mode": "SecondaryPreferred", - "maxStalenessSeconds": 150, - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.yml b/testdata/max-staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.yml deleted file mode 100644 index 5a13cc7323..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Latest secondary's lastWriteDate is used normally with read preference tags. ---- -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: a:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - tags: - data_center: tokyo # No match, but its lastWriteDate is used in estimate. - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness. - tags: - data_center: nyc - - &3 - address: c:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - tags: - data_center: nyc - - &4 - address: d:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "2"}} - tags: - data_center: tokyo # No match. -read_preference: - mode: SecondaryPreferred - maxStalenessSeconds: 150 - tag_sets: - - data_center: nyc -suitable_servers: -- *2 -in_latency_window: -- *2 diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/ZeroMaxStaleness.json b/testdata/max-staleness/ReplicaSetNoPrimary/ZeroMaxStaleness.json deleted file mode 100644 index fd84cd1193..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/ZeroMaxStaleness.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 0 - }, - "error": true -} diff --git a/testdata/max-staleness/ReplicaSetNoPrimary/ZeroMaxStaleness.yml b/testdata/max-staleness/ReplicaSetNoPrimary/ZeroMaxStaleness.yml deleted file mode 100644 index e37f6b20b1..0000000000 --- a/testdata/max-staleness/ReplicaSetNoPrimary/ZeroMaxStaleness.yml +++ /dev/null @@ -1,23 +0,0 @@ -# maxStalenessSeconds=0 is prohibited. ---- -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: a:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "2"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} -read_preference: - mode: Nearest - maxStalenessSeconds: 0 -error: true diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.json b/testdata/max-staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.json deleted file mode 100644 index 35eaa9d69d..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "Nearest" - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.yml b/testdata/max-staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.yml deleted file mode 100644 index 67cc894931..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.yml +++ /dev/null @@ -1,26 +0,0 @@ -# By default, a read preference sets no maximum on staleness. ---- -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 50 # Too far. - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1000001"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Very stale. -read_preference: - mode: Nearest -suitable_servers: # Very stale server is fine. -- *1 -- *2 -in_latency_window: -- *2 diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/LastUpdateTime.json b/testdata/max-staleness/ReplicaSetWithPrimary/LastUpdateTime.json deleted file mode 100644 index 18450beaed..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/LastUpdateTime.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 50, - "lastUpdateTime": 1, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 125001, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - }, - { - "address": "c:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 125001, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "maxWireVersion": 6 - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 150 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 50, - "lastUpdateTime": 1, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 125001, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 125001, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/LastUpdateTime.yml b/testdata/max-staleness/ReplicaSetWithPrimary/LastUpdateTime.yml deleted file mode 100644 index 694178bbd7..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/LastUpdateTime.yml +++ /dev/null @@ -1,35 +0,0 @@ -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 50 # Too far. - lastUpdateTime: 1 - lastWrite: {lastWriteDate: {$numberLong: "2"}} - maxWireVersion: 6 - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 125001 - # Updated 125 sec after primary, so 125 sec stale. - # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness. - lastWrite: {lastWriteDate: {$numberLong: "2"}} - maxWireVersion: 6 - - &3 - address: c:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 125001 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - maxWireVersion: 6 -read_preference: - mode: Nearest - maxStalenessSeconds: 150 -suitable_servers: -- *1 -- *2 -in_latency_window: -- *2 diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat.json b/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat.json deleted file mode 100644 index b9fb407f9e..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "heartbeatFrequencyMS": 120000, - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 130 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat.yml b/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat.yml deleted file mode 100644 index 89cab47444..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat.yml +++ /dev/null @@ -1,29 +0,0 @@ -# If users configure a longer ``heartbeatFrequencyMS`` than the default, -# ``maxStalenessSeconds`` might have a larger minimum. ---- -heartbeatFrequencyMS: 120000 # 120 seconds. -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 50 # Too far. - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} -read_preference: - mode: Nearest - maxStalenessSeconds: 130 # OK, must be 120 + 10 = 130 seconds. -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat2.json b/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat2.json deleted file mode 100644 index b695e1caeb..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat2.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "heartbeatFrequencyMS": 120000, - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 129 - }, - "error": true -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat2.yml b/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat2.yml deleted file mode 100644 index c849a0eff9..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/LongHeartbeat2.yml +++ /dev/null @@ -1,25 +0,0 @@ -# If users configure a longer ``heartbeatFrequencyMS`` than the default, -# ``maxStalenessSeconds`` might have a larger minimum. ---- -heartbeatFrequencyMS: 120000 # 120 seconds. -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} -read_preference: - mode: Nearest - maxStalenessSeconds: 129 # Too small, must be 120 + 10 = 130 seconds. -error: true diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.json b/testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.json deleted file mode 100644 index 9b798d37da..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "heartbeatFrequencyMS": 500, - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 89 - }, - "error": true -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.yml b/testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.yml deleted file mode 100644 index 82c8f81ae5..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.yml +++ /dev/null @@ -1,26 +0,0 @@ -# A driver MUST raise an error -# if the TopologyType is ReplicaSetWithPrimary or ReplicaSetNoPrimary -# and ``maxStalenessSeconds`` is less than 90. ---- -heartbeatFrequencyMS: 500 -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} -read_preference: - mode: Nearest - maxStalenessSeconds: 89 # Too small. -error: true diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.json b/testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.json deleted file mode 100644 index 1fa7bb4dd0..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "maxStalenessSeconds": 120 - }, - "error": true -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.yml b/testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.yml deleted file mode 100644 index dd62017011..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Drivers MUST raise an error if maxStalenessSeconds is defined and not -1 -# and the ``mode`` field is 'primary'. ---- -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} -read_preference: - maxStalenessSeconds: 120 -error: true diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/Nearest.json b/testdata/max-staleness/ReplicaSetWithPrimary/Nearest.json deleted file mode 100644 index 198be4a681..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/Nearest.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - }, - { - "address": "c:27017", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "type": "RSSecondary", - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "maxWireVersion": 6 - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 150 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/Nearest.yml b/testdata/max-staleness/ReplicaSetWithPrimary/Nearest.yml deleted file mode 100644 index 96eeb4b559..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/Nearest.yml +++ /dev/null @@ -1,33 +0,0 @@ -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - maxWireVersion: 6 - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 50 # Too far. - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness. - maxWireVersion: 6 - - &3 - address: c:27017 - avg_rtt_ms: 5 - lastUpdateTime: 0 - type: RSSecondary - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - maxWireVersion: 6 -read_preference: - mode: Nearest - maxStalenessSeconds: 150 -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/Nearest2.json b/testdata/max-staleness/ReplicaSetWithPrimary/Nearest2.json deleted file mode 100644 index 3ae629c898..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/Nearest2.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - }, - { - "address": "c:27017", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "type": "RSSecondary", - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "maxWireVersion": 6 - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 150 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6 - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/Nearest2.yml b/testdata/max-staleness/ReplicaSetWithPrimary/Nearest2.yml deleted file mode 100644 index 3ee119c3a7..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/Nearest2.yml +++ /dev/null @@ -1,33 +0,0 @@ -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 50 # Too far. - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - maxWireVersion: 6 - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness. - maxWireVersion: 6 - - &3 - address: c:27017 - avg_rtt_ms: 5 - lastUpdateTime: 0 - type: RSSecondary - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - maxWireVersion: 6 -read_preference: - mode: Nearest - maxStalenessSeconds: 150 -suitable_servers: -- *1 -- *2 -in_latency_window: -- *2 diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/Nearest_tags.json b/testdata/max-staleness/ReplicaSetWithPrimary/Nearest_tags.json deleted file mode 100644 index 675df82631..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/Nearest_tags.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "tokyo" - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "nyc" - } - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 150, - "tag_sets": [ - { - "data_center": "nyc" - }, - { - "data_center": "tokyo" - } - ] - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "tokyo" - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "tokyo" - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/Nearest_tags.yml b/testdata/max-staleness/ReplicaSetWithPrimary/Nearest_tags.yml deleted file mode 100644 index ce2c3ab3f0..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/Nearest_tags.yml +++ /dev/null @@ -1,36 +0,0 @@ -# maxStalenessSeconds is applied before tag sets. With tag sets -# [{data_center: nyc}, {data_center: tokyo}], if the only node in NYC is stale -# then use Tokyo. ---- -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - maxWireVersion: 6 - tags: - data_center: tokyo - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - maxWireVersion: 6 - tags: - data_center: nyc -read_preference: - mode: Nearest - maxStalenessSeconds: 150 - tag_sets: - - data_center: nyc - - data_center: tokyo -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/PrimaryPreferred.json b/testdata/max-staleness/ReplicaSetWithPrimary/PrimaryPreferred.json deleted file mode 100644 index 795b47a111..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/PrimaryPreferred.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "PrimaryPreferred", - "maxStalenessSeconds": 150 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/PrimaryPreferred.yml b/testdata/max-staleness/ReplicaSetWithPrimary/PrimaryPreferred.yml deleted file mode 100644 index c1594c410f..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/PrimaryPreferred.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Ignore maxStalenessSeconds if primary is available. ---- -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} -read_preference: - mode: PrimaryPreferred - maxStalenessSeconds: 150 -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred.json b/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred.json deleted file mode 100644 index 5455708a70..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "SecondaryPreferred", - "maxStalenessSeconds": 120 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred.yml b/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred.yml deleted file mode 100644 index 33c25f4129..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Fallback to primary if no secondary is fresh enough. ---- -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1000001"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Very stale. -read_preference: - mode: SecondaryPreferred - maxStalenessSeconds: 120 -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.json b/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.json deleted file mode 100644 index 6670b54c89..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 1, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - }, - "tags": { - "data_center": "nyc" - } - }, - { - "address": "d:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "tags": { - "data_center": "nyc" - } - }, - { - "address": "e:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "tokyo" - } - } - ] - }, - "read_preference": { - "mode": "SecondaryPreferred", - "maxStalenessSeconds": 150, - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 1, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - }, - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.yml b/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.yml deleted file mode 100644 index 05301d2109..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.yml +++ /dev/null @@ -1,59 +0,0 @@ -# Primary's lastWriteDate is used normally with SecondaryPreferred and tags. ---- -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness. - tags: - data_center: nyc - - &3 - address: c:27017 - type: RSSecondary - avg_rtt_ms: 50 # Too far. - lastUpdateTime: 1 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1000001"}} # Not used in estimate since we have a primary. - tags: - data_center: nyc - - &4 - address: d:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - tags: - data_center: nyc - - &5 - address: e:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "2"}} - tags: - data_center: tokyo # No match. -read_preference: - mode: SecondaryPreferred - maxStalenessSeconds: 150 - tag_sets: - - data_center: nyc -suitable_servers: -- *2 -- *3 -in_latency_window: -- *2 diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.json b/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.json deleted file mode 100644 index 642fee1fb3..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "tokyo" - } - }, - { - "address": "c:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "nyc" - } - } - ] - }, - "read_preference": { - "mode": "SecondaryPreferred", - "maxStalenessSeconds": 150, - "tag_sets": [ - { - "data_center": "nyc" - }, - { - "data_center": "tokyo" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "tokyo" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "tokyo" - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.yml b/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.yml deleted file mode 100644 index 00ed08c0af..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.yml +++ /dev/null @@ -1,43 +0,0 @@ -# maxStalenessSeconds is applied before tag sets. With tag sets -# [{data_center: nyc}, {data_center: tokyo}], if the only secondary in NYC is -# stale then use Tokyo. ---- -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - maxWireVersion: 6 - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "2"}} - maxWireVersion: 6 - tags: - data_center: tokyo - - &3 - address: c:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - maxWireVersion: 6 - tags: - data_center: nyc -read_preference: - mode: SecondaryPreferred - maxStalenessSeconds: 150 - tag_sets: - - data_center: nyc - - data_center: tokyo -suitable_servers: -- *2 -in_latency_window: -- *2 diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/Secondary_tags.json b/testdata/max-staleness/ReplicaSetWithPrimary/Secondary_tags.json deleted file mode 100644 index 502120dce6..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/Secondary_tags.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 1, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - }, - "tags": { - "data_center": "nyc" - } - }, - { - "address": "d:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "tags": { - "data_center": "nyc" - } - }, - { - "address": "e:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "tokyo" - } - } - ] - }, - "read_preference": { - "mode": "Secondary", - "maxStalenessSeconds": 150, - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "type": "RSSecondary", - "avg_rtt_ms": 50, - "lastUpdateTime": 1, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1000001" - } - }, - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/Secondary_tags.yml b/testdata/max-staleness/ReplicaSetWithPrimary/Secondary_tags.yml deleted file mode 100644 index 50650fea84..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/Secondary_tags.yml +++ /dev/null @@ -1,59 +0,0 @@ -# Primary's lastWriteDate is used normally with SecondaryPreferred and tags. ---- -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness. - tags: - data_center: nyc - - &3 - address: c:27017 - type: RSSecondary - avg_rtt_ms: 50 # Too far. - lastUpdateTime: 1 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1000001"}} # Not used in estimate since we have a primary. - tags: - data_center: nyc - - &4 - address: d:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - tags: - data_center: nyc - - &5 - address: e:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "2"}} - tags: - data_center: tokyo # No match. -read_preference: - mode: Secondary - maxStalenessSeconds: 150 - tag_sets: - - data_center: nyc -suitable_servers: -- *2 -- *3 -in_latency_window: -- *2 diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/Secondary_tags2.json b/testdata/max-staleness/ReplicaSetWithPrimary/Secondary_tags2.json deleted file mode 100644 index 6978a1807b..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/Secondary_tags2.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "heartbeatFrequencyMS": 25000, - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "125002" - } - }, - "maxWireVersion": 6 - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "tokyo" - } - }, - { - "address": "c:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "nyc" - } - } - ] - }, - "read_preference": { - "mode": "Secondary", - "maxStalenessSeconds": 150, - "tag_sets": [ - { - "data_center": "nyc" - }, - { - "data_center": "tokyo" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "tokyo" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - }, - "maxWireVersion": 6, - "tags": { - "data_center": "tokyo" - } - } - ] -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/Secondary_tags2.yml b/testdata/max-staleness/ReplicaSetWithPrimary/Secondary_tags2.yml deleted file mode 100644 index b48ae682bd..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/Secondary_tags2.yml +++ /dev/null @@ -1,43 +0,0 @@ -# maxStalenessSeconds is applied before tag sets. With tag sets -# [{data_center: nyc}, {data_center: tokyo}], if the only secondary in NYC is -# stale then use Tokyo. ---- -heartbeatFrequencyMS: 25000 # 25 seconds. -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "125002"}} - maxWireVersion: 6 - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "2"}} - maxWireVersion: 6 - tags: - data_center: tokyo - - &3 - address: c:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale. - maxWireVersion: 6 - tags: - data_center: nyc -read_preference: - mode: Secondary - maxStalenessSeconds: 150 - tag_sets: - - data_center: nyc - - data_center: tokyo -suitable_servers: -- *2 -in_latency_window: -- *2 diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.json b/testdata/max-staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.json deleted file mode 100644 index e1e4a7ffb7..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "type": "RSPrimary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "2" - } - } - }, - { - "address": "b:27017", - "type": "RSSecondary", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 0 - }, - "error": true -} diff --git a/testdata/max-staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.yml b/testdata/max-staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.yml deleted file mode 100644 index 1c2caf8e00..0000000000 --- a/testdata/max-staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.yml +++ /dev/null @@ -1,23 +0,0 @@ -# maxStalenessSeconds=0 is prohibited. ---- -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - type: RSPrimary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "2"}} - - &2 - address: b:27017 - type: RSSecondary - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} -read_preference: - mode: Nearest - maxStalenessSeconds: 0 -error: true diff --git a/testdata/max-staleness/Sharded/SmallMaxStaleness.json b/testdata/max-staleness/Sharded/SmallMaxStaleness.json deleted file mode 100644 index 91d89720d1..0000000000 --- a/testdata/max-staleness/Sharded/SmallMaxStaleness.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "heartbeatFrequencyMS": 10000, - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "a:27017", - "type": "Mongos", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - }, - { - "address": "b:27017", - "type": "Mongos", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 1 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "Mongos", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - }, - { - "address": "b:27017", - "type": "Mongos", - "avg_rtt_ms": 50, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "type": "Mongos", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] -} diff --git a/testdata/max-staleness/Sharded/SmallMaxStaleness.yml b/testdata/max-staleness/Sharded/SmallMaxStaleness.yml deleted file mode 100644 index 5ee1e079df..0000000000 --- a/testdata/max-staleness/Sharded/SmallMaxStaleness.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Driver doesn't validate maxStalenessSeconds for mongos ---- -heartbeatFrequencyMS: 10000 -topology_description: - type: Sharded - servers: - - &1 - address: a:27017 - type: Mongos - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} - - &2 - address: b:27017 - type: Mongos - avg_rtt_ms: 50 # Too far. - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} -read_preference: - mode: Nearest - maxStalenessSeconds: 1 # OK for sharding. -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/max-staleness/Single/SmallMaxStaleness.json b/testdata/max-staleness/Single/SmallMaxStaleness.json deleted file mode 100644 index b8d2db24be..0000000000 --- a/testdata/max-staleness/Single/SmallMaxStaleness.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "heartbeatFrequencyMS": 10000, - "topology_description": { - "type": "Single", - "servers": [ - { - "address": "a:27017", - "type": "Standalone", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 1 - }, - "suitable_servers": [ - { - "address": "a:27017", - "type": "Standalone", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "type": "Standalone", - "avg_rtt_ms": 5, - "lastUpdateTime": 0, - "maxWireVersion": 6, - "lastWrite": { - "lastWriteDate": { - "$numberLong": "1" - } - } - } - ] -} diff --git a/testdata/max-staleness/Single/SmallMaxStaleness.yml b/testdata/max-staleness/Single/SmallMaxStaleness.yml deleted file mode 100644 index 40f63a82a5..0000000000 --- a/testdata/max-staleness/Single/SmallMaxStaleness.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Driver doesn't validate maxStalenessSeconds for direct connection. ---- -heartbeatFrequencyMS: 10000 -topology_description: - type: Single - servers: - - &1 - address: a:27017 - type: Standalone - avg_rtt_ms: 5 - lastUpdateTime: 0 - maxWireVersion: 6 - lastWrite: {lastWriteDate: {$numberLong: "1"}} -read_preference: - mode: Nearest - maxStalenessSeconds: 1 -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/max-staleness/Unknown/SmallMaxStaleness.json b/testdata/max-staleness/Unknown/SmallMaxStaleness.json deleted file mode 100644 index 8d69f46a1e..0000000000 --- a/testdata/max-staleness/Unknown/SmallMaxStaleness.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "heartbeatFrequencyMS": 10000, - "topology_description": { - "type": "Unknown", - "servers": [ - { - "address": "a:27017", - "type": "Unknown", - "maxWireVersion": 6 - } - ] - }, - "read_preference": { - "mode": "Nearest", - "maxStalenessSeconds": 1 - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/max-staleness/Unknown/SmallMaxStaleness.yml b/testdata/max-staleness/Unknown/SmallMaxStaleness.yml deleted file mode 100644 index 59e14db362..0000000000 --- a/testdata/max-staleness/Unknown/SmallMaxStaleness.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Driver doesn't validate maxStalenessSeconds while TopologyType is Unknown. ---- -heartbeatFrequencyMS: 10000 -topology_description: - type: Unknown - servers: - - &1 - address: a:27017 - type: Unknown - maxWireVersion: 6 -read_preference: - mode: Nearest - maxStalenessSeconds: 1 -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/read-write-concern/connection-string/read-concern.json b/testdata/read-write-concern/connection-string/read-concern.json deleted file mode 100644 index 960b47f51d..0000000000 --- a/testdata/read-write-concern/connection-string/read-concern.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "tests": [ - { - "description": "Default", - "uri": "mongodb://localhost/", - "valid": true, - "warning": false, - "readConcern": {} - }, - { - "description": "local specified", - "uri": "mongodb://localhost/?readConcernLevel=local", - "valid": true, - "warning": false, - "readConcern": { - "level": "local" - } - }, - { - "description": "majority specified", - "uri": "mongodb://localhost/?readConcernLevel=majority", - "valid": true, - "warning": false, - "readConcern": { - "level": "majority" - } - }, - { - "description": "available specified", - "uri": "mongodb://localhost/?readConcernLevel=available", - "valid": true, - "warning": false, - "readConcern": { - "level": "available" - } - }, - { - "description": "snapshot specified", - "uri": "mongodb://localhost/?readConcernLevel=snapshot", - "valid": true, - "warning": false, - "readConcern": { - "level": "snapshot" - } - }, - { - "description": "linearizable specified", - "uri": "mongodb://localhost/?readConcernLevel=linearizable", - "valid": true, - "warning": false, - "readConcern": { - "level": "linearizable" - } - } - ] -} diff --git a/testdata/read-write-concern/connection-string/read-concern.yml b/testdata/read-write-concern/connection-string/read-concern.yml deleted file mode 100644 index 65de3243ff..0000000000 --- a/testdata/read-write-concern/connection-string/read-concern.yml +++ /dev/null @@ -1,37 +0,0 @@ -tests: - - - description: "Default" - uri: "mongodb://localhost/" - valid: true - warning: false - readConcern: { } - - - description: "local specified" - uri: "mongodb://localhost/?readConcernLevel=local" - valid: true - warning: false - readConcern: { level: "local" } - - - description: "majority specified" - uri: "mongodb://localhost/?readConcernLevel=majority" - valid: true - warning: false - readConcern: { level: "majority" } - - - description: "available specified" - uri: "mongodb://localhost?readConcernLevel=available" - valid: true - warning: false - readConcern: { level: "available" } - - - description: "snapshot specified" - uri: "mongodb://localhost?readConcernLevel=snapshot" - valid: true - warning: false - readConcern: { level: "snapshot" } - - - description: "linearizable specified" - uri: "mongodb://localhost?readConcernLevel=linearizable" - valid: true - warning: false - readConcern: { level: "linearizable" } \ No newline at end of file diff --git a/testdata/read-write-concern/connection-string/write-concern.json b/testdata/read-write-concern/connection-string/write-concern.json deleted file mode 100644 index a81e297dae..0000000000 --- a/testdata/read-write-concern/connection-string/write-concern.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "tests": [ - { - "description": "Default", - "uri": "mongodb://localhost/", - "valid": true, - "warning": false, - "writeConcern": {} - }, - { - "description": "w as a valid number", - "uri": "mongodb://localhost/?w=1", - "valid": true, - "warning": false, - "writeConcern": { - "w": 1 - } - }, - { - "description": "w as an invalid number", - "uri": "mongodb://localhost/?w=-2", - "valid": false, - "warning": null - }, - { - "description": "w as a string", - "uri": "mongodb://localhost/?w=majority", - "valid": true, - "warning": false, - "writeConcern": { - "w": "majority" - } - }, - { - "description": "wtimeoutMS as a valid number", - "skipReason": "GODRIVER-2348: the wtimeoutMS write concern option is not supported", - "uri": "mongodb://localhost/?wtimeoutMS=500", - "valid": true, - "warning": false, - "writeConcern": { - "wtimeoutMS": 500 - } - }, - { - "description": "wtimeoutMS as an invalid number", - "skipReason": "GODRIVER-2348: the wtimeoutMS write concern option is not supported", - "uri": "mongodb://localhost/?wtimeoutMS=-500", - "valid": false, - "warning": null - }, - { - "description": "journal as false", - "uri": "mongodb://localhost/?journal=false", - "valid": true, - "warning": false, - "writeConcern": { - "journal": false - } - }, - { - "description": "journal as true", - "uri": "mongodb://localhost/?journal=true", - "valid": true, - "warning": false, - "writeConcern": { - "journal": true - } - }, - { - "description": "All options combined", - "skipReason": "GODRIVER-2348: the wtimeoutMS write concern option is not supported", - "uri": "mongodb://localhost/?w=3&wtimeoutMS=500&journal=true", - "valid": true, - "warning": false, - "writeConcern": { - "w": 3, - "wtimeoutMS": 500, - "journal": true - } - }, - { - "description": "Unacknowledged with w", - "uri": "mongodb://localhost/?w=0", - "valid": true, - "warning": false, - "writeConcern": { - "w": 0 - } - }, - { - "description": "Unacknowledged with w and journal", - "uri": "mongodb://localhost/?w=0&journal=false", - "valid": true, - "warning": false, - "writeConcern": { - "w": 0, - "journal": false - } - }, - { - "description": "Unacknowledged with w and wtimeoutMS", - "skipReason": "GODRIVER-2348: the wtimeoutMS write concern option is not supported", - "uri": "mongodb://localhost/?w=0&wtimeoutMS=500", - "valid": true, - "warning": false, - "writeConcern": { - "w": 0, - "wtimeoutMS": 500 - } - }, - { - "description": "Acknowledged with w as 0 and journal true", - "uri": "mongodb://localhost/?w=0&journal=true", - "valid": false, - "warning": false, - "writeConcern": { - "w": 0, - "journal": true - } - } - ] -} diff --git a/testdata/read-write-concern/connection-string/write-concern.yml b/testdata/read-write-concern/connection-string/write-concern.yml deleted file mode 100644 index 52e09170e8..0000000000 --- a/testdata/read-write-concern/connection-string/write-concern.yml +++ /dev/null @@ -1,81 +0,0 @@ -tests: - - - description: "Default" - uri: "mongodb://localhost/" - valid: true - warning: false - writeConcern: { } - - - description: "w as a valid number" - uri: "mongodb://localhost/?w=1" - valid: true - warning: false - writeConcern: { w: 1 } - - - description: "w as an invalid number" - uri: "mongodb://localhost/?w=-2" - valid: false - warning: ~ - - - description: "w as a string" - uri: "mongodb://localhost/?w=majority" - valid: true - warning: false - writeConcern: { w: "majority" } - - - description: "wtimeoutMS as a valid number" - skipReason: "GODRIVER-2348: the wtimeoutMS write concern option is not supported" - uri: "mongodb://localhost/?wtimeoutMS=500" - valid: true - warning: false - writeConcern: { wtimeoutMS: 500 } - - - description: "wtimeoutMS as an invalid number" - skipReason: "GODRIVER-2348: the wtimeoutMS write concern option is not supported" - uri: "mongodb://localhost/?wtimeoutMS=-500" - valid: false - warning: ~ - - - description: "journal as false" - uri: "mongodb://localhost/?journal=false" - valid: true - warning: false - writeConcern: { journal: false } - - - description: "journal as true" - uri: "mongodb://localhost/?journal=true" - valid: true - warning: false - writeConcern: { journal: true } - - - description: "All options combined" - skipReason: "GODRIVER-2348: the wtimeoutMS write concern option is not supported" - uri: "mongodb://localhost/?w=3&wtimeoutMS=500&journal=true" - valid: true - warning: false - writeConcern: { w: 3, wtimeoutMS: 500, journal: true } - - - description: "Unacknowledged with w" - uri: "mongodb://localhost/?w=0" - valid: true - warning: false - writeConcern: { w: 0 } - - - description: "Unacknowledged with w and journal" - uri: "mongodb://localhost/?w=0&journal=false" - valid: true - warning: false - writeConcern: { w: 0, journal: false } - - - description: "Unacknowledged with w and wtimeoutMS" - skipReason: "GODRIVER-2348: the wtimeoutMS write concern option is not supported" - uri: "mongodb://localhost/?w=0&wtimeoutMS=500" - valid: true - warning: false - writeConcern: { w: 0, wtimeoutMS: 500 } - - - description: "Acknowledged with w as 0 and journal true" - uri: "mongodb://localhost/?w=0&journal=true" - valid: false - warning: false - writeConcern: { w: 0, journal: true } diff --git a/testdata/read-write-concern/document/read-concern.json b/testdata/read-write-concern/document/read-concern.json deleted file mode 100644 index 950954e0d7..0000000000 --- a/testdata/read-write-concern/document/read-concern.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "tests": [ - { - "description": "Default", - "valid": true, - "readConcern": {}, - "readConcernDocument": {}, - "isServerDefault": true - }, - { - "description": "Majority", - "valid": true, - "readConcern": { - "level": "majority" - }, - "readConcernDocument": { - "level": "majority" - }, - "isServerDefault": false - }, - { - "description": "Local", - "valid": true, - "readConcern": { - "level": "local" - }, - "readConcernDocument": { - "level": "local" - }, - "isServerDefault": false - }, - { - "description": "Available", - "valid": true, - "readConcern": { - "level": "available" - }, - "readConcernDocument": { - "level": "available" - }, - "isServerDefault": false - }, - { - "description": "Snapshot", - "valid": true, - "readConcern": { - "level": "snapshot" - }, - "readConcernDocument": { - "level": "snapshot" - }, - "isServerDefault": false - }, - { - "description": "Linearizable", - "valid": true, - "readConcern": { - "level": "linearizable" - }, - "readConcernDocument": { - "level": "linearizable" - }, - "isServerDefault": false - } - ] -} diff --git a/testdata/read-write-concern/document/read-concern.yml b/testdata/read-write-concern/document/read-concern.yml deleted file mode 100644 index 70679151c0..0000000000 --- a/testdata/read-write-concern/document/read-concern.yml +++ /dev/null @@ -1,37 +0,0 @@ -tests: - - - description: "Default" - valid: true - readConcern: {} - readConcernDocument: {} - isServerDefault: true - - - description: "Majority" - valid: true - readConcern: { level: "majority" } - readConcernDocument: { level: "majority" } - isServerDefault: false - - - description: "Local" - valid: true - readConcern: { level: "local" } - readConcernDocument: { level: "local" } - isServerDefault: false - - - description: "Available" - valid: true - readConcern: { level: "available" } - readConcernDocument: { level: "available" } - isServerDefault: false - - - description: "Snapshot" - valid: true - readConcern: { level: "snapshot" } - readConcernDocument: { level: "snapshot" } - isServerDefault: false - - - description: "Linearizable" - valid: true - readConcern: { level: "linearizable" } - readConcernDocument: { level: "linearizable" } - isServerDefault: false \ No newline at end of file diff --git a/testdata/read-write-concern/document/write-concern.json b/testdata/read-write-concern/document/write-concern.json deleted file mode 100644 index fe81741e70..0000000000 --- a/testdata/read-write-concern/document/write-concern.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "tests": [ - { - "description": "Default", - "valid": true, - "writeConcern": {}, - "writeConcernDocument": {}, - "isServerDefault": true, - "isAcknowledged": true - }, - { - "description": "W as a number", - "valid": true, - "writeConcern": { - "w": 3 - }, - "writeConcernDocument": { - "w": 3 - }, - "isServerDefault": false, - "isAcknowledged": true - }, - { - "description": "W as an invalid number", - "valid": false, - "writeConcern": { - "w": -3 - }, - "writeConcernDocument": null, - "isServerDefault": null, - "isAcknowledged": null - }, - { - "description": "W as majority", - "valid": true, - "writeConcern": { - "w": "majority" - }, - "writeConcernDocument": { - "w": "majority" - }, - "isServerDefault": false, - "isAcknowledged": true - }, - { - "description": "W as a custom string", - "valid": true, - "writeConcern": { - "w": "my_mode" - }, - "writeConcernDocument": { - "w": "my_mode" - }, - "isServerDefault": false, - "isAcknowledged": true - }, - { - "description": "WTimeoutMS", - "skipReason": "GODRIVER-2348: the wtimeoutMS write concern option is not supported", - "valid": true, - "writeConcern": { - "wtimeoutMS": 1000 - }, - "writeConcernDocument": { - "wtimeout": 1000 - }, - "isServerDefault": false, - "isAcknowledged": true - }, - { - "description": "WTimeoutMS as an invalid number", - "skipReason": "GODRIVER-2348: the wtimeoutMS write concern option is not supported", - "valid": false, - "writeConcern": { - "wtimeoutMS": -1000 - }, - "writeConcernDocument": null, - "isServerDefault": null, - "isAcknowledged": null - }, - { - "description": "Journal as true", - "valid": true, - "writeConcern": { - "journal": true - }, - "writeConcernDocument": { - "j": true - }, - "isServerDefault": false, - "isAcknowledged": true - }, - { - "description": "Journal as false", - "valid": true, - "writeConcern": { - "journal": false - }, - "writeConcernDocument": { - "j": false - }, - "isServerDefault": false, - "isAcknowledged": true - }, - { - "description": "Unacknowledged with only w", - "valid": true, - "writeConcern": { - "w": 0 - }, - "writeConcernDocument": { - "w": 0 - }, - "isServerDefault": false, - "isAcknowledged": false - }, - { - "description": "Unacknowledged with wtimeoutMS", - "skipReason": "GODRIVER-2348: the wtimeoutMS write concern option is not supported", - "valid": true, - "writeConcern": { - "w": 0, - "wtimeoutMS": 500 - }, - "writeConcernDocument": { - "w": 0, - "wtimeout": 500 - }, - "isServerDefault": false, - "isAcknowledged": false - }, - { - "description": "Unacknowledged with journal", - "valid": true, - "writeConcern": { - "w": 0, - "journal": false - }, - "writeConcernDocument": { - "w": 0, - "j": false - }, - "isServerDefault": false, - "isAcknowledged": false - }, - { - "description": "W is 0 with journal true", - "valid": false, - "writeConcern": { - "w": 0, - "journal": true - }, - "writeConcernDocument": { - "w": 0, - "j": true - }, - "isServerDefault": false, - "isAcknowledged": true - }, - { - "description": "Everything", - "skipReason": "GODRIVER-2348: the wtimeoutMS write concern option is not supported", - "valid": true, - "writeConcern": { - "w": 3, - "wtimeoutMS": 1000, - "journal": true - }, - "writeConcernDocument": { - "w": 3, - "wtimeout": 1000, - "j": true - }, - "isServerDefault": false, - "isAcknowledged": true - } - ] -} diff --git a/testdata/read-write-concern/document/write-concern.yml b/testdata/read-write-concern/document/write-concern.yml deleted file mode 100644 index 0c31f6958b..0000000000 --- a/testdata/read-write-concern/document/write-concern.yml +++ /dev/null @@ -1,102 +0,0 @@ -tests: - - - description: "Default" - valid: true - writeConcern: {} - writeConcernDocument: {} - isServerDefault: true - isAcknowledged: true - - - description: "W as a number" - valid: true - writeConcern: { w: 3 } - writeConcernDocument: { w: 3 } - isServerDefault: false - isAcknowledged: true - - - description: "W as an invalid number" - valid: false - writeConcern: { w: -3 } - writeConcernDocument: ~ - isServerDefault: ~ - isAcknowledged: ~ - - - description: "W as majority" - valid: true - writeConcern: { w: "majority" } - writeConcernDocument: { w: "majority" } - isServerDefault: false - isAcknowledged: true - - - description: "W as a custom string" - valid: true - writeConcern: { w: "my_mode" } - writeConcernDocument: { w: "my_mode" } - isServerDefault: false - isAcknowledged: true - - - description: "WTimeoutMS" - skipReason: "GODRIVER-2348: the wtimeoutMS write concern option is not supported" - valid: true - writeConcern: { wtimeoutMS: 1000 } - writeConcernDocument: { wtimeout: 1000 } - isServerDefault: false - isAcknowledged: true - - - description: "WTimeoutMS as an invalid number" - skipReason: "GODRIVER-2348: the wtimeoutMS write concern option is not supported" - valid: false - writeConcern: { wtimeoutMS: -1000 } - writeConcernDocument: ~ - isServerDefault: ~ - isAcknowledged: ~ - - - description: "Journal as true" - valid: true - writeConcern: { journal: true } - writeConcernDocument: { j: true } - isServerDefault: false - isAcknowledged: true - - - description: "Journal as false" - valid: true - writeConcern: { journal: false } - writeConcernDocument: { j: false } - isServerDefault: false - isAcknowledged: true - - - description: "Unacknowledged with only w" - valid: true - writeConcern: { w: 0 } - writeConcernDocument: { w: 0 } - isServerDefault: false - isAcknowledged: false - - - description: "Unacknowledged with wtimeoutMS" - skipReason: "GODRIVER-2348: the wtimeoutMS write concern option is not supported" - valid: true - writeConcern: { w: 0, wtimeoutMS: 500 } - writeConcernDocument: { w: 0, wtimeout: 500 } - isServerDefault: false - isAcknowledged: false - - - description: "Unacknowledged with journal" - valid: true - writeConcern: { w: 0, journal: false } - writeConcernDocument: { w: 0, j: false } - isServerDefault: false - isAcknowledged: false - - - description: "W is 0 with journal true" - valid: false - writeConcern: { w: 0, journal: true } - writeConcernDocument: { w: 0, j: true } - isServerDefault: false - isAcknowledged: true - - - description: "Everything" - valid: true - writeConcern: { w: 3, wtimeoutMS: 1000, journal: true } - writeConcernDocument: { w: 3, wtimeout: 1000, j: true } - isServerDefault: false - isAcknowledged: true diff --git a/testdata/read-write-concern/operation/default-write-concern-2.6.json b/testdata/read-write-concern/operation/default-write-concern-2.6.json deleted file mode 100644 index c623298cd7..0000000000 --- a/testdata/read-write-concern/operation/default-write-concern-2.6.json +++ /dev/null @@ -1,544 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "collection_name": "default_write_concern_coll", - "database_name": "default_write_concern_db", - "runOn": [ - { - "minServerVersion": "2.6" - } - ], - "tests": [ - { - "description": "DeleteOne omits default write concern", - "operations": [ - { - "name": "deleteOne", - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "arguments": { - "filter": {} - }, - "result": { - "deletedCount": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "delete": "default_write_concern_coll", - "deletes": [ - { - "q": {}, - "limit": 1 - } - ], - "writeConcern": null - } - } - } - ] - }, - { - "description": "DeleteMany omits default write concern", - "operations": [ - { - "name": "deleteMany", - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "arguments": { - "filter": {} - }, - "result": { - "deletedCount": 2 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "delete": "default_write_concern_coll", - "deletes": [ - { - "q": {}, - "limit": 0 - } - ], - "writeConcern": null - } - } - } - ] - }, - { - "description": "BulkWrite with all models omits default write concern", - "operations": [ - { - "name": "bulkWrite", - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "arguments": { - "ordered": true, - "requests": [ - { - "name": "deleteMany", - "arguments": { - "filter": {} - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2 - } - } - }, - { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 2 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3 - } - } - }, - { - "name": "updateMany", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 3 - } - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 3 - } - } - } - ] - } - } - ], - "outcome": { - "collection": { - "name": "default_write_concern_coll", - "data": [ - { - "_id": 1, - "x": 3 - }, - { - "_id": 2 - } - ] - } - }, - "expectations": [ - { - "command_started_event": { - "command": { - "delete": "default_write_concern_coll", - "deletes": [ - { - "q": {}, - "limit": 0 - } - ], - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "insert": "default_write_concern_coll", - "documents": [ - { - "_id": 1 - } - ], - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "update": "default_write_concern_coll", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$set": { - "x": 1 - } - } - } - ], - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "insert": "default_write_concern_coll", - "documents": [ - { - "_id": 2 - } - ], - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "update": "default_write_concern_coll", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "x": 2 - } - } - ], - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "insert": "default_write_concern_coll", - "documents": [ - { - "_id": 3 - } - ], - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "update": "default_write_concern_coll", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$set": { - "x": 3 - } - }, - "multi": true - } - ], - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "delete": "default_write_concern_coll", - "deletes": [ - { - "q": { - "_id": 3 - }, - "limit": 1 - } - ], - "writeConcern": null - } - } - } - ] - }, - { - "description": "InsertOne and InsertMany omit default write concern", - "operations": [ - { - "name": "insertOne", - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "arguments": { - "document": { - "_id": 3 - } - } - }, - { - "name": "insertMany", - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "arguments": { - "documents": [ - { - "_id": 4 - }, - { - "_id": 5 - } - ] - } - } - ], - "outcome": { - "collection": { - "name": "default_write_concern_coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3 - }, - { - "_id": 4 - }, - { - "_id": 5 - } - ] - } - }, - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "default_write_concern_coll", - "documents": [ - { - "_id": 3 - } - ], - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "insert": "default_write_concern_coll", - "documents": [ - { - "_id": 4 - }, - { - "_id": 5 - } - ], - "writeConcern": null - } - } - } - ] - }, - { - "description": "UpdateOne, UpdateMany, and ReplaceOne omit default write concern", - "operations": [ - { - "name": "updateOne", - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "updateMany", - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$set": { - "x": 2 - } - } - } - }, - { - "name": "replaceOne", - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "arguments": { - "filter": { - "_id": 2 - }, - "replacement": { - "x": 3 - } - } - } - ], - "outcome": { - "collection": { - "name": "default_write_concern_coll", - "data": [ - { - "_id": 1, - "x": 1 - }, - { - "_id": 2, - "x": 3 - } - ] - } - }, - "expectations": [ - { - "command_started_event": { - "command": { - "update": "default_write_concern_coll", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$set": { - "x": 1 - } - } - } - ], - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "update": "default_write_concern_coll", - "updates": [ - { - "q": { - "_id": 2 - }, - "u": { - "$set": { - "x": 2 - } - }, - "multi": true - } - ], - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "update": "default_write_concern_coll", - "updates": [ - { - "q": { - "_id": 2 - }, - "u": { - "x": 3 - } - } - ], - "writeConcern": null - } - } - } - ] - } - ] -} diff --git a/testdata/read-write-concern/operation/default-write-concern-2.6.yml b/testdata/read-write-concern/operation/default-write-concern-2.6.yml deleted file mode 100644 index 725bcfca12..0000000000 --- a/testdata/read-write-concern/operation/default-write-concern-2.6.yml +++ /dev/null @@ -1,215 +0,0 @@ -# Test that setting a default write concern does not add a write concern -# to the command sent over the wire. -# Test operations that require 2.6+ server. - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} -collection_name: &collection_name default_write_concern_coll -database_name: &database_name default_write_concern_db - -runOn: - - minServerVersion: "2.6" - -tests: - - description: DeleteOne omits default write concern - operations: - - name: deleteOne - object: collection - collectionOptions: {writeConcern: {}} - arguments: - filter: {} - result: - deletedCount: 1 - expectations: - - command_started_event: - command: - delete: *collection_name - deletes: - - {q: {}, limit: 1} - writeConcern: null - - description: DeleteMany omits default write concern - operations: - - name: deleteMany - object: collection - collectionOptions: {writeConcern: {}} - arguments: - filter: {} - result: - deletedCount: 2 - expectations: - - command_started_event: - command: - delete: *collection_name - deletes: [{q: {}, limit: 0}] - writeConcern: null - - description: BulkWrite with all models omits default write concern - operations: - - name: bulkWrite - object: collection - collectionOptions: {writeConcern: {}} - arguments: - ordered: true - requests: - - name: deleteMany - arguments: - filter: {} - - name: insertOne - arguments: - document: {_id: 1} - - name: updateOne - arguments: - filter: {_id: 1} - update: {$set: {x: 1}} - - name: insertOne - arguments: - document: {_id: 2} - - name: replaceOne - arguments: - filter: {_id: 1} - replacement: {x: 2} - - name: insertOne - arguments: - document: {_id: 3} - - name: updateMany - arguments: - filter: {_id: 1} - update: {$set: {x: 3}} - - name: deleteOne - arguments: - filter: {_id: 3} - outcome: - collection: - name: *collection_name - data: - - {_id: 1, x: 3} - - {_id: 2} - expectations: - - command_started_event: - command: - delete: *collection_name - deletes: [{q: {}, limit: 0}] - writeConcern: null - - command_started_event: - command: - insert: *collection_name - documents: - - {_id: 1} - writeConcern: null - - command_started_event: - command: - update: *collection_name - updates: - - {q: {_id: 1}, u: {$set: {x: 1}}} - writeConcern: null - - command_started_event: - command: - insert: *collection_name - documents: - - {_id: 2} - writeConcern: null - - command_started_event: - command: - update: *collection_name - updates: - - {q: {_id: 1}, u: {x: 2}} - writeConcern: null - - command_started_event: - command: - insert: *collection_name - documents: - - {_id: 3} - writeConcern: null - - command_started_event: - command: - update: *collection_name - updates: - - {q: {_id: 1}, u: {$set: {x: 3}}, multi: true} - writeConcern: null - - command_started_event: - command: - delete: *collection_name - deletes: [{q: {_id: 3}, limit: 1}] - writeConcern: null - - description: 'InsertOne and InsertMany omit default write concern' - operations: - - name: insertOne - object: collection - collectionOptions: {writeConcern: {}} - arguments: - document: {_id: 3} - - name: insertMany - object: collection - collectionOptions: {writeConcern: {}} - arguments: - documents: - - {_id: 4} - - {_id: 5} - outcome: - collection: - name: *collection_name - data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3} - - {_id: 4} - - {_id: 5} - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - {_id: 3} - writeConcern: null - - command_started_event: - command: - insert: *collection_name - documents: - - {_id: 4} - - {_id: 5} - writeConcern: null - - description: 'UpdateOne, UpdateMany, and ReplaceOne omit default write concern' - operations: - - name: updateOne - object: collection - collectionOptions: {writeConcern: {}} - arguments: - filter: {_id: 1} - update: {$set: {x: 1}} - - name: updateMany - object: collection - collectionOptions: {writeConcern: {}} - arguments: - filter: {_id: 2} - update: {$set: {x: 2}} - - name: replaceOne - object: collection - collectionOptions: {writeConcern: {}} - arguments: - filter: {_id: 2} - replacement: {x: 3} - outcome: - collection: - name: *collection_name - data: - - {_id: 1, x: 1} - - {_id: 2, x: 3} - expectations: - - command_started_event: - command: - update: *collection_name - updates: - - {q: {_id: 1}, u: {$set: {x: 1}}} - writeConcern: null - - command_started_event: - command: - update: *collection_name - updates: - - {q: {_id: 2}, u: {$set: {x: 2}}, multi: true} - writeConcern: null - - command_started_event: - command: - update: *collection_name - updates: - - {q: {_id: 2}, u: {x: 3}} - writeConcern: null \ No newline at end of file diff --git a/testdata/read-write-concern/operation/default-write-concern-3.2.json b/testdata/read-write-concern/operation/default-write-concern-3.2.json deleted file mode 100644 index 04dd231f04..0000000000 --- a/testdata/read-write-concern/operation/default-write-concern-3.2.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "collection_name": "default_write_concern_coll", - "database_name": "default_write_concern_db", - "runOn": [ - { - "minServerVersion": "3.2" - } - ], - "tests": [ - { - "description": "findAndModify operations omit default write concern", - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "arguments": { - "filter": { - "_id": 2 - }, - "replacement": { - "x": 2 - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "arguments": { - "filter": { - "_id": 2 - } - } - } - ], - "outcome": { - "collection": { - "name": "default_write_concern_coll", - "data": [ - { - "_id": 1, - "x": 1 - } - ] - } - }, - "expectations": [ - { - "command_started_event": { - "command": { - "findAndModify": "default_write_concern_coll", - "query": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - }, - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default_write_concern_coll", - "query": { - "_id": 2 - }, - "update": { - "x": 2 - }, - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "default_write_concern_coll", - "query": { - "_id": 2 - }, - "remove": true, - "writeConcern": null - } - } - } - ] - } - ] -} diff --git a/testdata/read-write-concern/operation/default-write-concern-3.2.yml b/testdata/read-write-concern/operation/default-write-concern-3.2.yml deleted file mode 100644 index dccb7e0d07..0000000000 --- a/testdata/read-write-concern/operation/default-write-concern-3.2.yml +++ /dev/null @@ -1,58 +0,0 @@ -# Test that setting a default write concern does not add a write concern -# to the command sent over the wire. -# Test operations that require 3.2+ server, where findAndModify started -# to accept a write concern. - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} -collection_name: &collection_name default_write_concern_coll -database_name: &database_name default_write_concern_db - -runOn: - - minServerVersion: "3.2" - -tests: - - description: 'findAndModify operations omit default write concern' - operations: - - name: findOneAndUpdate - object: collection - collectionOptions: {writeConcern: {}} - arguments: - filter: {_id: 1} - update: {$set: {x: 1}} - - name: findOneAndReplace - object: collection - collectionOptions: {writeConcern: {}} - arguments: - filter: {_id: 2} - replacement: {x: 2} - - name: findOneAndDelete - object: collection - collectionOptions: {writeConcern: {}} - arguments: - filter: {_id: 2} - outcome: - collection: - name: *collection_name - data: - - {_id: 1, x: 1} - expectations: - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 1} - update: {$set: {x: 1}} - writeConcern: null - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 2} - update: {x: 2} - writeConcern: null - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 2} - remove: true - writeConcern: null \ No newline at end of file diff --git a/testdata/read-write-concern/operation/default-write-concern-3.4.json b/testdata/read-write-concern/operation/default-write-concern-3.4.json deleted file mode 100644 index 6519f6f089..0000000000 --- a/testdata/read-write-concern/operation/default-write-concern-3.4.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "collection_name": "default_write_concern_coll", - "database_name": "default_write_concern_db", - "runOn": [ - { - "minServerVersion": "3.4" - } - ], - "tests": [ - { - "description": "Aggregate with $out omits default write concern", - "operations": [ - { - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "other_collection_name" - } - ] - } - } - ], - "outcome": { - "collection": { - "name": "other_collection_name", - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - }, - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "default_write_concern_coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "other_collection_name" - } - ], - "writeConcern": null - } - } - } - ] - }, - { - "description": "RunCommand with a write command omits default write concern (runCommand should never inherit write concern)", - "operations": [ - { - "object": "database", - "databaseOptions": { - "writeConcern": {} - }, - "name": "runCommand", - "command_name": "delete", - "arguments": { - "command": { - "delete": "default_write_concern_coll", - "deletes": [ - { - "q": {}, - "limit": 1 - } - ] - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "delete": "default_write_concern_coll", - "deletes": [ - { - "q": {}, - "limit": 1 - } - ], - "writeConcern": null - } - } - } - ] - }, - { - "description": "CreateIndex and dropIndex omits default write concern", - "operations": [ - { - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "name": "createIndex", - "arguments": { - "keys": { - "x": 1 - } - } - }, - { - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "name": "dropIndex", - "arguments": { - "name": "x_1" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "createIndexes": "default_write_concern_coll", - "indexes": [ - { - "name": "x_1", - "key": { - "x": 1 - } - } - ], - "writeConcern": null - } - } - }, - { - "command_started_event": { - "command": { - "dropIndexes": "default_write_concern_coll", - "index": "x_1", - "writeConcern": null - } - } - } - ] - }, - { - "description": "MapReduce omits default write concern", - "operations": [ - { - "name": "mapReduce", - "object": "collection", - "collectionOptions": { - "writeConcern": {} - }, - "arguments": { - "map": { - "$code": "function inc() { return emit(0, this.x + 1) }" - }, - "reduce": { - "$code": "function sum(key, values) { return values.reduce((acc, x) => acc + x); }" - }, - "out": { - "inline": 1 - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "mapReduce": "default_write_concern_coll", - "map": { - "$code": "function inc() { return emit(0, this.x + 1) }" - }, - "reduce": { - "$code": "function sum(key, values) { return values.reduce((acc, x) => acc + x); }" - }, - "out": { - "inline": 1 - }, - "writeConcern": null - } - } - } - ] - } - ] -} diff --git a/testdata/read-write-concern/operation/default-write-concern-3.4.yml b/testdata/read-write-concern/operation/default-write-concern-3.4.yml deleted file mode 100644 index c7b586cadc..0000000000 --- a/testdata/read-write-concern/operation/default-write-concern-3.4.yml +++ /dev/null @@ -1,95 +0,0 @@ -# Test that setting a default write concern does not add a write concern -# to the command sent over the wire. -# Test operations that require 3.4+ server, where all commands started -# to accept a write concern. - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} -collection_name: &collection_name default_write_concern_coll -database_name: &database_name default_write_concern_db - -runOn: - - minServerVersion: "3.4" - -tests: - - description: Aggregate with $out omits default write concern - operations: - - object: collection - collectionOptions: {writeConcern: {}} - name: aggregate - arguments: - pipeline: &out_pipeline - - $match: {_id: {$gt: 1}} - - $out: &other_collection_name "other_collection_name" - outcome: - collection: - name: *other_collection_name - data: - - {_id: 2, x: 22} - expectations: - - command_started_event: - command: - aggregate: *collection_name - pipeline: *out_pipeline - writeConcern: null - - description: RunCommand with a write command omits default write concern (runCommand should never inherit write concern) - operations: - - object: database - databaseOptions: {writeConcern: {}} - name: runCommand - command_name: delete - arguments: - command: - delete: *collection_name - deletes: - - {q: {}, limit: 1} - expectations: - - command_started_event: - command: - delete: *collection_name - deletes: - - {q: {}, limit: 1} - writeConcern: null - - description: CreateIndex and dropIndex omits default write concern - operations: - - object: collection - collectionOptions: {writeConcern: {}} - name: createIndex - arguments: - keys: {x: 1} - - object: collection - collectionOptions: {writeConcern: {}} - name: dropIndex - arguments: - name: x_1 - expectations: - - command_started_event: - command: - createIndexes: *collection_name - indexes: - - name: x_1 - key: {x: 1} - writeConcern: null - - command_started_event: - command: - dropIndexes: *collection_name - index: x_1 - writeConcern: null - - description: MapReduce omits default write concern - operations: - - name: mapReduce - object: collection - collectionOptions: {writeConcern: {}} - arguments: - map: { $code: 'function inc() { return emit(0, this.x + 1) }' } - reduce: { $code: 'function sum(key, values) { return values.reduce((acc, x) => acc + x); }' } - out: { inline: 1 } - expectations: - - command_started_event: - command: - mapReduce: *collection_name - map: { $code: 'function inc() { return emit(0, this.x + 1) }' } - reduce: { $code: 'function sum(key, values) { return values.reduce((acc, x) => acc + x); }' } - out: { inline: 1 } - writeConcern: null \ No newline at end of file diff --git a/testdata/read-write-concern/operation/default-write-concern-4.2.json b/testdata/read-write-concern/operation/default-write-concern-4.2.json deleted file mode 100644 index fef192d1a3..0000000000 --- a/testdata/read-write-concern/operation/default-write-concern-4.2.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "collection_name": "default_write_concern_coll", - "database_name": "default_write_concern_db", - "runOn": [ - { - "minServerVersion": "4.2" - } - ], - "tests": [ - { - "description": "Aggregate with $merge omits default write concern", - "operations": [ - { - "object": "collection", - "databaseOptions": { - "writeConcern": {} - }, - "collectionOptions": { - "writeConcern": {} - }, - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$merge": { - "into": "other_collection_name" - } - } - ] - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "default_write_concern_coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$merge": { - "into": "other_collection_name" - } - } - ], - "writeConcern": null - } - } - } - ], - "outcome": { - "collection": { - "name": "other_collection_name", - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/read-write-concern/operation/default-write-concern-4.2.yml b/testdata/read-write-concern/operation/default-write-concern-4.2.yml deleted file mode 100644 index 6039b55814..0000000000 --- a/testdata/read-write-concern/operation/default-write-concern-4.2.yml +++ /dev/null @@ -1,36 +0,0 @@ -# Test that setting a default write concern does not add a write concern -# to the command sent over the wire. -# Test operations that require 4.2+ server. - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} -collection_name: &collection_name default_write_concern_coll -database_name: &database_name default_write_concern_db - -runOn: - - minServerVersion: "4.2" - -tests: - - description: Aggregate with $merge omits default write concern - operations: - - object: collection - databaseOptions: {writeConcern: {}} - collectionOptions: {writeConcern: {}} - name: aggregate - arguments: - pipeline: &merge_pipeline - - $match: {_id: {$gt: 1}} - - $merge: {into: &other_collection_name "other_collection_name" } - expectations: - - command_started_event: - command: - aggregate: *collection_name - pipeline: *merge_pipeline - # "null" fields will be checked for non-existence - writeConcern: null - outcome: - collection: - name: *other_collection_name - data: - - {_id: 2, x: 22} \ No newline at end of file diff --git a/testdata/retryable-reads/legacy/aggregate-merge.json b/testdata/retryable-reads/legacy/aggregate-merge.json deleted file mode 100644 index b401d741ba..0000000000 --- a/testdata/retryable-reads/legacy/aggregate-merge.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.11" - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "Aggregate with $merge does not retry", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "object": "collection", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - }, - { - "$merge": { - "into": "output-collection" - } - } - ] - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - }, - { - "$merge": { - "into": "output-collection" - } - } - ] - }, - "command_name": "aggregate", - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/aggregate-merge.yml b/testdata/retryable-reads/legacy/aggregate-merge.yml deleted file mode 100644 index f9913348f4..0000000000 --- a/testdata/retryable-reads/legacy/aggregate-merge.yml +++ /dev/null @@ -1,39 +0,0 @@ -runOn: - - - minServerVersion: "4.1.11" - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "Aggregate with $merge does not retry" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [aggregate] - closeConnection: true - operations: - - - object: collection - name: aggregate - arguments: - pipeline: &pipeline - - $match: {_id: {$gt: 1}} - - $sort: {x: 1} - - $merge: { into: "output-collection" } - error: true - expectations: - - - command_started_event: - command: - aggregate: *collection_name - pipeline: *pipeline - command_name: aggregate - database_name: *database_name diff --git a/testdata/retryable-reads/legacy/aggregate-serverErrors.json b/testdata/retryable-reads/legacy/aggregate-serverErrors.json deleted file mode 100644 index 1155f808dc..0000000000 --- a/testdata/retryable-reads/legacy/aggregate-serverErrors.json +++ /dev/null @@ -1,1208 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "Aggregate succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/aggregate-serverErrors.yml b/testdata/retryable-reads/legacy/aggregate-serverErrors.yml deleted file mode 100644 index bf9fc01892..0000000000 --- a/testdata/retryable-reads/legacy/aggregate-serverErrors.yml +++ /dev/null @@ -1,157 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "Aggregate succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [aggregate], errorCode: 11600 } - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: aggregate - object: collection - arguments: - pipeline: - - $match: - _id: {$gt: 1} - - $sort: {x: 1} - result: - - {_id: 2, x: 22} - - {_id: 3, x: 33} - expectations: - - &retryable_command_started_event - command_started_event: - command: - aggregate: *collection_name - pipeline: [{$match: {_id: {$gt: 1}}}, {$sort: {x: 1}}] - database_name: *database_name - - *retryable_command_started_event - - - description: "Aggregate succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 11602 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 10107 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 13435 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 13436 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 189 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 91 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 7 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 6 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 89 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 9001 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [aggregate], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/aggregate.json b/testdata/retryable-reads/legacy/aggregate.json deleted file mode 100644 index f23d5c6793..0000000000 --- a/testdata/retryable-reads/legacy/aggregate.json +++ /dev/null @@ -1,406 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "Aggregate succeeds on first attempt", - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "result": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Aggregate with $out does not retry", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - }, - { - "$out": "output-collection" - } - ] - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - }, - { - "$out": "output-collection" - } - ] - }, - "command_name": "aggregate", - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/aggregate.yml b/testdata/retryable-reads/legacy/aggregate.yml deleted file mode 100644 index de9c0d7069..0000000000 --- a/testdata/retryable-reads/legacy/aggregate.yml +++ /dev/null @@ -1,87 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "Aggregate succeeds on first attempt" - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: aggregate - object: collection - arguments: - pipeline: - - $match: {_id: {$gt: 1}} - - $sort: {x: 1} - result: - - {_id: 2, x: 22} - - {_id: 3, x: 33} - expectations: - - &retryable_command_started_event - command_started_event: - command: - aggregate: *collection_name - pipeline: [{$match: {_id: {$gt: 1}}}, {$sort: {x: 1}}] - database_name: *database_name - - - description: "Aggregate succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [aggregate] - closeConnection: true - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "Aggregate fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Aggregate with $out does not retry" - failPoint: *failCommand_failPoint - operations: - - <<: *retryable_operation_fails - arguments: - pipeline: - - $match: {_id: {$gt: 1}} - - $sort: {x: 1} - - $out: "output-collection" - expectations: - - command_started_event: - command: - aggregate: *collection_name - pipeline: [{$match: {_id: {$gt: 1}}}, {$sort: {x: 1}}, {$out: 'output-collection'}] - command_name: aggregate - database_name: *database_name diff --git a/testdata/retryable-reads/legacy/changeStreams-client.watch-serverErrors.json b/testdata/retryable-reads/legacy/changeStreams-client.watch-serverErrors.json deleted file mode 100644 index 73dbfee916..0000000000 --- a/testdata/retryable-reads/legacy/changeStreams-client.watch-serverErrors.json +++ /dev/null @@ -1,740 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "client.watch succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "watch", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "watch", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/changeStreams-client.watch-serverErrors.yml b/testdata/retryable-reads/legacy/changeStreams-client.watch-serverErrors.yml deleted file mode 100644 index a1f1069643..0000000000 --- a/testdata/retryable-reads/legacy/changeStreams-client.watch-serverErrors.yml +++ /dev/null @@ -1,150 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - serverless: "forbid" - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "client.watch succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [aggregate], errorCode: 11600 } - operations: - - &retryable_operation - name: watch - object: client - expectations: - - &retryable_command_started_event - command_started_event: - command: - aggregate: 1 - cursor: {} - pipeline: [ { $changeStream: { allChangesForCluster: true } } ] - database_name: admin - - *retryable_command_started_event - - - description: "client.watch succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "client.watch succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "client.watch succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "client.watch succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "client.watch succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "client.watch succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "client.watch succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "client.watch succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "client.watch succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "client.watch succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "client.watch fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [aggregate], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "client.watch fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/changeStreams-client.watch.json b/testdata/retryable-reads/legacy/changeStreams-client.watch.json deleted file mode 100644 index 30a53037ad..0000000000 --- a/testdata/retryable-reads/legacy/changeStreams-client.watch.json +++ /dev/null @@ -1,209 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - } - ], - "tests": [ - { - "description": "client.watch succeeds on first attempt", - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "watch", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "watch", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - }, - { - "description": "client.watch fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "watch", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true - } - } - ] - }, - "database_name": "admin" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/changeStreams-client.watch.yml b/testdata/retryable-reads/legacy/changeStreams-client.watch.yml deleted file mode 100644 index ea7f7e069a..0000000000 --- a/testdata/retryable-reads/legacy/changeStreams-client.watch.yml +++ /dev/null @@ -1,62 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - serverless: "forbid" - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - -tests: - - - description: "client.watch succeeds on first attempt" - operations: - - &retryable_operation - name: watch - object: client - expectations: - - &retryable_command_started_event - command_started_event: - command: - aggregate: 1 - cursor: {} - pipeline: [ { $changeStream: { "allChangesForCluster": true } } ] - database_name: admin - - - description: "client.watch succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [aggregate] - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "client.watch fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "client.watch fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/changeStreams-db.coll.watch-serverErrors.json b/testdata/retryable-reads/legacy/changeStreams-db.coll.watch-serverErrors.json deleted file mode 100644 index 77b3af04f4..0000000000 --- a/testdata/retryable-reads/legacy/changeStreams-db.coll.watch-serverErrors.json +++ /dev/null @@ -1,690 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "db.coll.watch succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "watch", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/changeStreams-db.coll.watch-serverErrors.yml b/testdata/retryable-reads/legacy/changeStreams-db.coll.watch-serverErrors.yml deleted file mode 100644 index 4e4bb4a1b7..0000000000 --- a/testdata/retryable-reads/legacy/changeStreams-db.coll.watch-serverErrors.yml +++ /dev/null @@ -1,150 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - serverless: "forbid" - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "db.coll.watch succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [aggregate], errorCode: 11600 } - operations: - - &retryable_operation - name: watch - object: collection - expectations: - - &retryable_command_started_event - command_started_event: - command: - aggregate: *collection_name - cursor: {} - pipeline: [ { $changeStream: { } } ] - database_name: *database_name - - *retryable_command_started_event - - - description: "db.coll.watch succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.coll.watch succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.coll.watch succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.coll.watch succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.coll.watch succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.coll.watch succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.coll.watch succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.coll.watch succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.coll.watch succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.coll.watch succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.coll.watch fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [aggregate], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.coll.watch fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/changeStreams-db.coll.watch.json b/testdata/retryable-reads/legacy/changeStreams-db.coll.watch.json deleted file mode 100644 index 27f6105a4b..0000000000 --- a/testdata/retryable-reads/legacy/changeStreams-db.coll.watch.json +++ /dev/null @@ -1,197 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - } - ], - "tests": [ - { - "description": "db.coll.watch succeeds on first attempt", - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "watch", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "watch", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.coll.watch fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "watch", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/changeStreams-db.coll.watch.yml b/testdata/retryable-reads/legacy/changeStreams-db.coll.watch.yml deleted file mode 100644 index c8334b1a99..0000000000 --- a/testdata/retryable-reads/legacy/changeStreams-db.coll.watch.yml +++ /dev/null @@ -1,66 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - serverless: "forbid" - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - -tests: - - - description: "db.coll.watch succeeds on first attempt" - operations: - - &retryable_operation - name: watch - object: collection - expectations: - - &retryable_command_started_event - command_started_event: - command: - aggregate: *collection_name - cursor: {} - pipeline: [ { $changeStream: { } } ] - database_name: *database_name - - - description: "db.coll.watch succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: - - aggregate - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.coll.watch fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "db.coll.watch fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - diff --git a/testdata/retryable-reads/legacy/changeStreams-db.watch-serverErrors.json b/testdata/retryable-reads/legacy/changeStreams-db.watch-serverErrors.json deleted file mode 100644 index 7a87534508..0000000000 --- a/testdata/retryable-reads/legacy/changeStreams-db.watch-serverErrors.json +++ /dev/null @@ -1,690 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "db.watch succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "watch", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "watch", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/changeStreams-db.watch-serverErrors.yml b/testdata/retryable-reads/legacy/changeStreams-db.watch-serverErrors.yml deleted file mode 100644 index a527935bae..0000000000 --- a/testdata/retryable-reads/legacy/changeStreams-db.watch-serverErrors.yml +++ /dev/null @@ -1,154 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - serverless: "forbid" - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "db.watch succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [aggregate], errorCode: 11600 } - operations: - - &retryable_operation - name: watch - object: database - expectations: - - &retryable_command_started_event - command_started_event: - command: - aggregate: 1 - cursor: {} - pipeline: [ { $changeStream: { } } ] - database_name: *database_name - - *retryable_command_started_event - - - description: "db.watch succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.watch succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.watch succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.watch succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.watch succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.watch succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.watch succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.watch succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.watch succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.watch succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.watch fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [aggregate], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.watch fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - - - diff --git a/testdata/retryable-reads/legacy/changeStreams-db.watch.json b/testdata/retryable-reads/legacy/changeStreams-db.watch.json deleted file mode 100644 index e6b0b9b781..0000000000 --- a/testdata/retryable-reads/legacy/changeStreams-db.watch.json +++ /dev/null @@ -1,197 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - } - ], - "tests": [ - { - "description": "db.watch succeeds on first attempt", - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "watch", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "watch", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "db.watch fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "watch", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": {} - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/changeStreams-db.watch.yml b/testdata/retryable-reads/legacy/changeStreams-db.watch.yml deleted file mode 100644 index e2ceacbb66..0000000000 --- a/testdata/retryable-reads/legacy/changeStreams-db.watch.yml +++ /dev/null @@ -1,62 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - serverless: "forbid" - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - -tests: - - - description: "db.watch succeeds on first attempt" - operations: - - &retryable_operation - name: watch - object: database - expectations: - - &retryable_command_started_event - command_started_event: - command: - aggregate: 1 - cursor: {} - pipeline: [ { $changeStream: { } } ] - database_name: *database_name - - - description: "db.watch succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [aggregate] - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "db.watch fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "db.watch fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/count-serverErrors.json b/testdata/retryable-reads/legacy/count-serverErrors.json deleted file mode 100644 index 36a0c17cab..0000000000 --- a/testdata/retryable-reads/legacy/count-serverErrors.json +++ /dev/null @@ -1,586 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "Count succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/count-serverErrors.yml b/testdata/retryable-reads/legacy/count-serverErrors.yml deleted file mode 100644 index 48ceaea68b..0000000000 --- a/testdata/retryable-reads/legacy/count-serverErrors.yml +++ /dev/null @@ -1,150 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "Count succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [count], errorCode: 11600 } - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: count - object: collection - arguments: { filter: { } } - result: 2 - expectations: - - &retryable_command_started_event - command_started_event: - command: - count: *collection_name - database_name: *database_name - - *retryable_command_started_event - - - description: "Count succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 11602 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Count succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 10107 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Count succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 13435 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Count succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 13436 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Count succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 189 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Count succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 91 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Count succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 7 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Count succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 6 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Count succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 89 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Count succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 9001 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Count fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [count], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Count fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/count.json b/testdata/retryable-reads/legacy/count.json deleted file mode 100644 index 139a545131..0000000000 --- a/testdata/retryable-reads/legacy/count.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "Count succeeds on first attempt", - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Count fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "count" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "count", - "object": "collection", - "arguments": { - "filter": {} - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/count.yml b/testdata/retryable-reads/legacy/count.yml deleted file mode 100644 index c9c3936b6b..0000000000 --- a/testdata/retryable-reads/legacy/count.yml +++ /dev/null @@ -1,64 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "Count succeeds on first attempt" - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: count - object: collection - arguments: { filter: { } } - result: 2 - expectations: - - &retryable_command_started_event - command_started_event: - command: - count: *collection_name - database_name: *database_name - - - description: "Count succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [count] - closeConnection: true - - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Count fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "Count fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/countDocuments-serverErrors.json b/testdata/retryable-reads/legacy/countDocuments-serverErrors.json deleted file mode 100644 index 782ea5e4f1..0000000000 --- a/testdata/retryable-reads/legacy/countDocuments-serverErrors.json +++ /dev/null @@ -1,911 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "CountDocuments succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/countDocuments-serverErrors.yml b/testdata/retryable-reads/legacy/countDocuments-serverErrors.yml deleted file mode 100644 index 4ffb9a05b5..0000000000 --- a/testdata/retryable-reads/legacy/countDocuments-serverErrors.yml +++ /dev/null @@ -1,150 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "CountDocuments succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [aggregate], errorCode: 11600 } - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: countDocuments - object: collection - arguments: { filter: { } } - result: 2 - expectations: - - &retryable_command_started_event - command_started_event: - command: - aggregate: *collection_name - pipeline: [{'$match': {}}, {'$group': {'_id': 1, 'n': {'$sum': 1}}}] - database_name: *database_name - - *retryable_command_started_event - - - description: "CountDocuments succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 11602 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "CountDocuments succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 10107 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "CountDocuments succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 13435 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "CountDocuments succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 13436 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "CountDocuments succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 189 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "CountDocuments succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 91 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "CountDocuments succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 7 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "CountDocuments succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 6 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "CountDocuments succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 89 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "CountDocuments succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 9001 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "CountDocuments fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [aggregate], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "CountDocuments fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [aggregate], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/countDocuments.json b/testdata/retryable-reads/legacy/countDocuments.json deleted file mode 100644 index 57a64e45b7..0000000000 --- a/testdata/retryable-reads/legacy/countDocuments.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "CountDocuments succeeds on first attempt", - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "CountDocuments fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": {} - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ] - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/countDocuments.yml b/testdata/retryable-reads/legacy/countDocuments.yml deleted file mode 100644 index 9e2565129c..0000000000 --- a/testdata/retryable-reads/legacy/countDocuments.yml +++ /dev/null @@ -1,64 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "CountDocuments succeeds on first attempt" - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: countDocuments - object: collection - arguments: { filter: { } } - result: 2 - expectations: - - &retryable_command_started_event - command_started_event: - command: - aggregate: *collection_name - pipeline: [{'$match': {}}, {'$group': {'_id': 1, 'n': {'$sum': 1}}}] - database_name: *database_name - - - description: "CountDocuments succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [aggregate] - closeConnection: true - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "CountDocuments fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "CountDocuments fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/distinct-serverErrors.json b/testdata/retryable-reads/legacy/distinct-serverErrors.json deleted file mode 100644 index d7c6018a62..0000000000 --- a/testdata/retryable-reads/legacy/distinct-serverErrors.json +++ /dev/null @@ -1,838 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "Distinct succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/distinct-serverErrors.yml b/testdata/retryable-reads/legacy/distinct-serverErrors.yml deleted file mode 100644 index d4bc118ff6..0000000000 --- a/testdata/retryable-reads/legacy/distinct-serverErrors.yml +++ /dev/null @@ -1,156 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "Distinct succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [distinct], errorCode: 11600 } - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: distinct - object: collection - arguments: { fieldName: "x", filter: { _id: { $gt: 1 } } } - result: - - 22 - - 33 - expectations: - - &retryable_command_started_event - command_started_event: - command: - distinct: *collection_name - key: "x" - query: - _id: {$gt: 1} - database_name: *database_name - - *retryable_command_started_event - - - description: "Distinct succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [distinct], errorCode: 11602 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Distinct succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [distinct], errorCode: 10107 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Distinct succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [distinct], errorCode: 13435 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Distinct succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [distinct], errorCode: 13436 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Distinct succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [distinct], errorCode: 189 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Distinct succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [distinct], errorCode: 91 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Distinct succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [distinct], errorCode: 7 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Distinct succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [distinct], errorCode: 6 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Distinct succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [distinct], errorCode: 89 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Distinct succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [distinct], errorCode: 9001 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Distinct fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [distinct], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Distinct fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [distinct], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/distinct.json b/testdata/retryable-reads/legacy/distinct.json deleted file mode 100644 index 1fd415da81..0000000000 --- a/testdata/retryable-reads/legacy/distinct.json +++ /dev/null @@ -1,245 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "tests": [ - { - "description": "Distinct succeeds on first attempt", - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "result": [ - 22, - 33 - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Distinct fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "distinct" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "coll", - "key": "x", - "query": { - "_id": { - "$gt": 1 - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/distinct.yml b/testdata/retryable-reads/legacy/distinct.yml deleted file mode 100644 index 8ca2ac8315..0000000000 --- a/testdata/retryable-reads/legacy/distinct.yml +++ /dev/null @@ -1,71 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - - description: "Distinct succeeds on first attempt" - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: distinct - object: collection - arguments: { fieldName: "x", filter: { _id: { $gt: 1 } } } - result: - - 22 - - 33 - expectations: - - &retryable_command_started_event - command_started_event: - command: - distinct: *collection_name - key: "x" - query: - _id: {$gt: 1} - database_name: *database_name - - - description: "Distinct succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [distinct] - closeConnection: true - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Distinct fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - - description: "Distinct fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/estimatedDocumentCount-serverErrors.json b/testdata/retryable-reads/legacy/estimatedDocumentCount-serverErrors.json deleted file mode 100644 index 6bb128f5f3..0000000000 --- a/testdata/retryable-reads/legacy/estimatedDocumentCount-serverErrors.json +++ /dev/null @@ -1,546 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "EstimatedDocumentCount succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/estimatedDocumentCount-serverErrors.yml b/testdata/retryable-reads/legacy/estimatedDocumentCount-serverErrors.yml deleted file mode 100644 index aefb89ca69..0000000000 --- a/testdata/retryable-reads/legacy/estimatedDocumentCount-serverErrors.yml +++ /dev/null @@ -1,148 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "EstimatedDocumentCount succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [count], errorCode: 11600 } - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: estimatedDocumentCount - object: collection - result: 2 - expectations: - - &retryable_command_started_event - command_started_event: - command: - count: *collection_name - database_name: *database_name - - *retryable_command_started_event - - - description: "EstimatedDocumentCount succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 11602 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "EstimatedDocumentCount succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 10107 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "EstimatedDocumentCount succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 13435 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "EstimatedDocumentCount succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 13436 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "EstimatedDocumentCount succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 189 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "EstimatedDocumentCount succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 91 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "EstimatedDocumentCount succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 7 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "EstimatedDocumentCount succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 6 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "EstimatedDocumentCount succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 89 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "EstimatedDocumentCount succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 9001 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "EstimatedDocumentCount fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [count], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "EstimatedDocumentCount fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [count], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/estimatedDocumentCount.json b/testdata/retryable-reads/legacy/estimatedDocumentCount.json deleted file mode 100644 index 8dfa15a2cd..0000000000 --- a/testdata/retryable-reads/legacy/estimatedDocumentCount.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "EstimatedDocumentCount succeeds on first attempt", - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "result": 2 - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "count" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "EstimatedDocumentCount fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "count" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "count": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/estimatedDocumentCount.yml b/testdata/retryable-reads/legacy/estimatedDocumentCount.yml deleted file mode 100644 index de03e483bb..0000000000 --- a/testdata/retryable-reads/legacy/estimatedDocumentCount.yml +++ /dev/null @@ -1,62 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "EstimatedDocumentCount succeeds on first attempt" - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: estimatedDocumentCount - object: collection - result: 2 - expectations: - - &retryable_command_started_event - command_started_event: - command: - count: *collection_name - database_name: *database_name - - - description: "EstimatedDocumentCount succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [count] - closeConnection: true - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "EstimatedDocumentCount fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "EstimatedDocumentCount fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/find-serverErrors.json b/testdata/retryable-reads/legacy/find-serverErrors.json deleted file mode 100644 index f6b96c6dcb..0000000000 --- a/testdata/retryable-reads/legacy/find-serverErrors.json +++ /dev/null @@ -1,962 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ], - "tests": [ - { - "description": "Find succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/find-serverErrors.yml b/testdata/retryable-reads/legacy/find-serverErrors.yml deleted file mode 100644 index e122f3e2c8..0000000000 --- a/testdata/retryable-reads/legacy/find-serverErrors.yml +++ /dev/null @@ -1,160 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 44} - - {_id: 5, x: 55} - -tests: - - - description: "Find succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [find], errorCode: 11600 } - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: find - object: collection - arguments: { filter: {}, sort: { _id: 1 }, limit: 4 } - result: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 44} - expectations: - - &retryable_command_started_event - command_started_event: - command: - find: *collection_name - filter: {} - sort: {_id: 1} - limit: 4 - database_name: *database_name - - *retryable_command_started_event - - - description: "Find succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 11602 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 10107 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 13435 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 13436 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 189 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 91 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 7 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 6 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 89 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 9001 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [find], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/find.json b/testdata/retryable-reads/legacy/find.json deleted file mode 100644 index 00d419c0da..0000000000 --- a/testdata/retryable-reads/legacy/find.json +++ /dev/null @@ -1,348 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ], - "tests": [ - { - "description": "Find succeeds on first attempt", - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find succeeds on second attempt with explicit clientOptions", - "clientOptions": { - "retryReads": true - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "result": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Find fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 4 - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/find.yml b/testdata/retryable-reads/legacy/find.yml deleted file mode 100644 index b685c07b6a..0000000000 --- a/testdata/retryable-reads/legacy/find.yml +++ /dev/null @@ -1,86 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 44} - - {_id: 5, x: 55} - -tests: - - - description: "Find succeeds on first attempt" - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: find - object: collection - arguments: - filter: {} - sort: {_id: 1} - limit: 4 - result: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 44} - expectations: - - &retryable_command_started_event - command_started_event: - command: - find: *collection_name - filter: {} - sort: {_id: 1} - limit: 4 - database_name: *database_name - - - description: "Find succeeds on second attempt with explicit clientOptions" - clientOptions: - retryReads: true - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [find] - closeConnection: true - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find succeeds on second attempt" - failPoint: *failCommand_failPoint - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Find fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "Find fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/findOne-serverErrors.json b/testdata/retryable-reads/legacy/findOne-serverErrors.json deleted file mode 100644 index d039ef247e..0000000000 --- a/testdata/retryable-reads/legacy/findOne-serverErrors.json +++ /dev/null @@ -1,732 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ], - "tests": [ - { - "description": "FindOne succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/findOne-serverErrors.yml b/testdata/retryable-reads/legacy/findOne-serverErrors.yml deleted file mode 100644 index b6e7657408..0000000000 --- a/testdata/retryable-reads/legacy/findOne-serverErrors.yml +++ /dev/null @@ -1,154 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 44} - - {_id: 5, x: 55} - -tests: - - - description: "FindOne succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [find], errorCode: 11600 } - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: findOne - object: collection - arguments: - filter: {_id: 1} - result: {_id: 1, x: 11} - expectations: - - &retryable_command_started_event - command_started_event: - command: - find: *collection_name - filter: {_id: 1} - database_name: *database_name - - *retryable_command_started_event - - - description: "FindOne succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 11602 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "FindOne succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 10107 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "FindOne succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 13435 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "FindOne succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 13436 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "FindOne succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 189 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "FindOne succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 91 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "FindOne succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 7 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "FindOne succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 6 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "FindOne succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 89 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "FindOne succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 9001 } - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "FindOne fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [find], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "FindOne fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/findOne.json b/testdata/retryable-reads/legacy/findOne.json deleted file mode 100644 index b9deb73d2a..0000000000 --- a/testdata/retryable-reads/legacy/findOne.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ], - "tests": [ - { - "description": "FindOne succeeds on first attempt", - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": { - "_id": 1, - "x": 11 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "FindOne fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "findOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "coll", - "filter": { - "_id": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/findOne.yml b/testdata/retryable-reads/legacy/findOne.yml deleted file mode 100644 index 911314e98e..0000000000 --- a/testdata/retryable-reads/legacy/findOne.yml +++ /dev/null @@ -1,68 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - - {_id: 4, x: 44} - - {_id: 5, x: 55} - -tests: - - - description: "FindOne succeeds on first attempt" - operations: - - &retryable_operation_succeeds - <<: &retryable_operation - name: findOne - object: collection - arguments: {filter: {_id: 1 }} - result: {_id: 1, x: 11} - expectations: - - &retryable_command_started_event - command_started_event: - command: - find: *collection_name - filter: {_id: 1} - database_name: *database_name - - - description: "FindOne succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [find] - closeConnection: true - operations: [*retryable_operation_succeeds] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "FindOne fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "FindOne fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/gridfs-download-serverErrors.json b/testdata/retryable-reads/legacy/gridfs-download-serverErrors.json deleted file mode 100644 index cec3a5016a..0000000000 --- a/testdata/retryable-reads/legacy/gridfs-download-serverErrors.json +++ /dev/null @@ -1,925 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "bucket_name": "fs", - "data": { - "fs.files": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "filename": "abc", - "metadata": {} - } - ], - "fs.chunks": [ - { - "_id": { - "$oid": "000000000000000000000002" - }, - "files_id": { - "$oid": "000000000000000000000001" - }, - "n": 0, - "data": { - "$binary": { - "base64": "EQ==", - "subType": "00" - } - } - } - ] - }, - "tests": [ - { - "description": "Download succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/gridfs-download-serverErrors.yml b/testdata/retryable-reads/legacy/gridfs-download-serverErrors.yml deleted file mode 100644 index e120c162fd..0000000000 --- a/testdata/retryable-reads/legacy/gridfs-download-serverErrors.yml +++ /dev/null @@ -1,173 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -bucket_name: "fs" - -data: - fs.files: - - - _id: { $oid : "000000000000000000000001" } - length: 1 - chunkSize: 4 - uploadDate: { $date : "1970-01-01T00:00:00.000Z" } - filename: abc - metadata: {} - fs.chunks: - - { _id: { $oid: "000000000000000000000002" }, files_id: { $oid: "000000000000000000000001" }, n: 0, data: { $binary: { base64: "EQ==", subType: "00" } } } - -tests: - - - description: "Download succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [find], errorCode: 11600 } - operations: - - &retryable_operation - name: download - object: gridfsbucket - arguments: { id: { "$oid" : "000000000000000000000001" } } - expectations: - - &retryable_command_started_event - command_started_event: - command: - find: fs.files - filter: { _id: {$oid : "000000000000000000000001" }} - database_name: *database_name - - *retryable_command_started_event - - &find_chunks_command_started_event - command_started_event: - command: - find: fs.chunks - filter: { files_id: {$oid : "000000000000000000000001" }} - sort: { n: 1 } - database_name: *database_name - - - description: "Download succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "Download succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "Download succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "Download succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "Download succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "Download succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "Download succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "Download succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "Download succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "Download succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "Download fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [find], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "Download fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/gridfs-download.json b/testdata/retryable-reads/legacy/gridfs-download.json deleted file mode 100644 index 4d0d5a17e4..0000000000 --- a/testdata/retryable-reads/legacy/gridfs-download.json +++ /dev/null @@ -1,270 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "bucket_name": "fs", - "data": { - "fs.files": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "filename": "abc", - "metadata": {} - } - ], - "fs.chunks": [ - { - "_id": { - "$oid": "000000000000000000000002" - }, - "files_id": { - "$oid": "000000000000000000000001" - }, - "n": 0, - "data": { - "$binary": { - "base64": "EQ==", - "subType": "00" - } - } - } - ] - }, - "tests": [ - { - "description": "Download succeeds on first attempt", - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "Download fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "download", - "object": "gridfsbucket", - "arguments": { - "id": { - "$oid": "000000000000000000000001" - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "_id": { - "$oid": "000000000000000000000001" - } - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/gridfs-download.yml b/testdata/retryable-reads/legacy/gridfs-download.yml deleted file mode 100644 index a71c719d9a..0000000000 --- a/testdata/retryable-reads/legacy/gridfs-download.yml +++ /dev/null @@ -1,79 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -bucket_name: "fs" - -data: - fs.files: - - - _id: { $oid : "000000000000000000000001" } - length: 1 - chunkSize: 4 - uploadDate: { $date : "1970-01-01T00:00:00.000Z" } - filename: abc - metadata: {} - fs.chunks: - - { _id: { $oid: "000000000000000000000002" }, files_id: { $oid: "000000000000000000000001" }, n: 0, data: { $binary: { base64: "EQ==", subType: "00" } } } - -tests: - - - description: "Download succeeds on first attempt" - operations: - - &retryable_operation - name: download - object: gridfsbucket - arguments: { id: { "$oid" : "000000000000000000000001" } } - expectations: - - &retryable_command_started_event - command_started_event: - command: - find: fs.files - filter: { _id: {$oid : "000000000000000000000001" }} - database_name: *database_name - - &find_chunks_command_started_event - command_started_event: - command: - find: fs.chunks - filter: { files_id: {$oid : "000000000000000000000001" }} - sort: { n: 1 } - database_name: *database_name - - - description: "Download succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [find] - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "Download fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "Download fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/gridfs-downloadByName-serverErrors.json b/testdata/retryable-reads/legacy/gridfs-downloadByName-serverErrors.json deleted file mode 100644 index a64230d38a..0000000000 --- a/testdata/retryable-reads/legacy/gridfs-downloadByName-serverErrors.json +++ /dev/null @@ -1,849 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "bucket_name": "fs", - "data": { - "fs.files": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "filename": "abc", - "metadata": {} - } - ], - "fs.chunks": [ - { - "_id": { - "$oid": "000000000000000000000002" - }, - "files_id": { - "$oid": "000000000000000000000001" - }, - "n": 0, - "data": { - "$binary": { - "base64": "EQ==", - "subType": "00" - } - } - } - ] - }, - "tests": [ - { - "description": "DownloadByName succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/gridfs-downloadByName-serverErrors.yml b/testdata/retryable-reads/legacy/gridfs-downloadByName-serverErrors.yml deleted file mode 100644 index 704492135e..0000000000 --- a/testdata/retryable-reads/legacy/gridfs-downloadByName-serverErrors.yml +++ /dev/null @@ -1,174 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -bucket_name: "fs" - -data: - fs.files: - - - _id: { $oid : "000000000000000000000001" } - length: 1 - chunkSize: 4 - uploadDate: { $date : "1970-01-01T00:00:00.000Z" } - filename: abc - metadata: {} - fs.chunks: - - { _id: { $oid: "000000000000000000000002" }, files_id: { $oid: "000000000000000000000001" }, n: 0, data: { $binary: { base64: "EQ==", subType: "00" } } } - -tests: - - - description: "DownloadByName succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [find], errorCode: 11600 } - operations: - - &retryable_operation - name: download_by_name - object: gridfsbucket - arguments: - filename: abc - expectations: - - &retryable_command_started_event - command_started_event: - command: - find: fs.files - filter: { filename : "abc" } - database_name: *database_name - - *retryable_command_started_event - - &find_chunks_command_started_event - command_started_event: - command: - find: fs.chunks - filter: { files_id: { $oid : "000000000000000000000001" }} - sort: { n: 1 } - database_name: *database_name - - - description: "DownloadByName succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "DownloadByName succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "DownloadByName succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "DownloadByName succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "DownloadByName succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "DownloadByName succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "DownloadByName succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "DownloadByName succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "DownloadByName succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "DownloadByName succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "DownloadByName fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [find], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "DownloadByName fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [find], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/gridfs-downloadByName.json b/testdata/retryable-reads/legacy/gridfs-downloadByName.json deleted file mode 100644 index 48f2168cfc..0000000000 --- a/testdata/retryable-reads/legacy/gridfs-downloadByName.json +++ /dev/null @@ -1,250 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "bucket_name": "fs", - "data": { - "fs.files": [ - { - "_id": { - "$oid": "000000000000000000000001" - }, - "length": 1, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "filename": "abc", - "metadata": {} - } - ], - "fs.chunks": [ - { - "_id": { - "$oid": "000000000000000000000002" - }, - "files_id": { - "$oid": "000000000000000000000001" - }, - "n": 0, - "data": { - "$binary": { - "base64": "EQ==", - "subType": "00" - } - } - } - ] - }, - "tests": [ - { - "description": "DownloadByName succeeds on first attempt", - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.chunks", - "filter": { - "files_id": { - "$oid": "000000000000000000000001" - } - }, - "sort": { - "n": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "DownloadByName fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "download_by_name", - "object": "gridfsbucket", - "arguments": { - "filename": "abc" - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "fs.files", - "filter": { - "filename": "abc" - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/gridfs-downloadByName.yml b/testdata/retryable-reads/legacy/gridfs-downloadByName.yml deleted file mode 100644 index e5586954f0..0000000000 --- a/testdata/retryable-reads/legacy/gridfs-downloadByName.yml +++ /dev/null @@ -1,79 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -bucket_name: "fs" - -data: - fs.files: - - - _id: { $oid : "000000000000000000000001" } - length: 1 - chunkSize: 4 - uploadDate: { $date : "1970-01-01T00:00:00.000Z" } - filename: abc - metadata: {} - fs.chunks: - - { _id: { $oid: "000000000000000000000002" }, files_id: { $oid: "000000000000000000000001" }, n: 0, data: { $binary: { base64: "EQ==", subType: "00" } } } - -tests: - - - description: "DownloadByName succeeds on first attempt" - operations: - - &retryable_operation - name: download_by_name - object: gridfsbucket - arguments: { filename: "abc" } - expectations: - - &retryable_command_started_event - command_started_event: - command: - find: fs.files - filter: { filename : "abc" } - database_name: *database_name - - &find_chunks_command_started_event - command_started_event: - command: - find: fs.chunks - filter: { files_id: {$oid : "000000000000000000000001"} } - sort: { n: 1 } - database_name: *database_name - - - description: "DownloadByName succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [find] - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - *find_chunks_command_started_event - - - description: "DownloadByName fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "DownloadByName fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/listCollectionNames-serverErrors.json b/testdata/retryable-reads/legacy/listCollectionNames-serverErrors.json deleted file mode 100644 index bbdce625ad..0000000000 --- a/testdata/retryable-reads/legacy/listCollectionNames-serverErrors.json +++ /dev/null @@ -1,502 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListCollectionNames succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listCollectionNames-serverErrors.yml b/testdata/retryable-reads/legacy/listCollectionNames-serverErrors.yml deleted file mode 100644 index b99bddf827..0000000000 --- a/testdata/retryable-reads/legacy/listCollectionNames-serverErrors.yml +++ /dev/null @@ -1,143 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListCollectionNames succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [listCollections], errorCode: 11600 } - operations: - - &retryable_operation - name: listCollectionNames - object: database - expectations: - - &retryable_command_started_event - command_started_event: - command: - listCollections: 1 - - *retryable_command_started_event - - - description: "ListCollectionNames succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionNames succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionNames succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionNames succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionNames succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionNames succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionNames succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionNames succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionNames succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionNames succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionNames fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [listCollections], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionNames fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/listCollectionNames.json b/testdata/retryable-reads/legacy/listCollectionNames.json deleted file mode 100644 index 73d96a3cf7..0000000000 --- a/testdata/retryable-reads/legacy/listCollectionNames.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListCollectionNames succeeds on first attempt", - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionNames fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listCollectionNames", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listCollectionNames.yml b/testdata/retryable-reads/legacy/listCollectionNames.yml deleted file mode 100644 index 434adfbdd1..0000000000 --- a/testdata/retryable-reads/legacy/listCollectionNames.yml +++ /dev/null @@ -1,59 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListCollectionNames succeeds on first attempt" - operations: - - &retryable_operation - name: listCollectionNames - object: database - expectations: - - &retryable_command_started_event - command_started_event: - command: - listCollections: 1 - - - description: "ListCollectionNames succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: - - listCollections - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionNames fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "ListCollectionNames fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/listCollectionObjects-serverErrors.json b/testdata/retryable-reads/legacy/listCollectionObjects-serverErrors.json deleted file mode 100644 index ab469dfe30..0000000000 --- a/testdata/retryable-reads/legacy/listCollectionObjects-serverErrors.json +++ /dev/null @@ -1,502 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListCollectionObjects succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listCollectionObjects-serverErrors.yml b/testdata/retryable-reads/legacy/listCollectionObjects-serverErrors.yml deleted file mode 100644 index 0fcc2f795d..0000000000 --- a/testdata/retryable-reads/legacy/listCollectionObjects-serverErrors.yml +++ /dev/null @@ -1,144 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListCollectionObjects succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [listCollections], errorCode: 11600 } - operations: - - &retryable_operation - name: listCollectionObjects - object: database - expectations: - - &retryable_command_started_event - command_started_event: - command: - listCollections: 1 - - *retryable_command_started_event - - - description: "ListCollectionObjects succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionObjects succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionObjects succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionObjects succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionObjects succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionObjects succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionObjects succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionObjects succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionObjects succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionObjects succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionObjects fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [listCollections], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionObjects fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/listCollectionObjects.json b/testdata/retryable-reads/legacy/listCollectionObjects.json deleted file mode 100644 index 1fb0f18437..0000000000 --- a/testdata/retryable-reads/legacy/listCollectionObjects.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListCollectionObjects succeeds on first attempt", - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollectionObjects fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listCollectionObjects", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listCollectionObjects.yml b/testdata/retryable-reads/legacy/listCollectionObjects.yml deleted file mode 100644 index 885c0489af..0000000000 --- a/testdata/retryable-reads/legacy/listCollectionObjects.yml +++ /dev/null @@ -1,59 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListCollectionObjects succeeds on first attempt" - operations: - - &retryable_operation - name: listCollectionObjects - object: database - expectations: - - &retryable_command_started_event - command_started_event: - command: - listCollections: 1 - - - description: "ListCollectionObjects succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: - - listCollections - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollectionObjects fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "ListCollectionObjects fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/listCollections-serverErrors.json b/testdata/retryable-reads/legacy/listCollections-serverErrors.json deleted file mode 100644 index def9ac4595..0000000000 --- a/testdata/retryable-reads/legacy/listCollections-serverErrors.json +++ /dev/null @@ -1,502 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListCollections succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listCollections-serverErrors.yml b/testdata/retryable-reads/legacy/listCollections-serverErrors.yml deleted file mode 100644 index 94a9495e52..0000000000 --- a/testdata/retryable-reads/legacy/listCollections-serverErrors.yml +++ /dev/null @@ -1,143 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListCollections succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [listCollections], errorCode: 11600 } - operations: - - &retryable_operation - name: listCollections - object: database - expectations: - - &retryable_command_started_event - command_started_event: - command: - listCollections: 1 - - *retryable_command_started_event - - - description: "ListCollections succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollections succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollections succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollections succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollections succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollections succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollections succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollections succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollections succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollections succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollections fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [listCollections], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollections fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listCollections], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/listCollections.json b/testdata/retryable-reads/legacy/listCollections.json deleted file mode 100644 index 2427883621..0000000000 --- a/testdata/retryable-reads/legacy/listCollections.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListCollections succeeds on first attempt", - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - }, - { - "description": "ListCollections fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listCollections" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listCollections", - "object": "database", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listCollections": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listCollections.yml b/testdata/retryable-reads/legacy/listCollections.yml deleted file mode 100644 index 378ff924f4..0000000000 --- a/testdata/retryable-reads/legacy/listCollections.yml +++ /dev/null @@ -1,59 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListCollections succeeds on first attempt" - operations: - - &retryable_operation - name: listCollections - object: database - expectations: - - &retryable_command_started_event - command_started_event: - command: - listCollections: 1 - - - description: "ListCollections succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: - - listCollections - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListCollections fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "ListCollections fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/listDatabaseNames-serverErrors.json b/testdata/retryable-reads/legacy/listDatabaseNames-serverErrors.json deleted file mode 100644 index 1dd8e4415a..0000000000 --- a/testdata/retryable-reads/legacy/listDatabaseNames-serverErrors.json +++ /dev/null @@ -1,502 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListDatabaseNames succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listDatabaseNames-serverErrors.yml b/testdata/retryable-reads/legacy/listDatabaseNames-serverErrors.yml deleted file mode 100644 index ca6b150944..0000000000 --- a/testdata/retryable-reads/legacy/listDatabaseNames-serverErrors.yml +++ /dev/null @@ -1,143 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListDatabaseNames succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [listDatabases], errorCode: 11600 } - operations: - - &retryable_operation - name: listDatabaseNames - object: client - expectations: - - &retryable_command_started_event - command_started_event: - command: - listDatabases: 1 - - *retryable_command_started_event - - - description: "ListDatabaseNames succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseNames succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseNames succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseNames succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseNames succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseNames succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseNames succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseNames succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseNames succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseNames succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseNames fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [listDatabases], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseNames fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/listDatabaseNames.json b/testdata/retryable-reads/legacy/listDatabaseNames.json deleted file mode 100644 index b431f57016..0000000000 --- a/testdata/retryable-reads/legacy/listDatabaseNames.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListDatabaseNames succeeds on first attempt", - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseNames fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listDatabaseNames", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listDatabaseNames.yml b/testdata/retryable-reads/legacy/listDatabaseNames.yml deleted file mode 100644 index 13e01a48ea..0000000000 --- a/testdata/retryable-reads/legacy/listDatabaseNames.yml +++ /dev/null @@ -1,59 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListDatabaseNames succeeds on first attempt" - operations: - - &retryable_operation - name: listDatabaseNames - object: client - expectations: - - &retryable_command_started_event - command_started_event: - command: - listDatabases: 1 - - - description: "ListDatabaseNames succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: - - listDatabases - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseNames fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "ListDatabaseNames fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/listDatabaseObjects-serverErrors.json b/testdata/retryable-reads/legacy/listDatabaseObjects-serverErrors.json deleted file mode 100644 index bc497bb088..0000000000 --- a/testdata/retryable-reads/legacy/listDatabaseObjects-serverErrors.json +++ /dev/null @@ -1,502 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListDatabaseObjects succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listDatabaseObjects-serverErrors.yml b/testdata/retryable-reads/legacy/listDatabaseObjects-serverErrors.yml deleted file mode 100644 index acd5de34d4..0000000000 --- a/testdata/retryable-reads/legacy/listDatabaseObjects-serverErrors.yml +++ /dev/null @@ -1,144 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListDatabaseObjects succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [listDatabases], errorCode: 11600 } - operations: - - &retryable_operation - name: listDatabaseObjects - object: client - expectations: - - &retryable_command_started_event - command_started_event: - command: - listDatabases: 1 - - *retryable_command_started_event - - - description: "ListDatabaseObjects succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseObjects succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseObjects succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseObjects succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseObjects succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseObjects succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseObjects succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseObjects succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseObjects succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseObjects succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseObjects fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [listDatabases], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseObjects fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/listDatabaseObjects.json b/testdata/retryable-reads/legacy/listDatabaseObjects.json deleted file mode 100644 index 267fe921ca..0000000000 --- a/testdata/retryable-reads/legacy/listDatabaseObjects.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListDatabaseObjects succeeds on first attempt", - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabaseObjects fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listDatabaseObjects", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listDatabaseObjects.yml b/testdata/retryable-reads/legacy/listDatabaseObjects.yml deleted file mode 100644 index e4a31cfe21..0000000000 --- a/testdata/retryable-reads/legacy/listDatabaseObjects.yml +++ /dev/null @@ -1,59 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListDatabaseObjects succeeds on first attempt" - operations: - - &retryable_operation - name: listDatabaseObjects - object: client - expectations: - - &retryable_command_started_event - command_started_event: - command: - listDatabases: 1 - - - description: "ListDatabaseObjects succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: - - listDatabases - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabaseObjects fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "ListDatabaseObjects fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/listDatabases-serverErrors.json b/testdata/retryable-reads/legacy/listDatabases-serverErrors.json deleted file mode 100644 index ed7bcbc398..0000000000 --- a/testdata/retryable-reads/legacy/listDatabases-serverErrors.json +++ /dev/null @@ -1,502 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListDatabases succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listDatabases-serverErrors.yml b/testdata/retryable-reads/legacy/listDatabases-serverErrors.yml deleted file mode 100644 index ac904701de..0000000000 --- a/testdata/retryable-reads/legacy/listDatabases-serverErrors.yml +++ /dev/null @@ -1,144 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListDatabases succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [listDatabases], errorCode: 11600 } - operations: - - &retryable_operation - name: listDatabases - object: client - expectations: - - &retryable_command_started_event - command_started_event: - command: - listDatabases: 1 - - *retryable_command_started_event - - - description: "ListDatabases succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabases succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabases succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabases succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabases succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabases succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabases succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabases succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabases succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabases succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabases fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [listDatabases], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabases fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listDatabases], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/listDatabases.json b/testdata/retryable-reads/legacy/listDatabases.json deleted file mode 100644 index 69ef9788f8..0000000000 --- a/testdata/retryable-reads/legacy/listDatabases.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListDatabases succeeds on first attempt", - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - }, - { - "description": "ListDatabases fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listDatabases", - "object": "client", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - }, - { - "command_started_event": { - "command": { - "listDatabases": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listDatabases.yml b/testdata/retryable-reads/legacy/listDatabases.yml deleted file mode 100644 index 3eaed913ad..0000000000 --- a/testdata/retryable-reads/legacy/listDatabases.yml +++ /dev/null @@ -1,59 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListDatabases succeeds on first attempt" - operations: - - &retryable_operation - name: listDatabases - object: client - expectations: - - &retryable_command_started_event - command_started_event: - command: - listDatabases: 1 - - - description: "ListDatabases succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: - - listDatabases - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListDatabases fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "ListDatabases fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/listIndexNames-serverErrors.json b/testdata/retryable-reads/legacy/listIndexNames-serverErrors.json deleted file mode 100644 index 2d3265ec85..0000000000 --- a/testdata/retryable-reads/legacy/listIndexNames-serverErrors.json +++ /dev/null @@ -1,527 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListIndexNames succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listIndexNames-serverErrors.yml b/testdata/retryable-reads/legacy/listIndexNames-serverErrors.yml deleted file mode 100644 index 6fb7e30cbf..0000000000 --- a/testdata/retryable-reads/legacy/listIndexNames-serverErrors.yml +++ /dev/null @@ -1,144 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListIndexNames succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [listIndexes], errorCode: 11600 } - operations: - - &retryable_operation - name: listIndexNames - object: collection - expectations: - - &retryable_command_started_event - command_started_event: - command: - listIndexes: *collection_name - database_name: *database_name - - *retryable_command_started_event - - - description: "ListIndexNames succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexNames succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexNames succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexNames succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexNames succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexNames succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexNames succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexNames succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexNames succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexNames succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexNames fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [listIndexes], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexNames fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event diff --git a/testdata/retryable-reads/legacy/listIndexNames.json b/testdata/retryable-reads/legacy/listIndexNames.json deleted file mode 100644 index fbdb420f8a..0000000000 --- a/testdata/retryable-reads/legacy/listIndexNames.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListIndexNames succeeds on first attempt", - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexNames fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listIndexNames", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listIndexNames.yml b/testdata/retryable-reads/legacy/listIndexNames.yml deleted file mode 100644 index 3a73b51e15..0000000000 --- a/testdata/retryable-reads/legacy/listIndexNames.yml +++ /dev/null @@ -1,60 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListIndexNames succeeds on first attempt" - operations: - - &retryable_operation - name: listIndexNames - object: collection - expectations: - - &retryable_command_started_event - command_started_event: - command: - listIndexes: *collection_name - database_name: *database_name - - - description: "ListIndexNames succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: - - listIndexes - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexNames fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "ListIndexNames fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/listIndexes-serverErrors.json b/testdata/retryable-reads/legacy/listIndexes-serverErrors.json deleted file mode 100644 index 25c5b0e448..0000000000 --- a/testdata/retryable-reads/legacy/listIndexes-serverErrors.json +++ /dev/null @@ -1,527 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListIndexes succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 11600 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 11602 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 13435 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 13436 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 189 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 91 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 7 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 6 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 89 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 9001 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes fails after two NotWritablePrimary errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes fails after NotWritablePrimary when retryReads is false", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listIndexes-serverErrors.yml b/testdata/retryable-reads/legacy/listIndexes-serverErrors.yml deleted file mode 100644 index 23f2768e9a..0000000000 --- a/testdata/retryable-reads/legacy/listIndexes-serverErrors.yml +++ /dev/null @@ -1,145 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListIndexes succeeds after InterruptedAtShutdown" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: { failCommands: [listIndexes], errorCode: 11600 } - operations: - - &retryable_operation - name: listIndexes - object: collection - expectations: - - &retryable_command_started_event - command_started_event: - command: - listIndexes: *collection_name - database_name: *database_name - - *retryable_command_started_event - - - description: "ListIndexes succeeds after InterruptedDueToReplStateChange" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 11602 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexes succeeds after NotWritablePrimary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 10107 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexes succeeds after NotPrimaryNoSecondaryOk" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 13435 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexes succeeds after NotPrimaryOrSecondary" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 13436 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexes succeeds after PrimarySteppedDown" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 189 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexes succeeds after ShutdownInProgress" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 91 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexes succeeds after HostNotFound" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 7 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexes succeeds after HostUnreachable" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 6 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexes succeeds after NetworkTimeout" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 89 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexes succeeds after SocketException" - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 9001 } - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexes fails after two NotWritablePrimary errors" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - data: { failCommands: [listIndexes], errorCode: 10107 } - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexes fails after NotWritablePrimary when retryReads is false" - clientOptions: - retryReads: false - failPoint: - <<: *failCommand_failPoint - data: { failCommands: [listIndexes], errorCode: 10107 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/listIndexes.json b/testdata/retryable-reads/legacy/listIndexes.json deleted file mode 100644 index 5cb620ae45..0000000000 --- a/testdata/retryable-reads/legacy/listIndexes.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [], - "tests": [ - { - "description": "ListIndexes succeeds on first attempt", - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes succeeds on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes fails on first attempt", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "ListIndexes fails on second attempt", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "listIndexes" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "listIndexes", - "object": "collection", - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - }, - { - "command_started_event": { - "command": { - "listIndexes": "coll" - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/listIndexes.yml b/testdata/retryable-reads/legacy/listIndexes.yml deleted file mode 100644 index 84ba7242a3..0000000000 --- a/testdata/retryable-reads/legacy/listIndexes.yml +++ /dev/null @@ -1,60 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: [] - -tests: - - - description: "ListIndexes succeeds on first attempt" - operations: - - &retryable_operation - name: listIndexes - object: collection - expectations: - - &retryable_command_started_event - command_started_event: - command: - listIndexes: *collection_name - database_name: *database_name - - - description: "ListIndexes succeeds on second attempt" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: - - listIndexes - closeConnection: true - operations: [*retryable_operation] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - - - description: "ListIndexes fails on first attempt" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: - - &retryable_operation_fails - <<: *retryable_operation - error: true - expectations: - - *retryable_command_started_event - - - description: "ListIndexes fails on second attempt" - failPoint: - <<: *failCommand_failPoint - mode: { times: 2 } - operations: [*retryable_operation_fails] - expectations: - - *retryable_command_started_event - - *retryable_command_started_event - diff --git a/testdata/retryable-reads/legacy/mapReduce.json b/testdata/retryable-reads/legacy/mapReduce.json deleted file mode 100644 index e76aa76cbb..0000000000 --- a/testdata/retryable-reads/legacy/mapReduce.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "database_name": "retryable-reads-tests", - "collection_name": "coll", - "data": [ - { - "_id": 1, - "x": 0 - }, - { - "_id": 2, - "x": 1 - }, - { - "_id": 3, - "x": 2 - } - ], - "tests": [ - { - "description": "MapReduce succeeds with retry on", - "operations": [ - { - "name": "mapReduce", - "object": "collection", - "arguments": { - "map": { - "$code": "function inc() { return emit(0, this.x + 1) }" - }, - "reduce": { - "$code": "function sum(key, values) { return values.reduce((acc, x) => acc + x); }" - }, - "out": { - "inline": 1 - } - }, - "result": [ - { - "_id": 0, - "value": 6 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "mapReduce": "coll", - "map": { - "$code": "function inc() { return emit(0, this.x + 1) }" - }, - "reduce": { - "$code": "function sum(key, values) { return values.reduce((acc, x) => acc + x); }" - }, - "out": { - "inline": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "MapReduce fails with retry on", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "mapReduce" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "mapReduce", - "object": "collection", - "arguments": { - "map": { - "$code": "function inc() { return emit(0, this.x + 1) }" - }, - "reduce": { - "$code": "function sum(key, values) { return values.reduce((acc, x) => acc + x); }" - }, - "out": { - "inline": 1 - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "mapReduce": "coll", - "map": { - "$code": "function inc() { return emit(0, this.x + 1) }" - }, - "reduce": { - "$code": "function sum(key, values) { return values.reduce((acc, x) => acc + x); }" - }, - "out": { - "inline": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - }, - { - "description": "MapReduce fails with retry off", - "clientOptions": { - "retryReads": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "mapReduce" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "mapReduce", - "object": "collection", - "arguments": { - "map": { - "$code": "function inc() { return emit(0, this.x + 1) }" - }, - "reduce": { - "$code": "function sum(key, values) { return values.reduce((acc, x) => acc + x); }" - }, - "out": { - "inline": 1 - } - }, - "error": true - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "mapReduce": "coll", - "map": { - "$code": "function inc() { return emit(0, this.x + 1) }" - }, - "reduce": { - "$code": "function sum(key, values) { return values.reduce((acc, x) => acc + x); }" - }, - "out": { - "inline": 1 - } - }, - "database_name": "retryable-reads-tests" - } - } - ] - } - ] -} diff --git a/testdata/retryable-reads/legacy/mapReduce.yml b/testdata/retryable-reads/legacy/mapReduce.yml deleted file mode 100644 index 968d3d5037..0000000000 --- a/testdata/retryable-reads/legacy/mapReduce.yml +++ /dev/null @@ -1,60 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["single", "replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -database_name: &database_name "retryable-reads-tests" -collection_name: &collection_name "coll" - -data: - - {_id: 1, x: 0} - - {_id: 2, x: 1} - - {_id: 3, x: 2} - -tests: - - - description: "MapReduce succeeds with retry on" - operations: - - &operation_succeeds - <<: &operation - name: mapReduce - object: collection - arguments: - map: { $code: "function inc() { return emit(0, this.x + 1) }" } - reduce: { $code: "function sum(key, values) { return values.reduce((acc, x) => acc + x); }" } - out: { inline: 1 } - result: [ { "_id" : 0, "value" : 6 } ] - expectations: - - &command_started_event - command_started_event: - command: - mapReduce: *collection_name - map: { $code: "function inc() { return emit(0, this.x + 1) }" } - reduce: { $code: "function sum(key, values) { return values.reduce((acc, x) => acc + x); }" } - out: { inline: 1 } - database_name: *database_name - - - description: "MapReduce fails with retry on" - failPoint: &failCommand_failPoint - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [mapReduce] - closeConnection: true - operations: - - &operation_fails - <<: *operation - error: true - expectations: - - *command_started_event - - - description: "MapReduce fails with retry off" - clientOptions: - retryReads: false - failPoint: *failCommand_failPoint - operations: [*operation_fails] - expectations: - - *command_started_event diff --git a/testdata/retryable-reads/unified/readConcernMajorityNotAvailableYet.json b/testdata/retryable-reads/unified/readConcernMajorityNotAvailableYet.json deleted file mode 100644 index 8aa6a6b5e5..0000000000 --- a/testdata/retryable-reads/unified/readConcernMajorityNotAvailableYet.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "ReadConcernMajorityNotAvailableYet is a retryable read", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topologies": [ - "sharded", - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "retryable-reads-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "readconcernmajoritynotavailableyet_test" - } - } - ], - "initialData": [ - { - "collectionName": "readconcernmajoritynotavailableyet_test", - "databaseName": "retryable-reads-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "Find succeeds on second attempt after ReadConcernMajorityNotAvailableYet", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 134 - } - } - } - }, - { - "name": "find", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "object": "collection0", - "expectResult": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "readconcernmajoritynotavailableyet_test", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "commandName": "find", - "databaseName": "retryable-reads-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "readconcernmajoritynotavailableyet_test", - "filter": { - "_id": { - "$gt": 1 - } - } - }, - "commandName": "find", - "databaseName": "retryable-reads-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/retryable-reads/unified/readConcernMajorityNotAvailableYet.yml b/testdata/retryable-reads/unified/readConcernMajorityNotAvailableYet.yml deleted file mode 100644 index 707a62acd7..0000000000 --- a/testdata/retryable-reads/unified/readConcernMajorityNotAvailableYet.yml +++ /dev/null @@ -1,68 +0,0 @@ -description: "ReadConcernMajorityNotAvailableYet is a retryable read" - -schemaVersion: "1.3" - -runOnRequirements: - - minServerVersion: "4.0" - topologies: [single, replicaset] - - minServerVersion: "4.1.7" - topologies: [sharded, load-balanced] - -createEntities: - - client: - id: &client0 client0 - # Ensure the `configureFailpoint` and `find` commands are run on the same mongos - useMultipleMongoses: false - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name "retryable-reads-tests" - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name "readconcernmajoritynotavailableyet_test" - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -tests: - - description: "Find succeeds on second attempt after ReadConcernMajorityNotAvailableYet" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ "find" ] - errorCode: 134 # ReadConcernMajorityNotAvailableYet - - name: find - arguments: - filter: { _id: { $gt: 1 } } - object: *collection0 - expectResult: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: { _id: { $gt: 1 } } - commandName: find - databaseName: *database0Name - - commandStartedEvent: - command: - find: *collection0Name - filter: { _id: { $gt: 1 } } - commandName: find - databaseName: *database0Name diff --git a/testdata/retryable-writes/legacy/bulkWrite-errorLabels.json b/testdata/retryable-writes/legacy/bulkWrite-errorLabels.json deleted file mode 100644 index 66c3ecb336..0000000000 --- a/testdata/retryable-writes/legacy/bulkWrite-errorLabels.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.1", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "BulkWrite succeeds with RetryableWriteError from server", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 112, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 1, - "insertedCount": 1, - "insertedIds": { - "1": 3 - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "BulkWrite fails if server does not return RetryableWriteError", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 11600, - "errorLabels": [] - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/bulkWrite-errorLabels.yml b/testdata/retryable-writes/legacy/bulkWrite-errorLabels.yml deleted file mode 100644 index fb9d7e47e0..0000000000 --- a/testdata/retryable-writes/legacy/bulkWrite-errorLabels.yml +++ /dev/null @@ -1,77 +0,0 @@ -runOn: - - minServerVersion: "4.3.1" - topology: ["replicaset", "sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - description: "BulkWrite succeeds with RetryableWriteError from server" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - errorCode: 112 # WriteConflict, not a retryable error code - errorLabels: ["RetryableWriteError"] # Override server behavior: send RetryableWriteError label with non-retryable error code - operation: - name: "bulkWrite" - arguments: - requests: - - name: "deleteOne" - arguments: - filter: { _id: 1 } - - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - options: { ordered: true } - outcome: # Driver retries operation and it succeeds - result: - deletedCount: 1 - insertedCount: 1 - insertedIds: { 1: 3 } - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - upsertedIds: {} - collection: - data: - - { _id: 2, x: 23 } - - { _id: 3, x: 33 } - - - description: "BulkWrite fails if server does not return RetryableWriteError" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - errorCode: 11600 # InterruptedAtShutdown, normally a retryable error code - errorLabels: [] # Override server behavior: do not send RetryableWriteError label with retryable code - operation: - name: "bulkWrite" - arguments: - requests: - - name: "deleteOne" - arguments: - filter: { _id: 1 } - - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - options: { ordered: true } - outcome: - error: true # Driver does not retry operation because there was no RetryableWriteError label on response - result: - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } diff --git a/testdata/retryable-writes/legacy/bulkWrite-serverErrors.json b/testdata/retryable-writes/legacy/bulkWrite-serverErrors.json deleted file mode 100644 index 9d792ceafb..0000000000 --- a/testdata/retryable-writes/legacy/bulkWrite-serverErrors.json +++ /dev/null @@ -1,273 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "BulkWrite succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 1, - "insertedCount": 1, - "insertedIds": { - "1": 3 - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "BulkWrite succeeds after WriteConcernError ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 1, - "insertedCount": 1, - "insertedIds": { - "1": 3 - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "BulkWrite fails with a RetryableWriteError label after two connection failures", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "closeConnection": true - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/bulkWrite-serverErrors.yml b/testdata/retryable-writes/legacy/bulkWrite-serverErrors.yml deleted file mode 100644 index 0235a8a1ce..0000000000 --- a/testdata/retryable-writes/legacy/bulkWrite-serverErrors.yml +++ /dev/null @@ -1,130 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "BulkWrite succeeds after PrimarySteppedDown" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - errorCode: 189 - errorLabels: ["RetryableWriteError"] - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "deleteOne" - arguments: - filter: { _id: 1 } - - - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x : 1 }} - options: { ordered: true } - outcome: - result: - deletedCount: 1 - insertedCount: 1 - insertedIds: { 1: 3 } - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 2, x: 23 } - - { _id: 3, x: 33 } - - - description: "BulkWrite succeeds after WriteConcernError ShutdownInProgress" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "deleteOne" - arguments: - filter: { _id: 1 } - - - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x : 1 }} - options: { ordered: true } - outcome: - result: - deletedCount: 1 - insertedCount: 1 - insertedIds: { 1: 3 } - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 2, x: 23 } - - { _id: 3, x: 33 } - - - - description: "BulkWrite fails with a RetryableWriteError label after two connection failures" - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["update"] - closeConnection: true - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "deleteOne" - arguments: - filter: { _id: 1 } - - - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x : 1 }} - options: { ordered: true } - outcome: - error: true - result: - errorLabelsContain: ["RetryableWriteError"] - collection: - data: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } diff --git a/testdata/retryable-writes/legacy/bulkWrite.json b/testdata/retryable-writes/legacy/bulkWrite.json deleted file mode 100644 index 72a8d01893..0000000000 --- a/testdata/retryable-writes/legacy/bulkWrite.json +++ /dev/null @@ -1,806 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "3.6", - "topology": [ - "replicaset" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - } - ], - "tests": [ - { - "description": "First command is retried", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 1, - "insertedCount": 1, - "insertedIds": { - "0": 2 - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 23 - } - ] - } - } - }, - { - "description": "All commands are retried", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 7 - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 4, - "x": 44 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "upsert": true - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 5, - "x": 55 - } - } - }, - { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 3 - }, - "replacement": { - "_id": 3, - "x": 333 - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 1, - "insertedCount": 3, - "insertedIds": { - "0": 2, - "2": 3, - "4": 5 - }, - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 1, - "upsertedIds": { - "3": 4 - } - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 23 - }, - { - "_id": 3, - "x": 333 - }, - { - "_id": 4, - "x": 45 - }, - { - "_id": 5, - "x": 55 - } - ] - } - } - }, - { - "description": "Both commands are retried after their first statement fails", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 2 - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 0, - "insertedCount": 1, - "insertedIds": { - "0": 2 - }, - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 23 - } - ] - } - } - }, - { - "description": "Second command is retried after its second statement fails", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "skip": 2 - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 0, - "insertedCount": 1, - "insertedIds": { - "0": 2 - }, - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 23 - } - ] - } - } - }, - { - "description": "BulkWrite with unordered execution", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - } - ], - "options": { - "ordered": false - } - } - }, - "outcome": { - "result": { - "deletedCount": 0, - "insertedCount": 2, - "insertedIds": { - "0": 2, - "1": 3 - }, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "First insertOne is never committed", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 2 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "error": true, - "result": { - "deletedCount": 0, - "insertedCount": 0, - "insertedIds": {}, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - } - ] - } - } - }, - { - "description": "Second updateOne is never committed", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "skip": 1 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "error": true, - "result": { - "deletedCount": 0, - "insertedCount": 1, - "insertedIds": { - "0": 2 - }, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "Third updateOne is never committed", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "skip": 2 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "error": true, - "result": { - "deletedCount": 0, - "insertedCount": 1, - "insertedIds": { - "1": 2 - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "Single-document write following deleteMany is retried", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "deleteMany", - "arguments": { - "filter": { - "x": 11 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 1, - "insertedCount": 1, - "insertedIds": { - "1": 2 - }, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "Single-document write following updateMany is retried", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "name": "updateMany", - "arguments": { - "filter": { - "x": 11 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 2, - "x": 22 - } - } - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "deletedCount": 0, - "insertedCount": 1, - "insertedIds": { - "1": 2 - }, - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0, - "upsertedIds": {} - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/bulkWrite.yml b/testdata/retryable-writes/legacy/bulkWrite.yml deleted file mode 100644 index 939dacf772..0000000000 --- a/testdata/retryable-writes/legacy/bulkWrite.yml +++ /dev/null @@ -1,396 +0,0 @@ -runOn: - - - minServerVersion: "3.6" - topology: ["replicaset"] - -data: - - { _id: 1, x: 11 } - -tests: - - - description: "First command is retried" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "insertOne" - arguments: - document: { _id: 2, x: 22 } - - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x : 1 }} - - - name: "deleteOne" - arguments: - filter: { _id: 1 } - options: { ordered: true } - outcome: - result: - deletedCount: 1 - insertedCount: 1 - insertedIds: { 0: 2 } - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 2, x: 23 } - - - # Write operations in this ordered batch are intentionally sequenced so - # that each write command consists of a single statement, which will - # fail on the first attempt and succeed on the second, retry attempt. - description: "All commands are retried" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 7 } - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "insertOne" - arguments: - document: { _id: 2, x: 22 } - - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x : 1 }} - - - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - - - name: "updateOne" - arguments: - filter: { _id: 4, x: 44 } - update: { $inc: { x : 1 }} - upsert: true - - - name: "insertOne" - arguments: - document: { _id: 5, x: 55 } - - - name: "replaceOne" - arguments: - filter: { _id: 3 } - replacement: { _id: 3, x: 333 } - - - name: "deleteOne" - arguments: - filter: { _id: 1 } - options: { ordered: true } - outcome: - result: - deletedCount: 1 - insertedCount: 3 - insertedIds: { 0: 2, 2: 3, 4: 5 } - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 1 - upsertedIds: { 3: 4 } - collection: - data: - - { _id: 2, x: 23 } - - { _id: 3, x: 333 } - - { _id: 4, x: 45 } - - { _id: 5, x: 55 } - - - description: "Both commands are retried after their first statement fails" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 2 } - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "insertOne" - arguments: - document: { _id: 2, x: 22 } - - - name: "updateOne" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x : 1 }} - options: { ordered: true } - outcome: - result: - deletedCount: 0 - insertedCount: 1 - insertedIds: { 0: 2 } - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 23 } - - - description: "Second command is retried after its second statement fails" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { skip: 2 } - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "insertOne" - arguments: - document: { _id: 2, x: 22 } - - - name: "updateOne" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x : 1 }} - options: { ordered: true } - outcome: - result: - deletedCount: 0 - insertedCount: 1 - insertedIds: { 0: 2 } - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 23 } - - - description: "BulkWrite with unordered execution" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "insertOne" - arguments: - document: { _id: 2, x: 22 } - - - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - options: { ordered: false } - outcome: - result: - deletedCount: 0 - insertedCount: 2 - insertedIds: { 0: 2, 1: 3 } - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "First insertOne is never committed" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 2 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "insertOne" - arguments: - document: { _id: 2, x: 22 } - - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x : 1 }} - - - name: "deleteOne" - arguments: - filter: { _id: 1 } - options: { ordered: true } - outcome: - error: true - result: - deletedCount: 0 - insertedCount: 0 - insertedIds: { } - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 1, x: 11 } - - - description: "Second updateOne is never committed" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { skip: 1 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "insertOne" - arguments: - document: { _id: 2, x: 22 } - - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x : 1 }} - - - name: "deleteOne" - arguments: - filter: { _id: 1 } - options: { ordered: true } - outcome: - error: true - result: - deletedCount: 0 - insertedCount: 1 - insertedIds: { 0: 2 } - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - - description: "Third updateOne is never committed" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { skip: 2 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "updateOne" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - - - name: "insertOne" - arguments: - document: { _id: 2, x: 22 } - - - name: "updateOne" - arguments: - filter: { _id: 2 } - update: { $inc: { x : 1 }} - options: { ordered: true } - outcome: - error: true - result: - deletedCount: 0 - insertedCount: 1 - insertedIds: { 1: 2 } - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - # The onPrimaryTransactionalWrite fail point only triggers for write - # operations that include a transaction ID. Therefore, it will not - # affect the initial deleteMany and will trigger once (and only once) - # for the first insertOne attempt. - description: "Single-document write following deleteMany is retried" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "deleteMany" - arguments: - filter: { x: 11 } - - - name: "insertOne" - arguments: - document: { _id: 2, x: 22 } - options: { ordered: true } - outcome: - result: - deletedCount: 1 - insertedCount: 1 - insertedIds: { 1: 2 } - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 2, x: 22 } - - - # The onPrimaryTransactionalWrite fail point only triggers for write - # operations that include a transaction ID. Therefore, it will not - # affect the initial updateMany and will trigger once (and only once) - # for the first insertOne attempt. - description: "Single-document write following updateMany is retried" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "bulkWrite" - arguments: - requests: - - - name: "updateMany" - arguments: - filter: { x: 11 } - update: { $inc: { x : 1 }} - - - name: "insertOne" - arguments: - document: { _id: 2, x: 22 } - options: { ordered: true } - outcome: - result: - deletedCount: 0 - insertedCount: 1 - insertedIds: { 1: 2 } - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - upsertedIds: { } - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/deleteMany.json b/testdata/retryable-writes/legacy/deleteMany.json deleted file mode 100644 index faa21c44f1..0000000000 --- a/testdata/retryable-writes/legacy/deleteMany.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "3.6", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "DeleteMany ignores retryWrites", - "useMultipleMongoses": true, - "operation": { - "name": "deleteMany", - "arguments": { - "filter": {} - } - }, - "outcome": { - "result": { - "deletedCount": 2 - }, - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/deleteMany.yml b/testdata/retryable-writes/legacy/deleteMany.yml deleted file mode 100644 index 4743953fff..0000000000 --- a/testdata/retryable-writes/legacy/deleteMany.yml +++ /dev/null @@ -1,22 +0,0 @@ -runOn: - - - minServerVersion: "3.6" - topology: ["replicaset", "sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "DeleteMany ignores retryWrites" - useMultipleMongoses: true - operation: - name: "deleteMany" - arguments: - filter: { } - outcome: - result: - deletedCount: 2 - collection: - data: [] diff --git a/testdata/retryable-writes/legacy/deleteOne-errorLabels.json b/testdata/retryable-writes/legacy/deleteOne-errorLabels.json deleted file mode 100644 index c14692fd1a..0000000000 --- a/testdata/retryable-writes/legacy/deleteOne-errorLabels.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.1", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "DeleteOne succeeds with RetryableWriteError from server", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "errorCode": 112, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - "outcome": { - "result": { - "deletedCount": 1 - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "DeleteOne fails if server does not return RetryableWriteError", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "errorCode": 11600, - "errorLabels": [] - } - }, - "operation": { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/deleteOne-errorLabels.yml b/testdata/retryable-writes/legacy/deleteOne-errorLabels.yml deleted file mode 100644 index 9ee5c7426e..0000000000 --- a/testdata/retryable-writes/legacy/deleteOne-errorLabels.yml +++ /dev/null @@ -1,48 +0,0 @@ -runOn: - - minServerVersion: "4.3.1" - topology: ["replicaset", "sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - description: "DeleteOne succeeds with RetryableWriteError from server" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - errorCode: 112 # WriteConflict, not a retryable error code - errorLabels: ["RetryableWriteError"] # Override server behavior: send RetryableWriteError label with non-retryable error code - operation: - name: "deleteOne" - arguments: - filter: { _id: 1 } - outcome: # Driver retries operation and it succeeds - result: - deletedCount: 1 - collection: - data: - - { _id: 2, x: 22 } - - - description: "DeleteOne fails if server does not return RetryableWriteError" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - errorCode: 11600 # InterruptedAtShutdown, normally a retryable error code - errorLabels: [] # Override server behavior: do not send RetryableWriteError label with retryable code - operation: - name: "deleteOne" - arguments: - filter: { _id: 1 } - outcome: - error: true # Driver does not retry operation because there was no RetryableWriteError label on response - result: - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/deleteOne-serverErrors.json b/testdata/retryable-writes/legacy/deleteOne-serverErrors.json deleted file mode 100644 index 4eab2fa296..0000000000 --- a/testdata/retryable-writes/legacy/deleteOne-serverErrors.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "DeleteOne succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - "outcome": { - "result": { - "deletedCount": 1 - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "DeleteOne succeeds after WriteConcernError ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - "outcome": { - "result": { - "deletedCount": 1 - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "DeleteOne fails with RetryableWriteError label after two connection failures", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "delete" - ], - "closeConnection": true - } - }, - "operation": { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/deleteOne-serverErrors.yml b/testdata/retryable-writes/legacy/deleteOne-serverErrors.yml deleted file mode 100644 index 73cab927e7..0000000000 --- a/testdata/retryable-writes/legacy/deleteOne-serverErrors.yml +++ /dev/null @@ -1,73 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "DeleteOne succeeds after PrimarySteppedDown" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - errorCode: 189 - errorLabels: ["RetryableWriteError"] - operation: - name: "deleteOne" - arguments: - filter: { _id: 1 } - outcome: - result: - deletedCount: 1 - collection: - data: - - { _id: 2, x: 22 } - - - description: "DeleteOne succeeds after WriteConcernError ShutdownInProgress" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["delete"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "deleteOne" - arguments: - filter: { _id: 1 } - outcome: - result: - deletedCount: 1 - collection: - data: - - { _id: 2, x: 22 } - - - description: "DeleteOne fails with RetryableWriteError label after two connection failures" - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["delete"] - closeConnection: true - operation: - name: "deleteOne" - arguments: - filter: { _id: 1 } - outcome: - error: true - result: - errorLabelsContain: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/deleteOne.json b/testdata/retryable-writes/legacy/deleteOne.json deleted file mode 100644 index 592937aced..0000000000 --- a/testdata/retryable-writes/legacy/deleteOne.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "3.6", - "topology": [ - "replicaset" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "DeleteOne is committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - }, - "operation": { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - "outcome": { - "result": { - "deletedCount": 1 - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "DeleteOne is not committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - "outcome": { - "result": { - "deletedCount": 1 - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "DeleteOne is never committed", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 2 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 1 - } - } - }, - "outcome": { - "error": true, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/deleteOne.yml b/testdata/retryable-writes/legacy/deleteOne.yml deleted file mode 100644 index b15c991cda..0000000000 --- a/testdata/retryable-writes/legacy/deleteOne.yml +++ /dev/null @@ -1,57 +0,0 @@ -runOn: - - - minServerVersion: "3.6" - topology: ["replicaset"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "DeleteOne is committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - operation: - name: "deleteOne" - arguments: - filter: { _id: 1 } - outcome: - result: - deletedCount: 1 - collection: - data: - - { _id: 2, x: 22 } - - - description: "DeleteOne is not committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "deleteOne" - arguments: - filter: { _id: 1 } - outcome: - result: - deletedCount: 1 - collection: - data: - - { _id: 2, x: 22 } - - - description: "DeleteOne is never committed" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 2 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "deleteOne" - arguments: - filter: { _id: 1 } - outcome: - error: true - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/findOneAndDelete-errorLabels.json b/testdata/retryable-writes/legacy/findOneAndDelete-errorLabels.json deleted file mode 100644 index 60e6e0a7bc..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndDelete-errorLabels.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.1", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "FindOneAndDelete succeeds with RetryableWriteError from server", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 112, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "x": { - "$gte": 11 - } - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndDelete fails if server does not return RetryableWriteError", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 11600, - "errorLabels": [] - } - }, - "operation": { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "x": { - "$gte": 11 - } - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/findOneAndDelete-errorLabels.yml b/testdata/retryable-writes/legacy/findOneAndDelete-errorLabels.yml deleted file mode 100644 index 5192c5adfe..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndDelete-errorLabels.yml +++ /dev/null @@ -1,49 +0,0 @@ -runOn: - - minServerVersion: "4.3.1" - topology: ["replicaset", "sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - description: "FindOneAndDelete succeeds with RetryableWriteError from server" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - errorCode: 112 # WriteConflict, not a retryable error code - errorLabels: ["RetryableWriteError"] # Override server behavior: send RetryableWriteError label with non-retryable error code - operation: - name: "findOneAndDelete" - arguments: - filter: { x: { $gte: 11 } } - sort: { x: 1 } - outcome: # Driver retries operation and it succeeds - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 2, x: 22 } - - - description: "FindOneAndDelete fails if server does not return RetryableWriteError" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - errorCode: 11600 # InterruptedAtShutdown, normally a retryable error code - errorLabels: [] # Override server behavior: do not send RetryableWriteError label with retryable code - operation: - name: "findOneAndDelete" - arguments: - filter: { x: { $gte: 11 } } - sort: { x: 1 } - outcome: - error: true # Driver does not retry operation because there was no RetryableWriteError label on response - result: - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/findOneAndDelete-serverErrors.json b/testdata/retryable-writes/legacy/findOneAndDelete-serverErrors.json deleted file mode 100644 index 4c10861614..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndDelete-serverErrors.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "FindOneAndDelete succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "x": { - "$gte": 11 - } - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndDelete succeeds after WriteConcernError ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "x": { - "$gte": 11 - } - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndDelete fails with a RetryableWriteError label after two connection failures", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "closeConnection": true - } - }, - "operation": { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "x": { - "$gte": 11 - } - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/findOneAndDelete-serverErrors.yml b/testdata/retryable-writes/legacy/findOneAndDelete-serverErrors.yml deleted file mode 100644 index 5926026f08..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndDelete-serverErrors.yml +++ /dev/null @@ -1,74 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "FindOneAndDelete succeeds after PrimarySteppedDown" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - errorCode: 189 - errorLabels: ["RetryableWriteError"] - operation: - name: "findOneAndDelete" - arguments: - filter: { x: { $gte: 11 }} - sort: { x: 1 } - outcome: - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 2, x: 22 } - - - description: "FindOneAndDelete succeeds after WriteConcernError ShutdownInProgress" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "findOneAndDelete" - arguments: - filter: { x: { $gte: 11 }} - sort: { x: 1 } - outcome: - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 2, x: 22 } - - - description: "FindOneAndDelete fails with a RetryableWriteError label after two connection failures" - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - closeConnection: true - operation: - name: "findOneAndDelete" - arguments: - filter: { x: { $gte: 11 } } - sort: { x: 1 } - outcome: - error: true - result: - errorLabelsContain: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/findOneAndDelete.json b/testdata/retryable-writes/legacy/findOneAndDelete.json deleted file mode 100644 index 0cbe18108b..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndDelete.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "3.6", - "topology": [ - "replicaset" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "FindOneAndDelete is committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - }, - "operation": { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "x": { - "$gte": 11 - } - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndDelete is not committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "x": { - "$gte": 11 - } - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndDelete is never committed", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 2 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "findOneAndDelete", - "arguments": { - "filter": { - "x": { - "$gte": 11 - } - }, - "sort": { - "x": 1 - } - } - }, - "outcome": { - "error": true, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/findOneAndDelete.yml b/testdata/retryable-writes/legacy/findOneAndDelete.yml deleted file mode 100644 index 1456ad7162..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndDelete.yml +++ /dev/null @@ -1,58 +0,0 @@ -runOn: - - - minServerVersion: "3.6" - topology: ["replicaset"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "FindOneAndDelete is committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - operation: - name: "findOneAndDelete" - arguments: - filter: { x: { $gte: 11 }} - sort: { x: 1 } - outcome: - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 2, x: 22 } - - - description: "FindOneAndDelete is not committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "findOneAndDelete" - arguments: - filter: { x: { $gte: 11 }} - sort: { x: 1 } - outcome: - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 2, x: 22 } - - - description: "FindOneAndDelete is never committed" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 2 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "findOneAndDelete" - arguments: - filter: { x: { $gte: 11 }} - sort: { x: 1 } - outcome: - error: true - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/findOneAndReplace-errorLabels.json b/testdata/retryable-writes/legacy/findOneAndReplace-errorLabels.json deleted file mode 100644 index afa2f47af4..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndReplace-errorLabels.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.1", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "FindOneAndReplace succeeds with RetryableWriteError from server", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 112, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - }, - "returnDocument": "Before" - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 111 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndReplace fails if server does not return RetryableWriteError", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 11600, - "errorLabels": [] - } - }, - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - }, - "returnDocument": "Before" - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/findOneAndReplace-errorLabels.yml b/testdata/retryable-writes/legacy/findOneAndReplace-errorLabels.yml deleted file mode 100644 index 184366163f..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndReplace-errorLabels.yml +++ /dev/null @@ -1,52 +0,0 @@ -runOn: - - minServerVersion: "4.3.1" - topology: ["replicaset", "sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - description: "FindOneAndReplace succeeds with RetryableWriteError from server" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - errorCode: 112 # WriteConflict, not a retryable error code - errorLabels: ["RetryableWriteError"] # Override server behavior: send RetryableWriteError label with non-retryable error code - operation: - name: "findOneAndReplace" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - returnDocument: "Before" - outcome: # Driver retries operation and it succeeds - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 1, x: 111 } - - { _id: 2, x: 22 } - - - description: "FindOneAndReplace fails if server does not return RetryableWriteError" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - errorCode: 11600 # InterruptedAtShutdown, normally a retryable error code - errorLabels: [] # Override server behavior: do not send RetryableWriteError label with retryable code - operation: - name: "findOneAndReplace" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - returnDocument: "Before" - outcome: - error: true # Driver does not retry operation because there was no RetryableWriteError label on response - result: - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/findOneAndReplace-serverErrors.json b/testdata/retryable-writes/legacy/findOneAndReplace-serverErrors.json deleted file mode 100644 index 64c69e2f6d..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndReplace-serverErrors.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "FindOneAndReplace succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - }, - "returnDocument": "Before" - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 111 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndReplace succeeds after WriteConcernError ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - }, - "returnDocument": "Before" - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 111 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndReplace fails with a RetryableWriteError label after two connection failures", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "closeConnection": true - } - }, - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - }, - "returnDocument": "Before" - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/findOneAndReplace-serverErrors.yml b/testdata/retryable-writes/legacy/findOneAndReplace-serverErrors.yml deleted file mode 100644 index 5a483e60b6..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndReplace-serverErrors.yml +++ /dev/null @@ -1,80 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "FindOneAndReplace succeeds after PrimarySteppedDown" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - errorCode: 189 - errorLabels: ["RetryableWriteError"] - operation: - name: "findOneAndReplace" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - returnDocument: "Before" - outcome: - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 1, x: 111 } - - { _id: 2, x: 22 } - - - description: "FindOneAndReplace succeeds after WriteConcernError ShutdownInProgress" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "findOneAndReplace" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - returnDocument: "Before" - outcome: - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 1, x: 111 } - - { _id: 2, x: 22 } - - - - description: "FindOneAndReplace fails with a RetryableWriteError label after two connection failures" - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - closeConnection: true - operation: - name: "findOneAndReplace" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - returnDocument: "Before" - outcome: - error: true - result: - errorLabelsContain: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/findOneAndReplace.json b/testdata/retryable-writes/legacy/findOneAndReplace.json deleted file mode 100644 index e1f9ab7f8c..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndReplace.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "3.6", - "topology": [ - "replicaset" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "FindOneAndReplace is committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - }, - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - }, - "returnDocument": "Before" - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 111 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndReplace is not committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - }, - "returnDocument": "Before" - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 111 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndReplace is never committed", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 2 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "findOneAndReplace", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - }, - "returnDocument": "Before" - } - }, - "outcome": { - "error": true, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/findOneAndReplace.yml b/testdata/retryable-writes/legacy/findOneAndReplace.yml deleted file mode 100644 index 36d81d461e..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndReplace.yml +++ /dev/null @@ -1,63 +0,0 @@ -runOn: - - - minServerVersion: "3.6" - topology: ["replicaset"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "FindOneAndReplace is committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - operation: - name: "findOneAndReplace" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - returnDocument: "Before" - outcome: - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 1, x: 111 } - - { _id: 2, x: 22 } - - - description: "FindOneAndReplace is not committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "findOneAndReplace" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - returnDocument: "Before" - outcome: - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 1, x: 111 } - - { _id: 2, x: 22 } - - - description: "FindOneAndReplace is never committed" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 2 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "findOneAndReplace" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - returnDocument: "Before" - outcome: - error: true - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/findOneAndUpdate-errorLabels.json b/testdata/retryable-writes/legacy/findOneAndUpdate-errorLabels.json deleted file mode 100644 index 19b3a9e771..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndUpdate-errorLabels.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.1", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "FindOneAndUpdate succeeds with RetryableWriteError from server", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 112, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndUpdate fails if server does not return RetryableWriteError", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 11600, - "errorLabels": [] - } - }, - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/findOneAndUpdate-errorLabels.yml b/testdata/retryable-writes/legacy/findOneAndUpdate-errorLabels.yml deleted file mode 100644 index 03751d568b..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndUpdate-errorLabels.yml +++ /dev/null @@ -1,52 +0,0 @@ -runOn: - - minServerVersion: "4.3.1" - topology: ["replicaset", "sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - description: "FindOneAndUpdate succeeds with RetryableWriteError from server" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - errorCode: 112 # WriteConflict, not a retryable error code - errorLabels: ["RetryableWriteError"] # Override server behavior: send RetryableWriteError label with non-retryable error code - operation: - name: "findOneAndUpdate" - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: "Before" - outcome: # Driver retries operation and it succeeds - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - description: "FindOneAndUpdate fails if server does not return RetryableWriteError" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - errorCode: 11600 # InterruptedAtShutdown, normally a retryable error code - errorLabels: [] # Override server behavior: do not send RetryableWriteError label with retryable code - operation: - name: "findOneAndUpdate" - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: "Before" - outcome: - error: true # Driver does not retry operation because there was no RetryableWriteError label on response - result: - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/findOneAndUpdate-serverErrors.json b/testdata/retryable-writes/legacy/findOneAndUpdate-serverErrors.json deleted file mode 100644 index 9f54604992..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndUpdate-serverErrors.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "FindOneAndUpdate succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndUpdate succeeds after WriteConcernError ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndUpdate fails with a RetryableWriteError label after two connection failures", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "closeConnection": true - } - }, - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/findOneAndUpdate-serverErrors.yml b/testdata/retryable-writes/legacy/findOneAndUpdate-serverErrors.yml deleted file mode 100644 index 3c1fbe8226..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndUpdate-serverErrors.yml +++ /dev/null @@ -1,79 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "FindOneAndUpdate succeeds after PrimarySteppedDown" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - errorCode: 189 - errorLabels: ["RetryableWriteError"] - operation: - name: "findOneAndUpdate" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - returnDocument: "Before" - outcome: - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - description: "FindOneAndUpdate succeeds after WriteConcernError ShutdownInProgress" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["findAndModify"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "findOneAndUpdate" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - returnDocument: "Before" - outcome: - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - description: "FindOneAndUpdate fails with a RetryableWriteError label after two connection failures" - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["findAndModify"] - closeConnection: true - operation: - name: "findOneAndUpdate" - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: "Before" - outcome: - error: true - result: - errorLabelsContain: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/findOneAndUpdate.json b/testdata/retryable-writes/legacy/findOneAndUpdate.json deleted file mode 100644 index 9ae2d87d82..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndUpdate.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "3.6", - "topology": [ - "replicaset" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "FindOneAndUpdate is committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - }, - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndUpdate is not committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - } - }, - "outcome": { - "result": { - "_id": 1, - "x": 11 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "FindOneAndUpdate is never committed", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 2 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "findOneAndUpdate", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "error": true, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/findOneAndUpdate.yml b/testdata/retryable-writes/legacy/findOneAndUpdate.yml deleted file mode 100644 index 9235526be7..0000000000 --- a/testdata/retryable-writes/legacy/findOneAndUpdate.yml +++ /dev/null @@ -1,62 +0,0 @@ -runOn: - - - minServerVersion: "3.6" - topology: ["replicaset"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "FindOneAndUpdate is committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - operation: - name: "findOneAndUpdate" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - returnDocument: "Before" - outcome: - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - description: "FindOneAndUpdate is not committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "findOneAndUpdate" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - returnDocument: "Before" - outcome: - result: { _id: 1, x: 11 } - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - description: "FindOneAndUpdate is never committed" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 2 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "findOneAndUpdate" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - outcome: - error: true - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/insertMany-errorLabels.json b/testdata/retryable-writes/legacy/insertMany-errorLabels.json deleted file mode 100644 index 65fd377fa6..0000000000 --- a/testdata/retryable-writes/legacy/insertMany-errorLabels.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.1", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - } - ], - "tests": [ - { - "description": "InsertMany succeeds with RetryableWriteError from server", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 112, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "insertMany", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "insertedIds": { - "0": 2, - "1": 3 - } - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertMany fails if server does not return RetryableWriteError", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11600, - "errorLabels": [] - } - }, - "operation": { - "name": "insertMany", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/insertMany-errorLabels.yml b/testdata/retryable-writes/legacy/insertMany-errorLabels.yml deleted file mode 100644 index 9f5e163623..0000000000 --- a/testdata/retryable-writes/legacy/insertMany-errorLabels.yml +++ /dev/null @@ -1,54 +0,0 @@ -runOn: - - minServerVersion: "4.3.1" - topology: ["replicaset", "sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - -tests: - - description: "InsertMany succeeds with RetryableWriteError from server" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 112 # WriteConflict, not a retryable error code - errorLabels: ["RetryableWriteError"] # Override server behavior: send RetryableWriteError label with non-retryable error code - operation: - name: "insertMany" - arguments: - documents: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - options: { ordered: true } - outcome: # Driver retries operation and it succeeds - result: - insertedIds: { 0: 2, 1: 3 } - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertMany fails if server does not return RetryableWriteError" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 11600 # InterruptedAtShutdown, normally a retryable error code - errorLabels: [] # Override server behavior: do not send RetryableWriteError label with retryable code - operation: - name: "insertMany" - arguments: - documents: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - options: { ordered: true } - outcome: - error: true # Driver does not retry operation because there was no RetryableWriteError label on response - result: - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } diff --git a/testdata/retryable-writes/legacy/insertMany-serverErrors.json b/testdata/retryable-writes/legacy/insertMany-serverErrors.json deleted file mode 100644 index 7b45b506c9..0000000000 --- a/testdata/retryable-writes/legacy/insertMany-serverErrors.json +++ /dev/null @@ -1,197 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - } - ], - "tests": [ - { - "description": "InsertMany succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "insertMany", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "insertedIds": { - "0": 2, - "1": 3 - } - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertMany succeeds after WriteConcernError ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "insertMany", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "insertedIds": { - "0": 2, - "1": 3 - } - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertMany fails with a RetryableWriteError label after two connection failures", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - }, - "operation": { - "name": "insertMany", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/insertMany-serverErrors.yml b/testdata/retryable-writes/legacy/insertMany-serverErrors.yml deleted file mode 100644 index 140329fcb8..0000000000 --- a/testdata/retryable-writes/legacy/insertMany-serverErrors.yml +++ /dev/null @@ -1,84 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - -tests: - - - description: "InsertMany succeeds after PrimarySteppedDown" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 189 - errorLabels: ["RetryableWriteError"] - operation: - name: "insertMany" - arguments: - documents: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - options: { ordered: true } - outcome: - result: - insertedIds: { 0: 2, 1: 3 } - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertMany succeeds after WriteConcernError ShutdownInProgress" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "insertMany" - arguments: - documents: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - options: { ordered: true } - outcome: - result: - insertedIds: { 0: 2, 1: 3 } - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertMany fails with a RetryableWriteError label after two connection failures" - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - closeConnection: true - operation: - name: "insertMany" - arguments: - documents: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - options: { ordered: true } - outcome: - error: true - result: - errorLabelsContain: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } diff --git a/testdata/retryable-writes/legacy/insertMany.json b/testdata/retryable-writes/legacy/insertMany.json deleted file mode 100644 index 0ad326e2dc..0000000000 --- a/testdata/retryable-writes/legacy/insertMany.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "3.6", - "topology": [ - "replicaset" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - } - ], - "tests": [ - { - "description": "InsertMany succeeds after one network error", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - }, - "operation": { - "name": "insertMany", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "result": { - "insertedIds": { - "0": 2, - "1": 3 - } - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertMany with unordered execution", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - }, - "operation": { - "name": "insertMany", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "options": { - "ordered": false - } - } - }, - "outcome": { - "result": { - "insertedIds": { - "0": 2, - "1": 3 - } - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertMany fails after multiple network errors", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": "alwaysOn", - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "insertMany", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ], - "options": { - "ordered": true - } - } - }, - "outcome": { - "error": true, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/insertMany.yml b/testdata/retryable-writes/legacy/insertMany.yml deleted file mode 100644 index eed450e0a3..0000000000 --- a/testdata/retryable-writes/legacy/insertMany.yml +++ /dev/null @@ -1,74 +0,0 @@ -runOn: - - - minServerVersion: "3.6" - topology: ["replicaset"] - -data: - - { _id: 1, x: 11 } - -tests: - - - description: "InsertMany succeeds after one network error" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - operation: - name: "insertMany" - arguments: - documents: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - options: { ordered: true } - outcome: - result: - insertedIds: { 0: 2, 1: 3 } - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertMany with unordered execution" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - operation: - name: "insertMany" - arguments: - documents: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - options: { ordered: false } - outcome: - result: - insertedIds: { 0: 2, 1: 3 } - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertMany fails after multiple network errors" - failPoint: - # Normally, a mongod will insert the documents as a batch with a - # single commit. If this fails, mongod may try to insert each - # document one at a time depending on the failure. Therefore our - # single insert command may trigger the failpoint twice on each - # driver attempt. This test permanently enables the fail point to - # ensure the retry attempt always fails. - configureFailPoint: onPrimaryTransactionalWrite - mode: "alwaysOn" - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "insertMany" - arguments: - documents: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - options: { ordered: true } - outcome: - error: true - collection: - data: - - { _id: 1, x: 11 } diff --git a/testdata/retryable-writes/legacy/insertOne-errorLabels.json b/testdata/retryable-writes/legacy/insertOne-errorLabels.json deleted file mode 100644 index d90ac5dfbd..0000000000 --- a/testdata/retryable-writes/legacy/insertOne-errorLabels.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.1", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "data": [], - "tests": [ - { - "description": "InsertOne succeeds with RetryableWriteError from server", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 112, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "x": 11 - } - } - }, - "outcome": { - "result": { - "insertedId": 1 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - } - ] - } - } - }, - { - "description": "InsertOne fails if server does not return RetryableWriteError", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11600, - "errorLabels": [] - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "x": 11 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/insertOne-errorLabels.yml b/testdata/retryable-writes/legacy/insertOne-errorLabels.yml deleted file mode 100644 index 87100aa5cf..0000000000 --- a/testdata/retryable-writes/legacy/insertOne-errorLabels.yml +++ /dev/null @@ -1,44 +0,0 @@ -runOn: - - minServerVersion: "4.3.1" - topology: ["replicaset", "sharded", "load-balanced"] - -data: [] - -tests: - - description: "InsertOne succeeds with RetryableWriteError from server" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 112 # WriteConflict, not a retryable error code - errorLabels: ["RetryableWriteError"] # Override server behavior: send RetryableWriteError label with non-retryable error code - operation: - name: "insertOne" - arguments: - document: { _id: 1, x: 11 } - outcome: # Driver retries operation and it succeeds - result: - insertedId: 1 - collection: - data: - - { _id: 1, x: 11 } - - - description: "InsertOne fails if server does not return RetryableWriteError" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 11600 # InterruptedAtShutdown, normally a retryable error code - errorLabels: [] # Override server behavior: do not send RetryableWriteError label with retryable code - operation: - name: "insertOne" - arguments: - document: { _id: 1, x: 11 } - outcome: - error: true # Driver does not retry operation because there was no RetryableWriteError label on response - result: - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: [] diff --git a/testdata/retryable-writes/legacy/insertOne-serverErrors.json b/testdata/retryable-writes/legacy/insertOne-serverErrors.json deleted file mode 100644 index e8571f8cf9..0000000000 --- a/testdata/retryable-writes/legacy/insertOne-serverErrors.json +++ /dev/null @@ -1,1162 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "InsertOne succeeds after connection failure", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne fails after connection failure when retryWrites option is false", - "clientOptions": { - "retryWrites": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 10107, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 13436, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 13435, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11602, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11600, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 91, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 6, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 9001, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 89, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after ExceededTimeLimit", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 262, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne fails after Interrupted", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11601, - "closeConnection": false - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after WriteConcernError InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 11600, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after WriteConcernError InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 11602, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after WriteConcernError PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 189, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne succeeds after WriteConcernError ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne fails after multiple retryable writeConcernErrors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne fails after WriteConcernError Interrupted", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 11601, - "errmsg": "operation was interrupted" - } - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne fails after WriteConcernError WriteConcernFailed", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 64, - "codeName": "WriteConcernFailed", - "errmsg": "waiting for replication timed out", - "errInfo": { - "wtimeout": true - } - } - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne fails with a RetryableWriteError label after two connection failures", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/insertOne-serverErrors.yml b/testdata/retryable-writes/legacy/insertOne-serverErrors.yml deleted file mode 100644 index af50e761ee..0000000000 --- a/testdata/retryable-writes/legacy/insertOne-serverErrors.yml +++ /dev/null @@ -1,527 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "InsertOne succeeds after connection failure" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - closeConnection: true - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne fails after connection failure when retryWrites option is false" - clientOptions: - retryWrites: false - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - closeConnection: true - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - error: true - result: - # If retryWrites is false, the driver should not add the - # RetryableWriteError label to the error. - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - - description: "InsertOne succeeds after NotWritablePrimary" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 10107 - errorLabels: ["RetryableWriteError"] - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after NotPrimaryOrSecondary" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 13436 - errorLabels: ["RetryableWriteError"] - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after NotPrimaryNoSecondaryOk" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 13435 - errorLabels: ["RetryableWriteError"] - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after InterruptedDueToReplStateChange" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 11602 - errorLabels: ["RetryableWriteError"] - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after InterruptedAtShutdown" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 11600 - errorLabels: ["RetryableWriteError"] - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after PrimarySteppedDown" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 189 - errorLabels: ["RetryableWriteError"] - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after ShutdownInProgress" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 91 - errorLabels: ["RetryableWriteError"] - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after HostNotFound" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 7 - errorLabels: ["RetryableWriteError"] - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after HostUnreachable" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 6 - errorLabels: ["RetryableWriteError"] - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after SocketException" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 9001 - errorLabels: ["RetryableWriteError"] - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after NetworkTimeout" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 89 - errorLabels: ["RetryableWriteError"] - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after ExceededTimeLimit" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 262 - errorLabels: ["RetryableWriteError"] - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne fails after Interrupted" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 11601 - closeConnection: false - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - error: true - result: - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - - description: "InsertOne succeeds after WriteConcernError InterruptedAtShutdown" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - writeConcernError: - code: 11600 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after WriteConcernError InterruptedDueToReplStateChange" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - writeConcernError: - code: 11602 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after WriteConcernError PrimarySteppedDown" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - writeConcernError: - code: 189 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne succeeds after WriteConcernError ShutdownInProgress" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne fails after multiple retryable writeConcernErrors" - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - error: true - result: - errorLabelsContain: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } # The write was still applied. - - - description: "InsertOne fails after WriteConcernError Interrupted" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - writeConcernError: - code: 11601 - errmsg: operation was interrupted - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - error: true - result: - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } # The write was still applied. - - - description: "InsertOne fails after WriteConcernError WriteConcernFailed" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - writeConcernError: - code: 64 - codeName: WriteConcernFailed - errmsg: waiting for replication timed out - errInfo: {wtimeout: True} - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - error: true - result: - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } # The write was still applied. - - - - description: "InsertOne fails with a RetryableWriteError label after two connection failures" - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["insert"] - closeConnection: true - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - error: true - result: - errorLabelsContain: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/insertOne.json b/testdata/retryable-writes/legacy/insertOne.json deleted file mode 100644 index 04dee6dd68..0000000000 --- a/testdata/retryable-writes/legacy/insertOne.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "3.6", - "topology": [ - "replicaset" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "InsertOne is committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne is not committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "result": { - "insertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - } - }, - { - "description": "InsertOne is never committed", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 2 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - "outcome": { - "error": true, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/insertOne.yml b/testdata/retryable-writes/legacy/insertOne.yml deleted file mode 100644 index ebfdf23e66..0000000000 --- a/testdata/retryable-writes/legacy/insertOne.yml +++ /dev/null @@ -1,61 +0,0 @@ -runOn: - - - minServerVersion: "3.6" - topology: ["replicaset"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "InsertOne is committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne is not committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - result: - insertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "InsertOne is never committed" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 2 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "insertOne" - arguments: - document: { _id: 3, x: 33 } - outcome: - error: true - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/replaceOne-errorLabels.json b/testdata/retryable-writes/legacy/replaceOne-errorLabels.json deleted file mode 100644 index 6029b875dc..0000000000 --- a/testdata/retryable-writes/legacy/replaceOne-errorLabels.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.1", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "ReplaceOne succeeds with RetryableWriteError from server", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 112, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 111 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "ReplaceOne fails if server does not return RetryableWriteError", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 11600, - "errorLabels": [] - } - }, - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/replaceOne-errorLabels.yml b/testdata/retryable-writes/legacy/replaceOne-errorLabels.yml deleted file mode 100644 index 4193909293..0000000000 --- a/testdata/retryable-writes/legacy/replaceOne-errorLabels.yml +++ /dev/null @@ -1,53 +0,0 @@ -runOn: - - minServerVersion: "4.3.1" - topology: ["replicaset", "sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - description: "ReplaceOne succeeds with RetryableWriteError from server" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - errorCode: 112 # WriteConflict, not a retryable error code - errorLabels: ["RetryableWriteError"] # Override server behavior: send RetryableWriteError label with non-retryable error code - operation: - name: "replaceOne" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - outcome: # Driver retries operation and it succeeds - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - { _id: 1, x: 111 } - - { _id: 2, x: 22 } - - - description: "ReplaceOne fails if server does not return RetryableWriteError" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - errorCode: 11600 # InterruptedAtShutdown, normally a retryable error code - errorLabels: [] # Override server behavior: do not send RetryableWriteError label with retryable code - operation: - name: "replaceOne" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - outcome: - error: true # Driver does not retry operation because there was no RetryableWriteError label on response - result: - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/replaceOne-serverErrors.json b/testdata/retryable-writes/legacy/replaceOne-serverErrors.json deleted file mode 100644 index 7457228cd7..0000000000 --- a/testdata/retryable-writes/legacy/replaceOne-serverErrors.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "ReplaceOne succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 111 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "ReplaceOne succeeds after WriteConcernError ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 111 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "ReplaceOne fails with a RetryableWriteError label after two connection failures", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "closeConnection": true - } - }, - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/replaceOne-serverErrors.yml b/testdata/retryable-writes/legacy/replaceOne-serverErrors.yml deleted file mode 100644 index 292f96ecb0..0000000000 --- a/testdata/retryable-writes/legacy/replaceOne-serverErrors.yml +++ /dev/null @@ -1,82 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "ReplaceOne succeeds after PrimarySteppedDown" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - errorCode: 189 - errorLabels: ["RetryableWriteError"] - operation: - name: "replaceOne" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - { _id: 1, x: 111 } - - { _id: 2, x: 22 } - - - description: "ReplaceOne succeeds after WriteConcernError ShutdownInProgress" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "replaceOne" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - { _id: 1, x: 111 } - - { _id: 2, x: 22 } - - - description: "ReplaceOne fails with a RetryableWriteError label after two connection failures" - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["update"] - closeConnection: true - operation: - name: "replaceOne" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - outcome: - error: true - result: - errorLabelsContain: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/replaceOne.json b/testdata/retryable-writes/legacy/replaceOne.json deleted file mode 100644 index e5b8cf8eab..0000000000 --- a/testdata/retryable-writes/legacy/replaceOne.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "3.6", - "topology": [ - "replicaset" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "ReplaceOne is committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - }, - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 111 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "ReplaceOne is not committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 111 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "ReplaceOne is never committed", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 2 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - } - } - }, - "outcome": { - "error": true, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/replaceOne.yml b/testdata/retryable-writes/legacy/replaceOne.yml deleted file mode 100644 index 0000904a40..0000000000 --- a/testdata/retryable-writes/legacy/replaceOne.yml +++ /dev/null @@ -1,66 +0,0 @@ -runOn: - - - minServerVersion: "3.6" - topology: ["replicaset"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "ReplaceOne is committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - operation: - name: "replaceOne" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - { _id: 1, x: 111 } - - { _id: 2, x: 22 } - - - description: "ReplaceOne is not committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "replaceOne" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - { _id: 1, x: 111 } - - { _id: 2, x: 22 } - - - description: "ReplaceOne is never committed" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 2 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "replaceOne" - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - outcome: - error: true - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/updateMany.json b/testdata/retryable-writes/legacy/updateMany.json deleted file mode 100644 index 46fef73e74..0000000000 --- a/testdata/retryable-writes/legacy/updateMany.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "3.6", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "UpdateMany ignores retryWrites", - "useMultipleMongoses": true, - "operation": { - "name": "updateMany", - "arguments": { - "filter": {}, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "result": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 23 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/updateMany.yml b/testdata/retryable-writes/legacy/updateMany.yml deleted file mode 100644 index f3ab39faa3..0000000000 --- a/testdata/retryable-writes/legacy/updateMany.yml +++ /dev/null @@ -1,27 +0,0 @@ -runOn: - - - minServerVersion: "3.6" - topology: ["replicaset", "sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "UpdateMany ignores retryWrites" - useMultipleMongoses: true - operation: - name: "updateMany" - arguments: - filter: { } - update: { $inc: { x : 1 }} - outcome: - result: - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 23 } diff --git a/testdata/retryable-writes/legacy/updateOne-errorLabels.json b/testdata/retryable-writes/legacy/updateOne-errorLabels.json deleted file mode 100644 index 5bd00cde90..0000000000 --- a/testdata/retryable-writes/legacy/updateOne-errorLabels.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.1", - "topology": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "UpdateOne succeeds with RetryableWriteError from server", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 112, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "UpdateOne fails if server does not return RetryableWriteError", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 11600, - "errorLabels": [] - } - }, - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/updateOne-errorLabels.yml b/testdata/retryable-writes/legacy/updateOne-errorLabels.yml deleted file mode 100644 index 6bfef3b129..0000000000 --- a/testdata/retryable-writes/legacy/updateOne-errorLabels.yml +++ /dev/null @@ -1,53 +0,0 @@ -runOn: - - minServerVersion: "4.3.1" - topology: ["replicaset", "sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - description: "UpdateOne succeeds with RetryableWriteError from server" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - errorCode: 112 # WriteConflict, not a retryable error code - errorLabels: ["RetryableWriteError"] # Override server behavior: send RetryableWriteError label with non-retryable error code - operation: - name: "updateOne" - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - outcome: # Driver retries operation and it succeeds - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - description: "UpdateOne fails if server does not return RetryableWriteError" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - errorCode: 11600 # InterruptedAtShutdown, normally a retryable error code - errorLabels: [] # Override server behavior: do not send RetryableWriteError label with retryable code - operation: - name: "updateOne" - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - outcome: - error: true # Driver does not retry operation because there was no RetryableWriteError label on response - result: - errorLabelsOmit: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/updateOne-serverErrors.json b/testdata/retryable-writes/legacy/updateOne-serverErrors.json deleted file mode 100644 index 1160198019..0000000000 --- a/testdata/retryable-writes/legacy/updateOne-serverErrors.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topology": [ - "sharded", - "load-balanced" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "UpdateOne succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "UpdateOne succeeds after WriteConcernError ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "UpdateOne fails with a RetryableWriteError label after two connection failures", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "closeConnection": true - } - }, - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "error": true, - "result": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/updateOne-serverErrors.yml b/testdata/retryable-writes/legacy/updateOne-serverErrors.yml deleted file mode 100644 index 35ed406a54..0000000000 --- a/testdata/retryable-writes/legacy/updateOne-serverErrors.yml +++ /dev/null @@ -1,82 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.7" - topology: ["sharded", "load-balanced"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "UpdateOne succeeds after PrimarySteppedDown" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - errorCode: 189 - errorLabels: ["RetryableWriteError"] - operation: - name: "updateOne" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - description: "UpdateOne succeeds after WriteConcernError ShutdownInProgress" - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["update"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - operation: - name: "updateOne" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - description: "UpdateOne fails with a RetryableWriteError label after two connection failures" - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["update"] - closeConnection: true - operation: - name: "updateOne" - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - outcome: - error: true - result: - errorLabelsContain: ["RetryableWriteError"] - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/legacy/updateOne.json b/testdata/retryable-writes/legacy/updateOne.json deleted file mode 100644 index 0f806dc3d8..0000000000 --- a/testdata/retryable-writes/legacy/updateOne.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "3.6", - "topology": [ - "replicaset" - ] - } - ], - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ], - "tests": [ - { - "description": "UpdateOne is committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - }, - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "UpdateOne is not committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "UpdateOne is never committed", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 2 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - "outcome": { - "error": true, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - }, - { - "description": "UpdateOne with upsert is committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - }, - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 3, - "x": 33 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "upsert": true - } - }, - "outcome": { - "result": { - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 1, - "upsertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 34 - } - ] - } - } - }, - { - "description": "UpdateOne with upsert is not committed on first attempt", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 3, - "x": 33 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "upsert": true - } - }, - "outcome": { - "result": { - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 1, - "upsertedId": 3 - }, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 34 - } - ] - } - } - }, - { - "description": "UpdateOne with upsert is never committed", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 2 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - }, - "operation": { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 3, - "x": 33 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "upsert": true - } - }, - "outcome": { - "error": true, - "collection": { - "data": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - } - } - ] -} diff --git a/testdata/retryable-writes/legacy/updateOne.yml b/testdata/retryable-writes/legacy/updateOne.yml deleted file mode 100644 index 56b7d822b4..0000000000 --- a/testdata/retryable-writes/legacy/updateOne.yml +++ /dev/null @@ -1,129 +0,0 @@ -runOn: - - - minServerVersion: "3.6" - topology: ["replicaset"] - -data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - - description: "UpdateOne is committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - operation: - name: "updateOne" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - description: "UpdateOne is not committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "updateOne" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - outcome: - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - collection: - data: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - description: "UpdateOne is never committed" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 2 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "updateOne" - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - outcome: - error: true - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - - description: "UpdateOne with upsert is committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - operation: - name: "updateOne" - arguments: - filter: { _id: 3, x: 33 } - update: { $inc: { x : 1 }} - upsert: true - outcome: - result: - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 1 - upsertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 34 } - - - description: "UpdateOne with upsert is not committed on first attempt" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "updateOne" - arguments: - filter: { _id: 3, x: 33 } - update: { $inc: { x : 1 }} - upsert: true - outcome: - result: - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 1 - upsertedId: 3 - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 34 } - - - description: "UpdateOne with upsert is never committed" - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 2 } - data: { failBeforeCommitExceptionCode: 1 } - operation: - name: "updateOne" - arguments: - filter: { _id: 3, x: 33 } - update: { $inc: { x : 1 }} - upsert: true - outcome: - error: true - collection: - data: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/retryable-writes/unified/bulkWrite-serverErrors.json b/testdata/retryable-writes/unified/bulkWrite-serverErrors.json deleted file mode 100644 index 0a063ab4d9..0000000000 --- a/testdata/retryable-writes/unified/bulkWrite-serverErrors.json +++ /dev/null @@ -1,285 +0,0 @@ -{ - "description": "retryable-writes bulkWrite serverErrors", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topologies": [ - "sharded", - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "retryable-writes-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll" - } - } - ], - "initialData": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "BulkWrite succeeds after retryable writeConcernError in first batch", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorLabels": [ - "RetryableWriteError" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down" - } - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "deleteOne": { - "filter": { - "_id": 2 - } - } - } - ] - }, - "expectResult": { - "deletedCount": 1, - "insertedCount": 1, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "insertedIds": { - "$$unsetOrMatches": { - "0": 3 - } - }, - "upsertedIds": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll", - "documents": [ - { - "_id": 3, - "x": 33 - } - ] - }, - "commandName": "insert", - "databaseName": "retryable-writes-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "coll", - "documents": [ - { - "_id": 3, - "x": 33 - } - ] - }, - "commandName": "insert", - "databaseName": "retryable-writes-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "delete": "coll", - "deletes": [ - { - "q": { - "_id": 2 - }, - "limit": 1 - } - ] - }, - "commandName": "delete", - "databaseName": "retryable-writes-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "BulkWrite fails with a RetryableWriteError label after two connection failures", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "update" - ], - "closeConnection": true - } - } - } - }, - { - "object": "collection0", - "name": "bulkWrite", - "arguments": { - "requests": [ - { - "deleteOne": { - "filter": { - "_id": 1 - } - } - }, - { - "insertOne": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "updateOne": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "ordered": true - }, - "expectError": { - "isError": true, - "errorLabelsContain": [ - "RetryableWriteError" - ] - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/retryable-writes/unified/bulkWrite-serverErrors.yml b/testdata/retryable-writes/unified/bulkWrite-serverErrors.yml deleted file mode 100644 index a88a206123..0000000000 --- a/testdata/retryable-writes/unified/bulkWrite-serverErrors.yml +++ /dev/null @@ -1,136 +0,0 @@ -description: "retryable-writes bulkWrite serverErrors" - -schemaVersion: "1.3" - -runOnRequirements: - - minServerVersion: "4.0" - topologies: [ replicaset ] - - minServerVersion: "4.1.7" - topologies: [ sharded, load-balanced ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &databaseName retryable-writes-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collectionName coll - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - description: "BulkWrite succeeds after retryable writeConcernError in first batch" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - errorLabels: [RetryableWriteError] # top-level error labels - writeConcernError: - code: 91 # ShutdownInProgress - errmsg: "Replication is being shut down" - - name: bulkWrite - object: *collection0 - arguments: - requests: - - insertOne: - document: { _id: 3, x: 33 } - - deleteOne: - filter: { _id: 2 } - expectResult: - deletedCount: 1 - insertedCount: 1 - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - insertedIds: { $$unsetOrMatches: { 0: 3 } } - upsertedIds: { } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: [{ _id: 3, x: 33 }] - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - insert: *collectionName - documents: [{ _id: 3, x: 33 }] - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - - q: { _id: 2 } - limit: 1 - commandName: delete - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 3, x: 33 } # The write was still applied - - - description: 'BulkWrite fails with a RetryableWriteError label after two connection failures' - operations: - - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: [ update ] - closeConnection: true - - - object: *collection0 - name: bulkWrite - arguments: - requests: - - - deleteOne: - filter: { _id: 1 } - - - insertOne: - document: { _id: 3, x: 33 } - - - updateOne: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - ordered: true - expectError: - isError: true - errorLabelsContain: - - RetryableWriteError - outcome: - - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } diff --git a/testdata/retryable-writes/unified/client-bulkWrite-clientErrors.json b/testdata/retryable-writes/unified/client-bulkWrite-clientErrors.json deleted file mode 100644 index d16e0c9c8d..0000000000 --- a/testdata/retryable-writes/unified/client-bulkWrite-clientErrors.json +++ /dev/null @@ -1,351 +0,0 @@ -{ - "description": "client bulkWrite retryable writes with client errors", - "schemaVersion": "1.21", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ], - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "retryable-writes-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "retryable-writes-tests.coll0" - }, - "tests": [ - { - "description": "client bulkWrite with one network error succeeds after retry", - "operations": [ - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "closeConnection": true - } - } - } - }, - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "retryable-writes-tests.coll0", - "document": { - "_id": 4, - "x": 44 - } - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 4 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 4, - "x": 44 - } - } - ], - "nsInfo": [ - { - "ns": "retryable-writes-tests.coll0" - } - ], - "lsid": { - "$$exists": true - }, - "txnNumber": { - "$$exists": true - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 4, - "x": 44 - } - } - ], - "nsInfo": [ - { - "ns": "retryable-writes-tests.coll0" - } - ], - "lsid": { - "$$exists": true - }, - "txnNumber": { - "$$exists": true - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "client bulkWrite with two network errors fails after retry", - "operations": [ - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "closeConnection": true - } - } - } - }, - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "retryable-writes-tests.coll0", - "document": { - "_id": 4, - "x": 44 - } - } - } - ], - "verboseResults": true - }, - "expectError": { - "isClientError": true, - "errorLabelsContain": [ - "RetryableWriteError" - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 4, - "x": 44 - } - } - ], - "nsInfo": [ - { - "ns": "retryable-writes-tests.coll0" - } - ], - "lsid": { - "$$exists": true - }, - "txnNumber": { - "$$exists": true - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 4, - "x": 44 - } - } - ], - "nsInfo": [ - { - "ns": "retryable-writes-tests.coll0" - } - ], - "lsid": { - "$$exists": true - }, - "txnNumber": { - "$$exists": true - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/retryable-writes/unified/client-bulkWrite-clientErrors.yml b/testdata/retryable-writes/unified/client-bulkWrite-clientErrors.yml deleted file mode 100644 index e5214b90f8..0000000000 --- a/testdata/retryable-writes/unified/client-bulkWrite-clientErrors.yml +++ /dev/null @@ -1,173 +0,0 @@ -description: "client bulkWrite retryable writes with client errors" -schemaVersion: "1.21" -runOnRequirements: - - minServerVersion: "8.0" - topologies: - - replicaset - - sharded - - load-balanced - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name retryable-writes-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -_yamlAnchors: - namespace: &namespace "retryable-writes-tests.coll0" - -tests: - - description: "client bulkWrite with one network error succeeds after retry" - operations: - - object: testRunner - name: failPoint - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: [ bulkWrite ] - closeConnection: true - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 4, x: 44 } - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 4 - updateResults: {} - deleteResults: {} - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 4, x: 44 } - nsInfo: - - ns: *namespace - # An implicit session is included with the transaction number: - lsid: { "$$exists": true } - txnNumber: { "$$exists": true } - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 4, x: 44 } - nsInfo: - - ns: *namespace - # An implicit session is included with the transaction number: - lsid: { "$$exists": true } - txnNumber: { "$$exists": true } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - description: "client bulkWrite with two network errors fails after retry" - operations: - - object: testRunner - name: failPoint - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: - times: 2 - data: - failCommands: [ bulkWrite ] - closeConnection: true - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 4, x: 44 } - verboseResults: true - expectError: - isClientError: true - errorLabelsContain: ["RetryableWriteError"] # Error label added by driver. - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 4, x: 44 } - nsInfo: - - ns: *namespace - # An implicit session is included with the transaction number: - lsid: { "$$exists": true } - txnNumber: { "$$exists": true } - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 4, x: 44 } - nsInfo: - - ns: *namespace - # An implicit session is included with the transaction number: - lsid: { "$$exists": true } - txnNumber: { "$$exists": true } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } diff --git a/testdata/retryable-writes/unified/client-bulkWrite-serverErrors.json b/testdata/retryable-writes/unified/client-bulkWrite-serverErrors.json deleted file mode 100644 index f58c82bcc7..0000000000 --- a/testdata/retryable-writes/unified/client-bulkWrite-serverErrors.json +++ /dev/null @@ -1,873 +0,0 @@ -{ - "description": "client bulkWrite retryable writes", - "schemaVersion": "1.21", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ], - "useMultipleMongoses": false - } - }, - { - "client": { - "id": "clientRetryWritesFalse", - "uriOptions": { - "retryWrites": false - }, - "observeEvents": [ - "commandStartedEvent" - ], - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "retryable-writes-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "_yamlAnchors": { - "namespace": "retryable-writes-tests.coll0" - }, - "tests": [ - { - "description": "client bulkWrite with no multi: true operations succeeds after retryable top-level error", - "operations": [ - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "retryable-writes-tests.coll0", - "document": { - "_id": 4, - "x": 44 - } - } - }, - { - "updateOne": { - "namespace": "retryable-writes-tests.coll0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "replaceOne": { - "namespace": "retryable-writes-tests.coll0", - "filter": { - "_id": 2 - }, - "replacement": { - "x": 222 - } - } - }, - { - "deleteOne": { - "namespace": "retryable-writes-tests.coll0", - "filter": { - "_id": 3 - } - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 2, - "modifiedCount": 2, - "deletedCount": 1, - "insertResults": { - "0": { - "insertedId": 4 - } - }, - "updateResults": { - "1": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - }, - "2": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - } - }, - "deleteResults": { - "3": { - "deletedCount": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 4, - "x": 44 - } - }, - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "multi": false - }, - { - "update": 0, - "filter": { - "_id": 2 - }, - "updateMods": { - "x": 222 - }, - "multi": false - }, - { - "delete": 0, - "filter": { - "_id": 3 - }, - "multi": false - } - ], - "nsInfo": [ - { - "ns": "retryable-writes-tests.coll0" - } - ], - "lsid": { - "$$exists": true - }, - "txnNumber": { - "$$exists": true - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 4, - "x": 44 - } - }, - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "multi": false - }, - { - "update": 0, - "filter": { - "_id": 2 - }, - "updateMods": { - "x": 222 - }, - "multi": false - }, - { - "delete": 0, - "filter": { - "_id": 3 - }, - "multi": false - } - ], - "nsInfo": [ - { - "ns": "retryable-writes-tests.coll0" - } - ], - "lsid": { - "$$exists": true - }, - "txnNumber": { - "$$exists": true - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 222 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "client bulkWrite with multi: true operations fails after retryable top-level error", - "operations": [ - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "updateMany": { - "namespace": "retryable-writes-tests.coll0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "deleteMany": { - "namespace": "retryable-writes-tests.coll0", - "filter": { - "_id": 3 - } - } - } - ] - }, - "expectError": { - "errorCode": 189, - "errorLabelsContain": [ - "RetryableWriteError" - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": true, - "ordered": true, - "ops": [ - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "multi": true - }, - { - "delete": 0, - "filter": { - "_id": 3 - }, - "multi": true - } - ], - "nsInfo": [ - { - "ns": "retryable-writes-tests.coll0" - } - ] - } - } - } - ] - } - ] - }, - { - "description": "client bulkWrite with no multi: true operations succeeds after retryable writeConcernError", - "operations": [ - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "errorLabels": [ - "RetryableWriteError" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down" - } - } - } - } - }, - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "retryable-writes-tests.coll0", - "document": { - "_id": 4, - "x": 44 - } - } - }, - { - "updateOne": { - "namespace": "retryable-writes-tests.coll0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "replaceOne": { - "namespace": "retryable-writes-tests.coll0", - "filter": { - "_id": 2 - }, - "replacement": { - "x": 222 - } - } - }, - { - "deleteOne": { - "namespace": "retryable-writes-tests.coll0", - "filter": { - "_id": 3 - } - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 2, - "modifiedCount": 2, - "deletedCount": 1, - "insertResults": { - "0": { - "insertedId": 4 - } - }, - "updateResults": { - "1": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - }, - "2": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - } - }, - "deleteResults": { - "3": { - "deletedCount": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 4, - "x": 44 - } - }, - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "multi": false - }, - { - "update": 0, - "filter": { - "_id": 2 - }, - "updateMods": { - "x": 222 - }, - "multi": false - }, - { - "delete": 0, - "filter": { - "_id": 3 - }, - "multi": false - } - ], - "nsInfo": [ - { - "ns": "retryable-writes-tests.coll0" - } - ], - "lsid": { - "$$exists": true - }, - "txnNumber": { - "$$exists": true - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 4, - "x": 44 - } - }, - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "multi": false - }, - { - "update": 0, - "filter": { - "_id": 2 - }, - "updateMods": { - "x": 222 - }, - "multi": false - }, - { - "delete": 0, - "filter": { - "_id": 3 - }, - "multi": false - } - ], - "nsInfo": [ - { - "ns": "retryable-writes-tests.coll0" - } - ], - "lsid": { - "$$exists": true - }, - "txnNumber": { - "$$exists": true - } - } - } - } - ] - } - ] - }, - { - "description": "client bulkWrite with multi: true operations fails after retryable writeConcernError", - "operations": [ - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "errorLabels": [ - "RetryableWriteError" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down" - } - } - } - } - }, - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "updateMany": { - "namespace": "retryable-writes-tests.coll0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "deleteMany": { - "namespace": "retryable-writes-tests.coll0", - "filter": { - "_id": 3 - } - } - } - ] - }, - "expectError": { - "writeConcernErrors": [ - { - "code": 91, - "message": "Replication is being shut down" - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": true, - "ordered": true, - "ops": [ - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "multi": true - }, - { - "delete": 0, - "filter": { - "_id": 3 - }, - "multi": true - } - ], - "nsInfo": [ - { - "ns": "retryable-writes-tests.coll0" - } - ] - } - } - } - ] - } - ] - }, - { - "description": "client bulkWrite with retryWrites: false does not retry", - "operations": [ - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "clientRetryWritesFalse", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "object": "clientRetryWritesFalse", - "name": "clientBulkWrite", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "retryable-writes-tests.coll0", - "document": { - "_id": 4, - "x": 44 - } - } - } - ] - }, - "expectError": { - "errorCode": 189, - "errorLabelsContain": [ - "RetryableWriteError" - ] - } - } - ], - "expectEvents": [ - { - "client": "clientRetryWritesFalse", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": true, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 4, - "x": 44 - } - } - ], - "nsInfo": [ - { - "ns": "retryable-writes-tests.coll0" - } - ] - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/retryable-writes/unified/client-bulkWrite-serverErrors.yml b/testdata/retryable-writes/unified/client-bulkWrite-serverErrors.yml deleted file mode 100644 index 722e5cc8e0..0000000000 --- a/testdata/retryable-writes/unified/client-bulkWrite-serverErrors.yml +++ /dev/null @@ -1,413 +0,0 @@ -description: "client bulkWrite retryable writes" -schemaVersion: "1.21" -runOnRequirements: - - minServerVersion: "8.0" - topologies: - - replicaset - - sharded - - load-balanced - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - useMultipleMongoses: false - - client: - id: &clientRetryWritesFalse clientRetryWritesFalse - uriOptions: - retryWrites: false - observeEvents: [ commandStartedEvent ] - useMultipleMongoses: false - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name retryable-writes-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - -_yamlAnchors: - namespace: &namespace "retryable-writes-tests.coll0" - -tests: - - description: "client bulkWrite with no multi: true operations succeeds after retryable top-level error" - operations: - - object: testRunner - name: failPoint - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: [ bulkWrite ] - errorCode: 189 # PrimarySteppedDown - errorLabels: [ RetryableWriteError ] - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 4, x: 44 } - - updateOne: - namespace: *namespace - filter: { _id: 1 } - update: - $inc: { x: 1 } - - replaceOne: - namespace: *namespace - filter: { _id: 2 } - replacement: { x: 222 } - - deleteOne: - namespace: *namespace - filter: { _id: 3 } - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 2 - modifiedCount: 2 - deletedCount: 1 - insertResults: - 0: - insertedId: 4 - updateResults: - 1: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - 2: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - deleteResults: - 3: - deletedCount: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 4, x: 44 } - - update: 0 - filter: { _id: 1 } - updateMods: - $inc: { x: 1 } - multi: false - - update: 0 - filter: { _id: 2 } - updateMods: { x: 222 } - multi: false - - delete: 0 - filter: { _id: 3 } - multi: false - nsInfo: - - ns: *namespace - lsid: { $$exists: true } - txnNumber: { $$exists: true } - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 4, x: 44 } - - update: 0 - filter: { _id: 1 } - updateMods: - $inc: { x: 1 } - multi: false - - update: 0 - filter: { _id: 2 } - updateMods: { x: 222 } - multi: false - - delete: 0 - filter: { _id: 3 } - multi: false - nsInfo: - - ns: *namespace - lsid: { $$exists: true } - txnNumber: { $$exists: true } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 12 } - - { _id: 2, x: 222 } - - { _id: 4, x: 44 } - - description: "client bulkWrite with multi: true operations fails after retryable top-level error" - operations: - - object: testRunner - name: failPoint - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: [ bulkWrite ] - errorCode: 189 # PrimarySteppedDown - errorLabels: [ RetryableWriteError ] - - object: *client0 - name: clientBulkWrite - arguments: - models: - - updateMany: - namespace: *namespace - filter: { _id: 1 } - update: - $inc: { x: 1 } - - deleteMany: - namespace: *namespace - filter: { _id: 3 } - expectError: - errorCode: 189 - errorLabelsContain: [ RetryableWriteError ] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: true - ordered: true - ops: - - update: 0 - filter: { _id: 1 } - updateMods: - $inc: { x: 1 } - multi: true - - delete: 0 - filter: { _id: 3 } - multi: true - nsInfo: - - ns: *namespace - - description: "client bulkWrite with no multi: true operations succeeds after retryable writeConcernError" - operations: - - object: testRunner - name: failPoint - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: [ bulkWrite ] - errorLabels: [ RetryableWriteError ] - writeConcernError: - code: 91 - errmsg: "Replication is being shut down" - - object: *client0 - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 4, x: 44 } - - updateOne: - namespace: *namespace - filter: { _id: 1 } - update: - $inc: { x: 1 } - - replaceOne: - namespace: *namespace - filter: { _id: 2 } - replacement: { x: 222 } - - deleteOne: - namespace: *namespace - filter: { _id: 3 } - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 2 - modifiedCount: 2 - deletedCount: 1 - insertResults: - 0: - insertedId: 4 - updateResults: - 1: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - 2: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - deleteResults: - 3: - deletedCount: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 4, x: 44 } - - update: 0 - filter: { _id: 1 } - updateMods: - $inc: { x: 1 } - multi: false - - update: 0 - filter: { _id: 2 } - updateMods: { x: 222 } - multi: false - - delete: 0 - filter: { _id: 3 } - multi: false - nsInfo: - - ns: *namespace - lsid: { $$exists: true } - txnNumber: { $$exists: true } - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 4, x: 44 } - - update: 0 - filter: { _id: 1 } - updateMods: - $inc: { x: 1 } - multi: false - - update: 0 - filter: { _id: 2 } - updateMods: { x: 222 } - multi: false - - delete: 0 - filter: { _id: 3 } - multi: false - nsInfo: - - ns: *namespace - lsid: { $$exists: true } - txnNumber: { $$exists: true } - - description: "client bulkWrite with multi: true operations fails after retryable writeConcernError" - operations: - - object: testRunner - name: failPoint - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: [ bulkWrite ] - errorLabels: [ RetryableWriteError ] - writeConcernError: - code: 91 - errmsg: "Replication is being shut down" - - object: *client0 - name: clientBulkWrite - arguments: - models: - - updateMany: - namespace: *namespace - filter: { _id: 1 } - update: - $inc: { x: 1 } - - deleteMany: - namespace: *namespace - filter: { _id: 3 } - expectError: - writeConcernErrors: - - code: 91 - message: "Replication is being shut down" - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: true - ordered: true - ops: - - update: 0 - filter: { _id: 1 } - updateMods: - $inc: { x: 1 } - multi: true - - delete: 0 - filter: { _id: 3 } - multi: true - nsInfo: - - ns: *namespace - - description: "client bulkWrite with retryWrites: false does not retry" - operations: - - object: testRunner - name: failPoint - arguments: - client: *clientRetryWritesFalse - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: [ bulkWrite ] - errorCode: 189 # PrimarySteppedDown - errorLabels: [ RetryableWriteError ] - - object: *clientRetryWritesFalse - name: clientBulkWrite - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 4, x: 44 } - expectError: - errorCode: 189 - errorLabelsContain: [ RetryableWriteError ] - expectEvents: - - client: *clientRetryWritesFalse - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: true - ordered: true - ops: - - insert: 0 - document: { _id: 4, x: 44 } - nsInfo: - - ns: *namespace diff --git a/testdata/retryable-writes/unified/insertOne-noWritesPerformedError.yml b/testdata/retryable-writes/unified/insertOne-noWritesPerformedError.yml deleted file mode 100644 index 3295d153dd..0000000000 --- a/testdata/retryable-writes/unified/insertOne-noWritesPerformedError.yml +++ /dev/null @@ -1,54 +0,0 @@ -description: "retryable-writes insertOne noWritesPerformedErrors" - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "6.0" - topologies: [ replicaset ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: [ commandFailedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &databaseName retryable-writes-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collectionName no-writes-performed-collection - -tests: - - description: "InsertOne fails after NoWritesPerformed error" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: - times: 2 - data: - failCommands: - - insert - errorCode: 64 - errorLabels: - - NoWritesPerformed - - RetryableWriteError - - name: insertOne - object: *collection0 - arguments: - document: - x: 1 - expectError: - errorCode: 64 - errorLabelsContain: - - NoWritesPerformed - - RetryableWriteError - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: [] diff --git a/testdata/retryable-writes/unified/insertOne-noWritesPerformedErrors.json b/testdata/retryable-writes/unified/insertOne-noWritesPerformedErrors.json deleted file mode 100644 index 3194e91c5c..0000000000 --- a/testdata/retryable-writes/unified/insertOne-noWritesPerformedErrors.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "description": "retryable-writes insertOne noWritesPerformedErrors", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "6.0", - "topologies": [ - "replicaset" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "retryable-writes-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "no-writes-performed-collection" - } - } - ], - "tests": [ - { - "description": "InsertOne fails after NoWritesPerformed error", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 64, - "errorLabels": [ - "NoWritesPerformed", - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - } - }, - "expectError": { - "errorCode": 64, - "errorLabelsContain": [ - "NoWritesPerformed", - "RetryableWriteError" - ] - } - } - ], - "outcome": [ - { - "collectionName": "no-writes-performed-collection", - "databaseName": "retryable-writes-tests", - "documents": [] - } - ] - } - ] -} diff --git a/testdata/retryable-writes/unified/insertOne-serverErrors.json b/testdata/retryable-writes/unified/insertOne-serverErrors.json deleted file mode 100644 index f404adcaf4..0000000000 --- a/testdata/retryable-writes/unified/insertOne-serverErrors.json +++ /dev/null @@ -1,865 +0,0 @@ -{ - "description": "retryable-writes insertOne serverErrors", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topologies": [ - "sharded", - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "retryable-writes-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll" - } - } - ], - "initialData": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "InsertOne succeeds after retryable writeConcernError", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorLabels": [ - "RetryableWriteError" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down" - } - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll", - "documents": [ - { - "_id": 3, - "x": 33 - } - ] - }, - "commandName": "insert", - "databaseName": "retryable-writes-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "coll", - "documents": [ - { - "_id": 3, - "x": 33 - } - ] - }, - "commandName": "insert", - "databaseName": "retryable-writes-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "RetryableWriteError label is added based on top-level code in pre-4.4 server response", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99", - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 189 - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - }, - "expectError": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll", - "documents": [ - { - "_id": 3, - "x": 33 - } - ] - }, - "commandName": "insert", - "databaseName": "retryable-writes-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "coll", - "documents": [ - { - "_id": 3, - "x": 33 - } - ] - }, - "commandName": "insert", - "databaseName": "retryable-writes-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "RetryableWriteError label is added based on writeConcernError in pre-4.4 mongod response", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99", - "topologies": [ - "replicaset" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down" - } - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - }, - "expectError": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll", - "documents": [ - { - "_id": 3, - "x": 33 - } - ] - }, - "commandName": "insert", - "databaseName": "retryable-writes-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "coll", - "documents": [ - { - "_id": 3, - "x": 33 - } - ] - }, - "commandName": "insert", - "databaseName": "retryable-writes-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "RetryableWriteError label is not added based on writeConcernError in pre-4.4 mongos response", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "maxServerVersion": "4.2.99", - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down" - } - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - }, - "expectError": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll", - "documents": [ - { - "_id": 3, - "x": 33 - } - ] - }, - "commandName": "insert", - "databaseName": "retryable-writes-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "InsertOne succeeds after connection failure", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "InsertOne fails after connection failure when retryWrites option is false", - "operations": [ - { - "object": "testRunner", - "name": "createEntities", - "arguments": { - "entities": [ - { - "client": { - "id": "client1", - "useMultipleMongoses": false, - "uriOptions": { - "retryWrites": false - } - } - }, - { - "database": { - "id": "database1", - "client": "client1", - "databaseName": "retryable-writes-tests" - } - }, - { - "collection": { - "id": "collection1", - "database": "database1", - "collectionName": "coll" - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client1", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "object": "collection1", - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - }, - "expectError": { - "isError": true, - "errorLabelsOmit": [ - "RetryableWriteError" - ] - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "InsertOne fails after Interrupted", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11601, - "closeConnection": false - } - } - } - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - }, - "expectError": { - "isError": true, - "errorLabelsOmit": [ - "RetryableWriteError" - ] - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "InsertOne fails after WriteConcernError Interrupted", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 11601, - "errmsg": "operation was interrupted" - } - } - } - } - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - }, - "expectError": { - "isError": true, - "errorLabelsOmit": [ - "RetryableWriteError" - ] - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "InsertOne fails after WriteConcernError WriteConcernFailed", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 64, - "codeName": "WriteConcernFailed", - "errmsg": "waiting for replication timed out", - "errInfo": { - "wtimeout": true - } - } - } - } - } - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - }, - "expectError": { - "isError": true, - "errorLabelsOmit": [ - "RetryableWriteError" - ] - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "InsertOne fails with a RetryableWriteError label after two connection failures", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - }, - "expectError": { - "isError": true, - "errorLabelsContain": [ - "RetryableWriteError" - ] - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - } - ] -} diff --git a/testdata/retryable-writes/unified/insertOne-serverErrors.yml b/testdata/retryable-writes/unified/insertOne-serverErrors.yml deleted file mode 100644 index 95fa71ec79..0000000000 --- a/testdata/retryable-writes/unified/insertOne-serverErrors.yml +++ /dev/null @@ -1,406 +0,0 @@ -description: "retryable-writes insertOne serverErrors" - -schemaVersion: "1.9" - -runOnRequirements: - - minServerVersion: "4.0" - topologies: [ replicaset ] - - minServerVersion: "4.1.7" - topologies: [ sharded, load-balanced ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &databaseName retryable-writes-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collectionName coll - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - description: "InsertOne succeeds after retryable writeConcernError" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - errorLabels: [RetryableWriteError] # top-level error labels - writeConcernError: - code: 91 # ShutdownInProgress - errmsg: "Replication is being shut down" - - name: insertOne - object: *collection0 - arguments: - document: { _id: 3, x: 33 } - expectResult: - $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 3 } } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: [{ _id: 3, x: 33 }] - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - insert: *collectionName - documents: [{ _id: 3, x: 33 }] - commandName: insert - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } # The write was still applied - - - description: "RetryableWriteError label is added based on top-level code in pre-4.4 server response" - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - topologies: [ replicaset, sharded ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - # Trigger the fail point twice to allow asserting the error label in - # the retry attempt's response. - mode: { times: 2 } - data: - failCommands: [ "insert" ] - errorCode: 189 # PrimarySteppedDown - - name: insertOne - object: *collection0 - arguments: - document: { _id: 3, x: 33 } - expectError: - errorLabelsContain: [ "RetryableWriteError" ] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: &insertCommandStartedEvent - command: - insert: *collectionName - documents: [{ _id: 3, x: 33 }] - commandName: insert - databaseName: *databaseName - - commandStartedEvent: *insertCommandStartedEvent - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - - description: "RetryableWriteError label is added based on writeConcernError in pre-4.4 mongod response" - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - topologies: [ replicaset ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - # Trigger the fail point twice to allow asserting the error label in - # the retry attempt's response. - mode: { times: 2 } - data: - failCommands: [ "insert" ] - writeConcernError: - code: 91 # ShutdownInProgress - errmsg: "Replication is being shut down" - - name: insertOne - object: *collection0 - arguments: - document: { _id: 3, x: 33 } - expectError: - errorLabelsContain: [ "RetryableWriteError" ] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: *insertCommandStartedEvent - - commandStartedEvent: *insertCommandStartedEvent - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - # writeConcernError doesn't prevent the server from applying the write - - { _id: 3, x: 33 } - - - description: "RetryableWriteError label is not added based on writeConcernError in pre-4.4 mongos response" - runOnRequirements: - - minServerVersion: "4.2" - maxServerVersion: "4.2.99" - topologies: [ sharded ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - # Trigger the fail point only once since a RetryableWriteError label - # will not be added and the write will not be retried. - mode: { times: 1 } - data: - failCommands: [ "insert" ] - writeConcernError: - code: 91 # ShutdownInProgress - errmsg: "Replication is being shut down" - - name: insertOne - object: *collection0 - arguments: - document: { _id: 3, x: 33 } - expectError: - errorLabelsOmit: [ "RetryableWriteError" ] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: *insertCommandStartedEvent - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - # writeConcernError doesn't prevent the server from applying the write - - { _id: 3, x: 33 } - - - description: 'InsertOne succeeds after connection failure' - operations: - - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - closeConnection: true - - - object: *collection0 - name: insertOne - arguments: - document: { _id: 3, x: 33 } - expectResult: - $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 3 } } - outcome: - - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: 'InsertOne fails after connection failure when retryWrites option is false' - operations: - - - object: testRunner - name: createEntities - arguments: - entities: - - client: - id: &client1 client1 - useMultipleMongoses: false - uriOptions: - retryWrites: false - - database: - id: &database1 database1 - client: *client1 - databaseName: *databaseName - - collection: - id: &collection1 collection1 - database: *database1 - collectionName: *collectionName - - - name: failPoint - object: testRunner - arguments: - client: *client1 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - closeConnection: true - - - object: *collection1 - name: insertOne - arguments: - document: { _id: 3, x: 33 } - expectError: - isError: true - # If retryWrites is false, the driver should not add the - # RetryableWriteError label to the error. - errorLabelsOmit: - - RetryableWriteError - outcome: - - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - - description: 'InsertOne fails after Interrupted' - operations: - - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - errorCode: 11601 - closeConnection: false - - - object: *collection0 - name: insertOne - arguments: - document: { _id: 3, x: 33 } - expectError: - isError: true - errorLabelsOmit: - - RetryableWriteError - outcome: - - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - - description: 'InsertOne fails after WriteConcernError Interrupted' - operations: - - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - writeConcernError: - code: 11601 - errmsg: 'operation was interrupted' - - - object: *collection0 - name: insertOne - arguments: - document: { _id: 3, x: 33 } - expectError: - isError: true - errorLabelsOmit: - - RetryableWriteError - outcome: - - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } # The write was still applied. - - - description: 'InsertOne fails after WriteConcernError WriteConcernFailed' - operations: - - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - writeConcernError: - code: 64 - codeName: WriteConcernFailed - errmsg: 'waiting for replication timed out' - errInfo: - wtimeout: true - - - object: *collection0 - name: insertOne - arguments: - document: { _id: 3, x: 33 } - expectError: - isError: true - errorLabelsOmit: - - RetryableWriteError - outcome: - - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } # The write was still applied. - - - description: 'InsertOne fails with a RetryableWriteError label after two connection failures' - operations: - - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: [ insert ] - closeConnection: true - - - object: *collection0 - name: insertOne - arguments: - document: { _id: 3, x: 33 } - expectError: - isError: true - errorLabelsContain: - - RetryableWriteError - outcome: - - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } diff --git a/testdata/run-command/runCommand.json b/testdata/run-command/runCommand.json deleted file mode 100644 index fde9de92e6..0000000000 --- a/testdata/run-command/runCommand.json +++ /dev/null @@ -1,634 +0,0 @@ -{ - "description": "runCommand", - "schemaVersion": "1.3", - "createEntities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "db", - "client": "client", - "databaseName": "db" - } - }, - { - "collection": { - "id": "collection", - "database": "db", - "collectionName": "collection" - } - }, - { - "database": { - "id": "dbWithRC", - "client": "client", - "databaseName": "dbWithRC", - "databaseOptions": { - "readConcern": { - "level": "local" - } - } - } - }, - { - "database": { - "id": "dbWithWC", - "client": "client", - "databaseName": "dbWithWC", - "databaseOptions": { - "writeConcern": { - "w": 0 - } - } - } - }, - { - "session": { - "id": "session", - "client": "client" - } - }, - { - "client": { - "id": "clientWithStableApi", - "observeEvents": [ - "commandStartedEvent" - ], - "serverApi": { - "version": "1", - "strict": true - } - } - }, - { - "database": { - "id": "dbWithStableApi", - "client": "clientWithStableApi", - "databaseName": "dbWithStableApi" - } - } - ], - "initialData": [ - { - "collectionName": "collection", - "databaseName": "db", - "documents": [] - } - ], - "tests": [ - { - "description": "always attaches $db and implicit lsid to given command and omits default readPreference", - "operations": [ - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectResult": { - "ok": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "ping": 1, - "$db": "db", - "lsid": { - "$$exists": true - }, - "$readPreference": { - "$$exists": false - } - }, - "commandName": "ping" - } - } - ] - } - ] - }, - { - "description": "always gossips the $clusterTime on the sent command", - "runOnRequirements": [ - { - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "operations": [ - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectResult": { - "ok": 1 - } - }, - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectResult": { - "ok": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "ping" - } - }, - { - "commandStartedEvent": { - "command": { - "ping": 1, - "$clusterTime": { - "$$exists": true - } - }, - "commandName": "ping" - } - } - ] - } - ] - }, - { - "description": "attaches the provided session lsid to given command", - "operations": [ - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - }, - "session": "session" - }, - "expectResult": { - "ok": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "ping": 1, - "lsid": { - "$$sessionLsid": "session" - }, - "$db": "db" - }, - "commandName": "ping" - } - } - ] - } - ] - }, - { - "description": "attaches the provided $readPreference to given command", - "runOnRequirements": [ - { - "topologies": [ - "replicaset", - "load-balanced", - "sharded" - ] - } - ], - "operations": [ - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - }, - "readPreference": { - "mode": "nearest" - } - }, - "expectResult": { - "ok": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "ping": 1, - "$readPreference": { - "mode": "nearest" - }, - "$db": "db" - }, - "commandName": "ping" - } - } - ] - } - ] - }, - { - "description": "does not attach $readPreference to given command on standalone", - "runOnRequirements": [ - { - "topologies": [ - "single" - ] - } - ], - "operations": [ - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - }, - "readPreference": { - "mode": "nearest" - } - }, - "expectResult": { - "ok": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "ping": 1, - "$readPreference": { - "$$exists": false - }, - "$db": "db" - }, - "commandName": "ping" - } - } - ] - } - ] - }, - { - "description": "does not attach primary $readPreference to given command", - "operations": [ - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - }, - "readPreference": { - "mode": "primary" - } - }, - "expectResult": { - "ok": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "ping": 1, - "$readPreference": { - "$$exists": false - }, - "$db": "db" - }, - "commandName": "ping" - } - } - ] - } - ] - }, - { - "description": "does not inherit readConcern specified at the db level", - "operations": [ - { - "name": "runCommand", - "object": "dbWithRC", - "arguments": { - "commandName": "aggregate", - "command": { - "aggregate": "collection", - "pipeline": [], - "cursor": {} - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection", - "readConcern": { - "$$exists": false - }, - "$db": "dbWithRC" - }, - "commandName": "aggregate" - } - } - ] - } - ] - }, - { - "description": "does not inherit writeConcern specified at the db level", - "operations": [ - { - "name": "runCommand", - "object": "dbWithWC", - "arguments": { - "commandName": "insert", - "command": { - "insert": "collection", - "documents": [ - { - "foo": "bar" - } - ], - "ordered": true - } - }, - "expectResult": { - "ok": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "collection", - "writeConcern": { - "$$exists": false - }, - "$db": "dbWithWC" - }, - "commandName": "insert" - } - } - ] - } - ] - }, - { - "description": "does not retry retryable errors on given command", - "runOnRequirements": [ - { - "minServerVersion": "4.2" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "ping" - ], - "closeConnection": true - } - } - } - }, - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectError": { - "isClientError": true - } - } - ] - }, - { - "description": "attaches transaction fields to given command", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.2", - "topologies": [ - "sharded", - "load-balanced" - ] - } - ], - "operations": [ - { - "name": "withTransaction", - "object": "session", - "arguments": { - "callback": [ - { - "name": "runCommand", - "object": "db", - "arguments": { - "session": "session", - "commandName": "insert", - "command": { - "insert": "collection", - "documents": [ - { - "foo": "transaction" - } - ], - "ordered": true - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "collection", - "documents": [ - { - "foo": "transaction" - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session" - }, - "txnNumber": 1, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "$$exists": false - }, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "db" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session" - }, - "txnNumber": 1, - "autocommit": false, - "writeConcern": { - "$$exists": false - }, - "readConcern": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ] - }, - { - "description": "attaches apiVersion fields to given command when stableApi is configured on the client", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "dbWithStableApi", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectResult": { - "ok": 1 - } - } - ], - "expectEvents": [ - { - "client": "clientWithStableApi", - "events": [ - { - "commandStartedEvent": { - "command": { - "ping": 1, - "$db": "dbWithStableApi", - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - }, - "commandName": "ping" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/run-command/runCommand.yml b/testdata/run-command/runCommand.yml deleted file mode 100644 index bc55d79205..0000000000 --- a/testdata/run-command/runCommand.yml +++ /dev/null @@ -1,319 +0,0 @@ -description: runCommand - -schemaVersion: "1.3" - -createEntities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: [commandStartedEvent] - - database: - id: &db db - client: *client - databaseName: *db - - collection: - id: &collection collection - database: *db - collectionName: *collection - - database: - id: &dbWithRC dbWithRC - client: *client - databaseName: *dbWithRC - databaseOptions: - readConcern: { level: 'local' } - - database: - id: &dbWithWC dbWithWC - client: *client - databaseName: *dbWithWC - databaseOptions: - writeConcern: { w: 0 } - - session: - id: &session session - client: *client - # Stable API test - - client: - id: &clientWithStableApi clientWithStableApi - observeEvents: [commandStartedEvent] - serverApi: - version: "1" - strict: true - - database: - id: &dbWithStableApi dbWithStableApi - client: *clientWithStableApi - databaseName: *dbWithStableApi - -initialData: -- collectionName: *collection - databaseName: *db - documents: [] - -tests: - - description: always attaches $db and implicit lsid to given command and omits default readPreference - operations: - - name: runCommand - object: *db - arguments: - commandName: ping - command: { ping: 1 } - expectResult: { ok: 1 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - ping: 1 - $db: *db - lsid: { $$exists: true } - $readPreference: { $$exists: false } - commandName: ping - - - description: always gossips the $clusterTime on the sent command - runOnRequirements: - # Only replicasets and sharded clusters have a $clusterTime - - topologies: [ replicaset, sharded ] - operations: - # We have to run one command to obtain a clusterTime to gossip - - name: runCommand - object: *db - arguments: - commandName: ping - command: { ping: 1 } - expectResult: { ok: 1 } - - name: runCommand - object: *db - arguments: - commandName: ping - command: { ping: 1 } - expectResult: { ok: 1 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: ping - # Only check the shape of the second ping which should have the $clusterTime received from the first operation - - commandStartedEvent: - command: - ping: 1 - $clusterTime: { $$exists: true } - commandName: ping - - - description: attaches the provided session lsid to given command - operations: - - name: runCommand - object: *db - arguments: - commandName: ping - command: { ping: 1 } - session: *session - expectResult: { ok: 1 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - ping: 1 - lsid: { $$sessionLsid: *session } - $db: *db - commandName: ping - - - description: attaches the provided $readPreference to given command - runOnRequirements: - # Exclude single topology, which is most likely a standalone server - - topologies: [ replicaset, load-balanced, sharded ] - operations: - - name: runCommand - object: *db - arguments: - commandName: ping - command: { ping: 1 } - readPreference: &readPreference { mode: 'nearest' } - expectResult: { ok: 1 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - ping: 1 - $readPreference: *readPreference - $db: *db - commandName: ping - - - description: does not attach $readPreference to given command on standalone - runOnRequirements: - # This test assumes that the single topology contains a standalone server; - # however, it is possible for a single topology to contain a direct - # connection to another server type. - # See: https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.md#topology-type-single - - topologies: [ single ] - operations: - - name: runCommand - object: *db - arguments: - commandName: ping - command: { ping: 1 } - readPreference: { mode: 'nearest' } - expectResult: { ok: 1 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - ping: 1 - $readPreference: { $$exists: false } - $db: *db - commandName: ping - - - description: does not attach primary $readPreference to given command - operations: - - name: runCommand - object: *db - arguments: - commandName: ping - command: { ping: 1 } - readPreference: { mode: 'primary' } - expectResult: { ok: 1 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - ping: 1 - $readPreference: { $$exists: false } - $db: *db - commandName: ping - - - description: does not inherit readConcern specified at the db level - operations: - - name: runCommand - object: *dbWithRC - # Test with a command that supports a readConcern option. - # expectResult is intentionally omitted because some drivers - # may automatically convert command responses into cursors. - arguments: - commandName: aggregate - command: { aggregate: *collection, pipeline: [], cursor: {} } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - aggregate: *collection - readConcern: { $$exists: false } - $db: *dbWithRC - commandName: aggregate - - - description: does not inherit writeConcern specified at the db level - operations: - - name: runCommand - object: *dbWithWC - arguments: - commandName: insert - command: - insert: *collection - documents: [ { foo: 'bar' } ] - ordered: true - expectResult: { ok: 1 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collection - writeConcern: { $$exists: false } - $db: *dbWithWC - commandName: insert - - - description: does not retry retryable errors on given command - runOnRequirements: - - minServerVersion: "4.2" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ping] - closeConnection: true - - name: runCommand - object: *db - arguments: - commandName: ping - command: { ping: 1 } - expectError: - isClientError: true - - - description: attaches transaction fields to given command - runOnRequirements: - - minServerVersion: "4.0" - topologies: [ replicaset ] - - minServerVersion: "4.2" - topologies: [ sharded, load-balanced ] - operations: - - name: withTransaction - object: *session - arguments: - callback: - - name: runCommand - object: *db - arguments: - session: *session - commandName: insert - command: - insert: *collection - documents: [ { foo: 'transaction' } ] - ordered: true - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 1 } } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collection - documents: [ { foo: 'transaction' } ] - ordered: true - lsid: { $$sessionLsid: *session } - txnNumber: 1 - startTransaction: true - autocommit: false - # omitted fields - readConcern: { $$exists: false } - writeConcern: { $$exists: false } - commandName: insert - databaseName: *db - - commandStartedEvent: - command: - commitTransaction: 1 - lsid: { $$sessionLsid: *session } - txnNumber: 1 - autocommit: false - # omitted fields - writeConcern: { $$exists: false } - readConcern: { $$exists: false } - commandName: commitTransaction - databaseName: admin - - - description: attaches apiVersion fields to given command when stableApi is configured on the client - runOnRequirements: - - minServerVersion: "5.0" - operations: - - name: runCommand - object: *dbWithStableApi - arguments: - commandName: ping - command: - ping: 1 - expectResult: { ok: 1 } - expectEvents: - - client: *clientWithStableApi - events: - - commandStartedEvent: - command: - ping: 1 - $db: *dbWithStableApi - apiVersion: "1" - apiStrict: true - apiDeprecationErrors: { $$unsetOrMatches: false } - commandName: ping diff --git a/testdata/run-command/runCursorCommand.json b/testdata/run-command/runCursorCommand.json deleted file mode 100644 index 4f1ec8a01a..0000000000 --- a/testdata/run-command/runCursorCommand.json +++ /dev/null @@ -1,877 +0,0 @@ -{ - "description": "runCursorCommand", - "schemaVersion": "1.9", - "createEntities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "connectionReadyEvent", - "connectionCheckedOutEvent", - "connectionCheckedInEvent" - ] - } - }, - { - "session": { - "id": "session", - "client": "client" - } - }, - { - "database": { - "id": "db", - "client": "client", - "databaseName": "db" - } - }, - { - "collection": { - "id": "collection", - "database": "db", - "collectionName": "collection" - } - } - ], - "initialData": [ - { - "collectionName": "collection", - "databaseName": "db", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "tests": [ - { - "description": "successfully executes checkMetadataConsistency cursor creating command", - "runOnRequirements": [ - { - "minServerVersion": "7.0", - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "runCursorCommand", - "object": "db", - "arguments": { - "commandName": "checkMetadataConsistency", - "command": { - "checkMetadataConsistency": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "checkMetadataConsistency": 1, - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "checkMetadataConsistency" - } - } - ] - } - ] - }, - { - "description": "errors if the command response is not a cursor", - "operations": [ - { - "name": "createCommandCursor", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectError": { - "isClientError": true - } - } - ] - }, - { - "description": "creates an implicit session that is reused across getMores", - "operations": [ - { - "name": "runCursorCommand", - "object": "db", - "arguments": { - "commandName": "find", - "command": { - "find": "collection", - "batchSize": 2 - } - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - }, - { - "name": "assertSameLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client" - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection", - "batchSize": 2, - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection", - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "getMore" - } - } - ] - } - ] - }, - { - "description": "accepts an explicit session that is reused across getMores", - "operations": [ - { - "name": "runCursorCommand", - "object": "db", - "arguments": { - "commandName": "find", - "session": "session", - "command": { - "find": "collection", - "batchSize": 2 - } - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - }, - { - "name": "assertSameLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client" - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection", - "batchSize": 2, - "$db": "db", - "lsid": { - "$$sessionLsid": "session" - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection", - "$db": "db", - "lsid": { - "$$sessionLsid": "session" - } - }, - "commandName": "getMore" - } - } - ] - } - ] - }, - { - "description": "returns pinned connections to the pool when the cursor is exhausted", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ] - } - ], - "operations": [ - { - "name": "createCommandCursor", - "object": "db", - "arguments": { - "commandName": "find", - "batchSize": 2, - "session": "session", - "command": { - "find": "collection", - "batchSize": 2 - } - }, - "saveResultAsEntity": "cursor" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client", - "connections": 1 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor", - "expectResult": { - "_id": 1, - "x": 11 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor", - "expectResult": { - "_id": 2, - "x": 22 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor", - "expectResult": { - "_id": 3, - "x": 33 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor", - "expectResult": { - "_id": 4, - "x": 44 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor", - "expectResult": { - "_id": 5, - "x": 55 - } - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client", - "connections": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection", - "batchSize": 2, - "$db": "db", - "lsid": { - "$$sessionLsid": "session" - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection", - "$db": "db", - "lsid": { - "$$sessionLsid": "session" - } - }, - "commandName": "getMore" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection", - "$db": "db", - "lsid": { - "$$sessionLsid": "session" - } - }, - "commandName": "getMore" - } - } - ] - }, - { - "client": "client", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - }, - { - "description": "returns pinned connections to the pool when the cursor is closed", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ] - } - ], - "operations": [ - { - "name": "createCommandCursor", - "object": "db", - "arguments": { - "commandName": "find", - "command": { - "find": "collection", - "batchSize": 2 - } - }, - "saveResultAsEntity": "cursor" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client", - "connections": 1 - } - }, - { - "name": "close", - "object": "cursor" - }, - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client", - "connections": 0 - } - } - ] - }, - { - "description": "supports configuring getMore batchSize", - "operations": [ - { - "name": "runCursorCommand", - "object": "db", - "arguments": { - "commandName": "find", - "batchSize": 5, - "command": { - "find": "collection", - "batchSize": 1 - } - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection", - "batchSize": 1, - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection", - "batchSize": 5, - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "getMore" - } - } - ] - } - ] - }, - { - "description": "supports configuring getMore maxTimeMS", - "operations": [ - { - "name": "runCursorCommand", - "object": "db", - "arguments": { - "commandName": "find", - "maxTimeMS": 300, - "command": { - "find": "collection", - "maxTimeMS": 200, - "batchSize": 1 - } - }, - "ignoreResultAndError": true - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection", - "maxTimeMS": 200, - "batchSize": 1, - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection", - "$db": "db", - "maxTimeMS": 300, - "lsid": { - "$$exists": true - } - }, - "commandName": "getMore" - } - } - ] - } - ] - }, - { - "description": "supports configuring getMore comment", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "runCursorCommand", - "object": "db", - "arguments": { - "commandName": "find", - "comment": { - "hello": "getMore" - }, - "command": { - "find": "collection", - "batchSize": 1, - "comment": { - "hello": "find" - } - } - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection", - "batchSize": 1, - "comment": { - "hello": "find" - }, - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection", - "comment": { - "hello": "getMore" - }, - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "getMore" - } - } - ] - } - ] - }, - { - "description": "does not close the cursor when receiving an empty batch", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "dropCollection", - "object": "db", - "arguments": { - "collection": "cappedCollection" - } - }, - { - "name": "createCollection", - "object": "db", - "arguments": { - "collection": "cappedCollection", - "capped": true, - "size": 4096, - "max": 3 - }, - "saveResultAsEntity": "cappedCollection" - }, - { - "name": "insertMany", - "object": "cappedCollection", - "arguments": { - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - }, - { - "name": "createCommandCursor", - "object": "db", - "arguments": { - "cursorType": "tailable", - "commandName": "find", - "batchSize": 2, - "command": { - "find": "cappedCollection", - "tailable": true - } - }, - "saveResultAsEntity": "cursor" - }, - { - "name": "iterateOnce", - "object": "cursor" - }, - { - "name": "iterateOnce", - "object": "cursor" - }, - { - "name": "iterateOnce", - "object": "cursor" - }, - { - "name": "close", - "object": "cursor" - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "drop": "cappedCollection" - }, - "commandName": "drop" - } - }, - { - "commandStartedEvent": { - "command": { - "create": "cappedCollection" - }, - "commandName": "create" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "cappedCollection" - }, - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "cappedCollection", - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "cappedCollection", - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "getMore" - } - }, - { - "commandStartedEvent": { - "command": { - "killCursors": "cappedCollection", - "cursors": { - "$$type": "array" - } - }, - "commandName": "killCursors" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/run-command/runCursorCommand.yml b/testdata/run-command/runCursorCommand.yml deleted file mode 100644 index 1f9bf532c3..0000000000 --- a/testdata/run-command/runCursorCommand.yml +++ /dev/null @@ -1,391 +0,0 @@ -description: runCursorCommand - -schemaVersion: '1.9' - -createEntities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: [commandStartedEvent, connectionReadyEvent, connectionCheckedOutEvent, connectionCheckedInEvent] - - session: - id: &session session - client: *client - - database: - id: &db db - client: *client - databaseName: *db - - collection: - id: &collection collection - database: *db - collectionName: *collection - -initialData: - - collectionName: collection - databaseName: *db - documents: &documents - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - -tests: - # This is what this API was invented to do. - - description: successfully executes checkMetadataConsistency cursor creating command - runOnRequirements: - - minServerVersion: '7.0' - topologies: [sharded] - operations: - - name: runCursorCommand - object: *db - arguments: - commandName: checkMetadataConsistency - command: { checkMetadataConsistency: 1 } - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - checkMetadataConsistency: 1 - $db: *db - lsid: { $$exists: true } - commandName: checkMetadataConsistency - - - description: errors if the command response is not a cursor - operations: - - name: createCommandCursor - object: *db - arguments: - commandName: ping - command: { ping: 1 } - expectError: - isClientError: true - - - # Driver Sessions - - description: creates an implicit session that is reused across getMores - operations: - - name: runCursorCommand - object: *db - arguments: - commandName: find - command: { find: *collection, batchSize: 2 } - expectResult: *documents - - name: assertSameLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - find: *collection - batchSize: 2 - $db: *db - lsid: { $$exists: true } - commandName: find - - commandStartedEvent: - command: - getMore: { $$type: [int, long] } - collection: *collection - $db: *db - lsid: { $$exists: true } - commandName: getMore - - - description: accepts an explicit session that is reused across getMores - operations: - - name: runCursorCommand - object: *db - arguments: - commandName: find - session: *session - command: { find: *collection, batchSize: 2 } - expectResult: *documents - - name: assertSameLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - find: *collection - batchSize: 2 - $db: *db - lsid: { $$sessionLsid: *session } - commandName: find - - commandStartedEvent: - command: - getMore: { $$type: [int, long] } - collection: *collection - $db: *db - lsid: { $$sessionLsid: *session } - commandName: getMore - - # Load Balancers - - description: returns pinned connections to the pool when the cursor is exhausted - runOnRequirements: - - topologies: [ load-balanced ] - operations: - - name: createCommandCursor - object: *db - arguments: - commandName: find - batchSize: 2 - session: *session - command: { find: *collection, batchSize: 2 } - saveResultAsEntity: &cursor cursor - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client - connections: 1 - - name: iterateUntilDocumentOrError - object: *cursor - expectResult: { _id: 1, x: 11 } - - name: iterateUntilDocumentOrError - object: *cursor - expectResult: { _id: 2, x: 22 } - - name: iterateUntilDocumentOrError - object: *cursor - expectResult: { _id: 3, x: 33 } - - name: iterateUntilDocumentOrError - object: *cursor - expectResult: { _id: 4, x: 44 } - - name: iterateUntilDocumentOrError - object: *cursor - expectResult: { _id: 5, x: 55 } - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client - connections: 0 - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - find: *collection - batchSize: 2 - $db: *db - lsid: { $$sessionLsid: *session } - commandName: find # 2 documents - - commandStartedEvent: - command: - getMore: { $$type: [int, long] } - collection: *collection - $db: *db - lsid: { $$sessionLsid: *session } - commandName: getMore # 2 documents - - commandStartedEvent: - command: - getMore: { $$type: [int, long] } - collection: *collection - $db: *db - lsid: { $$sessionLsid: *session } - commandName: getMore # 1 document - # Total documents: 5 - - client: *client - eventType: cmap - events: - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - - description: returns pinned connections to the pool when the cursor is closed - runOnRequirements: - - topologies: [ load-balanced ] - operations: - - name: createCommandCursor - object: *db - arguments: - commandName: find - command: { find: *collection, batchSize: 2 } - saveResultAsEntity: *cursor - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client - connections: 1 - - name: close - object: *cursor - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client - connections: 0 - - # Iterating the Cursor / Executing GetMores - - description: supports configuring getMore batchSize - operations: - - name: runCursorCommand - object: *db - arguments: - commandName: find - batchSize: 5 - command: { find: *collection, batchSize: 1 } - expectResult: *documents - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - find: *collection - batchSize: 1 - $db: *db - lsid: { $$exists: true } - commandName: find - - commandStartedEvent: - command: - getMore: { $$type: [int, long] } - collection: *collection - batchSize: 5 - $db: *db - lsid: { $$exists: true } - commandName: getMore - - - description: supports configuring getMore maxTimeMS - operations: - - name: runCursorCommand - object: *db - arguments: - commandName: find - maxTimeMS: 300 - command: { find: *collection, maxTimeMS: 200, batchSize: 1 } - ignoreResultAndError: true - expectEvents: - - client: *client - eventType: command - # The getMore should receive an error here because we do not have the right kind of cursor - # So drivers should run a killCursors, but neither the error nor the killCursors command is relevant to this test - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - find: *collection - maxTimeMS: 200 - batchSize: 1 - $db: *db - lsid: { $$exists: true } - commandName: find - - commandStartedEvent: - command: - getMore: { $$type: [int, long] } - collection: *collection - $db: *db - maxTimeMS: 300 - lsid: { $$exists: true } - commandName: getMore - - - description: supports configuring getMore comment - runOnRequirements: - - minServerVersion: '4.4' - operations: - - name: runCursorCommand - object: *db - arguments: - commandName: find - comment: { hello: 'getMore' } - command: { find: *collection, batchSize: 1, comment: { hello: 'find' } } - expectResult: *documents - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - find: *collection - batchSize: 1 - comment: { hello: 'find' } - $db: *db - lsid: { $$exists: true } - commandName: find - - commandStartedEvent: - command: - getMore: { $$type: [int, long] } - collection: *collection - comment: { hello: 'getMore' } - $db: *db - lsid: { $$exists: true } - commandName: getMore - - # Tailable cursor - - description: does not close the cursor when receiving an empty batch - runOnRequirements: - - serverless: forbid - operations: - - name: dropCollection - object: *db - arguments: - collection: &cappedCollection cappedCollection - - name: createCollection - object: *db - arguments: - collection: *cappedCollection - capped: true - size: 4096 - max: 3 - saveResultAsEntity: *cappedCollection - - name: insertMany - object: *cappedCollection - arguments: - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - name: createCommandCursor - object: *db - arguments: - cursorType: tailable - commandName: find - batchSize: 2 - command: { find: *cappedCollection, tailable: true } - saveResultAsEntity: &cursor cursor - - name: iterateOnce - object: *cursor - - name: iterateOnce - object: *cursor - - name: iterateOnce - object: *cursor - - name: close - object: *cursor - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - drop: *cappedCollection - commandName: drop - - commandStartedEvent: - command: - create: *cappedCollection - commandName: create - - commandStartedEvent: - command: - insert: *cappedCollection - commandName: insert - - commandStartedEvent: - command: - find: *cappedCollection - $db: *db - lsid: { $$exists: true } - commandName: find - - commandStartedEvent: - command: - getMore: { $$type: [int, long] } - collection: *cappedCollection - $db: *db - lsid: { $$exists: true } - commandName: getMore - - commandStartedEvent: - command: - killCursors: *cappedCollection - cursors: { $$type: array } - commandName: killCursors diff --git a/testdata/server-discovery-and-monitoring/errors/error_handling_handshake.json b/testdata/server-discovery-and-monitoring/errors/error_handling_handshake.json deleted file mode 100644 index 56ca7d1132..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/error_handling_handshake.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "description": "Network timeouts before and after the handshake completes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore network timeout application error (afterHandshakeCompletes)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "timeout" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Mark server unknown on network timeout application error (beforeHandshakeCompletes)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "beforeHandshakeCompletes", - "maxWireVersion": 9, - "type": "timeout" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/error_handling_handshake.yml b/testdata/server-discovery-and-monitoring/errors/error_handling_handshake.yml deleted file mode 100644 index 8482ea704c..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/error_handling_handshake.yml +++ /dev/null @@ -1,55 +0,0 @@ -description: Network timeouts before and after the handshake completes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore network timeout application error (afterHandshakeCompletes) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: timeout - outcome: *outcome - -- description: Mark server unknown on network timeout application error (beforeHandshakeCompletes) - applicationErrors: - - address: a:27017 - when: beforeHandshakeCompletes - maxWireVersion: 9 - type: timeout - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/generate-error-tests.py b/testdata/server-discovery-and-monitoring/errors/generate-error-tests.py deleted file mode 100644 index c9323857ad..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/generate-error-tests.py +++ /dev/null @@ -1,172 +0,0 @@ -import itertools -import os -import subprocess -import sys - -# Require Python 3.7+ for ordered dictionaries so that the order of the -# generated tests remain the same. -if sys.version_info[:2] < (3, 7): - print('ERROR: This script requires Python >= 3.7, not:') - print(sys.version) - print('Usage: python3 %s' % (sys.argv[0])) - exit(1) - - -dirname = os.path.dirname -DIR = dirname(os.path.realpath(__file__)) -SOURCE = dirname(dirname(dirname(DIR))) - - -def template(filename): - fullpath = os.path.join(DIR, filename) - with open(fullpath, 'r') as f: - return f.read() - - -def write_test(filename, data): - fullpath = os.path.join(DIR, filename + '.yml') - with open(fullpath, 'w') as f: - f.write(data) - - print(f"Generated {fullpath}") - - -# Maps from error_name to (error_code,) -ERR_CODES = { - 'InterruptedAtShutdown': (11600,), - 'InterruptedDueToReplStateChange': (11602,), - 'NotPrimaryOrSecondary': (13436,), - 'PrimarySteppedDown': (189,), - 'ShutdownInProgress': (91,), - 'NotWritablePrimary': (10107,), - 'NotPrimaryNoSecondaryOk': (13435,), - 'LegacyNotPrimary': (10058,), -} - - -def create_stale_tests(): - tmp = template('stale-topologyVersion.yml.template') - for error_name in ERR_CODES: - test_name = f'stale-topologyVersion-{error_name}' - error_code, = ERR_CODES[error_name] - data = tmp.format(**locals()) - write_test(test_name, data) - -TV_GREATER = ''' - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2"''' -TV_GREATER_FINAL = ''' - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2"''' -TV_CHANGED = ''' - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1"''' -TV_CHANGED_FINAL = ''' - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1"''' - -# Maps non-stale error description to: -# (error_topology_version, final_topology_version) -NON_STALE_CASES = { - 'topologyVersion missing': ('', ' null'), - 'topologyVersion greater': (TV_GREATER, TV_GREATER_FINAL), - 'topologyVersion proccessId changed': (TV_CHANGED, TV_CHANGED_FINAL), -} - - -def create_non_stale_tests(): - tmp = template('non-stale-topologyVersion.yml.template') - for error_name, description in itertools.product( - ERR_CODES, NON_STALE_CASES): - test_name = f'non-stale-{description.replace(" ", "-")}-{error_name}' - error_code, = ERR_CODES[error_name] - error_topology_version, final_topology_version = NON_STALE_CASES[description] - # On 4.2+, only ShutdownInProgress and InterruptedAtShutdown will - # clear the pool. - if error_name in ("ShutdownInProgress", "InterruptedAtShutdown"): - final_pool_generation = 1 - else: - final_pool_generation = 0 - - data = tmp.format(**locals()) - write_test(test_name, data) - - -WHEN = ['beforeHandshakeCompletes', 'afterHandshakeCompletes'] -STALE_GENERATION_COMMAND_ERROR = ''' - type: command - response: - ok: 0 - errmsg: {error_name} - code: {error_code} - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2"''' -STALE_GENERATION_NETWORK_ERROR = ''' - type: {network_error_type}''' - - -def create_stale_generation_tests(): - tmp = template('stale-generation.yml.template') - # Stale command errors - for error_name, when in itertools.product(ERR_CODES, WHEN): - test_name = f'stale-generation-{when}-{error_name}' - error_code, = ERR_CODES[error_name] - stale_error = STALE_GENERATION_COMMAND_ERROR.format(**locals()) - data = tmp.format(**locals()) - write_test(test_name, data) - # Stale network errors - for network_error_type, when in itertools.product( - ['network', 'timeout'], WHEN): - error_name = network_error_type - test_name = f'stale-generation-{when}-{network_error_type}' - stale_error = STALE_GENERATION_NETWORK_ERROR.format(**locals()) - data = tmp.format(**locals()) - write_test(test_name, data) - - -def create_pre_42_tests(): - tmp = template('pre-42.yml.template') - # All "not writable primary"/"node is recovering" clear the pool on <4.2 - for error_name in ERR_CODES: - test_name = f'pre-42-{error_name}' - error_code, = ERR_CODES[error_name] - data = tmp.format(**locals()) - write_test(test_name, data) - - -def create_post_42_tests(): - tmp = template('post-42.yml.template') - for error_name in ERR_CODES: - test_name = f'post-42-{error_name}' - error_code, = ERR_CODES[error_name] - # On 4.2+, only ShutdownInProgress and InterruptedAtShutdown will - # clear the pool. - if error_name in ("ShutdownInProgress", "InterruptedAtShutdown"): - final_pool_generation = 1 - else: - final_pool_generation = 0 - data = tmp.format(**locals()) - write_test(test_name, data) - - -create_stale_tests() -create_non_stale_tests() -create_stale_generation_tests() -create_pre_42_tests() -create_post_42_tests() - -print('Running make') -subprocess.run(f'cd {SOURCE} && make', shell=True, check=True) diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-network-error.json b/testdata/server-discovery-and-monitoring/errors/non-stale-network-error.json deleted file mode 100644 index c22a47dc8a..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-network-error.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "description": "Non-stale network error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale network error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-network-error.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-network-error.yml deleted file mode 100644 index 3d29debefe..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-network-error.yml +++ /dev/null @@ -1,47 +0,0 @@ -description: Non-stale network error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale network error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-network-timeout-error.json b/testdata/server-discovery-and-monitoring/errors/non-stale-network-timeout-error.json deleted file mode 100644 index 03dc5b66c9..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-network-timeout-error.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "description": "Non-stale network timeout error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale network timeout error does not mark server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "timeout" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-network-timeout-error.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-network-timeout-error.yml deleted file mode 100644 index 0c27f52d2e..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-network-timeout-error.yml +++ /dev/null @@ -1,38 +0,0 @@ -description: Non-stale network timeout error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale network timeout error does not mark server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: timeout - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-InterruptedAtShutdown.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-InterruptedAtShutdown.json deleted file mode 100644 index 777e703a3c..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-InterruptedAtShutdown.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion greater InterruptedAtShutdown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion greater InterruptedAtShutdown error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedAtShutdown", - "code": 11600, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-InterruptedAtShutdown.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-InterruptedAtShutdown.yml deleted file mode 100644 index 9672debceb..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-InterruptedAtShutdown.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion greater InterruptedAtShutdown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion greater InterruptedAtShutdown error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedAtShutdown - code: 11600 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-InterruptedDueToReplStateChange.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-InterruptedDueToReplStateChange.json deleted file mode 100644 index c4aa7fb71b..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-InterruptedDueToReplStateChange.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion greater InterruptedDueToReplStateChange error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion greater InterruptedDueToReplStateChange error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedDueToReplStateChange", - "code": 11602, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-InterruptedDueToReplStateChange.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-InterruptedDueToReplStateChange.yml deleted file mode 100644 index 87162a1595..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-InterruptedDueToReplStateChange.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion greater InterruptedDueToReplStateChange error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion greater InterruptedDueToReplStateChange error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedDueToReplStateChange - code: 11602 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-LegacyNotPrimary.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-LegacyNotPrimary.json deleted file mode 100644 index 2a9bc8a5cf..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-LegacyNotPrimary.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion greater LegacyNotPrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion greater LegacyNotPrimary error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "LegacyNotPrimary", - "code": 10058, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-LegacyNotPrimary.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-LegacyNotPrimary.yml deleted file mode 100644 index ca25a16512..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-LegacyNotPrimary.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion greater LegacyNotPrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion greater LegacyNotPrimary error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: LegacyNotPrimary - code: 10058 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotPrimaryNoSecondaryOk.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotPrimaryNoSecondaryOk.json deleted file mode 100644 index 638aa306cb..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotPrimaryNoSecondaryOk.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion greater NotPrimaryNoSecondaryOk error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion greater NotPrimaryNoSecondaryOk error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryNoSecondaryOk", - "code": 13435, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotPrimaryNoSecondaryOk.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotPrimaryNoSecondaryOk.yml deleted file mode 100644 index b5dfc46978..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotPrimaryNoSecondaryOk.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion greater NotPrimaryNoSecondaryOk error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion greater NotPrimaryNoSecondaryOk error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryNoSecondaryOk - code: 13435 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotPrimaryOrSecondary.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotPrimaryOrSecondary.json deleted file mode 100644 index f327954a9d..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotPrimaryOrSecondary.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion greater NotPrimaryOrSecondary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion greater NotPrimaryOrSecondary error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryOrSecondary", - "code": 13436, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotPrimaryOrSecondary.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotPrimaryOrSecondary.yml deleted file mode 100644 index 8583704c90..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotPrimaryOrSecondary.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion greater NotPrimaryOrSecondary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion greater NotPrimaryOrSecondary error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryOrSecondary - code: 13436 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotWritablePrimary.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotWritablePrimary.json deleted file mode 100644 index 0ac02fb19b..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotWritablePrimary.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion greater NotWritablePrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion greater NotWritablePrimary error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotWritablePrimary", - "code": 10107, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotWritablePrimary.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotWritablePrimary.yml deleted file mode 100644 index 6770de0519..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-NotWritablePrimary.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion greater NotWritablePrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion greater NotWritablePrimary error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotWritablePrimary - code: 10107 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-PrimarySteppedDown.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-PrimarySteppedDown.json deleted file mode 100644 index daf2a7e8e1..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-PrimarySteppedDown.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion greater PrimarySteppedDown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion greater PrimarySteppedDown error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "PrimarySteppedDown", - "code": 189, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-PrimarySteppedDown.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-PrimarySteppedDown.yml deleted file mode 100644 index a302307d97..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-PrimarySteppedDown.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion greater PrimarySteppedDown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion greater PrimarySteppedDown error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: PrimarySteppedDown - code: 189 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-ShutdownInProgress.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-ShutdownInProgress.json deleted file mode 100644 index a7d9e1fe24..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-ShutdownInProgress.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion greater ShutdownInProgress error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion greater ShutdownInProgress error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "ShutdownInProgress", - "code": 91, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-ShutdownInProgress.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-ShutdownInProgress.yml deleted file mode 100644 index 2d7a0c7d27..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-greater-ShutdownInProgress.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion greater ShutdownInProgress error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion greater ShutdownInProgress error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: ShutdownInProgress - code: 91 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-InterruptedAtShutdown.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-InterruptedAtShutdown.json deleted file mode 100644 index 2c59e785ab..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-InterruptedAtShutdown.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "description": "Non-stale topologyVersion missing InterruptedAtShutdown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion missing InterruptedAtShutdown error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedAtShutdown", - "code": 11600 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-InterruptedAtShutdown.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-InterruptedAtShutdown.yml deleted file mode 100644 index 74e59d2056..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-InterruptedAtShutdown.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion missing InterruptedAtShutdown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion missing InterruptedAtShutdown error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedAtShutdown - code: 11600 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-InterruptedDueToReplStateChange.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-InterruptedDueToReplStateChange.json deleted file mode 100644 index f2cb834e83..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-InterruptedDueToReplStateChange.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "description": "Non-stale topologyVersion missing InterruptedDueToReplStateChange error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion missing InterruptedDueToReplStateChange error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedDueToReplStateChange", - "code": 11602 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-InterruptedDueToReplStateChange.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-InterruptedDueToReplStateChange.yml deleted file mode 100644 index 3eab8ad40f..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-InterruptedDueToReplStateChange.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion missing InterruptedDueToReplStateChange error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion missing InterruptedDueToReplStateChange error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedDueToReplStateChange - code: 11602 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-LegacyNotPrimary.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-LegacyNotPrimary.json deleted file mode 100644 index 095128d615..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-LegacyNotPrimary.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "description": "Non-stale topologyVersion missing LegacyNotPrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion missing LegacyNotPrimary error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "LegacyNotPrimary", - "code": 10058 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-LegacyNotPrimary.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-LegacyNotPrimary.yml deleted file mode 100644 index a7d0113357..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-LegacyNotPrimary.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion missing LegacyNotPrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion missing LegacyNotPrimary error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: LegacyNotPrimary - code: 10058 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotPrimaryNoSecondaryOk.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotPrimaryNoSecondaryOk.json deleted file mode 100644 index 3d7312d4a5..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotPrimaryNoSecondaryOk.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "description": "Non-stale topologyVersion missing NotPrimaryNoSecondaryOk error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion missing NotPrimaryNoSecondaryOk error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryNoSecondaryOk", - "code": 13435 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotPrimaryNoSecondaryOk.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotPrimaryNoSecondaryOk.yml deleted file mode 100644 index 0f43246070..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotPrimaryNoSecondaryOk.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion missing NotPrimaryNoSecondaryOk error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion missing NotPrimaryNoSecondaryOk error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryNoSecondaryOk - code: 13435 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotPrimaryOrSecondary.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotPrimaryOrSecondary.json deleted file mode 100644 index a457ba3072..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotPrimaryOrSecondary.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "description": "Non-stale topologyVersion missing NotPrimaryOrSecondary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion missing NotPrimaryOrSecondary error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryOrSecondary", - "code": 13436 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotPrimaryOrSecondary.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotPrimaryOrSecondary.yml deleted file mode 100644 index fcc72bf794..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotPrimaryOrSecondary.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion missing NotPrimaryOrSecondary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion missing NotPrimaryOrSecondary error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryOrSecondary - code: 13436 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotWritablePrimary.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotWritablePrimary.json deleted file mode 100644 index b7427a3f3d..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotWritablePrimary.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "description": "Non-stale topologyVersion missing NotWritablePrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion missing NotWritablePrimary error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotWritablePrimary", - "code": 10107 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotWritablePrimary.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotWritablePrimary.yml deleted file mode 100644 index 4a9ef427fb..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-NotWritablePrimary.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion missing NotWritablePrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion missing NotWritablePrimary error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotWritablePrimary - code: 10107 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-PrimarySteppedDown.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-PrimarySteppedDown.json deleted file mode 100644 index 8146a60d6e..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-PrimarySteppedDown.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "description": "Non-stale topologyVersion missing PrimarySteppedDown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion missing PrimarySteppedDown error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "PrimarySteppedDown", - "code": 189 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-PrimarySteppedDown.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-PrimarySteppedDown.yml deleted file mode 100644 index 8ca1251a2d..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-PrimarySteppedDown.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion missing PrimarySteppedDown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion missing PrimarySteppedDown error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: PrimarySteppedDown - code: 189 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-ShutdownInProgress.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-ShutdownInProgress.json deleted file mode 100644 index c7597007d7..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-ShutdownInProgress.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "description": "Non-stale topologyVersion missing ShutdownInProgress error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion missing ShutdownInProgress error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "ShutdownInProgress", - "code": 91 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-ShutdownInProgress.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-ShutdownInProgress.yml deleted file mode 100644 index cd8857008d..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-missing-ShutdownInProgress.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion missing ShutdownInProgress error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion missing ShutdownInProgress error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: ShutdownInProgress - code: 91 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-InterruptedAtShutdown.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-InterruptedAtShutdown.json deleted file mode 100644 index 8448c60599..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-InterruptedAtShutdown.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion proccessId changed InterruptedAtShutdown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion proccessId changed InterruptedAtShutdown error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedAtShutdown", - "code": 11600, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-InterruptedAtShutdown.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-InterruptedAtShutdown.yml deleted file mode 100644 index 126ed23b44..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-InterruptedAtShutdown.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion proccessId changed InterruptedAtShutdown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion proccessId changed InterruptedAtShutdown error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedAtShutdown - code: 11600 - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-InterruptedDueToReplStateChange.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-InterruptedDueToReplStateChange.json deleted file mode 100644 index 9d601c4ede..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-InterruptedDueToReplStateChange.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion proccessId changed InterruptedDueToReplStateChange error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion proccessId changed InterruptedDueToReplStateChange error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedDueToReplStateChange", - "code": 11602, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-InterruptedDueToReplStateChange.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-InterruptedDueToReplStateChange.yml deleted file mode 100644 index bcb69479d1..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-InterruptedDueToReplStateChange.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion proccessId changed InterruptedDueToReplStateChange error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion proccessId changed InterruptedDueToReplStateChange error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedDueToReplStateChange - code: 11602 - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-LegacyNotPrimary.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-LegacyNotPrimary.json deleted file mode 100644 index 8be833f104..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-LegacyNotPrimary.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion proccessId changed LegacyNotPrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion proccessId changed LegacyNotPrimary error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "LegacyNotPrimary", - "code": 10058, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-LegacyNotPrimary.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-LegacyNotPrimary.yml deleted file mode 100644 index 172240cb78..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-LegacyNotPrimary.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion proccessId changed LegacyNotPrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion proccessId changed LegacyNotPrimary error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: LegacyNotPrimary - code: 10058 - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotPrimaryNoSecondaryOk.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotPrimaryNoSecondaryOk.json deleted file mode 100644 index f2f94c0d00..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotPrimaryNoSecondaryOk.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion proccessId changed NotPrimaryNoSecondaryOk error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion proccessId changed NotPrimaryNoSecondaryOk error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryNoSecondaryOk", - "code": 13435, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotPrimaryNoSecondaryOk.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotPrimaryNoSecondaryOk.yml deleted file mode 100644 index b915fb97f3..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotPrimaryNoSecondaryOk.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion proccessId changed NotPrimaryNoSecondaryOk error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion proccessId changed NotPrimaryNoSecondaryOk error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryNoSecondaryOk - code: 13435 - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotPrimaryOrSecondary.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotPrimaryOrSecondary.json deleted file mode 100644 index 6d3b397566..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotPrimaryOrSecondary.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion proccessId changed NotPrimaryOrSecondary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion proccessId changed NotPrimaryOrSecondary error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryOrSecondary", - "code": 13436, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotPrimaryOrSecondary.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotPrimaryOrSecondary.yml deleted file mode 100644 index dc104488cd..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotPrimaryOrSecondary.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion proccessId changed NotPrimaryOrSecondary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion proccessId changed NotPrimaryOrSecondary error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryOrSecondary - code: 13436 - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotWritablePrimary.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotWritablePrimary.json deleted file mode 100644 index 332ddf5ec1..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotWritablePrimary.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion proccessId changed NotWritablePrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion proccessId changed NotWritablePrimary error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotWritablePrimary", - "code": 10107, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotWritablePrimary.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotWritablePrimary.yml deleted file mode 100644 index 5146636b65..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-NotWritablePrimary.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion proccessId changed NotWritablePrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion proccessId changed NotWritablePrimary error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotWritablePrimary - code: 10107 - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-PrimarySteppedDown.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-PrimarySteppedDown.json deleted file mode 100644 index c22a537f58..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-PrimarySteppedDown.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion proccessId changed PrimarySteppedDown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion proccessId changed PrimarySteppedDown error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "PrimarySteppedDown", - "code": 189, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-PrimarySteppedDown.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-PrimarySteppedDown.yml deleted file mode 100644 index 0c997a2a3e..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-PrimarySteppedDown.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion proccessId changed PrimarySteppedDown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion proccessId changed PrimarySteppedDown error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: PrimarySteppedDown - code: 189 - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-ShutdownInProgress.json b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-ShutdownInProgress.json deleted file mode 100644 index eaaab79273..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-ShutdownInProgress.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Non-stale topologyVersion proccessId changed ShutdownInProgress error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale topologyVersion proccessId changed ShutdownInProgress error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "ShutdownInProgress", - "code": 91, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-ShutdownInProgress.yml b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-ShutdownInProgress.yml deleted file mode 100644 index 973c56460b..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion-proccessId-changed-ShutdownInProgress.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale topologyVersion proccessId changed ShutdownInProgress error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale topologyVersion proccessId changed ShutdownInProgress error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: ShutdownInProgress - code: 91 - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: - processId: - "$oid": '000000000000000000000002' - counter: - "$numberLong": "1" - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion.yml.template b/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion.yml.template deleted file mode 100644 index 83cff68e27..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/non-stale-topologyVersion.yml.template +++ /dev/null @@ -1,52 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Non-stale {description} {error_name} error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Non-stale {description} {error_name} error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: {error_name} - code: {error_code}{error_topology_version} - outcome: - servers: - a:27017: - type: Unknown - topologyVersion:{final_topology_version} - pool: - generation: {final_pool_generation} - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-InterruptedAtShutdown.json b/testdata/server-discovery-and-monitoring/errors/post-42-InterruptedAtShutdown.json deleted file mode 100644 index 40c4ed6c80..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-InterruptedAtShutdown.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Post-4.2 InterruptedAtShutdown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 8 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Post-4.2 InterruptedAtShutdown error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 8, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedAtShutdown", - "code": 11600 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-InterruptedAtShutdown.yml b/testdata/server-discovery-and-monitoring/errors/post-42-InterruptedAtShutdown.yml deleted file mode 100644 index 73a0f0d285..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-InterruptedAtShutdown.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Post-4.2 InterruptedAtShutdown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 8 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Post-4.2 InterruptedAtShutdown error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 8 - type: command - response: - ok: 0 - errmsg: InterruptedAtShutdown - code: 11600 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-InterruptedDueToReplStateChange.json b/testdata/server-discovery-and-monitoring/errors/post-42-InterruptedDueToReplStateChange.json deleted file mode 100644 index 5c489f5ecb..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-InterruptedDueToReplStateChange.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Post-4.2 InterruptedDueToReplStateChange error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 8 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Post-4.2 InterruptedDueToReplStateChange error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 8, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedDueToReplStateChange", - "code": 11602 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-InterruptedDueToReplStateChange.yml b/testdata/server-discovery-and-monitoring/errors/post-42-InterruptedDueToReplStateChange.yml deleted file mode 100644 index ad333e311e..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-InterruptedDueToReplStateChange.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Post-4.2 InterruptedDueToReplStateChange error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 8 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Post-4.2 InterruptedDueToReplStateChange error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 8 - type: command - response: - ok: 0 - errmsg: InterruptedDueToReplStateChange - code: 11602 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-LegacyNotPrimary.json b/testdata/server-discovery-and-monitoring/errors/post-42-LegacyNotPrimary.json deleted file mode 100644 index f0851b299e..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-LegacyNotPrimary.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Post-4.2 LegacyNotPrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 8 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Post-4.2 LegacyNotPrimary error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 8, - "type": "command", - "response": { - "ok": 0, - "errmsg": "LegacyNotPrimary", - "code": 10058 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-LegacyNotPrimary.yml b/testdata/server-discovery-and-monitoring/errors/post-42-LegacyNotPrimary.yml deleted file mode 100644 index 9c7723bbf3..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-LegacyNotPrimary.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Post-4.2 LegacyNotPrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 8 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Post-4.2 LegacyNotPrimary error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 8 - type: command - response: - ok: 0 - errmsg: LegacyNotPrimary - code: 10058 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-NotPrimaryNoSecondaryOk.json b/testdata/server-discovery-and-monitoring/errors/post-42-NotPrimaryNoSecondaryOk.json deleted file mode 100644 index a675f0ca54..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-NotPrimaryNoSecondaryOk.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Post-4.2 NotPrimaryNoSecondaryOk error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 8 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Post-4.2 NotPrimaryNoSecondaryOk error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 8, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryNoSecondaryOk", - "code": 13435 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-NotPrimaryNoSecondaryOk.yml b/testdata/server-discovery-and-monitoring/errors/post-42-NotPrimaryNoSecondaryOk.yml deleted file mode 100644 index 49304d6d63..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-NotPrimaryNoSecondaryOk.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Post-4.2 NotPrimaryNoSecondaryOk error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 8 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Post-4.2 NotPrimaryNoSecondaryOk error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 8 - type: command - response: - ok: 0 - errmsg: NotPrimaryNoSecondaryOk - code: 13435 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-NotPrimaryOrSecondary.json b/testdata/server-discovery-and-monitoring/errors/post-42-NotPrimaryOrSecondary.json deleted file mode 100644 index ea9bf1d16b..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-NotPrimaryOrSecondary.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Post-4.2 NotPrimaryOrSecondary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 8 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Post-4.2 NotPrimaryOrSecondary error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 8, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryOrSecondary", - "code": 13436 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-NotPrimaryOrSecondary.yml b/testdata/server-discovery-and-monitoring/errors/post-42-NotPrimaryOrSecondary.yml deleted file mode 100644 index 9174b31057..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-NotPrimaryOrSecondary.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Post-4.2 NotPrimaryOrSecondary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 8 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Post-4.2 NotPrimaryOrSecondary error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 8 - type: command - response: - ok: 0 - errmsg: NotPrimaryOrSecondary - code: 13436 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-NotWritablePrimary.json b/testdata/server-discovery-and-monitoring/errors/post-42-NotWritablePrimary.json deleted file mode 100644 index 10211fca70..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-NotWritablePrimary.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Post-4.2 NotWritablePrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 8 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Post-4.2 NotWritablePrimary error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 8, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotWritablePrimary", - "code": 10107 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-NotWritablePrimary.yml b/testdata/server-discovery-and-monitoring/errors/post-42-NotWritablePrimary.yml deleted file mode 100644 index 886b1f5b5b..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-NotWritablePrimary.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Post-4.2 NotWritablePrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 8 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Post-4.2 NotWritablePrimary error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 8 - type: command - response: - ok: 0 - errmsg: NotWritablePrimary - code: 10107 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-PrimarySteppedDown.json b/testdata/server-discovery-and-monitoring/errors/post-42-PrimarySteppedDown.json deleted file mode 100644 index fa98d0bf06..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-PrimarySteppedDown.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Post-4.2 PrimarySteppedDown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 8 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Post-4.2 PrimarySteppedDown error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 8, - "type": "command", - "response": { - "ok": 0, - "errmsg": "PrimarySteppedDown", - "code": 189 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-PrimarySteppedDown.yml b/testdata/server-discovery-and-monitoring/errors/post-42-PrimarySteppedDown.yml deleted file mode 100644 index 6a42267996..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-PrimarySteppedDown.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Post-4.2 PrimarySteppedDown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 8 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Post-4.2 PrimarySteppedDown error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 8 - type: command - response: - ok: 0 - errmsg: PrimarySteppedDown - code: 189 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-ShutdownInProgress.json b/testdata/server-discovery-and-monitoring/errors/post-42-ShutdownInProgress.json deleted file mode 100644 index cd587205b6..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-ShutdownInProgress.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Post-4.2 ShutdownInProgress error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 8 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Post-4.2 ShutdownInProgress error marks server Unknown", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 8, - "type": "command", - "response": { - "ok": 0, - "errmsg": "ShutdownInProgress", - "code": 91 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/post-42-ShutdownInProgress.yml b/testdata/server-discovery-and-monitoring/errors/post-42-ShutdownInProgress.yml deleted file mode 100644 index 2ad90d9864..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42-ShutdownInProgress.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Post-4.2 ShutdownInProgress error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 8 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Post-4.2 ShutdownInProgress error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 8 - type: command - response: - ok: 0 - errmsg: ShutdownInProgress - code: 91 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/post-42.yml.template b/testdata/server-discovery-and-monitoring/errors/post-42.yml.template deleted file mode 100644 index 8ca3c79ba4..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/post-42.yml.template +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Post-4.2 {error_name} error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 8 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Post-4.2 {error_name} error marks server Unknown - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 8 - type: command - response: - ok: 0 - errmsg: {error_name} - code: {error_code} - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: {final_pool_generation} - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-InterruptedAtShutdown.json b/testdata/server-discovery-and-monitoring/errors/pre-42-InterruptedAtShutdown.json deleted file mode 100644 index 9f6ea212e5..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-InterruptedAtShutdown.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 InterruptedAtShutdown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 InterruptedAtShutdown error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedAtShutdown", - "code": 11600 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-InterruptedAtShutdown.yml b/testdata/server-discovery-and-monitoring/errors/pre-42-InterruptedAtShutdown.yml deleted file mode 100644 index 4996e9f25f..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-InterruptedAtShutdown.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Pre-4.2 InterruptedAtShutdown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 7 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Pre-4.2 InterruptedAtShutdown error marks server Unknown and clears the pool - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 7 - type: command - response: - ok: 0 - errmsg: InterruptedAtShutdown - code: 11600 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-InterruptedDueToReplStateChange.json b/testdata/server-discovery-and-monitoring/errors/pre-42-InterruptedDueToReplStateChange.json deleted file mode 100644 index 7e5f235713..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-InterruptedDueToReplStateChange.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 InterruptedDueToReplStateChange error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 InterruptedDueToReplStateChange error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedDueToReplStateChange", - "code": 11602 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-InterruptedDueToReplStateChange.yml b/testdata/server-discovery-and-monitoring/errors/pre-42-InterruptedDueToReplStateChange.yml deleted file mode 100644 index ada5f1ff73..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-InterruptedDueToReplStateChange.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Pre-4.2 InterruptedDueToReplStateChange error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 7 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Pre-4.2 InterruptedDueToReplStateChange error marks server Unknown and clears the pool - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 7 - type: command - response: - ok: 0 - errmsg: InterruptedDueToReplStateChange - code: 11602 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-LegacyNotPrimary.json b/testdata/server-discovery-and-monitoring/errors/pre-42-LegacyNotPrimary.json deleted file mode 100644 index 1635f1a856..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-LegacyNotPrimary.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 LegacyNotPrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 LegacyNotPrimary error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "LegacyNotPrimary", - "code": 10058 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-LegacyNotPrimary.yml b/testdata/server-discovery-and-monitoring/errors/pre-42-LegacyNotPrimary.yml deleted file mode 100644 index e2b37b4f5f..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-LegacyNotPrimary.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Pre-4.2 LegacyNotPrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 7 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Pre-4.2 LegacyNotPrimary error marks server Unknown and clears the pool - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 7 - type: command - response: - ok: 0 - errmsg: LegacyNotPrimary - code: 10058 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-NotPrimaryNoSecondaryOk.json b/testdata/server-discovery-and-monitoring/errors/pre-42-NotPrimaryNoSecondaryOk.json deleted file mode 100644 index 0e70ede02c..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-NotPrimaryNoSecondaryOk.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 NotPrimaryNoSecondaryOk error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 NotPrimaryNoSecondaryOk error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryNoSecondaryOk", - "code": 13435 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-NotPrimaryNoSecondaryOk.yml b/testdata/server-discovery-and-monitoring/errors/pre-42-NotPrimaryNoSecondaryOk.yml deleted file mode 100644 index 867b7d3dc1..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-NotPrimaryNoSecondaryOk.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Pre-4.2 NotPrimaryNoSecondaryOk error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 7 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Pre-4.2 NotPrimaryNoSecondaryOk error marks server Unknown and clears the pool - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 7 - type: command - response: - ok: 0 - errmsg: NotPrimaryNoSecondaryOk - code: 13435 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-NotPrimaryOrSecondary.json b/testdata/server-discovery-and-monitoring/errors/pre-42-NotPrimaryOrSecondary.json deleted file mode 100644 index 3fefb21663..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-NotPrimaryOrSecondary.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 NotPrimaryOrSecondary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 NotPrimaryOrSecondary error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryOrSecondary", - "code": 13436 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-NotPrimaryOrSecondary.yml b/testdata/server-discovery-and-monitoring/errors/pre-42-NotPrimaryOrSecondary.yml deleted file mode 100644 index 705e2339c0..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-NotPrimaryOrSecondary.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Pre-4.2 NotPrimaryOrSecondary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 7 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Pre-4.2 NotPrimaryOrSecondary error marks server Unknown and clears the pool - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 7 - type: command - response: - ok: 0 - errmsg: NotPrimaryOrSecondary - code: 13436 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-NotWritablePrimary.json b/testdata/server-discovery-and-monitoring/errors/pre-42-NotWritablePrimary.json deleted file mode 100644 index d010da0a5b..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-NotWritablePrimary.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 NotWritablePrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 NotWritablePrimary error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotWritablePrimary", - "code": 10107 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-NotWritablePrimary.yml b/testdata/server-discovery-and-monitoring/errors/pre-42-NotWritablePrimary.yml deleted file mode 100644 index 29669ff336..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-NotWritablePrimary.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Pre-4.2 NotWritablePrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 7 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Pre-4.2 NotWritablePrimary error marks server Unknown and clears the pool - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 7 - type: command - response: - ok: 0 - errmsg: NotWritablePrimary - code: 10107 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-PrimarySteppedDown.json b/testdata/server-discovery-and-monitoring/errors/pre-42-PrimarySteppedDown.json deleted file mode 100644 index 02956d201d..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-PrimarySteppedDown.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 PrimarySteppedDown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 PrimarySteppedDown error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "PrimarySteppedDown", - "code": 189 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-PrimarySteppedDown.yml b/testdata/server-discovery-and-monitoring/errors/pre-42-PrimarySteppedDown.yml deleted file mode 100644 index 9176ee25c3..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-PrimarySteppedDown.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Pre-4.2 PrimarySteppedDown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 7 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Pre-4.2 PrimarySteppedDown error marks server Unknown and clears the pool - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 7 - type: command - response: - ok: 0 - errmsg: PrimarySteppedDown - code: 189 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-ShutdownInProgress.json b/testdata/server-discovery-and-monitoring/errors/pre-42-ShutdownInProgress.json deleted file mode 100644 index fc3a5aa6fe..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-ShutdownInProgress.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 ShutdownInProgress error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 ShutdownInProgress error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "ShutdownInProgress", - "code": 91 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42-ShutdownInProgress.yml b/testdata/server-discovery-and-monitoring/errors/pre-42-ShutdownInProgress.yml deleted file mode 100644 index 5c64050e59..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42-ShutdownInProgress.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Pre-4.2 ShutdownInProgress error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 7 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Pre-4.2 ShutdownInProgress error marks server Unknown and clears the pool - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 7 - type: command - response: - ok: 0 - errmsg: ShutdownInProgress - code: 91 - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/pre-42.yml.template b/testdata/server-discovery-and-monitoring/errors/pre-42.yml.template deleted file mode 100644 index 7449f68c16..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/pre-42.yml.template +++ /dev/null @@ -1,47 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Pre-4.2 {error_name} error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 7 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: null - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Pre-4.2 {error_name} error marks server Unknown and clears the pool - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 7 - type: command - response: - ok: 0 - errmsg: {error_name} - code: {error_code} - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs diff --git a/testdata/server-discovery-and-monitoring/errors/prefer-error-code.json b/testdata/server-discovery-and-monitoring/errors/prefer-error-code.json deleted file mode 100644 index eb00b69613..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/prefer-error-code.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "description": "Do not check errmsg when code exists", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "errmsg \"not master\" gets ignored when error code exists", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "not master", - "code": 1 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "errmsg \"node is recovering\" gets ignored when error code exists", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "node is recovering", - "code": 1 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/prefer-error-code.yml b/testdata/server-discovery-and-monitoring/errors/prefer-error-code.yml deleted file mode 100644 index 6bd98386bb..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/prefer-error-code.yml +++ /dev/null @@ -1,54 +0,0 @@ -description: Do not check errmsg when code exists -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: errmsg "not master" gets ignored when error code exists - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: "not master" # NOTE: This needs to be "not master" and not "not writable primary". - code: 1 # Not a "not writable primary" error code. - outcome: *outcome - -- description: errmsg "node is recovering" gets ignored when error code exists - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: "node is recovering" - code: 1 # Not a "node is recovering" error code. - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-InterruptedAtShutdown.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-InterruptedAtShutdown.json deleted file mode 100644 index 2f7c7fd13b..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-InterruptedAtShutdown.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation InterruptedAtShutdown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale InterruptedAtShutdown error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedAtShutdown", - "code": 11600, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-InterruptedAtShutdown.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-InterruptedAtShutdown.yml deleted file mode 100644 index 37dddcead5..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-InterruptedAtShutdown.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation InterruptedAtShutdown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale InterruptedAtShutdown error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedAtShutdown - code: 11600 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '2' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-InterruptedDueToReplStateChange.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-InterruptedDueToReplStateChange.json deleted file mode 100644 index b0b51ef676..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-InterruptedDueToReplStateChange.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation InterruptedDueToReplStateChange error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale InterruptedDueToReplStateChange error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedDueToReplStateChange", - "code": 11602, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-InterruptedDueToReplStateChange.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-InterruptedDueToReplStateChange.yml deleted file mode 100644 index f83532e2c5..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-InterruptedDueToReplStateChange.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation InterruptedDueToReplStateChange error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale InterruptedDueToReplStateChange error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedDueToReplStateChange - code: 11602 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '2' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-NotPrimaryNoSecondaryOk.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-NotPrimaryNoSecondaryOk.json deleted file mode 100644 index b68e23b7a7..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-NotPrimaryNoSecondaryOk.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation NotPrimaryNoSecondaryOk error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotPrimaryNoSecondaryOk error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryNoSecondaryOk", - "code": 13435, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-NotPrimaryNoSecondaryOk.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-NotPrimaryNoSecondaryOk.yml deleted file mode 100644 index 43c7f57742..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-NotPrimaryNoSecondaryOk.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation NotPrimaryNoSecondaryOk error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale NotPrimaryNoSecondaryOk error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryNoSecondaryOk - code: 13435 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '2' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-NotPrimaryOrSecondary.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-NotPrimaryOrSecondary.json deleted file mode 100644 index d9b3562654..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-NotPrimaryOrSecondary.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation NotPrimaryOrSecondary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotPrimaryOrSecondary error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryOrSecondary", - "code": 13436, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-NotPrimaryOrSecondary.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-NotPrimaryOrSecondary.yml deleted file mode 100644 index 1dc6a2319e..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-NotPrimaryOrSecondary.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation NotPrimaryOrSecondary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale NotPrimaryOrSecondary error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryOrSecondary - code: 13436 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '2' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-NotWritablePrimary.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-NotWritablePrimary.json deleted file mode 100644 index 90889356dd..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-NotWritablePrimary.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation NotWritablePrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotWritablePrimary error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotWritablePrimary", - "code": 10107, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-NotWritablePrimary.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-NotWritablePrimary.yml deleted file mode 100644 index 488eaab4a5..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-NotWritablePrimary.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation NotWritablePrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale NotWritablePrimary error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotWritablePrimary - code: 10107 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '2' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-PrimarySteppedDown.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-PrimarySteppedDown.json deleted file mode 100644 index 0a707a1c07..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-PrimarySteppedDown.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation PrimarySteppedDown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale PrimarySteppedDown error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "PrimarySteppedDown", - "code": 189, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-PrimarySteppedDown.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-PrimarySteppedDown.yml deleted file mode 100644 index 2b45081087..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-PrimarySteppedDown.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation PrimarySteppedDown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale PrimarySteppedDown error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: PrimarySteppedDown - code: 189 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '2' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-ShutdownInProgress.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-ShutdownInProgress.json deleted file mode 100644 index 5da3413d5b..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-ShutdownInProgress.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation ShutdownInProgress error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale ShutdownInProgress error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "ShutdownInProgress", - "code": 91, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-ShutdownInProgress.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-ShutdownInProgress.yml deleted file mode 100644 index b9bd8212d9..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-ShutdownInProgress.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation ShutdownInProgress error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale ShutdownInProgress error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: ShutdownInProgress - code: 91 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '2' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-InterruptedAtShutdown.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-InterruptedAtShutdown.json deleted file mode 100644 index d29310fb61..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-InterruptedAtShutdown.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation InterruptedAtShutdown error afterHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale InterruptedAtShutdown error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedAtShutdown", - "code": 11600, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-InterruptedAtShutdown.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-InterruptedAtShutdown.yml deleted file mode 100644 index 48dd257af9..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-InterruptedAtShutdown.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation InterruptedAtShutdown error afterHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale InterruptedAtShutdown error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedAtShutdown - code: 11600 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-InterruptedDueToReplStateChange.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-InterruptedDueToReplStateChange.json deleted file mode 100644 index 376bb93770..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-InterruptedDueToReplStateChange.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation InterruptedDueToReplStateChange error afterHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale InterruptedDueToReplStateChange error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedDueToReplStateChange", - "code": 11602, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-InterruptedDueToReplStateChange.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-InterruptedDueToReplStateChange.yml deleted file mode 100644 index 5e7ddeaa36..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-InterruptedDueToReplStateChange.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation InterruptedDueToReplStateChange error afterHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale InterruptedDueToReplStateChange error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedDueToReplStateChange - code: 11602 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-LegacyNotPrimary.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-LegacyNotPrimary.json deleted file mode 100644 index 990fc45e4e..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-LegacyNotPrimary.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation LegacyNotPrimary error afterHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale LegacyNotPrimary error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "LegacyNotPrimary", - "code": 10058, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-LegacyNotPrimary.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-LegacyNotPrimary.yml deleted file mode 100644 index 8701f366ab..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-LegacyNotPrimary.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation LegacyNotPrimary error afterHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale LegacyNotPrimary error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: LegacyNotPrimary - code: 10058 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotPrimaryNoSecondaryOk.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotPrimaryNoSecondaryOk.json deleted file mode 100644 index 1744a82f77..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotPrimaryNoSecondaryOk.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation NotPrimaryNoSecondaryOk error afterHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotPrimaryNoSecondaryOk error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryNoSecondaryOk", - "code": 13435, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotPrimaryNoSecondaryOk.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotPrimaryNoSecondaryOk.yml deleted file mode 100644 index 70673e9fe6..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotPrimaryNoSecondaryOk.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation NotPrimaryNoSecondaryOk error afterHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale NotPrimaryNoSecondaryOk error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryNoSecondaryOk - code: 13435 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotPrimaryOrSecondary.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotPrimaryOrSecondary.json deleted file mode 100644 index 57ca1cf158..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotPrimaryOrSecondary.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation NotPrimaryOrSecondary error afterHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotPrimaryOrSecondary error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryOrSecondary", - "code": 13436, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotPrimaryOrSecondary.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotPrimaryOrSecondary.yml deleted file mode 100644 index 4b036edd0d..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotPrimaryOrSecondary.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation NotPrimaryOrSecondary error afterHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale NotPrimaryOrSecondary error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryOrSecondary - code: 13436 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotWritablePrimary.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotWritablePrimary.json deleted file mode 100644 index 995453c82b..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotWritablePrimary.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation NotWritablePrimary error afterHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotWritablePrimary error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotWritablePrimary", - "code": 10107, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotWritablePrimary.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotWritablePrimary.yml deleted file mode 100644 index f9199ef48f..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-NotWritablePrimary.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation NotWritablePrimary error afterHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale NotWritablePrimary error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotWritablePrimary - code: 10107 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-PrimarySteppedDown.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-PrimarySteppedDown.json deleted file mode 100644 index bf4c85d24f..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-PrimarySteppedDown.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation PrimarySteppedDown error afterHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale PrimarySteppedDown error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "PrimarySteppedDown", - "code": 189, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-PrimarySteppedDown.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-PrimarySteppedDown.yml deleted file mode 100644 index 032993e749..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-PrimarySteppedDown.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation PrimarySteppedDown error afterHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale PrimarySteppedDown error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: PrimarySteppedDown - code: 189 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-ShutdownInProgress.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-ShutdownInProgress.json deleted file mode 100644 index 9374900e06..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-ShutdownInProgress.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation ShutdownInProgress error afterHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale ShutdownInProgress error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "ShutdownInProgress", - "code": 91, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-ShutdownInProgress.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-ShutdownInProgress.yml deleted file mode 100644 index 23659f729b..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-ShutdownInProgress.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation ShutdownInProgress error afterHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale ShutdownInProgress error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: ShutdownInProgress - code: 91 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-network.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-network.json deleted file mode 100644 index f5d01b6540..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-network.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "description": "Stale generation network error afterHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale network error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-network.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-network.yml deleted file mode 100644 index 98cb9a44e1..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-network.yml +++ /dev/null @@ -1,82 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation network error afterHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale network error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-timeout.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-timeout.json deleted file mode 100644 index fa84343b0b..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-timeout.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "description": "Stale generation timeout error afterHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale timeout error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "timeout" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-timeout.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-timeout.yml deleted file mode 100644 index 37b8f71d8d..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-timeout.yml +++ /dev/null @@ -1,82 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation timeout error afterHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale timeout error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: timeout - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-InterruptedAtShutdown.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-InterruptedAtShutdown.json deleted file mode 100644 index 72fac9a86e..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-InterruptedAtShutdown.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation InterruptedAtShutdown error beforeHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale InterruptedAtShutdown error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "beforeHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedAtShutdown", - "code": 11600, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-InterruptedAtShutdown.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-InterruptedAtShutdown.yml deleted file mode 100644 index c699c53ab1..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-InterruptedAtShutdown.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation InterruptedAtShutdown error beforeHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale InterruptedAtShutdown error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: beforeHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedAtShutdown - code: 11600 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-InterruptedDueToReplStateChange.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-InterruptedDueToReplStateChange.json deleted file mode 100644 index 3c713592a3..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-InterruptedDueToReplStateChange.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation InterruptedDueToReplStateChange error beforeHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale InterruptedDueToReplStateChange error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "beforeHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedDueToReplStateChange", - "code": 11602, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-InterruptedDueToReplStateChange.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-InterruptedDueToReplStateChange.yml deleted file mode 100644 index a9826eb01a..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-InterruptedDueToReplStateChange.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation InterruptedDueToReplStateChange error beforeHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale InterruptedDueToReplStateChange error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: beforeHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedDueToReplStateChange - code: 11602 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-LegacyNotPrimary.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-LegacyNotPrimary.json deleted file mode 100644 index 257b6ec6fb..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-LegacyNotPrimary.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation LegacyNotPrimary error beforeHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale LegacyNotPrimary error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "beforeHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "LegacyNotPrimary", - "code": 10058, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-LegacyNotPrimary.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-LegacyNotPrimary.yml deleted file mode 100644 index f26d4d963f..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-LegacyNotPrimary.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation LegacyNotPrimary error beforeHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale LegacyNotPrimary error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: beforeHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: LegacyNotPrimary - code: 10058 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotPrimaryNoSecondaryOk.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotPrimaryNoSecondaryOk.json deleted file mode 100644 index dcb5716f44..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotPrimaryNoSecondaryOk.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation NotPrimaryNoSecondaryOk error beforeHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotPrimaryNoSecondaryOk error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "beforeHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryNoSecondaryOk", - "code": 13435, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotPrimaryNoSecondaryOk.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotPrimaryNoSecondaryOk.yml deleted file mode 100644 index 27187bae63..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotPrimaryNoSecondaryOk.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation NotPrimaryNoSecondaryOk error beforeHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale NotPrimaryNoSecondaryOk error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: beforeHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryNoSecondaryOk - code: 13435 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotPrimaryOrSecondary.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotPrimaryOrSecondary.json deleted file mode 100644 index 58cefafae9..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotPrimaryOrSecondary.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation NotPrimaryOrSecondary error beforeHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotPrimaryOrSecondary error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "beforeHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryOrSecondary", - "code": 13436, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotPrimaryOrSecondary.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotPrimaryOrSecondary.yml deleted file mode 100644 index 1b56fd2ab7..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotPrimaryOrSecondary.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation NotPrimaryOrSecondary error beforeHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale NotPrimaryOrSecondary error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: beforeHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryOrSecondary - code: 13436 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotWritablePrimary.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotWritablePrimary.json deleted file mode 100644 index c92b01e054..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotWritablePrimary.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation NotWritablePrimary error beforeHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotWritablePrimary error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "beforeHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotWritablePrimary", - "code": 10107, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotWritablePrimary.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotWritablePrimary.yml deleted file mode 100644 index 725dc172de..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-NotWritablePrimary.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation NotWritablePrimary error beforeHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale NotWritablePrimary error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: beforeHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotWritablePrimary - code: 10107 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-PrimarySteppedDown.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-PrimarySteppedDown.json deleted file mode 100644 index 62759b6ad9..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-PrimarySteppedDown.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation PrimarySteppedDown error beforeHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale PrimarySteppedDown error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "beforeHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "PrimarySteppedDown", - "code": 189, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-PrimarySteppedDown.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-PrimarySteppedDown.yml deleted file mode 100644 index cac86fa7ee..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-PrimarySteppedDown.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation PrimarySteppedDown error beforeHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale PrimarySteppedDown error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: beforeHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: PrimarySteppedDown - code: 189 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-ShutdownInProgress.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-ShutdownInProgress.json deleted file mode 100644 index 4661632c4f..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-ShutdownInProgress.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "description": "Stale generation ShutdownInProgress error beforeHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale ShutdownInProgress error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "beforeHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "ShutdownInProgress", - "code": 91, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-ShutdownInProgress.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-ShutdownInProgress.yml deleted file mode 100644 index dd3ca671b3..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-ShutdownInProgress.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation ShutdownInProgress error beforeHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale ShutdownInProgress error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: beforeHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: ShutdownInProgress - code: 91 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": "2" - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-network.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-network.json deleted file mode 100644 index 15b044fc73..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-network.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "description": "Stale generation network error beforeHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale network error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "beforeHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-network.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-network.yml deleted file mode 100644 index b678534826..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-network.yml +++ /dev/null @@ -1,82 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation network error beforeHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale network error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: beforeHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-timeout.json b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-timeout.json deleted file mode 100644 index acbb9e581e..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-timeout.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "description": "Stale generation timeout error beforeHandshakeCompletes", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Non-stale application network error", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "network" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Primary A is rediscovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale timeout error (stale generation)", - "applicationErrors": [ - { - "address": "a:27017", - "generation": 0, - "when": "beforeHandshakeCompletes", - "maxWireVersion": 9, - "type": "timeout" - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-timeout.yml b/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-timeout.yml deleted file mode 100644 index d1ba24ba3b..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation-beforeHandshakeCompletes-timeout.yml +++ /dev/null @@ -1,82 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation timeout error beforeHandshakeCompletes -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale timeout error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: beforeHandshakeCompletes - maxWireVersion: 9 - type: timeout - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-generation.yml.template b/testdata/server-discovery-and-monitoring/errors/stale-generation.yml.template deleted file mode 100644 index 1519796575..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-generation.yml.template +++ /dev/null @@ -1,81 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale generation {error_name} error {when} -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -# Process a network error which increments the pool generation. -- description: Non-stale application network error - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: network - outcome: - servers: - a:27017: - type: Unknown - topologyVersion: null - pool: - generation: 1 - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Primary A is rediscovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: *topologyVersion_1_1 - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 1 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale {error_name} error (stale generation) - applicationErrors: - - address: a:27017 - generation: 0 - when: {when} - maxWireVersion: 9{stale_error} - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-InterruptedAtShutdown.json b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-InterruptedAtShutdown.json deleted file mode 100644 index f2207a04d5..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-InterruptedAtShutdown.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "Stale topologyVersion InterruptedAtShutdown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale InterruptedAtShutdown error (topologyVersion less)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedAtShutdown", - "code": 11600, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "0" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale InterruptedAtShutdown error (topologyVersion equal)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedAtShutdown", - "code": 11600, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-InterruptedAtShutdown.yml b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-InterruptedAtShutdown.yml deleted file mode 100644 index 483c48044d..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-InterruptedAtShutdown.yml +++ /dev/null @@ -1,65 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale topologyVersion InterruptedAtShutdown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale InterruptedAtShutdown error (topologyVersion less) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedAtShutdown - code: 11600 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '0' - outcome: *outcome - -- description: Ignore stale InterruptedAtShutdown error (topologyVersion equal) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedAtShutdown - code: 11600 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-InterruptedDueToReplStateChange.json b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-InterruptedDueToReplStateChange.json deleted file mode 100644 index 4387451ce6..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-InterruptedDueToReplStateChange.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "Stale topologyVersion InterruptedDueToReplStateChange error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale InterruptedDueToReplStateChange error (topologyVersion less)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedDueToReplStateChange", - "code": 11602, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "0" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale InterruptedDueToReplStateChange error (topologyVersion equal)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedDueToReplStateChange", - "code": 11602, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-InterruptedDueToReplStateChange.yml b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-InterruptedDueToReplStateChange.yml deleted file mode 100644 index 5bed83e3da..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-InterruptedDueToReplStateChange.yml +++ /dev/null @@ -1,65 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale topologyVersion InterruptedDueToReplStateChange error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale InterruptedDueToReplStateChange error (topologyVersion less) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedDueToReplStateChange - code: 11602 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '0' - outcome: *outcome - -- description: Ignore stale InterruptedDueToReplStateChange error (topologyVersion equal) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: InterruptedDueToReplStateChange - code: 11602 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-LegacyNotPrimary.json b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-LegacyNotPrimary.json deleted file mode 100644 index 8c0cf00f22..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-LegacyNotPrimary.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "Stale topologyVersion LegacyNotPrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale LegacyNotPrimary error (topologyVersion less)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "LegacyNotPrimary", - "code": 10058, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "0" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale LegacyNotPrimary error (topologyVersion equal)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "LegacyNotPrimary", - "code": 10058, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-LegacyNotPrimary.yml b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-LegacyNotPrimary.yml deleted file mode 100644 index 483087a238..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-LegacyNotPrimary.yml +++ /dev/null @@ -1,65 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale topologyVersion LegacyNotPrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale LegacyNotPrimary error (topologyVersion less) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: LegacyNotPrimary - code: 10058 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '0' - outcome: *outcome - -- description: Ignore stale LegacyNotPrimary error (topologyVersion equal) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: LegacyNotPrimary - code: 10058 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryNoSecondaryOk.json b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryNoSecondaryOk.json deleted file mode 100644 index 99a828326c..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryNoSecondaryOk.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "Stale topologyVersion NotPrimaryNoSecondaryOk error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotPrimaryNoSecondaryOk error (topologyVersion less)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryNoSecondaryOk", - "code": 13435, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "0" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotPrimaryNoSecondaryOk error (topologyVersion equal)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryNoSecondaryOk", - "code": 13435, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryNoSecondaryOk.yml b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryNoSecondaryOk.yml deleted file mode 100644 index 823bf3ee8e..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryNoSecondaryOk.yml +++ /dev/null @@ -1,65 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale topologyVersion NotPrimaryNoSecondaryOk error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale NotPrimaryNoSecondaryOk error (topologyVersion less) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryNoSecondaryOk - code: 13435 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '0' - outcome: *outcome - -- description: Ignore stale NotPrimaryNoSecondaryOk error (topologyVersion equal) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryNoSecondaryOk - code: 13435 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryOrSecondary.json b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryOrSecondary.json deleted file mode 100644 index ba2ea87106..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryOrSecondary.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "Stale topologyVersion NotPrimaryOrSecondary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotPrimaryOrSecondary error (topologyVersion less)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryOrSecondary", - "code": 13436, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "0" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotPrimaryOrSecondary error (topologyVersion equal)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryOrSecondary", - "code": 13436, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryOrSecondary.yml b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryOrSecondary.yml deleted file mode 100644 index acee1ec566..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryOrSecondary.yml +++ /dev/null @@ -1,65 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale topologyVersion NotPrimaryOrSecondary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale NotPrimaryOrSecondary error (topologyVersion less) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryOrSecondary - code: 13436 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '0' - outcome: *outcome - -- description: Ignore stale NotPrimaryOrSecondary error (topologyVersion equal) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotPrimaryOrSecondary - code: 13436 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotWritablePrimary.json b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotWritablePrimary.json deleted file mode 100644 index 8edd317a73..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotWritablePrimary.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "Stale topologyVersion NotWritablePrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotWritablePrimary error (topologyVersion less)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotWritablePrimary", - "code": 10107, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "0" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale NotWritablePrimary error (topologyVersion equal)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotWritablePrimary", - "code": 10107, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotWritablePrimary.yml b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotWritablePrimary.yml deleted file mode 100644 index 8e126b0cb0..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotWritablePrimary.yml +++ /dev/null @@ -1,65 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale topologyVersion NotWritablePrimary error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale NotWritablePrimary error (topologyVersion less) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotWritablePrimary - code: 10107 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '0' - outcome: *outcome - -- description: Ignore stale NotWritablePrimary error (topologyVersion equal) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: NotWritablePrimary - code: 10107 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-PrimarySteppedDown.json b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-PrimarySteppedDown.json deleted file mode 100644 index da8e4755eb..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-PrimarySteppedDown.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "Stale topologyVersion PrimarySteppedDown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale PrimarySteppedDown error (topologyVersion less)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "PrimarySteppedDown", - "code": 189, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "0" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale PrimarySteppedDown error (topologyVersion equal)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "PrimarySteppedDown", - "code": 189, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-PrimarySteppedDown.yml b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-PrimarySteppedDown.yml deleted file mode 100644 index c5e8a403b1..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-PrimarySteppedDown.yml +++ /dev/null @@ -1,65 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale topologyVersion PrimarySteppedDown error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale PrimarySteppedDown error (topologyVersion less) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: PrimarySteppedDown - code: 189 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '0' - outcome: *outcome - -- description: Ignore stale PrimarySteppedDown error (topologyVersion equal) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: PrimarySteppedDown - code: 189 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-ShutdownInProgress.json b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-ShutdownInProgress.json deleted file mode 100644 index aa252e1dc4..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-ShutdownInProgress.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "Stale topologyVersion ShutdownInProgress error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale ShutdownInProgress error (topologyVersion less)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "ShutdownInProgress", - "code": 91, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "0" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore stale ShutdownInProgress error (topologyVersion equal)", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 0, - "errmsg": "ShutdownInProgress", - "code": 91, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-ShutdownInProgress.yml b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-ShutdownInProgress.yml deleted file mode 100644 index 6ad7677cf0..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-ShutdownInProgress.yml +++ /dev/null @@ -1,65 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale topologyVersion ShutdownInProgress error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale ShutdownInProgress error (topologyVersion less) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: ShutdownInProgress - code: 91 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '0' - outcome: *outcome - -- description: Ignore stale ShutdownInProgress error (topologyVersion equal) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: ShutdownInProgress - code: 91 - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion.yml.template b/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion.yml.template deleted file mode 100644 index f69d440da0..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion.yml.template +++ /dev/null @@ -1,65 +0,0 @@ -# Autogenerated tests for SDAM error handling, see generate-error-tests.py -description: Stale topologyVersion {error_name} error -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore stale {error_name} error (topologyVersion less) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: {error_name} - code: {error_code} - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '0' - outcome: *outcome - -- description: Ignore stale {error_name} error (topologyVersion equal) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 0 - errmsg: {error_name} - code: {error_code} - topologyVersion: - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/errors/write_errors_ignored.json b/testdata/server-discovery-and-monitoring/errors/write_errors_ignored.json deleted file mode 100644 index b588807e08..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/write_errors_ignored.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "description": "writeErrors field is ignored", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Ignore command error with writeErrors field", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 9, - "type": "command", - "response": { - "ok": 1, - "writeErrors": [ - { - "errmsg": "NotPrimaryNoSecondaryOk", - "code": 13435, - "index": 0 - } - ] - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - }, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/errors/write_errors_ignored.yml b/testdata/server-discovery-and-monitoring/errors/write_errors_ignored.yml deleted file mode 100644 index 85f59d97d4..0000000000 --- a/testdata/server-discovery-and-monitoring/errors/write_errors_ignored.yml +++ /dev/null @@ -1,42 +0,0 @@ -description: writeErrors field is ignored -uri: mongodb://a/?replicaSet=rs -phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - -- description: Ignore command error with writeErrors field - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: command - response: - ok: 1 - writeErrors: - - { errmsg: NotPrimaryNoSecondaryOk, code: 13435, index: 0 } - outcome: *outcome diff --git a/testdata/server-discovery-and-monitoring/load-balanced/discover_load_balancer.json b/testdata/server-discovery-and-monitoring/load-balanced/discover_load_balancer.json deleted file mode 100644 index d2e34478e6..0000000000 --- a/testdata/server-discovery-and-monitoring/load-balanced/discover_load_balancer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "description": "Load balancer can be discovered and only has the address property set", - "uri": "mongodb://a/?loadBalanced=true", - "phases": [ - { - "outcome": { - "servers": { - "a:27017": { - "type": "LoadBalancer", - "setName": null, - "setVersion": null, - "electionId": null, - "logicalSessionTimeoutMinutes": null, - "minWireVersion": null, - "maxWireVersion": null, - "topologyVersion": null - } - }, - "topologyType": "LoadBalanced", - "setName": null, - "logicalSessionTimeoutMinutes": null, - "maxSetVersion": null, - "maxElectionId": null, - "compatible": true - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/load-balanced/discover_load_balancer.yml b/testdata/server-discovery-and-monitoring/load-balanced/discover_load_balancer.yml deleted file mode 100644 index 20083d98be..0000000000 --- a/testdata/server-discovery-and-monitoring/load-balanced/discover_load_balancer.yml +++ /dev/null @@ -1,25 +0,0 @@ -description: "Load balancer can be discovered and only has the address property set" - -uri: "mongodb://a/?loadBalanced=true" - -phases: - - # There should be no monitoring in LoadBalanced mode, so no responses are necessary to get the topology into the - # correct state. - - outcome: - servers: - a:27017: - type: LoadBalancer - setName: null - setVersion: null - electionId: null - logicalSessionTimeoutMinutes: null - minWireVersion: null - maxWireVersion: null - topologyVersion: null - topologyType: LoadBalanced - setName: null - logicalSessionTimeoutMinutes: null - maxSetVersion: null - maxElectionId: null - compatible: true diff --git a/testdata/server-discovery-and-monitoring/monitoring/discovered_standalone.json b/testdata/server-discovery-and-monitoring/monitoring/discovered_standalone.json deleted file mode 100644 index 097203694e..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/discovered_standalone.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "description": "Monitoring a discovered standalone connection", - "uri": "mongodb://a:27017/?directConnection=false", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "events": [ - { - "topology_opening_event": { - "topologyId": "42" - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Unknown", - "servers": [] - }, - "newDescription": { - "topologyType": "Unknown", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - } - } - }, - { - "server_opening_event": { - "topologyId": "42", - "address": "a:27017" - } - }, - { - "server_description_changed_event": { - "topologyId": "42", - "address": "a:27017", - "previousDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - "newDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Standalone" - } - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Unknown", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - }, - "newDescription": { - "topologyType": "Single", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Standalone" - } - ] - } - } - } - ] - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/monitoring/discovered_standalone.yml b/testdata/server-discovery-and-monitoring/monitoring/discovered_standalone.yml deleted file mode 100644 index 1de96154cc..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/discovered_standalone.yml +++ /dev/null @@ -1,70 +0,0 @@ -description: "Monitoring a discovered standalone connection" -uri: "mongodb://a:27017/?directConnection=false" -phases: - - - responses: - - - - "a:27017" - - { ok: 1, helloOk: true, isWritablePrimary: true, minWireVersion: 0, maxWireVersion: 21 } - - outcome: - events: - - - topology_opening_event: - topologyId: "42" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Unknown" - servers: [] - newDescription: - topologyType: "Unknown" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - server_opening_event: - topologyId: "42" - address: "a:27017" - - - server_description_changed_event: - topologyId: "42" - address: "a:27017" - previousDescription: - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Standalone" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Unknown" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - topologyType: "Single" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Standalone" diff --git a/testdata/server-discovery-and-monitoring/monitoring/load_balancer.json b/testdata/server-discovery-and-monitoring/monitoring/load_balancer.json deleted file mode 100644 index 09b1537193..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/load_balancer.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "description": "Monitoring a load balancer", - "uri": "mongodb://a:27017/?loadBalanced=true", - "phases": [ - { - "outcome": { - "events": [ - { - "topology_opening_event": { - "topologyId": "42" - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Unknown", - "servers": [] - }, - "newDescription": { - "topologyType": "LoadBalanced", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - } - } - }, - { - "server_opening_event": { - "topologyId": "42", - "address": "a:27017" - } - }, - { - "server_description_changed_event": { - "topologyId": "42", - "address": "a:27017", - "previousDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - "newDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "LoadBalancer" - } - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "LoadBalanced", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - }, - "newDescription": { - "topologyType": "LoadBalanced", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "LoadBalancer" - } - ] - } - } - } - ] - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/monitoring/load_balancer.yml b/testdata/server-discovery-and-monitoring/monitoring/load_balancer.yml deleted file mode 100644 index b4eec2d2c6..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/load_balancer.yml +++ /dev/null @@ -1,65 +0,0 @@ -description: "Monitoring a load balancer" -uri: "mongodb://a:27017/?loadBalanced=true" -phases: - - - outcome: - events: - - - topology_opening_event: - topologyId: "42" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Unknown" - servers: [] - newDescription: - topologyType: "LoadBalanced" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - server_opening_event: - topologyId: "42" - address: "a:27017" - - - server_description_changed_event: - topologyId: "42" - address: "a:27017" - previousDescription: - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "LoadBalancer" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "LoadBalanced" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - topologyType: "LoadBalanced" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "LoadBalancer" diff --git a/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_no_primary.json b/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_no_primary.json deleted file mode 100644 index 41d048729d..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_no_primary.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "description": "Monitoring a topology that is a replica set with no primary connected", - "uri": "mongodb://a,b", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "setVersion": 1, - "primary": "b:27017", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "events": [ - { - "topology_opening_event": { - "topologyId": "42" - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Unknown", - "servers": [] - }, - "newDescription": { - "topologyType": "Unknown", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - { - "address": "b:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - } - } - }, - { - "server_opening_event": { - "topologyId": "42", - "address": "a:27017" - } - }, - { - "server_opening_event": { - "topologyId": "42", - "address": "b:27017" - } - }, - { - "server_description_changed_event": { - "topologyId": "42", - "address": "a:27017", - "previousDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - "newDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [ - "a:27017", - "b:27017" - ], - "passives": [], - "primary": "b:27017", - "setName": "rs", - "type": "RSSecondary" - } - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Unknown", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - { - "address": "b:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - }, - "newDescription": { - "topologyType": "ReplicaSetNoPrimary", - "setName": "rs", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [ - "a:27017", - "b:27017" - ], - "passives": [], - "primary": "b:27017", - "setName": "rs", - "type": "RSSecondary" - }, - { - "address": "b:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "PossiblePrimary" - } - ] - } - } - } - ] - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_no_primary.yml b/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_no_primary.yml deleted file mode 100644 index e5ca9cd90d..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_no_primary.yml +++ /dev/null @@ -1,112 +0,0 @@ -description: "Monitoring a topology that is a replica set with no primary connected" -uri: "mongodb://a,b" -phases: - - - responses: - - - - "a:27017" - - - ok: 1 - helloOk: true - isWritablePrimary: false - secondary: true - setName: "rs" - setVersion: 1 - primary: "b:27017" - hosts: - - "a:27017" - - "b:27017" - minWireVersion: 0 - maxWireVersion: 21 - outcome: - events: - - - topology_opening_event: - topologyId: "42" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Unknown" - servers: [] - newDescription: - topologyType: "Unknown" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - address: "b:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - server_opening_event: - topologyId: "42" - address: "a:27017" - - - server_opening_event: - topologyId: "42" - address: "b:27017" - - - server_description_changed_event: - topologyId: "42" - address: "a:27017" - previousDescription: - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - address: "a:27017" - arbiters: [] - hosts: - - "a:27017" - - "b:27017" - passives: [] - primary: "b:27017" - setName: "rs" - type: "RSSecondary" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Unknown" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - address: "b:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - topologyType: "ReplicaSetNoPrimary" - setName: "rs" - servers: - - - address: "a:27017" - arbiters: [] - hosts: - - "a:27017" - - "b:27017" - passives: [] - primary: "b:27017" - setName: "rs" - type: "RSSecondary" - - - address: "b:27017" - arbiters: [] - hosts: [] - passives: [] - type: "PossiblePrimary" diff --git a/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_primary.json b/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_primary.json deleted file mode 100644 index 3ccc127d1d..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_primary.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "description": "Monitoring a topology that is a replica set with a primary connected", - "uri": "mongodb://a,b", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "setVersion": 1, - "primary": "a:27017", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "events": [ - { - "topology_opening_event": { - "topologyId": "42" - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Unknown", - "servers": [] - }, - "newDescription": { - "topologyType": "Unknown", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - { - "address": "b:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - } - } - }, - { - "server_opening_event": { - "topologyId": "42", - "address": "a:27017" - } - }, - { - "server_opening_event": { - "topologyId": "42", - "address": "b:27017" - } - }, - { - "server_description_changed_event": { - "topologyId": "42", - "address": "a:27017", - "previousDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - "newDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [ - "a:27017", - "b:27017" - ], - "passives": [], - "primary": "a:27017", - "setName": "rs", - "type": "RSPrimary" - } - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Unknown", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - { - "address": "b:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - }, - "newDescription": { - "topologyType": "ReplicaSetWithPrimary", - "setName": "rs", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [ - "a:27017", - "b:27017" - ], - "passives": [], - "primary": "a:27017", - "setName": "rs", - "type": "RSPrimary" - }, - { - "address": "b:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - } - } - } - ] - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_primary.yml b/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_primary.yml deleted file mode 100644 index 256895bb28..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_primary.yml +++ /dev/null @@ -1,111 +0,0 @@ -description: "Monitoring a topology that is a replica set with a primary connected" -uri: "mongodb://a,b" -phases: - - - responses: - - - - "a:27017" - - - ok: 1 - helloOk: true - isWritablePrimary: true - setName: "rs" - setVersion: 1 - primary: "a:27017" - hosts: - - "a:27017" - - "b:27017" - minWireVersion: 0 - maxWireVersion: 21 - outcome: - events: - - - topology_opening_event: - topologyId: "42" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Unknown" - servers: [] - newDescription: - topologyType: "Unknown" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - address: "b:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - server_opening_event: - topologyId: "42" - address: "a:27017" - - - server_opening_event: - topologyId: "42" - address: "b:27017" - - - server_description_changed_event: - topologyId: "42" - address: "a:27017" - previousDescription: - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - address: "a:27017" - arbiters: [] - hosts: - - "a:27017" - - "b:27017" - passives: [] - primary: "a:27017" - setName: "rs" - type: "RSPrimary" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Unknown" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - address: "b:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - topologyType: "ReplicaSetWithPrimary" - setName: "rs" - servers: - - - address: "a:27017" - arbiters: [] - hosts: - - "a:27017" - - "b:27017" - passives: [] - primary: "a:27017" - setName: "rs" - type: "RSPrimary" - - - address: "b:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" diff --git a/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_removal.json b/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_removal.json deleted file mode 100644 index dc6fbe7e7d..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_removal.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "description": "Monitoring a replica set with non member", - "uri": "mongodb://a,b/", - "phases": [ - { - "responses": [], - "outcome": { - "events": [ - { - "topology_opening_event": { - "topologyId": "42" - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Unknown", - "servers": [] - }, - "newDescription": { - "topologyType": "Unknown", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - { - "address": "b:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - } - } - }, - { - "server_opening_event": { - "topologyId": "42", - "address": "a:27017" - } - }, - { - "server_opening_event": { - "topologyId": "42", - "address": "b:27017" - } - } - ] - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "setVersion": 1, - "primary": "a:27017", - "hosts": [ - "a:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true - } - ] - ], - "outcome": { - "events": [ - { - "server_description_changed_event": { - "topologyId": "42", - "address": "a:27017", - "previousDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - "newDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [ - "a:27017" - ], - "passives": [], - "primary": "a:27017", - "setName": "rs", - "type": "RSPrimary" - } - } - }, - { - "server_closed_event": { - "topologyId": "42", - "address": "b:27017" - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Unknown", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - { - "address": "b:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - }, - "newDescription": { - "topologyType": "ReplicaSetWithPrimary", - "setName": "rs", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [ - "a:27017" - ], - "passives": [], - "primary": "a:27017", - "setName": "rs", - "type": "RSPrimary" - } - ] - } - } - } - ] - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_removal.yml b/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_removal.yml deleted file mode 100644 index 25c006861a..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/replica_set_with_removal.yml +++ /dev/null @@ -1,111 +0,0 @@ -description: "Monitoring a replica set with non member" -uri: "mongodb://a,b/" -phases: - - - responses: [] - outcome: - events: - - - topology_opening_event: - topologyId: "42" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Unknown" - servers: [] - newDescription: - topologyType: "Unknown" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - address: "b:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - server_opening_event: - topologyId: "42" - address: "a:27017" - - - server_opening_event: - topologyId: "42" - address: "b:27017" - - - responses: - - - - "a:27017" - - { - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - setVersion: 1.0, - primary: "a:27017", - hosts: [ "a:27017" ], - minWireVersion: 0, - maxWireVersion: 21 - } - - - - "b:27017" - - { ok: 1, helloOk: true, isWritablePrimary: true } - outcome: - events: - - - server_description_changed_event: - topologyId: "42" - address: "a:27017" - previousDescription: - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - address: "a:27017" - arbiters: [] - hosts: [ "a:27017" ] - passives: [] - primary: "a:27017" - setName: "rs" - type: "RSPrimary" - - - server_closed_event: - topologyId: "42" - address: "b:27017" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Unknown" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - address: "b:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - topologyType: "ReplicaSetWithPrimary" - setName: "rs" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [ "a:27017" ] - passives: [] - primary: "a:27017" - setName: "rs" - type: "RSPrimary" diff --git a/testdata/server-discovery-and-monitoring/monitoring/required_replica_set.json b/testdata/server-discovery-and-monitoring/monitoring/required_replica_set.json deleted file mode 100644 index 1f4e5c1d71..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/required_replica_set.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "description": "Monitoring a topology that is required to be a replica set", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "setVersion": 1, - "primary": "a:27017", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "events": [ - { - "topology_opening_event": { - "topologyId": "42" - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Unknown", - "servers": [] - }, - "newDescription": { - "topologyType": "ReplicaSetNoPrimary", - "setName": "rs", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - { - "address": "b:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - } - } - }, - { - "server_opening_event": { - "topologyId": "42", - "address": "a:27017" - } - }, - { - "server_opening_event": { - "topologyId": "42", - "address": "b:27017" - } - }, - { - "server_description_changed_event": { - "topologyId": "42", - "address": "a:27017", - "previousDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - "newDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [ - "a:27017", - "b:27017" - ], - "passives": [], - "primary": "a:27017", - "setName": "rs", - "type": "RSPrimary" - } - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "ReplicaSetNoPrimary", - "setName": "rs", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - { - "address": "b:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - }, - "newDescription": { - "topologyType": "ReplicaSetWithPrimary", - "setName": "rs", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [ - "a:27017", - "b:27017" - ], - "passives": [], - "primary": "a:27017", - "setName": "rs", - "type": "RSPrimary" - }, - { - "address": "b:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - } - } - } - ] - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/monitoring/required_replica_set.yml b/testdata/server-discovery-and-monitoring/monitoring/required_replica_set.yml deleted file mode 100644 index 69d0500de1..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/required_replica_set.yml +++ /dev/null @@ -1,108 +0,0 @@ -description: "Monitoring a topology that is required to be a replica set" -uri: "mongodb://a,b/?replicaSet=rs" -phases: - - - responses: - - - - "a:27017" - - { - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - setVersion: 1.0, - primary: "a:27017", - hosts: [ "a:27017", "b:27017" ], - minWireVersion: 0, - maxWireVersion: 21 - } - outcome: - events: - - - topology_opening_event: - topologyId: "42" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Unknown" - servers: [] - newDescription: - topologyType: "ReplicaSetNoPrimary" - setName: "rs" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - address: "b:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - server_opening_event: - topologyId: "42" - address: "a:27017" - - - server_opening_event: - topologyId: "42" - address: "b:27017" - - - server_description_changed_event: - topologyId: "42" - address: "a:27017" - previousDescription: - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - address: "a:27017" - arbiters: [] - hosts: [ "a:27017", "b:27017" ] - passives: [] - primary: "a:27017" - setName: "rs" - type: "RSPrimary" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "ReplicaSetNoPrimary" - setName: "rs" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - address: "b:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - topologyType: "ReplicaSetWithPrimary" - setName: "rs" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [ "a:27017", "b:27017" ] - passives: [] - primary: "a:27017" - setName: "rs" - type: "RSPrimary" - - - address: "b:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" diff --git a/testdata/server-discovery-and-monitoring/monitoring/standalone.json b/testdata/server-discovery-and-monitoring/monitoring/standalone.json deleted file mode 100644 index f375a383ca..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/standalone.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "description": "Monitoring a direct connection", - "uri": "mongodb://a:27017/?directConnection=true", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "events": [ - { - "topology_opening_event": { - "topologyId": "42" - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Unknown", - "servers": [] - }, - "newDescription": { - "topologyType": "Single", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - } - } - }, - { - "server_opening_event": { - "topologyId": "42", - "address": "a:27017" - } - }, - { - "server_description_changed_event": { - "topologyId": "42", - "address": "a:27017", - "previousDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - "newDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Standalone" - } - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Single", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - }, - "newDescription": { - "topologyType": "Single", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Standalone" - } - ] - } - } - } - ] - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/monitoring/standalone.yml b/testdata/server-discovery-and-monitoring/monitoring/standalone.yml deleted file mode 100644 index 0c3ed64601..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/standalone.yml +++ /dev/null @@ -1,70 +0,0 @@ -description: "Monitoring a direct connection" -uri: "mongodb://a:27017/?directConnection=true" -phases: - - - responses: - - - - "a:27017" - - { ok: 1, helloOk: true, isWritablePrimary: true, minWireVersion: 0, maxWireVersion: 21 } - - outcome: - events: - - - topology_opening_event: - topologyId: "42" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Unknown" - servers: [] - newDescription: - topologyType: "Single" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - server_opening_event: - topologyId: "42" - address: "a:27017" - - - server_description_changed_event: - topologyId: "42" - address: "a:27017" - previousDescription: - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Standalone" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Single" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - topologyType: "Single" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Standalone" diff --git a/testdata/server-discovery-and-monitoring/monitoring/standalone_suppress_equal_description_changes.json b/testdata/server-discovery-and-monitoring/monitoring/standalone_suppress_equal_description_changes.json deleted file mode 100644 index 4d046ff8ed..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/standalone_suppress_equal_description_changes.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "description": "Monitoring a direct connection - suppress update events for equal server descriptions", - "uri": "mongodb://a:27017/?directConnection=true", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "events": [ - { - "topology_opening_event": { - "topologyId": "42" - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Unknown", - "servers": [] - }, - "newDescription": { - "topologyType": "Single", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - } - } - }, - { - "server_opening_event": { - "topologyId": "42", - "address": "a:27017" - } - }, - { - "server_description_changed_event": { - "topologyId": "42", - "address": "a:27017", - "previousDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - }, - "newDescription": { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Standalone" - } - } - }, - { - "topology_description_changed_event": { - "topologyId": "42", - "previousDescription": { - "topologyType": "Single", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Unknown" - } - ] - }, - "newDescription": { - "topologyType": "Single", - "servers": [ - { - "address": "a:27017", - "arbiters": [], - "hosts": [], - "passives": [], - "type": "Standalone" - } - ] - } - } - } - ] - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/monitoring/standalone_suppress_equal_description_changes.yml b/testdata/server-discovery-and-monitoring/monitoring/standalone_suppress_equal_description_changes.yml deleted file mode 100644 index 255ec2dd43..0000000000 --- a/testdata/server-discovery-and-monitoring/monitoring/standalone_suppress_equal_description_changes.yml +++ /dev/null @@ -1,73 +0,0 @@ -description: "Monitoring a direct connection - suppress update events for equal server descriptions" -uri: "mongodb://a:27017/?directConnection=true" -phases: - - - responses: - - - - "a:27017" - - { ok: 1, helloOk: true, isWritablePrimary: true, minWireVersion: 0, maxWireVersion: 21 } - - - - "a:27017" - - { ok: 1, helloOk: true, isWritablePrimary: true, minWireVersion: 0, maxWireVersion: 21 } - - outcome: - events: - - - topology_opening_event: - topologyId: "42" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Unknown" - servers: [] - newDescription: - topologyType: "Single" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - - - server_opening_event: - topologyId: "42" - address: "a:27017" - - - server_description_changed_event: - topologyId: "42" - address: "a:27017" - previousDescription: - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Standalone" - - - topology_description_changed_event: - topologyId: "42" - previousDescription: - topologyType: "Single" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Unknown" - newDescription: - topologyType: "Single" - servers: - - - address: "a:27017" - arbiters: [] - hosts: [] - passives: [] - type: "Standalone" diff --git a/testdata/server-discovery-and-monitoring/rs/compatible.json b/testdata/server-discovery-and-monitoring/rs/compatible.json deleted file mode 100644 index dfd5d57dfa..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/compatible.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "description": "Replica set member with large maxWireVersion", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 1000 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "setName": "rs", - "logicalSessionTimeoutMinutes": null, - "compatible": true - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/compatible.yml b/testdata/server-discovery-and-monitoring/rs/compatible.yml deleted file mode 100644 index ce17d7e302..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/compatible.yml +++ /dev/null @@ -1,45 +0,0 @@ -description: "Replica set member with large maxWireVersion" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }], - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 1000 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs" - }, - "b:27017": { - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - setName: "rs", - logicalSessionTimeoutMinutes: null, - compatible: true - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/compatible_unknown.json b/testdata/server-discovery-and-monitoring/rs/compatible_unknown.json deleted file mode 100644 index 95e03ea958..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/compatible_unknown.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "description": "Replica set member and an unknown server", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "setName": "rs", - "logicalSessionTimeoutMinutes": null, - "compatible": true - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/compatible_unknown.yml b/testdata/server-discovery-and-monitoring/rs/compatible_unknown.yml deleted file mode 100644 index ed97ab31ac..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/compatible_unknown.yml +++ /dev/null @@ -1,34 +0,0 @@ -description: "Replica set member and an unknown server" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }], - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs" - }, - "b:27017": { - type: "Unknown", - } - }, - topologyType: "ReplicaSetWithPrimary", - setName: "rs", - logicalSessionTimeoutMinutes: null, - compatible: true - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_arbiters.json b/testdata/server-discovery-and-monitoring/rs/discover_arbiters.json deleted file mode 100644 index 803462b156..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_arbiters.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "description": "Discover arbiters with directConnection URI option", - "uri": "mongodb://a/?directConnection=false", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "arbiters": [ - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_arbiters.yml b/testdata/server-discovery-and-monitoring/rs/discover_arbiters.yml deleted file mode 100644 index 5334bc8241..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_arbiters.yml +++ /dev/null @@ -1,44 +0,0 @@ -description: "Discover arbiters with directConnection URI option" - -uri: "mongodb://a/?directConnection=false" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - arbiters: ["b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_arbiters_replicaset.json b/testdata/server-discovery-and-monitoring/rs/discover_arbiters_replicaset.json deleted file mode 100644 index e58d7c7fb4..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_arbiters_replicaset.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "description": "Discover arbiters with replicaSet URI option", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "arbiters": [ - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_arbiters_replicaset.yml b/testdata/server-discovery-and-monitoring/rs/discover_arbiters_replicaset.yml deleted file mode 100644 index 882dbb0f89..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_arbiters_replicaset.yml +++ /dev/null @@ -1,44 +0,0 @@ -description: "Discover arbiters with replicaSet URI option" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - arbiters: ["b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_ghost.json b/testdata/server-discovery-and-monitoring/rs/discover_ghost.json deleted file mode 100644 index 3b7fc836ec..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_ghost.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "description": "Discover ghost with directConnection URI option", - "uri": "mongodb://b/?directConnection=false", - "phases": [ - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "isreplicaset": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "b:27017": { - "type": "RSGhost", - "setName": null - } - }, - "topologyType": "Unknown", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_ghost.yml b/testdata/server-discovery-and-monitoring/rs/discover_ghost.yml deleted file mode 100644 index 7a9cbd5559..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_ghost.yml +++ /dev/null @@ -1,36 +0,0 @@ -description: "Discover ghost with directConnection URI option" - -uri: "mongodb://b/?directConnection=false" - -phases: [ - - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - isreplicaset: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "b:27017": { - - type: "RSGhost", - setName: - } - }, - topologyType: "Unknown", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_ghost_replicaset.json b/testdata/server-discovery-and-monitoring/rs/discover_ghost_replicaset.json deleted file mode 100644 index 1a8457983b..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_ghost_replicaset.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "description": "Discover ghost with replicaSet URI option", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "isreplicaset": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - }, - "b:27017": { - "type": "RSGhost", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_ghost_replicaset.yml b/testdata/server-discovery-and-monitoring/rs/discover_ghost_replicaset.yml deleted file mode 100644 index 61ba1eab56..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_ghost_replicaset.yml +++ /dev/null @@ -1,42 +0,0 @@ -description: "Discover ghost with replicaSet URI option" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - isreplicaset: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - }, - - "b:27017": { - - type: "RSGhost", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_hidden.json b/testdata/server-discovery-and-monitoring/rs/discover_hidden.json deleted file mode 100644 index 10bd51edeb..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_hidden.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "Discover hidden with directConnection URI option", - "uri": "mongodb://a/?directConnection=false", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hidden": true, - "hosts": [ - "c:27017", - "d:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSOther", - "setName": "rs" - }, - "c:27017": { - "type": "Unknown", - "setName": null - }, - "d:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_hidden.yml b/testdata/server-discovery-and-monitoring/rs/discover_hidden.yml deleted file mode 100644 index f483255802..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_hidden.yml +++ /dev/null @@ -1,51 +0,0 @@ -description: "Discover hidden with directConnection URI option" - -uri: "mongodb://a/?directConnection=false" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - hidden: true, - hosts: ["c:27017", "d:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }], - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSOther", - setName: "rs" - }, - - "c:27017": { - - type: "Unknown", - setName: - }, - - "d:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_hidden_replicaset.json b/testdata/server-discovery-and-monitoring/rs/discover_hidden_replicaset.json deleted file mode 100644 index 63cf558675..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_hidden_replicaset.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "Discover hidden with replicaSet URI option", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hidden": true, - "hosts": [ - "c:27017", - "d:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSOther", - "setName": "rs" - }, - "c:27017": { - "type": "Unknown", - "setName": null - }, - "d:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_hidden_replicaset.yml b/testdata/server-discovery-and-monitoring/rs/discover_hidden_replicaset.yml deleted file mode 100644 index 8d496544d2..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_hidden_replicaset.yml +++ /dev/null @@ -1,51 +0,0 @@ -description: "Discover hidden with replicaSet URI option" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - hidden: true, - hosts: ["c:27017", "d:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }], - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSOther", - setName: "rs" - }, - - "c:27017": { - - type: "Unknown", - setName: - }, - - "d:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_passives.json b/testdata/server-discovery-and-monitoring/rs/discover_passives.json deleted file mode 100644 index 0a292c675c..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_passives.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "description": "Discover passives with directConnection URI option", - "uri": "mongodb://a/?directConnection=false", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "passives": [ - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "passive": true, - "hosts": [ - "a:27017" - ], - "passives": [ - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_passives.yml b/testdata/server-discovery-and-monitoring/rs/discover_passives.yml deleted file mode 100644 index 25419733cf..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_passives.yml +++ /dev/null @@ -1,83 +0,0 @@ -description: "Discover passives with directConnection URI option" - -uri: "mongodb://a/?directConnection=false" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - passives: ["b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - passive: true, - hosts: ["a:27017"], - passives: ["b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_passives_replicaset.json b/testdata/server-discovery-and-monitoring/rs/discover_passives_replicaset.json deleted file mode 100644 index c48fd47625..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_passives_replicaset.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "description": "Discover passives with replicaSet URI option", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "passives": [ - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "passive": true, - "hosts": [ - "a:27017" - ], - "passives": [ - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_passives_replicaset.yml b/testdata/server-discovery-and-monitoring/rs/discover_passives_replicaset.yml deleted file mode 100644 index d981280a2f..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_passives_replicaset.yml +++ /dev/null @@ -1,83 +0,0 @@ -description: "Discover passives with replicaSet URI option" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - passives: ["b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - passive: true, - hosts: ["a:27017"], - passives: ["b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_primary.json b/testdata/server-discovery-and-monitoring/rs/discover_primary.json deleted file mode 100644 index 04e7a4984c..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_primary.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "description": "Discover primary with directConnection URI option", - "uri": "mongodb://a/?directConnection=false", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_primary.yml b/testdata/server-discovery-and-monitoring/rs/discover_primary.yml deleted file mode 100644 index 3c11e3e4f2..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_primary.yml +++ /dev/null @@ -1,43 +0,0 @@ -description: "Discover primary with directConnection URI option" - -uri: "mongodb://a/?directConnection=false" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_primary_replicaset.json b/testdata/server-discovery-and-monitoring/rs/discover_primary_replicaset.json deleted file mode 100644 index 3cdcfdcee2..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_primary_replicaset.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "description": "Discover primary with replicaSet URI option", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_primary_replicaset.yml b/testdata/server-discovery-and-monitoring/rs/discover_primary_replicaset.yml deleted file mode 100644 index 47831fa60a..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_primary_replicaset.yml +++ /dev/null @@ -1,43 +0,0 @@ -description: "Discover primary with replicaSet URI option" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_rsother.json b/testdata/server-discovery-and-monitoring/rs/discover_rsother.json deleted file mode 100644 index 9c3b8d8b7d..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_rsother.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "description": "Discover RSOther with directConnection URI option", - "uri": "mongodb://b/?directConnection=false", - "phases": [ - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": false, - "hosts": [ - "c:27017", - "d:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "b:27017": { - "type": "RSOther", - "setName": "rs" - }, - "c:27017": { - "type": "Unknown", - "setName": null - }, - "d:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_rsother.yml b/testdata/server-discovery-and-monitoring/rs/discover_rsother.yml deleted file mode 100644 index 11c65863f4..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_rsother.yml +++ /dev/null @@ -1,50 +0,0 @@ -description: "Discover RSOther with directConnection URI option" - -uri: "mongodb://b/?directConnection=false" - -phases: [ - - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: false, - hosts: ["c:27017", "d:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "b:27017": { - - type: "RSOther", - setName: "rs" - }, - - "c:27017": { - - type: "Unknown", - setName: - }, - - "d:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_rsother_replicaset.json b/testdata/server-discovery-and-monitoring/rs/discover_rsother_replicaset.json deleted file mode 100644 index 3da9efb066..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_rsother_replicaset.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "description": "Discover RSOther with replicaSet URI option", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hidden": true, - "hosts": [ - "c:27017", - "d:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": false, - "hosts": [ - "c:27017", - "d:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSOther", - "setName": "rs" - }, - "b:27017": { - "type": "RSOther", - "setName": "rs" - }, - "c:27017": { - "type": "Unknown", - "setName": null - }, - "d:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_rsother_replicaset.yml b/testdata/server-discovery-and-monitoring/rs/discover_rsother_replicaset.yml deleted file mode 100644 index c25d33ab2b..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_rsother_replicaset.yml +++ /dev/null @@ -1,68 +0,0 @@ -description: "Discover RSOther with replicaSet URI option" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - hidden: true, - hosts: ["c:27017", "d:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }], - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: false, - hosts: ["c:27017", "d:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSOther", - setName: "rs" - }, - - "b:27017": { - - type: "RSOther", - setName: "rs" - }, - - "c:27017": { - - type: "Unknown", - setName: - }, - - "d:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_secondary.json b/testdata/server-discovery-and-monitoring/rs/discover_secondary.json deleted file mode 100644 index 64a1ce31e3..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_secondary.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "description": "Discover secondary with directConnection URI option", - "uri": "mongodb://b/?directConnection=false", - "phases": [ - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_secondary.yml b/testdata/server-discovery-and-monitoring/rs/discover_secondary.yml deleted file mode 100644 index 83af822eda..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_secondary.yml +++ /dev/null @@ -1,44 +0,0 @@ -description: "Discover secondary with directConnection URI option" - -uri: "mongodb://b/?directConnection=false" - -phases: [ - - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - }, - - "b:27017": { - - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discover_secondary_replicaset.json b/testdata/server-discovery-and-monitoring/rs/discover_secondary_replicaset.json deleted file mode 100644 index d230f976a2..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_secondary_replicaset.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "description": "Discover secondary with replicaSet URI option", - "uri": "mongodb://b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discover_secondary_replicaset.yml b/testdata/server-discovery-and-monitoring/rs/discover_secondary_replicaset.yml deleted file mode 100644 index 71229387cc..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discover_secondary_replicaset.yml +++ /dev/null @@ -1,44 +0,0 @@ -description: "Discover secondary with replicaSet URI option" - -uri: "mongodb://b/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - }, - - "b:27017": { - - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/discovery.json b/testdata/server-discovery-and-monitoring/rs/discovery.json deleted file mode 100644 index e9deaa7587..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discovery.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "description": "Replica set discovery", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017", - "c:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - }, - "c:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "primary": "d:27017", - "hosts": [ - "b:27017", - "c:27017", - "d:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "c:27017": { - "type": "Unknown", - "setName": null - }, - "d:27017": { - "type": "PossiblePrimary", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "d:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "b:27017", - "c:27017", - "d:27017", - "e:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "c:27017": { - "type": "Unknown", - "setName": null - }, - "d:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "e:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "c:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017", - "c:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "c:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "d:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "e:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/discovery.yml b/testdata/server-discovery-and-monitoring/rs/discovery.yml deleted file mode 100644 index 19be04897b..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/discovery.yml +++ /dev/null @@ -1,207 +0,0 @@ -description: "Replica set discovery" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # At first, a, b, and c are secondaries. - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - hosts: ["a:27017", "b:27017", "c:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSSecondary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - }, - - "c:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - # Admin removes a, adds a high-priority member d which becomes primary. - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - primary: "d:27017", - hosts: ["b:27017", "c:27017", "d:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSSecondary", - setName: "rs" - }, - - "b:27017": { - - type: "RSSecondary", - setName: "rs" - }, - - "c:27017": { - - type: "Unknown", - setName: - }, - - "d:27017": { - - type: "PossiblePrimary", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - # Primary responds. - { - responses: [ - - ["d:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["b:27017", "c:27017", "d:27017", "e:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - # e is new. - servers: { - - "b:27017": { - - type: "RSSecondary", - setName: "rs" - }, - - "c:27017": { - - type: "Unknown", - setName: - }, - - "d:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "e:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - # Stale response from c. - { - responses: [ - - ["c:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - hosts: ["a:27017", "b:27017", "c:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - # We don't add a back. - # We don't remove e. - servers: { - - "b:27017": { - - type: "RSSecondary", - setName: "rs" - }, - - "c:27017": { - - type: "RSSecondary", - setName: "rs" - }, - - "d:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "e:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/electionId_precedence_setVersion.json b/testdata/server-discovery-and-monitoring/rs/electionId_precedence_setVersion.json deleted file mode 100644 index 2fcea2bf66..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/electionId_precedence_setVersion.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "description": "ElectionId is considered higher precedence than setVersion", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 2, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ], - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - }, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - } - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "setVersion": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/electionId_precedence_setVersion.yml b/testdata/server-discovery-and-monitoring/rs/electionId_precedence_setVersion.yml deleted file mode 100644 index 4b9563fcfd..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/electionId_precedence_setVersion.yml +++ /dev/null @@ -1,62 +0,0 @@ -description: ElectionId is considered higher precedence than setVersion -uri: "mongodb://a/?replicaSet=rs" -phases: - - responses: - - - "a:27017" - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - "a:27017" - - "b:27017" - setName: rs - setVersion: 1 - electionId: - $oid: "000000000000000000000001" - minWireVersion: 0 - maxWireVersion: 17 - - - "b:27017" - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - "a:27017" - - "b:27017" - setName: rs - setVersion: 2 # Even though "B" reports the newer setVersion, "A" will report the newer electionId which should allow it to remain the primary - electionId: - $oid: "000000000000000000000001" - minWireVersion: 0 - maxWireVersion: 17 - - - "a:27017" - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - "a:27017" - - "b:27017" - setName: rs - setVersion: 1 - electionId: - $oid: "000000000000000000000002" - minWireVersion: 0 - maxWireVersion: 17 - outcome: - servers: - "a:27017": - type: RSPrimary - setName: rs - setVersion: 1 - electionId: - $oid: "000000000000000000000002" - "b:27017": - type: Unknown - setName: null - setVersion: null - electionId: null - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - maxSetVersion: 1 - maxElectionId: - $oid: "000000000000000000000002" diff --git a/testdata/server-discovery-and-monitoring/rs/equal_electionids.json b/testdata/server-discovery-and-monitoring/rs/equal_electionids.json deleted file mode 100644 index f1deedf9f4..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/equal_electionids.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "description": "New primary with equal electionId", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "setVersion": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/equal_electionids.yml b/testdata/server-discovery-and-monitoring/rs/equal_electionids.yml deleted file mode 100644 index 17e8aa2c11..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/equal_electionids.yml +++ /dev/null @@ -1,57 +0,0 @@ -description: "New primary with equal electionId" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # A and B claim to be primaries, with equal electionIds. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 21 - }], - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - # No choice but to believe the latter response. - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - setVersion: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"} - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/hosts_differ_from_seeds.json b/testdata/server-discovery-and-monitoring/rs/hosts_differ_from_seeds.json deleted file mode 100644 index 085e81e266..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/hosts_differ_from_seeds.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "description": "Host list differs from seeds", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/hosts_differ_from_seeds.yml b/testdata/server-discovery-and-monitoring/rs/hosts_differ_from_seeds.yml deleted file mode 100644 index 2ecd27ec7c..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/hosts_differ_from_seeds.yml +++ /dev/null @@ -1,37 +0,0 @@ -description: "Host list differs from seeds" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/incompatible_arbiter.json b/testdata/server-discovery-and-monitoring/rs/incompatible_arbiter.json deleted file mode 100644 index bda18d9f6f..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/incompatible_arbiter.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "description": "Incompatible arbiter", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "arbiterOnly": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 1 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSArbiter", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "setName": "rs", - "logicalSessionTimeoutMinutes": null, - "compatible": false - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/incompatible_arbiter.yml b/testdata/server-discovery-and-monitoring/rs/incompatible_arbiter.yml deleted file mode 100644 index 2e46ff2951..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/incompatible_arbiter.yml +++ /dev/null @@ -1,36 +0,0 @@ -description: "Incompatible arbiter" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: - - responses: - - - - "a:27017" - - ok: 1 - helloOk: true - isWritablePrimary: true - setName: "rs" - hosts: ["a:27017", "b:27017"] - minWireVersion: 0 - maxWireVersion: 21 - - - - "b:27017" - - ok: 1 - helloOk: true - arbiterOnly: true - setName: "rs" - hosts: ["a:27017", "b:27017"] - minWireVersion: 0 - maxWireVersion: 1 - outcome: - servers: - "a:27017": - type: "RSPrimary" - setName: "rs" - "b:27017": - type: "RSArbiter" - setName: "rs" - topologyType: "ReplicaSetWithPrimary" - setName: "rs" - logicalSessionTimeoutMinutes: ~ - compatible: false diff --git a/testdata/server-discovery-and-monitoring/rs/incompatible_ghost.json b/testdata/server-discovery-and-monitoring/rs/incompatible_ghost.json deleted file mode 100644 index 9d82e31682..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/incompatible_ghost.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "description": "Incompatible ghost", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isreplicaset": true, - "minWireVersion": 0, - "maxWireVersion": 1 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSGhost", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "setName": "rs", - "logicalSessionTimeoutMinutes": null, - "compatible": false - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/incompatible_ghost.yml b/testdata/server-discovery-and-monitoring/rs/incompatible_ghost.yml deleted file mode 100644 index c99badf4a3..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/incompatible_ghost.yml +++ /dev/null @@ -1,34 +0,0 @@ -description: "Incompatible ghost" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: - - responses: - - - - "a:27017" - - ok: 1 - helloOk: true - isWritablePrimary: true - setName: "rs" - hosts: ["a:27017", "b:27017"] - minWireVersion: 0 - maxWireVersion: 21 - - - - "b:27017" - - ok: 1 - helloOk: true - isreplicaset: true - minWireVersion: 0 - maxWireVersion: 1 - outcome: - servers: - "a:27017": - type: "RSPrimary" - setName: "rs" - "b:27017": - type: "RSGhost" - setName: - topologyType: "ReplicaSetWithPrimary" - setName: "rs" - logicalSessionTimeoutMinutes: ~ - compatible: false diff --git a/testdata/server-discovery-and-monitoring/rs/incompatible_other.json b/testdata/server-discovery-and-monitoring/rs/incompatible_other.json deleted file mode 100644 index 149ba01142..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/incompatible_other.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "description": "Incompatible other", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "hidden": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 1 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSOther", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "setName": "rs", - "logicalSessionTimeoutMinutes": null, - "compatible": false - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/incompatible_other.yml b/testdata/server-discovery-and-monitoring/rs/incompatible_other.yml deleted file mode 100644 index 16452e7b02..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/incompatible_other.yml +++ /dev/null @@ -1,36 +0,0 @@ -description: "Incompatible other" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: - - responses: - - - - "a:27017" - - ok: 1 - helloOk: true - isWritablePrimary: true - setName: "rs" - hosts: ["a:27017", "b:27017"] - minWireVersion: 0 - maxWireVersion: 21 - - - - "b:27017" - - ok: 1 - helloOk: true - hidden: true - setName: "rs" - hosts: ["a:27017", "b:27017"] - minWireVersion: 0 - maxWireVersion: 1 - outcome: - servers: - "a:27017": - type: "RSPrimary" - setName: "rs" - "b:27017": - type: "RSOther" - setName: "rs" - topologyType: "ReplicaSetWithPrimary" - setName: "rs" - logicalSessionTimeoutMinutes: ~ - compatible: false diff --git a/testdata/server-discovery-and-monitoring/rs/ls_timeout.json b/testdata/server-discovery-and-monitoring/rs/ls_timeout.json deleted file mode 100644 index c68790ddfd..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/ls_timeout.json +++ /dev/null @@ -1,279 +0,0 @@ -{ - "description": "Parse logicalSessionTimeoutMinutes from replica set", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017", - "c:27017", - "d:27017", - "e:27017" - ], - "setName": "rs", - "logicalSessionTimeoutMinutes": 3, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown" - }, - "c:27017": { - "type": "Unknown" - }, - "d:27017": { - "type": "Unknown" - }, - "e:27017": { - "type": "Unknown" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": 3, - "setName": "rs" - } - }, - { - "responses": [ - [ - "d:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "isreplicaset": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown" - }, - "c:27017": { - "type": "Unknown" - }, - "d:27017": { - "type": "RSGhost" - }, - "e:27017": { - "type": "Unknown" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": 3, - "setName": "rs" - } - }, - { - "responses": [ - [ - "e:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "hosts": [ - "a:27017", - "b:27017", - "c:27017", - "d:27017", - "e:27017" - ], - "setName": "rs", - "arbiterOnly": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown" - }, - "c:27017": { - "type": "Unknown" - }, - "d:27017": { - "type": "RSGhost" - }, - "e:27017": { - "type": "RSArbiter", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": 3, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hosts": [ - "a:27017", - "b:27017", - "c:27017", - "d:27017", - "e:27017" - ], - "setName": "rs", - "logicalSessionTimeoutMinutes": 2, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "c:27017": { - "type": "Unknown" - }, - "d:27017": { - "type": "RSGhost" - }, - "e:27017": { - "type": "RSArbiter", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": 2, - "setName": "rs" - } - }, - { - "responses": [ - [ - "c:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "setName": "rs", - "hidden": true, - "logicalSessionTimeoutMinutes": 1, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "c:27017": { - "type": "RSOther", - "setName": "rs" - }, - "d:27017": { - "type": "RSGhost" - }, - "e:27017": { - "type": "RSArbiter", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": 2, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hosts": [ - "a:27017", - "b:27017", - "c:27017", - "d:27017", - "e:27017" - ], - "setName": "rs", - "logicalSessionTimeoutMinutes": null, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "c:27017": { - "type": "RSOther", - "setName": "rs" - }, - "d:27017": { - "type": "RSGhost" - }, - "e:27017": { - "type": "RSArbiter", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/ls_timeout.yml b/testdata/server-discovery-and-monitoring/rs/ls_timeout.yml deleted file mode 100644 index 2cea00e99e..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/ls_timeout.yml +++ /dev/null @@ -1,249 +0,0 @@ -description: "Parse logicalSessionTimeoutMinutes from replica set" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - # An RSPrimary responds with a non-null logicalSessionTimeoutMinutes - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017", "c:27017", "d:27017", "e:27017"], - setName: "rs", - logicalSessionTimeoutMinutes: 3, - minWireVersion: 0, - maxWireVersion: 21 - }], - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs" - }, - "b:27017": { - type: "Unknown", - }, - "c:27017": { - type: "Unknown", - }, - "d:27017": { - type: "Unknown", - }, - "e:27017": { - type: "Unknown", - } - - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: 3, - setName: "rs", - } - }, - # An RSGhost responds without a logicalSessionTimeoutMinutes - { - responses: [ - ["d:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: false, - isreplicaset: true, - minWireVersion: 0, - maxWireVersion: 21 - }], - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs" - }, - "b:27017": { - type: "Unknown", - }, - "c:27017": { - type: "Unknown", - }, - "d:27017": { - type: "RSGhost", - }, - "e:27017": { - type: "Unknown", - } - - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: 3, - setName: "rs", - } - }, - # An RSArbiter responds without a logicalSessionTimeoutMinutes - { - responses: [ - ["e:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: false, - hosts: ["a:27017", "b:27017", "c:27017", "d:27017", "e:27017"], - setName: "rs", - arbiterOnly: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs" - }, - "b:27017": { - type: "Unknown", - }, - "c:27017": { - type: "Unknown", - }, - "d:27017": { - type: "RSGhost", - }, - "e:27017": { - type: "RSArbiter", - setName: "rs" - } - - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: 3, - setName: "rs", - } - }, - # An RSSecondary responds with a lower logicalSessionTimeoutMinutes - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - hosts: ["a:27017", "b:27017", "c:27017", "d:27017", "e:27017"], - setName: "rs", - logicalSessionTimeoutMinutes: 2, - minWireVersion: 0, - maxWireVersion: 21 - }], - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs" - }, - "b:27017": { - type: "RSSecondary", - setName: "rs" - }, - "c:27017": { - type: "Unknown", - }, - "d:27017": { - type: "RSGhost", - }, - "e:27017": { - type: "RSArbiter", - setName: "rs" - } - - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: 2, - setName: "rs", - } - }, - # An RSOther responds with an even lower logicalSessionTimeoutMinutes, which is ignored - { - responses: [ - ["c:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: false, - setName: "rs", - hidden: true, - logicalSessionTimeoutMinutes: 1, - minWireVersion: 0, - maxWireVersion: 21 - }], - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs" - }, - "b:27017": { - type: "RSSecondary", - setName: "rs" - }, - "c:27017": { - type: "RSOther", - setName: "rs" - }, - "d:27017": { - type: "RSGhost", - }, - "e:27017": { - type: "RSArbiter", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: 2, - setName: "rs", - } - }, - # Now the RSSecondary responds with no logicalSessionTimeoutMinutes - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - hosts: ["a:27017", "b:27017", "c:27017", "d:27017", "e:27017"], - setName: "rs", - logicalSessionTimeoutMinutes: null, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - # Sessions aren't supported now - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs" - }, - "b:27017": { - type: "RSSecondary", - setName: "rs" - }, - "c:27017": { - type: "RSOther", - setName: "rs" - }, - "d:27017": { - type: "RSGhost", - }, - "e:27017": { - type: "RSArbiter", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/member_reconfig.json b/testdata/server-discovery-and-monitoring/rs/member_reconfig.json deleted file mode 100644 index a05fed0efb..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/member_reconfig.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "description": "Member removed by reconfig", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/member_reconfig.yml b/testdata/server-discovery-and-monitoring/rs/member_reconfig.yml deleted file mode 100644 index a43a88d53f..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/member_reconfig.yml +++ /dev/null @@ -1,74 +0,0 @@ -description: "Member removed by reconfig" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/member_standalone.json b/testdata/server-discovery-and-monitoring/rs/member_standalone.json deleted file mode 100644 index db100db9f3..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/member_standalone.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "description": "Member brought up as standalone", - "uri": "mongodb://a,b", - "phases": [ - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "Unknown", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/member_standalone.yml b/testdata/server-discovery-and-monitoring/rs/member_standalone.yml deleted file mode 100644 index 1be000ea4e..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/member_standalone.yml +++ /dev/null @@ -1,66 +0,0 @@ -description: "Member brought up as standalone" - -uri: "mongodb://a,b" - -phases: [ - - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "Unknown", - logicalSessionTimeoutMinutes: null, - setName: - } - }, - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/new_primary.json b/testdata/server-discovery-and-monitoring/rs/new_primary.json deleted file mode 100644 index 1a84c69c91..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/new_primary.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "description": "New primary", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/new_primary.yml b/testdata/server-discovery-and-monitoring/rs/new_primary.yml deleted file mode 100644 index f2485a1863..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/new_primary.yml +++ /dev/null @@ -1,80 +0,0 @@ -description: "New primary" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - }, - - "b:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/new_primary_new_electionid.json b/testdata/server-discovery-and-monitoring/rs/new_primary_new_electionid.json deleted file mode 100644 index 509720d445..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/new_primary_new_electionid.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "New primary with greater setVersion and electionId", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - } - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/new_primary_new_electionid.yml b/testdata/server-discovery-and-monitoring/rs/new_primary_new_electionid.yml deleted file mode 100644 index 5641cfda95..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/new_primary_new_electionid.yml +++ /dev/null @@ -1,119 +0,0 @@ -description: "New primary with greater setVersion and electionId" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A is discovered and tells us about B. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"} - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - }, - - # B is elected. - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000002"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000002"} - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - }, - - # A still claims to be primary but it's ignored. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000002"} - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/new_primary_new_setversion.json b/testdata/server-discovery-and-monitoring/rs/new_primary_new_setversion.json deleted file mode 100644 index 96533c61ee..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/new_primary_new_setversion.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "New primary with greater setVersion", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - } - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 2, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 2, - "electionId": { - "$oid": "000000000000000000000001" - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 2, - "electionId": { - "$oid": "000000000000000000000001" - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/new_primary_new_setversion.yml b/testdata/server-discovery-and-monitoring/rs/new_primary_new_setversion.yml deleted file mode 100644 index f269797112..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/new_primary_new_setversion.yml +++ /dev/null @@ -1,119 +0,0 @@ -description: "New primary with greater setVersion" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A is discovered and tells us about B. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"} - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - }, - - # RS is reconfigured and B is elected. - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 2, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 2, - electionId: {"$oid": "000000000000000000000001"} - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - }, - - # A still claims to be primary but it's ignored. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 2, - electionId: {"$oid": "000000000000000000000001"} - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/new_primary_wrong_set_name.json b/testdata/server-discovery-and-monitoring/rs/new_primary_wrong_set_name.json deleted file mode 100644 index 774b3a5736..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/new_primary_wrong_set_name.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "description": "New primary with wrong setName", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "wrong", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/new_primary_wrong_set_name.yml b/testdata/server-discovery-and-monitoring/rs/new_primary_wrong_set_name.yml deleted file mode 100644 index dc6df9cd8b..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/new_primary_wrong_set_name.yml +++ /dev/null @@ -1,77 +0,0 @@ -description: "New primary with wrong setName" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary is discovered normally, and tells us about server B. - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - # B is actually the primary of another replica set. It's removed, and - # topologyType remains ReplicaSetWithPrimary. - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - setName: "wrong", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/non_rs_member.json b/testdata/server-discovery-and-monitoring/rs/non_rs_member.json deleted file mode 100644 index 6bf10bd628..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/non_rs_member.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "description": "Non replicaSet member responds", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/non_rs_member.yml b/testdata/server-discovery-and-monitoring/rs/non_rs_member.yml deleted file mode 100644 index 4e2f0b1be2..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/non_rs_member.yml +++ /dev/null @@ -1,33 +0,0 @@ -description: "Non replicaSet member responds" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["b:27017", { - ok: 1, - helloOk: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/normalize_case.json b/testdata/server-discovery-and-monitoring/rs/normalize_case.json deleted file mode 100644 index 62915495e0..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/normalize_case.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "description": "Replica set case normalization", - "uri": "mongodb://A/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "A:27017" - ], - "passives": [ - "B:27017" - ], - "arbiters": [ - "C:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - }, - "c:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/normalize_case.yml b/testdata/server-discovery-and-monitoring/rs/normalize_case.yml deleted file mode 100644 index a543ab72af..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/normalize_case.yml +++ /dev/null @@ -1,52 +0,0 @@ -description: "Replica set case normalization" - -uri: "mongodb://A/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["A:27017"], - passives: ["B:27017"], - arbiters: ["C:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - }, - - "c:27017": { - - type: "Unknown", - setName: - } - - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/normalize_case_me.json b/testdata/server-discovery-and-monitoring/rs/normalize_case_me.json deleted file mode 100644 index 0d9ba6213e..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/normalize_case_me.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "description": "Replica set mixed case normalization", - "uri": "mongodb://A/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "me": "A:27017", - "hosts": [ - "A:27017" - ], - "passives": [ - "B:27017" - ], - "arbiters": [ - "C:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - }, - "c:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "me": "B:27017", - "hosts": [ - "A:27017" - ], - "passives": [ - "B:27017" - ], - "arbiters": [ - "C:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "c:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/normalize_case_me.yml b/testdata/server-discovery-and-monitoring/rs/normalize_case_me.yml deleted file mode 100644 index 03ac43f314..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/normalize_case_me.yml +++ /dev/null @@ -1,102 +0,0 @@ -description: "Replica set mixed case normalization" - -uri: "mongodb://A/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - me: "A:27017", - hosts: ["A:27017"], - passives: ["B:27017"], - arbiters: ["C:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - }, - - "c:27017": { - - type: "Unknown", - setName: - } - - }, - - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - me: "B:27017", - hosts: ["A:27017"], - passives: ["B:27017"], - arbiters: ["C:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "RSSecondary", - setName: "rs" - }, - - "c:27017": { - - type: "Unknown", - setName: - } - - }, - - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/null_election_id-pre-6.0.json b/testdata/server-discovery-and-monitoring/rs/null_election_id-pre-6.0.json deleted file mode 100644 index 9e7ccc6e7f..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/null_election_id-pre-6.0.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "description": "Pre 6.0 Primaries with and without electionIds", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017", - "c:27017" - ], - "setVersion": 1, - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "c:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1 - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017", - "c:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - } - }, - "c:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017", - "c:27017" - ], - "setVersion": 1, - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "c:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - }, - { - "responses": [ - [ - "c:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017", - "c:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "c:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/null_election_id-pre-6.0.yml b/testdata/server-discovery-and-monitoring/rs/null_election_id-pre-6.0.yml deleted file mode 100644 index 63f9699f22..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/null_election_id-pre-6.0.yml +++ /dev/null @@ -1,175 +0,0 @@ -description: "Pre 6.0 Primaries with and without electionIds" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A has no electionId. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017", "c:27017"], - setVersion: 1, - setName: "rs", - minWireVersion: 0, - maxWireVersion: 7 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - }, - "c:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - } - }, - - # B is elected, it has an electionId. - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017", "c:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000002"}, - minWireVersion: 0, - maxWireVersion: 7 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000002"} - }, - "c:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - }, - - # A still claims to be primary, no electionId, we have to trust it. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017", "c:27017"], - setVersion: 1, - setName: "rs", - minWireVersion: 0, - maxWireVersion: 7 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - }, - "c:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - }, - - # But we remember B's electionId, so when we finally hear from C - # claiming it is primary, we ignore it due to its outdated electionId - { - responses: [ - ["c:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017", "c:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 7 - }] - ], - outcome: { - servers: { - # Still primary. - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - }, - "c:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/null_election_id.json b/testdata/server-discovery-and-monitoring/rs/null_election_id.json deleted file mode 100644 index 8a99a78475..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/null_election_id.json +++ /dev/null @@ -1,209 +0,0 @@ -{ - "description": "Primaries with and without electionIds", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017", - "c:27017" - ], - "setVersion": 1, - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "c:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1 - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017", - "c:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - }, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - } - }, - "c:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017", - "c:27017" - ], - "setVersion": 1, - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "setVersion": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - } - }, - "c:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - }, - { - "responses": [ - [ - "c:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017", - "c:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "setVersion": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - } - }, - "c:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/null_election_id.yml b/testdata/server-discovery-and-monitoring/rs/null_election_id.yml deleted file mode 100644 index 54c1af272a..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/null_election_id.yml +++ /dev/null @@ -1,177 +0,0 @@ -description: "Primaries with and without electionIds" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A has no electionId. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017", "c:27017"], - setVersion: 1, - setName: "rs", - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - }, - "c:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - } - }, - - # B is elected, it has an electionId. - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017", "c:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000002"}, - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000002"} - }, - "c:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - }, - - # A still claims to be primary, no electionId, we don't trust it. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017", "c:27017"], - setVersion: 1, - setName: "rs", - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - outcome: { - servers: { - # A ignored for missing electionId - "a:27017": { - type: "Unknown", - setName: , - setVersion: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: { "$oid": "000000000000000000000002" } - }, - "c:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - }, - - # But we remember B's electionId, so when we finally hear from C - # claiming it is primary, we ignore it due to its outdated electionId - { - responses: [ - ["c:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017", "c:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - setVersion: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: { "$oid": "000000000000000000000002" } - }, - "c:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/primary_becomes_ghost.json b/testdata/server-discovery-and-monitoring/rs/primary_becomes_ghost.json deleted file mode 100644 index e34280e88c..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_becomes_ghost.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "description": "Primary becomes ghost", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "isreplicaset": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSGhost", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_becomes_ghost.yml b/testdata/server-discovery-and-monitoring/rs/primary_becomes_ghost.yml deleted file mode 100644 index ee0158db0d..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_becomes_ghost.yml +++ /dev/null @@ -1,65 +0,0 @@ -description: "Primary becomes ghost" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: false, - isreplicaset: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSGhost", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/primary_becomes_mongos.json b/testdata/server-discovery-and-monitoring/rs/primary_becomes_mongos.json deleted file mode 100644 index 79510d9399..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_becomes_mongos.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "description": "Primary becomes mongos", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": {}, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_becomes_mongos.yml b/testdata/server-discovery-and-monitoring/rs/primary_becomes_mongos.yml deleted file mode 100644 index 251f155277..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_becomes_mongos.yml +++ /dev/null @@ -1,58 +0,0 @@ -description: "Primary becomes mongos" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: {}, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/primary_becomes_standalone.json b/testdata/server-discovery-and-monitoring/rs/primary_becomes_standalone.json deleted file mode 100644 index abcc1e2d01..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_becomes_standalone.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "description": "Primary becomes standalone", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": {}, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_becomes_standalone.yml b/testdata/server-discovery-and-monitoring/rs/primary_becomes_standalone.yml deleted file mode 100644 index 9f6a0817bf..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_becomes_standalone.yml +++ /dev/null @@ -1,55 +0,0 @@ -description: "Primary becomes standalone" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - { - responses: [ - ["a:27017", { - ok: 1, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: {}, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/primary_changes_set_name.json b/testdata/server-discovery-and-monitoring/rs/primary_changes_set_name.json deleted file mode 100644 index 3b564d2c93..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_changes_set_name.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "description": "Primary changes setName", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "wrong", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": {}, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_changes_set_name.yml b/testdata/server-discovery-and-monitoring/rs/primary_changes_set_name.yml deleted file mode 100644 index e49aa24911..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_changes_set_name.yml +++ /dev/null @@ -1,63 +0,0 @@ -description: "Primary changes setName" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary is discovered normally. - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - # Primary changes its setName. Remove it and change the topologyType. - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - setName: "wrong", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: {}, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/primary_disconnect.json b/testdata/server-discovery-and-monitoring/rs/primary_disconnect.json deleted file mode 100644 index 73a01a82a9..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_disconnect.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "description": "Disconnected from primary", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - {} - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_disconnect.yml b/testdata/server-discovery-and-monitoring/rs/primary_disconnect.yml deleted file mode 100644 index 84c88daa67..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_disconnect.yml +++ /dev/null @@ -1,59 +0,0 @@ -description: "Disconnected from primary" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - { - responses: [ - - ["a:27017", {}] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/primary_disconnect_electionid.json b/testdata/server-discovery-and-monitoring/rs/primary_disconnect_electionid.json deleted file mode 100644 index 5a91188ea8..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_disconnect_electionid.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "description": "Disconnected from primary, reject primary with stale electionId", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - }, - { - "responses": [ - [ - "b:27017", - {} - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000003" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000003" - } - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000003" - } - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000003" - } - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000003" - } - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_disconnect_electionid.yml b/testdata/server-discovery-and-monitoring/rs/primary_disconnect_electionid.yml deleted file mode 100644 index 391ec31213..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_disconnect_electionid.yml +++ /dev/null @@ -1,189 +0,0 @@ -description: "Disconnected from primary, reject primary with stale electionId" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # A is elected, then B. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 21 - }], - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000002"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000002"} - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - }, - - # Disconnected from B. - { - responses: [ - ["b:27017", {}] - ], - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - }, - - # A still claims to be primary but it's ignored. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - }, - - # Now A is re-elected. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000003"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000003"} - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000003"}, - } - }, - - # B comes back as secondary. - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000003"} - }, - "b:27017": { - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000003"}, - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/primary_disconnect_setversion.json b/testdata/server-discovery-and-monitoring/rs/primary_disconnect_setversion.json deleted file mode 100644 index f7417ad77b..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_disconnect_setversion.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "description": "Disconnected from primary, reject primary with stale setVersion", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 2, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 2, - "electionId": { - "$oid": "000000000000000000000001" - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - }, - { - "responses": [ - [ - "b:27017", - {} - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 2, - "electionId": { - "$oid": "000000000000000000000002" - }, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 2, - "electionId": { - "$oid": "000000000000000000000002" - } - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 2, - "electionId": { - "$oid": "000000000000000000000002" - } - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_disconnect_setversion.yml b/testdata/server-discovery-and-monitoring/rs/primary_disconnect_setversion.yml deleted file mode 100644 index 57eeb573e4..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_disconnect_setversion.yml +++ /dev/null @@ -1,189 +0,0 @@ -description: "Disconnected from primary, reject primary with stale setVersion" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # A is elected, then B after a reconfig. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 21 - }], - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 2, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 2, - electionId: {"$oid": "000000000000000000000001"} - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - }, - - # Disconnected from B. - { - responses: [ - ["b:27017", {}] - ], - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - }, - - # A still claims to be primary but it's ignored. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - }, - - # Now A is re-elected. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 2, - electionId: {"$oid": "000000000000000000000002"}, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 2, - electionId: {"$oid": "000000000000000000000002"} - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - }, - - # B comes back as secondary. - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 2, - electionId: {"$oid": "000000000000000000000002"} - }, - "b:27017": { - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/primary_hint_from_secondary_with_mismatched_me.json b/testdata/server-discovery-and-monitoring/rs/primary_hint_from_secondary_with_mismatched_me.json deleted file mode 100644 index 1ca72225a2..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_hint_from_secondary_with_mismatched_me.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "description": "Secondary with mismatched 'me' tells us who the primary is", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "me": "c:27017", - "hosts": [ - "b:27017" - ], - "setName": "rs", - "primary": "b:27017", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "b:27017": { - "type": "PossiblePrimary", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "me": "b:27017", - "hosts": [ - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "b:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_hint_from_secondary_with_mismatched_me.yml b/testdata/server-discovery-and-monitoring/rs/primary_hint_from_secondary_with_mismatched_me.yml deleted file mode 100644 index cebbe7d083..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_hint_from_secondary_with_mismatched_me.yml +++ /dev/null @@ -1,64 +0,0 @@ -description: "Secondary with mismatched 'me' tells us who the primary is" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # A is a secondary with mismatched "me". Remove A, add PossiblePrimary B. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - me: "c:27017", - hosts: ["b:27017"], - setName: "rs", - primary: "b:27017", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - servers: { - "b:27017": { - type: "PossiblePrimary", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - } - }, - - # Discover B is primary. - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - me: "b:27017", - hosts: ["b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - servers: { - "b:27017": { - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/primary_mismatched_me.json b/testdata/server-discovery-and-monitoring/rs/primary_mismatched_me.json deleted file mode 100644 index 6bb6226f8a..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_mismatched_me.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "description": "Primary mismatched me", - "phases": [ - { - "outcome": { - "servers": { - "a:27017": { - "setName": null, - "type": "Unknown" - }, - "b:27017": { - "setName": null, - "type": "Unknown" - } - }, - "setName": "rs", - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null - }, - "responses": [ - [ - "localhost:27017", - { - "me": "a:27017", - "hosts": [ - "a:27017", - "b:27017" - ], - "helloOk": true, - "isWritablePrimary": true, - "ok": 1, - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ] - } - ], - "uri": "mongodb://localhost:27017/?replicaSet=rs" -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_mismatched_me.yml b/testdata/server-discovery-and-monitoring/rs/primary_mismatched_me.yml deleted file mode 100644 index 25ca1722e0..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_mismatched_me.yml +++ /dev/null @@ -1,27 +0,0 @@ -description: Primary mismatched me -phases: - - outcome: - servers: - 'a:27017': - setName: null - type: Unknown - 'b:27017': - setName: null - type: Unknown - setName: rs - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - responses: - - - 'localhost:27017' - - me: 'a:27017' - hosts: - - 'a:27017' - - 'b:27017' - helloOk: true - isWritablePrimary: true - ok: 1 - setName: rs - minWireVersion: 0 - maxWireVersion: 21 -uri: 'mongodb://localhost:27017/?replicaSet=rs' - diff --git a/testdata/server-discovery-and-monitoring/rs/primary_mismatched_me_not_removed.json b/testdata/server-discovery-and-monitoring/rs/primary_mismatched_me_not_removed.json deleted file mode 100644 index 4c40093659..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_mismatched_me_not_removed.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "description": "Primary mismatched me is not removed", - "uri": "mongodb://localhost:27017,localhost:27018/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "localhost:27017", - { - "ok": 1, - "hosts": [ - "localhost:27017", - "localhost:27018" - ], - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "primary": "localhost:27017", - "me": "a:27017", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "localhost:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "localhost:27018": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "localhost:27018", - { - "ok": 1, - "hosts": [ - "localhost:27017", - "localhost:27018" - ], - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "primary": "localhost:27017", - "me": "localhost:27018", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "localhost:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "localhost:27018": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_mismatched_me_not_removed.yml b/testdata/server-discovery-and-monitoring/rs/primary_mismatched_me_not_removed.yml deleted file mode 100644 index 5b7e92e603..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_mismatched_me_not_removed.yml +++ /dev/null @@ -1,75 +0,0 @@ -description: Primary mismatched me is not removed -uri: mongodb://localhost:27017,localhost:27018/?replicaSet=rs - -phases: [ - { - responses: [ - ["localhost:27017", { - ok: 1, - hosts: [ - "localhost:27017", - "localhost:27018" - ], - helloOk: true, - isWritablePrimary: true, - setName: "rs", - primary: "localhost:27017", - # me does not match the primary responder's address, but the server - # is still added because we don't me mismatch check the primary and all - # servers from a primary isWritablePrimary are added to the working server set - me: "a:27017", - minWireVersion: 0, - maxWireVersion: 7 - }] - ], - outcome: { - servers: { - "localhost:27017": { - type: "RSPrimary", - setName: "rs" - }, - "localhost:27018": { - type: "Unknown", - setName: null - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - { - responses: [ - ["localhost:27018", { - ok: 1, - hosts: [ - "localhost:27017", - "localhost:27018" - ], - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - primary: "localhost:27017", - me: "localhost:27018", - minWireVersion: 0, - maxWireVersion: 7 - }] - ], - outcome: { - servers: { - "localhost:27017": { - type: "RSPrimary", - setName: "rs" - }, - "localhost:27018": { - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/primary_reports_new_member.json b/testdata/server-discovery-and-monitoring/rs/primary_reports_new_member.json deleted file mode 100644 index ed28c48c87..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_reports_new_member.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "description": "Primary reports a new member", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017", - "c:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "c:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "c:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "primary": "b:27017", - "hosts": [ - "a:27017", - "b:27017", - "c:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSSecondary", - "setName": "rs" - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "c:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_reports_new_member.yml b/testdata/server-discovery-and-monitoring/rs/primary_reports_new_member.yml deleted file mode 100644 index aa2878d637..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_reports_new_member.yml +++ /dev/null @@ -1,175 +0,0 @@ -description: "Primary reports a new member" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # At first, a is a secondary. - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSSecondary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - # b is the primary. - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSSecondary", - setName: "rs" - }, - - "b:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - # Admin adds a secondary member c. - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017", "c:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - # c is new. - servers: { - - "a:27017": { - - type: "RSSecondary", - setName: "rs" - }, - - "b:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "c:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - # c becomes secondary. - { - responses: [ - - ["c:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - primary: "b:27017", - hosts: ["a:27017", "b:27017", "c:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - # c is a secondary. - servers: { - - "a:27017": { - - type: "RSSecondary", - setName: "rs" - }, - - "b:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "c:27017": { - - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/primary_to_no_primary_mismatched_me.json b/testdata/server-discovery-and-monitoring/rs/primary_to_no_primary_mismatched_me.json deleted file mode 100644 index 798a648d19..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_to_no_primary_mismatched_me.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "description": "Primary to no primary with mismatched me", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "me": "a:27017", - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "c:27017", - "d:27017" - ], - "me": "c:27017", - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "c:27017": { - "type": "Unknown", - "setName": null - }, - "d:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_to_no_primary_mismatched_me.yml b/testdata/server-discovery-and-monitoring/rs/primary_to_no_primary_mismatched_me.yml deleted file mode 100644 index e8bdb00f0f..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_to_no_primary_mismatched_me.yml +++ /dev/null @@ -1,81 +0,0 @@ -description: "Primary to no primary with mismatched me" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - me: "a:27017", - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["c:27017", "d:27017"], - me : "c:27017", - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "c:27017": { - - type: "Unknown", - setName: - }, - - "d:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/primary_wrong_set_name.json b/testdata/server-discovery-and-monitoring/rs/primary_wrong_set_name.json deleted file mode 100644 index 1366e38996..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_wrong_set_name.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "description": "Primary wrong setName", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "wrong", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": {}, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/primary_wrong_set_name.yml b/testdata/server-discovery-and-monitoring/rs/primary_wrong_set_name.yml deleted file mode 100644 index 3e463333e6..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/primary_wrong_set_name.yml +++ /dev/null @@ -1,30 +0,0 @@ -description: "Primary wrong setName" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - setName: "wrong", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: {}, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/repeated.json b/testdata/server-discovery-and-monitoring/rs/repeated.json deleted file mode 100644 index 3ce0948ab8..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/repeated.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "description": "Repeated isWritablePrimary response must be processed", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hidden": true, - "hosts": [ - "a:27017", - "c:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSOther", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown" - }, - "c:27017": { - "type": "Unknown" - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "c:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSOther", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown" - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hidden": true, - "hosts": [ - "a:27017", - "c:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSOther", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown" - }, - "c:27017": { - "type": "Unknown" - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "c:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "c:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSOther", - "setName": "rs" - }, - "c:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/repeated.yml b/testdata/server-discovery-and-monitoring/rs/repeated.yml deleted file mode 100644 index b9e14ed982..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/repeated.yml +++ /dev/null @@ -1,105 +0,0 @@ -description: Repeated isWritablePrimary response must be processed - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: - # Phase 1 - a says it's not primary and suggests c may be the primary - - responses: - - - - "a:27017" - - ok: 1 - helloOk: true - isWritablePrimary: false - secondary: true - hidden: true - hosts: ["a:27017", "c:27017"] - setName: "rs" - minWireVersion: 0 - maxWireVersion: 21 - outcome: - servers: - "a:27017": - type: "RSOther" - setName: "rs" - - "b:27017": - type: Unknown - - "c:27017": - type: Unknown - topologyType: "ReplicaSetNoPrimary" - logicalSessionTimeoutMinutes: ~ - setName: "rs" - - # Phase 2 - c says it's a standalone, is removed - - responses: - - - - "c:27017" - - ok: 1 - helloOk: true - isWritablePrimary: true - minWireVersion: 0 - maxWireVersion: 21 - outcome: - servers: - "a:27017": - type: "RSOther" - setName: "rs" - - "b:27017": - type: Unknown - topologyType: "ReplicaSetNoPrimary" - logicalSessionTimeoutMinutes: ~ - setName: "rs" - - # Phase 3 - response from a is repeated, and must be processed; c added again - - responses: - - - - "a:27017" - - ok: 1 - helloOk: true - isWritablePrimary: false - secondary: true - hidden: true - hosts: ["a:27017", "c:27017"] - setName: "rs" - minWireVersion: 0 - maxWireVersion: 21 - outcome: - servers: - "a:27017": - type: "RSOther" - setName: "rs" - - "b:27017": - type: Unknown - - "c:27017": - type: Unknown - topologyType: "ReplicaSetNoPrimary" - logicalSessionTimeoutMinutes: ~ - setName: "rs" - - # Phase 4 - c is now a primary - - responses: - - - - "c:27017" - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: ["a:27017", "c:27017"] - setName: "rs" - minWireVersion: 0 - maxWireVersion: 21 - outcome: - servers: - "a:27017": - type: "RSOther" - setName: "rs" - - "c:27017": - type: RSPrimary - setName: rs - topologyType: "ReplicaSetWithPrimary" - logicalSessionTimeoutMinutes: ~ - setName: "rs" diff --git a/testdata/server-discovery-and-monitoring/rs/replicaset_rsnp.json b/testdata/server-discovery-and-monitoring/rs/replicaset_rsnp.json deleted file mode 100644 index 1cd732b82f..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/replicaset_rsnp.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "description": "replicaSet URI option causes starting topology to be RSNP", - "uri": "mongodb://a/?replicaSet=rs&directConnection=false", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": {}, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/replicaset_rsnp.yml b/testdata/server-discovery-and-monitoring/rs/replicaset_rsnp.yml deleted file mode 100644 index 6bdf8cbe2d..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/replicaset_rsnp.yml +++ /dev/null @@ -1,21 +0,0 @@ -description: replicaSet URI option causes starting topology to be RSNP - -uri: "mongodb://a/?replicaSet=rs&directConnection=false" - -phases: - # We are connecting to a standalone - - responses: - - - - "a:27017" - - ok: 1 - helloOk: true - isWritablePrimary: true - minWireVersion: 0 - maxWireVersion: 21 - outcome: - # Server is removed because it's a standalone and the driver - # started in RSNP topology - servers: {} - topologyType: "ReplicaSetNoPrimary" - logicalSessionTimeoutMinutes: ~ - setName: "rs" diff --git a/testdata/server-discovery-and-monitoring/rs/response_from_removed.json b/testdata/server-discovery-and-monitoring/rs/response_from_removed.json deleted file mode 100644 index fa46a14ceb..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/response_from_removed.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "description": "Response from removed server", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/response_from_removed.yml b/testdata/server-discovery-and-monitoring/rs/response_from_removed.yml deleted file mode 100644 index fc9961ce36..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/response_from_removed.yml +++ /dev/null @@ -1,69 +0,0 @@ -description: "Response from removed server" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/sec_not_auth.json b/testdata/server-discovery-and-monitoring/rs/sec_not_auth.json deleted file mode 100644 index ccbe7a08af..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/sec_not_auth.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "description": "Secondary's host list is not authoritative", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "hosts": [ - "b:27017", - "c:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/sec_not_auth.yml b/testdata/server-discovery-and-monitoring/rs/sec_not_auth.yml deleted file mode 100644 index 507eb9d292..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/sec_not_auth.yml +++ /dev/null @@ -1,55 +0,0 @@ -description: "Secondary's host list is not authoritative" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }], - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - hosts: ["b:27017", "c:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0-pre-6.0.json b/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0-pre-6.0.json deleted file mode 100644 index f27060533c..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0-pre-6.0.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "description": "Pre 6.0 New primary", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 0, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0-pre-6.0.yml b/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0-pre-6.0.yml deleted file mode 100644 index b63c43f227..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0-pre-6.0.yml +++ /dev/null @@ -1,87 +0,0 @@ -description: "Pre 6.0 New primary" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }], - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - { - responses: [ - - ["b:27017", { - - ok: 0, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0.json b/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0.json deleted file mode 100644 index 9ffff58ef0..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "description": "Secondary ignored when ok is zero", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 0, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0.yml b/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0.yml deleted file mode 100644 index 796e7f668e..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0.yml +++ /dev/null @@ -1,87 +0,0 @@ -description: "Secondary ignored when ok is zero" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }], - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - { - responses: [ - - ["b:27017", { - - ok: 0, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/secondary_mismatched_me.json b/testdata/server-discovery-and-monitoring/rs/secondary_mismatched_me.json deleted file mode 100644 index 790e4bfca8..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/secondary_mismatched_me.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "description": "Secondary mismatched me", - "uri": "mongodb://localhost:27017/?replicaSet=rs", - "phases": [ - { - "outcome": { - "servers": { - "a:27017": { - "setName": null, - "type": "Unknown" - }, - "b:27017": { - "setName": null, - "type": "Unknown" - } - }, - "setName": "rs", - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null - }, - "responses": [ - [ - "localhost:27017", - { - "me": "a:27017", - "hosts": [ - "a:27017", - "b:27017" - ], - "helloOk": true, - "isWritablePrimary": false, - "ok": 1, - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/secondary_mismatched_me.yml b/testdata/server-discovery-and-monitoring/rs/secondary_mismatched_me.yml deleted file mode 100644 index d359609d83..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/secondary_mismatched_me.yml +++ /dev/null @@ -1,28 +0,0 @@ -description: Secondary mismatched me - -uri: 'mongodb://localhost:27017/?replicaSet=rs' - -phases: - - outcome: - servers: - 'a:27017': - setName: null - type: Unknown - 'b:27017': - setName: null - type: Unknown - setName: rs - topologyType: ReplicaSetNoPrimary - logicalSessionTimeoutMinutes: null - responses: - - - 'localhost:27017' - - me: 'a:27017' - hosts: - - 'a:27017' - - 'b:27017' - helloOk: true - isWritablePrimary: false - ok: 1 - setName: rs - minWireVersion: 0 - maxWireVersion: 21 diff --git a/testdata/server-discovery-and-monitoring/rs/secondary_wrong_set_name.json b/testdata/server-discovery-and-monitoring/rs/secondary_wrong_set_name.json deleted file mode 100644 index 1f86b50543..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/secondary_wrong_set_name.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "Secondary wrong setName", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hosts": [ - "a:27017" - ], - "setName": "wrong", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": {}, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/secondary_wrong_set_name.yml b/testdata/server-discovery-and-monitoring/rs/secondary_wrong_set_name.yml deleted file mode 100644 index 60823815f0..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/secondary_wrong_set_name.yml +++ /dev/null @@ -1,31 +0,0 @@ -description: "Secondary wrong setName" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - hosts: ["a:27017"], - setName: "wrong", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: {}, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/secondary_wrong_set_name_with_primary.json b/testdata/server-discovery-and-monitoring/rs/secondary_wrong_set_name_with_primary.json deleted file mode 100644 index 6b89914151..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/secondary_wrong_set_name_with_primary.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "description": "Secondary wrong setName with primary", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "wrong", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/secondary_wrong_set_name_with_primary.yml b/testdata/server-discovery-and-monitoring/rs/secondary_wrong_set_name_with_primary.yml deleted file mode 100644 index 8d1990363c..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/secondary_wrong_set_name_with_primary.yml +++ /dev/null @@ -1,75 +0,0 @@ -description: "Secondary wrong setName with primary" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - hosts: ["a:27017", "b:27017"], - setName: "wrong", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/set_version_can_rollback.json b/testdata/server-discovery-and-monitoring/rs/set_version_can_rollback.json deleted file mode 100644 index 1cc608a344..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/set_version_can_rollback.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "description": "Set version rolls back after new primary with higher election Id", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 2, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 2, - "electionId": { - "$oid": "000000000000000000000001" - } - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - }, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 2, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/set_version_can_rollback.yml b/testdata/server-discovery-and-monitoring/rs/set_version_can_rollback.yml deleted file mode 100644 index c30a8660ec..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/set_version_can_rollback.yml +++ /dev/null @@ -1,101 +0,0 @@ -description: Set version rolls back after new primary with higher election Id -uri: mongodb://a/?replicaSet=rs -phases: - - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - - b:27017 - setName: rs - setVersion: 2 - electionId: - $oid: '000000000000000000000001' - minWireVersion: 0 - maxWireVersion: 17 - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - setVersion: 2 - electionId: - $oid: '000000000000000000000001' - b:27017: - type: Unknown - setName: null - electionId: null - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - maxSetVersion: 2 - maxElectionId: - $oid: '000000000000000000000001' - - # Response from new primary with newer election Id - responses: - - - b:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - - b:27017 - setName: rs - setVersion: 1 - electionId: - $oid: '000000000000000000000002' - minWireVersion: 0 - maxWireVersion: 17 - outcome: - servers: - a:27017: - type: Unknown - setName: null - electionId: null - b:27017: - type: RSPrimary - setName: rs - setVersion: 1 - electionId: - $oid: '000000000000000000000002' - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - maxSetVersion: 1 - maxElectionId: - $oid: '000000000000000000000002' - - # Response from stale primary - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - - b:27017 - setName: rs - setVersion: 2 - electionId: - $oid: '000000000000000000000001' - minWireVersion: 0 - maxWireVersion: 17 - outcome: - servers: - a:27017: - type: Unknown - setName: null - electionId: null - b:27017: - type: RSPrimary - setName: rs - setVersion: 1 - electionId: - $oid: '000000000000000000000002' - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs - maxSetVersion: 1 - maxElectionId: - $oid: '000000000000000000000002' diff --git a/testdata/server-discovery-and-monitoring/rs/setversion_equal_max_without_electionid.json b/testdata/server-discovery-and-monitoring/rs/setversion_equal_max_without_electionid.json deleted file mode 100644 index 3669511c5a..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/setversion_equal_max_without_electionid.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "description": "setVersion version that is equal is treated the same as greater than if there is no electionId", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1 - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1 - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/setversion_equal_max_without_electionid.yml b/testdata/server-discovery-and-monitoring/rs/setversion_equal_max_without_electionid.yml deleted file mode 100644 index 3733a12e56..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/setversion_equal_max_without_electionid.yml +++ /dev/null @@ -1,78 +0,0 @@ -description: "setVersion version that is equal is treated the same as greater than if there is no electionId" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A is discovered and tells us about B. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - } - }, - - # B is elected, its setVersion is older so it is stale - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, # Max is still 1, there wasn't an actual larger setVersion seen - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/setversion_greaterthan_max_without_electionid.json b/testdata/server-discovery-and-monitoring/rs/setversion_greaterthan_max_without_electionid.json deleted file mode 100644 index 97870d71d5..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/setversion_greaterthan_max_without_electionid.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "description": "setVersion that is greater than maxSetVersion is used if there is no electionId", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1 - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 2, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 2, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2 - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/setversion_greaterthan_max_without_electionid.yml b/testdata/server-discovery-and-monitoring/rs/setversion_greaterthan_max_without_electionid.yml deleted file mode 100644 index 3252e0f611..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/setversion_greaterthan_max_without_electionid.yml +++ /dev/null @@ -1,79 +0,0 @@ -description: "setVersion that is greater than maxSetVersion is used if there is no electionId" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A is discovered and tells us about B. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - } - }, - - # B is elected, its setVersion is greater than our current maxSetVersion - # B is primary, A is marked Unknown - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 2, - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 2, - electionId: - }, - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/setversion_without_electionid-pre-6.0.json b/testdata/server-discovery-and-monitoring/rs/setversion_without_electionid-pre-6.0.json deleted file mode 100644 index e62c6963ed..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/setversion_without_electionid-pre-6.0.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "description": "Pre 6.0 setVersion is ignored if there is no electionId", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 2, - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 2, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2 - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2 - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/setversion_without_electionid-pre-6.0.yml b/testdata/server-discovery-and-monitoring/rs/setversion_without_electionid-pre-6.0.yml deleted file mode 100644 index 0fe6819aa7..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/setversion_without_electionid-pre-6.0.yml +++ /dev/null @@ -1,79 +0,0 @@ -description: "Pre 6.0 setVersion is ignored if there is no electionId" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A is discovered and tells us about B. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 2, - minWireVersion: 0, - maxWireVersion: 7 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 2 , - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - } - }, - - # B is elected, its setVersion is older but we believe it anyway, because - # setVersion is only used in conjunction with electionId. - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - minWireVersion: 0, - maxWireVersion: 7 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/setversion_without_electionid.json b/testdata/server-discovery-and-monitoring/rs/setversion_without_electionid.json deleted file mode 100644 index 256fafe108..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/setversion_without_electionid.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "description": "setVersion that is less than maxSetVersion is ignored if there is no electionId", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 2, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 2, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2 - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 2, - "electionId": null - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2 - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/setversion_without_electionid.yml b/testdata/server-discovery-and-monitoring/rs/setversion_without_electionid.yml deleted file mode 100644 index 04992929a1..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/setversion_without_electionid.yml +++ /dev/null @@ -1,78 +0,0 @@ -description: "setVersion that is less than maxSetVersion is ignored if there is no electionId" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A is discovered and tells us about B. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 2, - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 2 , - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - } - }, - - # B is elected, its setVersion is older so it is stale - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 2 , - electionId: - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/stepdown_change_set_name.json b/testdata/server-discovery-and-monitoring/rs/stepdown_change_set_name.json deleted file mode 100644 index 6de995518d..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/stepdown_change_set_name.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "description": "Primary becomes a secondary with wrong setName", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hosts": [ - "a:27017" - ], - "setName": "wrong", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": {}, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/stepdown_change_set_name.yml b/testdata/server-discovery-and-monitoring/rs/stepdown_change_set_name.yml deleted file mode 100644 index 2e1c1a551e..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/stepdown_change_set_name.yml +++ /dev/null @@ -1,65 +0,0 @@ -description: "Primary becomes a secondary with wrong setName" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary is discovered normally. - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - }, - - # Primary changes its setName and becomes secondary. - # Remove it and change the topologyType. - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - hosts: ["a:27017"], - setName: "wrong", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: {}, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/too_new.json b/testdata/server-discovery-and-monitoring/rs/too_new.json deleted file mode 100644 index 696246f8e1..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/too_new.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "description": "Replica set member with large minWireVersion", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 999, - "maxWireVersion": 1000 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "setName": "rs", - "logicalSessionTimeoutMinutes": null, - "compatible": false - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/too_new.yml b/testdata/server-discovery-and-monitoring/rs/too_new.yml deleted file mode 100644 index 121286554e..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/too_new.yml +++ /dev/null @@ -1,45 +0,0 @@ -description: "Replica set member with large minWireVersion" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }], - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 999, - maxWireVersion: 1000 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs" - }, - "b:27017": { - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - setName: "rs", - logicalSessionTimeoutMinutes: null, - compatible: false - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/too_old.json b/testdata/server-discovery-and-monitoring/rs/too_old.json deleted file mode 100644 index 8100a663f5..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/too_old.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "description": "Replica set member with default maxWireVersion of 0", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ], - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "setName": "rs", - "hosts": [ - "a:27017", - "b:27017" - ] - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - }, - "b:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "ReplicaSetWithPrimary", - "setName": "rs", - "logicalSessionTimeoutMinutes": null, - "compatible": false - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/too_old.yml b/testdata/server-discovery-and-monitoring/rs/too_old.yml deleted file mode 100644 index 1fe611fbb9..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/too_old.yml +++ /dev/null @@ -1,41 +0,0 @@ -description: "Replica set member with default maxWireVersion of 0" -uri: "mongodb://a,b/?replicaSet=rs" -phases: [ - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"], - minWireVersion: 0, - maxWireVersion: 21 - }], - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - setName: "rs", - hosts: ["a:27017", "b:27017"] - }] - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs" - }, - "b:27017": { - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "ReplicaSetWithPrimary", - setName: "rs", - logicalSessionTimeoutMinutes: null, - compatible: false - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/topology_version_equal.json b/testdata/server-discovery-and-monitoring/rs/topology_version_equal.json deleted file mode 100644 index d3baa13479..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/topology_version_equal.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "description": "Primary with equal topologyVersion", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - }, - "b:27017": { - "type": "Unknown", - "topologyVersion": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/topology_version_equal.yml b/testdata/server-discovery-and-monitoring/rs/topology_version_equal.yml deleted file mode 100644 index 3ce3bb6050..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/topology_version_equal.yml +++ /dev/null @@ -1,68 +0,0 @@ -description: "Primary with equal topologyVersion" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A is discovered - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 9, - topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "1"}} - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "1"}} - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - } - }, - - # A responds with an equal topologyVersion, we should process the response. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 9, - topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "1"}} - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "1"}} - }, - "b:27017": { - type: "Unknown", - topologyVersion: null - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/topology_version_greater.json b/testdata/server-discovery-and-monitoring/rs/topology_version_greater.json deleted file mode 100644 index f296ccee62..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/topology_version_greater.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "description": "Primary with newer topologyVersion", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "2" - } - } - }, - "b:27017": { - "type": "Unknown", - "topologyVersion": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "c:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "0" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000002" - }, - "counter": { - "$numberLong": "0" - } - } - }, - "c:27017": { - "type": "Unknown", - "topologyVersion": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "d:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null - }, - "d:27017": { - "type": "Unknown", - "topologyVersion": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "e:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000003" - }, - "counter": { - "$numberLong": "0" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000003" - }, - "counter": { - "$numberLong": "0" - } - } - }, - "e:27017": { - "type": "Unknown", - "topologyVersion": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - {} - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null - }, - "e:27017": { - "type": "Unknown", - "topologyVersion": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/topology_version_greater.yml b/testdata/server-discovery-and-monitoring/rs/topology_version_greater.yml deleted file mode 100644 index 89603d604d..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/topology_version_greater.yml +++ /dev/null @@ -1,194 +0,0 @@ -description: "Primary with newer topologyVersion" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A is discovered - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 9, - topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "1"}} - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "1"}} - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - } - }, - - # A responds with a greater topologyVersion counter, we should process the response. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 9, - topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "2"}} - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "2"}} - }, - "b:27017": { - - type: "Unknown", - topologyVersion: null - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - } - }, - - # A responds with a different topologyVersion processId, we should process the response. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "c:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 9, - topologyVersion: {'processId': {"$oid": "000000000000000000000002"}, "counter": {"$numberLong": "0"}} - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - topologyVersion: {'processId': {"$oid": "000000000000000000000002"}, "counter": {"$numberLong": "0"}} - }, - "c:27017": { - - type: "Unknown", - topologyVersion: null - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - } - }, - - # A responds without a topologyVersion, we should process the response. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "d:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 9 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - topologyVersion: null - }, - "d:27017": { - - type: "Unknown", - topologyVersion: null - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - } - }, - - # A responds with a topologyVersion again, we should process the response. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "e:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 9, - topologyVersion: {'processId': {"$oid": "000000000000000000000003"}, "counter": {"$numberLong": "0"}} - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - topologyVersion: {'processId': {"$oid": "000000000000000000000003"}, "counter": {"$numberLong": "0"}} - }, - "e:27017": { - - type: "Unknown", - topologyVersion: null - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - } - }, - - # A responds with a network error, we should process the response. - { - responses: [ - ["a:27017", {}] - ], - - outcome: { - servers: { - "a:27017": { - type: "Unknown", - topologyVersion: null - }, - "e:27017": { - - type: "Unknown", - topologyVersion: null - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/topology_version_less.json b/testdata/server-discovery-and-monitoring/rs/topology_version_less.json deleted file mode 100644 index 435337ff25..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/topology_version_less.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "description": "Primary with older topologyVersion", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 9, - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "0" - } - } - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": { - "processId": { - "$oid": "000000000000000000000001" - }, - "counter": { - "$numberLong": "1" - } - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/topology_version_less.yml b/testdata/server-discovery-and-monitoring/rs/topology_version_less.yml deleted file mode 100644 index 1c23e7849e..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/topology_version_less.yml +++ /dev/null @@ -1,64 +0,0 @@ -description: "Primary with older topologyVersion" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A is discovered - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 9, - topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "1"}} - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "1"}} - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - } - }, - - # A responds with an older topologyVersion, we should ignore the response. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 9, - topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "0"}} - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - topologyVersion: {'processId': {"$oid": "000000000000000000000001"}, "counter": {"$numberLong": "1"}} - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/unexpected_mongos.json b/testdata/server-discovery-and-monitoring/rs/unexpected_mongos.json deleted file mode 100644 index c6ffb321ca..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/unexpected_mongos.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "description": "Unexpected mongos", - "uri": "mongodb://b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": {}, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/unexpected_mongos.yml b/testdata/server-discovery-and-monitoring/rs/unexpected_mongos.yml deleted file mode 100644 index a9c5a24ee6..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/unexpected_mongos.yml +++ /dev/null @@ -1,29 +0,0 @@ -description: "Unexpected mongos" - -uri: "mongodb://b/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: {}, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/use_setversion_without_electionid-pre-6.0.json b/testdata/server-discovery-and-monitoring/rs/use_setversion_without_electionid-pre-6.0.json deleted file mode 100644 index 2f9b567b85..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/use_setversion_without_electionid-pre-6.0.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "description": "Pre 6.0 Record max setVersion, even from primary without electionId", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - } - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 2, - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 2 - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - }, - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - }, - "b:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 2 - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 2, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/use_setversion_without_electionid-pre-6.0.yml b/testdata/server-discovery-and-monitoring/rs/use_setversion_without_electionid-pre-6.0.yml deleted file mode 100644 index 24d6accbe0..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/use_setversion_without_electionid-pre-6.0.yml +++ /dev/null @@ -1,117 +0,0 @@ -description: "Pre 6.0 Record max setVersion, even from primary without electionId" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A has setVersion and electionId, tells us about B. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 7 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"} - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - }, - - # Reconfig the set and elect B, it has a new setVersion but no electionId. - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 2, - minWireVersion: 0, - maxWireVersion: 7 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 2 - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - }, - - # Delayed response from A, reporting its reelection. Its setVersion shows - # the election preceded B's so we ignore it. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000002"}, - minWireVersion: 0, - maxWireVersion: 7 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Unknown", - setName: , - electionId: - }, - "b:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 2 - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 2, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/use_setversion_without_electionid.json b/testdata/server-discovery-and-monitoring/rs/use_setversion_without_electionid.json deleted file mode 100644 index 551f3e12c2..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/use_setversion_without_electionid.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "description": "Record max setVersion, even from primary without electionId", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - }, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - } - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - }, - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 2, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000001" - } - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000001" - } - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - }, - "minWireVersion": 0, - "maxWireVersion": 17 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "setVersion": 1, - "electionId": { - "$oid": "000000000000000000000002" - } - }, - "b:27017": { - "type": "Unknown", - "setName": null, - "electionId": null - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs", - "maxSetVersion": 1, - "maxElectionId": { - "$oid": "000000000000000000000002" - } - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/use_setversion_without_electionid.yml b/testdata/server-discovery-and-monitoring/rs/use_setversion_without_electionid.yml deleted file mode 100644 index 68c88bc503..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/use_setversion_without_electionid.yml +++ /dev/null @@ -1,119 +0,0 @@ -description: "Record max setVersion, even from primary without electionId" - -uri: "mongodb://a/?replicaSet=rs" - -phases: [ - - # Primary A has electionId and setVersion, tells us about B. - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"}, - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000001"} - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - }, - - # Reconfig, B reports as primary, B is missing the electionId but reports setVersion - { - responses: [ - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 2, - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: { "$oid": "000000000000000000000001" } - }, - "b:27017": { - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000001"}, - } - }, - - # A reports as primary, A has been reelection (electionId greater than our recorded maxElectionId). - # A's setVersion is less than our maxSetVersion, but electionId takes precedence so B's primary claim is ignored - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000002"}, - minWireVersion: 0, - maxWireVersion: 17 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "RSPrimary", - setName: "rs", - setVersion: 1, - electionId: {"$oid": "000000000000000000000002"} - }, - "b:27017":{ - type: "Unknown", - setName: , - electionId: - } - }, - topologyType: "ReplicaSetWithPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs", - maxSetVersion: 1, - maxElectionId: {"$oid": "000000000000000000000002"}, - } - } -] diff --git a/testdata/server-discovery-and-monitoring/rs/wrong_set_name.json b/testdata/server-discovery-and-monitoring/rs/wrong_set_name.json deleted file mode 100644 index d0764d24dc..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/wrong_set_name.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "description": "Wrong setName", - "uri": "mongodb://a,b/?replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hosts": [ - "b:27017", - "c:27017" - ], - "setName": "wrong", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/rs/wrong_set_name.yml b/testdata/server-discovery-and-monitoring/rs/wrong_set_name.yml deleted file mode 100644 index e7d3ace92d..0000000000 --- a/testdata/server-discovery-and-monitoring/rs/wrong_set_name.yml +++ /dev/null @@ -1,38 +0,0 @@ -description: "Wrong setName" - -uri: "mongodb://a,b/?replicaSet=rs" - -phases: [ - - { - responses: [ - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - hosts: ["b:27017", "c:27017"], - setName: "wrong", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "ReplicaSetNoPrimary", - logicalSessionTimeoutMinutes: null, - setName: "rs" - } - } -] diff --git a/testdata/server-discovery-and-monitoring/sharded/compatible.json b/testdata/server-discovery-and-monitoring/sharded/compatible.json deleted file mode 100644 index ceb0ec24c4..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/compatible.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "description": "Multiple mongoses with large maxWireVersion", - "uri": "mongodb://a,b", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 1000 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Mongos", - "setName": null - }, - "b:27017": { - "type": "Mongos", - "setName": null - } - }, - "topologyType": "Sharded", - "logicalSessionTimeoutMinutes": null, - "setName": null, - "compatible": true - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/sharded/compatible.yml b/testdata/server-discovery-and-monitoring/sharded/compatible.yml deleted file mode 100644 index 20519089f5..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/compatible.yml +++ /dev/null @@ -1,40 +0,0 @@ -description: "Multiple mongoses with large maxWireVersion" -uri: "mongodb://a,b" -phases: [ - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 0, - maxWireVersion: 1000 - }], - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Mongos", - setName: - }, - "b:27017": { - type: "Mongos", - setName: - } - }, - topologyType: "Sharded", - logicalSessionTimeoutMinutes: null, - setName: , - compatible: true - } - } -] diff --git a/testdata/server-discovery-and-monitoring/sharded/discover_single_mongos.json b/testdata/server-discovery-and-monitoring/sharded/discover_single_mongos.json deleted file mode 100644 index bf7e57521c..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/discover_single_mongos.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "Discover single mongos", - "uri": "mongodb://a/?directConnection=false", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Mongos", - "setName": null - } - }, - "topologyType": "Sharded", - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/sharded/discover_single_mongos.yml b/testdata/server-discovery-and-monitoring/sharded/discover_single_mongos.yml deleted file mode 100644 index 1e8adc6c5c..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/discover_single_mongos.yml +++ /dev/null @@ -1,24 +0,0 @@ -description: "Discover single mongos" - -uri: "mongodb://a/?directConnection=false" - -phases: - - - responses: - - - - "a:27017" - - - ok: 1 - helloOk: true - isWritablePrimary: true - msg: "isdbgrid" - minWireVersion: 0 - maxWireVersion: 21 - - outcome: - servers: - "a:27017": - type: "Mongos" - setName: - topologyType: "Sharded" - setName: diff --git a/testdata/server-discovery-and-monitoring/sharded/ls_timeout_mongos.json b/testdata/server-discovery-and-monitoring/sharded/ls_timeout_mongos.json deleted file mode 100644 index 3da0f84ca2..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/ls_timeout_mongos.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "description": "Parse logicalSessionTimeoutMinutes from mongoses", - "uri": "mongodb://a,b", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "logicalSessionTimeoutMinutes": 1, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "logicalSessionTimeoutMinutes": 2, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Mongos", - "setName": null - }, - "b:27017": { - "type": "Mongos", - "setName": null - } - }, - "topologyType": "Sharded", - "logicalSessionTimeoutMinutes": 1, - "setName": null - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "logicalSessionTimeoutMinutes": 1, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Mongos", - "setName": null - }, - "b:27017": { - "type": "Mongos", - "setName": null - } - }, - "topologyType": "Sharded", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/sharded/ls_timeout_mongos.yml b/testdata/server-discovery-and-monitoring/sharded/ls_timeout_mongos.yml deleted file mode 100644 index 62ae97f057..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/ls_timeout_mongos.yml +++ /dev/null @@ -1,101 +0,0 @@ -description: "Parse logicalSessionTimeoutMinutes from mongoses" - -uri: "mongodb://a,b" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - logicalSessionTimeoutMinutes: 1, - minWireVersion: 0, - maxWireVersion: 21 - }], - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - logicalSessionTimeoutMinutes: 2, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Mongos", - setName: - }, - - "b:27017": { - - type: "Mongos", - setName: - } - }, - topologyType: "Sharded", - logicalSessionTimeoutMinutes: 1, # Minimum of the two - setName: - } - }, - # Now an isWritablePrimary response with no logicalSessionTimeoutMinutes - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - logicalSessionTimeoutMinutes: 1, - minWireVersion: 0, - maxWireVersion: 21 - }], - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Mongos", - setName: - }, - - "b:27017": { - - type: "Mongos", - setName: - } - }, - topologyType: "Sharded", - logicalSessionTimeoutMinutes: null, # Sessions not supported now - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/sharded/mongos_disconnect.json b/testdata/server-discovery-and-monitoring/sharded/mongos_disconnect.json deleted file mode 100644 index 29b3351869..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/mongos_disconnect.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "description": "Mongos disconnect", - "uri": "mongodb://a,b", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Mongos", - "setName": null - }, - "b:27017": { - "type": "Mongos", - "setName": null - } - }, - "topologyType": "Sharded", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - }, - { - "responses": [ - [ - "a:27017", - {} - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - }, - "b:27017": { - "type": "Mongos", - "setName": null - } - }, - "topologyType": "Sharded", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Mongos", - "setName": null - }, - "b:27017": { - "type": "Mongos", - "setName": null - } - }, - "topologyType": "Sharded", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/sharded/mongos_disconnect.yml b/testdata/server-discovery-and-monitoring/sharded/mongos_disconnect.yml deleted file mode 100644 index c384b3be11..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/mongos_disconnect.yml +++ /dev/null @@ -1,113 +0,0 @@ -description: "Mongos disconnect" - -uri: "mongodb://a,b" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 0, - maxWireVersion: 21 - }], - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Mongos", - setName: - }, - - "b:27017": { - - type: "Mongos", - setName: - } - }, - topologyType: "Sharded", - logicalSessionTimeoutMinutes: null, - setName: - } - }, - { - responses: [ - ["a:27017", {}], # Hangup. - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - }, - - "b:27017": { - - type: "Mongos", - setName: - } - }, - topologyType: "Sharded", - logicalSessionTimeoutMinutes: null, - setName: - } - }, - { - responses: [ - # Back in action. - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 0, - maxWireVersion: 21 - }], - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Mongos", - setName: - }, - - "b:27017": { - - type: "Mongos", - setName: - } - }, - topologyType: "Sharded", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/sharded/multiple_mongoses.json b/testdata/server-discovery-and-monitoring/sharded/multiple_mongoses.json deleted file mode 100644 index ae0c2d9cde..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/multiple_mongoses.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "description": "Multiple mongoses", - "uri": "mongodb://a,b", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Mongos", - "setName": null - }, - "b:27017": { - "type": "Mongos", - "setName": null - } - }, - "topologyType": "Sharded", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/sharded/multiple_mongoses.yml b/testdata/server-discovery-and-monitoring/sharded/multiple_mongoses.yml deleted file mode 100644 index 6311605a89..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/multiple_mongoses.yml +++ /dev/null @@ -1,52 +0,0 @@ -description: "Multiple mongoses" - -uri: "mongodb://a,b" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 0, - maxWireVersion: 21 - }], - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Mongos", - setName: - }, - - "b:27017": { - - type: "Mongos", - setName: - } - }, - topologyType: "Sharded", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/sharded/non_mongos_removed.json b/testdata/server-discovery-and-monitoring/sharded/non_mongos_removed.json deleted file mode 100644 index 4698f576d5..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/non_mongos_removed.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "Non-Mongos server in sharded cluster", - "uri": "mongodb://a,b", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Mongos", - "setName": null - } - }, - "topologyType": "Sharded", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/sharded/non_mongos_removed.yml b/testdata/server-discovery-and-monitoring/sharded/non_mongos_removed.yml deleted file mode 100644 index aa604f1100..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/non_mongos_removed.yml +++ /dev/null @@ -1,47 +0,0 @@ -description: "Non-Mongos server in sharded cluster" - -uri: "mongodb://a,b" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 0, - maxWireVersion: 21 - }], - - ["b:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Mongos", - setName: - } - }, - topologyType: "Sharded", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/sharded/normalize_uri_case.json b/testdata/server-discovery-and-monitoring/sharded/normalize_uri_case.json deleted file mode 100644 index 4aa7cb08b6..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/normalize_uri_case.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "description": "Normalize URI case", - "uri": "mongodb://A,B", - "phases": [ - { - "responses": [], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - }, - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "Unknown", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/sharded/normalize_uri_case.yml b/testdata/server-discovery-and-monitoring/sharded/normalize_uri_case.yml deleted file mode 100644 index 9a144b3907..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/normalize_uri_case.yml +++ /dev/null @@ -1,32 +0,0 @@ -description: "Normalize URI case" - -uri: "mongodb://A,B" - -phases: [ - - { - responses: [ - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - }, - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "Unknown", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/sharded/too_new.json b/testdata/server-discovery-and-monitoring/sharded/too_new.json deleted file mode 100644 index 4b997d2163..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/too_new.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "Multiple mongoses with large minWireVersion", - "uri": "mongodb://a,b", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 999, - "maxWireVersion": 1000 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid" - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Mongos", - "setName": null - }, - "b:27017": { - "type": "Mongos", - "setName": null - } - }, - "topologyType": "Sharded", - "logicalSessionTimeoutMinutes": null, - "setName": null, - "compatible": false - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/sharded/too_new.yml b/testdata/server-discovery-and-monitoring/sharded/too_new.yml deleted file mode 100644 index 7d59cb4305..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/too_new.yml +++ /dev/null @@ -1,38 +0,0 @@ -description: "Multiple mongoses with large minWireVersion" -uri: "mongodb://a,b" -phases: [ - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 999, - maxWireVersion: 1000 - }], - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid" - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Mongos", - setName: - }, - "b:27017": { - type: "Mongos", - setName: - } - }, - topologyType: "Sharded", - logicalSessionTimeoutMinutes: null, - setName: , - compatible: false - } - } -] diff --git a/testdata/server-discovery-and-monitoring/sharded/too_old.json b/testdata/server-discovery-and-monitoring/sharded/too_old.json deleted file mode 100644 index b918715ada..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/too_old.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "Multiple mongoses with default maxWireVersion of 0", - "uri": "mongodb://a,b", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 2, - "maxWireVersion": 21 - } - ], - [ - "b:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid" - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Mongos", - "setName": null - }, - "b:27017": { - "type": "Mongos", - "setName": null - } - }, - "topologyType": "Sharded", - "logicalSessionTimeoutMinutes": null, - "setName": null, - "compatible": false - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/sharded/too_old.yml b/testdata/server-discovery-and-monitoring/sharded/too_old.yml deleted file mode 100644 index a709934c2f..0000000000 --- a/testdata/server-discovery-and-monitoring/sharded/too_old.yml +++ /dev/null @@ -1,38 +0,0 @@ -description: "Multiple mongoses with default maxWireVersion of 0" -uri: "mongodb://a,b" -phases: [ - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 2, - maxWireVersion: 21 - }], - ["b:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid" - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Mongos", - setName: - }, - "b:27017": { - type: "Mongos", - setName: - } - }, - topologyType: "Sharded", - logicalSessionTimeoutMinutes: null, - setName: , - compatible: false - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/compatible.json b/testdata/server-discovery-and-monitoring/single/compatible.json deleted file mode 100644 index 493d9b748e..0000000000 --- a/testdata/server-discovery-and-monitoring/single/compatible.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "description": "Standalone with large maxWireVersion", - "uri": "mongodb://a", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Standalone", - "setName": null - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null, - "compatible": true - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/compatible.yml b/testdata/server-discovery-and-monitoring/single/compatible.yml deleted file mode 100644 index e183c7127d..0000000000 --- a/testdata/server-discovery-and-monitoring/single/compatible.yml +++ /dev/null @@ -1,27 +0,0 @@ -description: "Standalone with large maxWireVersion" -uri: "mongodb://a" -phases: [ - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Standalone", - setName: - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: , - compatible: true - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_external_ip.json b/testdata/server-discovery-and-monitoring/single/direct_connection_external_ip.json deleted file mode 100644 index 1461b4c469..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_external_ip.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "description": "Direct connection to RSPrimary via external IP", - "uri": "mongodb://a/?directConnection=true", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_external_ip.yml b/testdata/server-discovery-and-monitoring/single/direct_connection_external_ip.yml deleted file mode 100644 index 0cb73c50e2..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_external_ip.yml +++ /dev/null @@ -1,37 +0,0 @@ -description: "Direct connection to RSPrimary via external IP" - -uri: "mongodb://a/?directConnection=true" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["b:27017"], # Internal IP. - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_mongos.json b/testdata/server-discovery-and-monitoring/single/direct_connection_mongos.json deleted file mode 100644 index 72be020862..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_mongos.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "description": "Direct connection to mongos", - "uri": "mongodb://a/?directConnection=true", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "msg": "isdbgrid", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Mongos", - "setName": null - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_mongos.yml b/testdata/server-discovery-and-monitoring/single/direct_connection_mongos.yml deleted file mode 100644 index e81c9aef9b..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_mongos.yml +++ /dev/null @@ -1,36 +0,0 @@ -description: "Direct connection to mongos" - -uri: "mongodb://a/?directConnection=true" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - msg: "isdbgrid", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Mongos", - setName: - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_replicaset.json b/testdata/server-discovery-and-monitoring/single/direct_connection_replicaset.json deleted file mode 100644 index 82a51d390e..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_replicaset.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "description": "Direct connection with replicaSet URI option", - "uri": "mongodb://a/?replicaSet=rs&directConnection=true", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_replicaset.yml b/testdata/server-discovery-and-monitoring/single/direct_connection_replicaset.yml deleted file mode 100644 index 9a0f3996ca..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_replicaset.yml +++ /dev/null @@ -1,23 +0,0 @@ -description: Direct connection with replicaSet URI option - -uri: "mongodb://a/?replicaSet=rs&directConnection=true" - -phases: - # We are connecting to a replica set member - - responses: - - - - "a:27017" - - ok: 1 - helloOk: true - isWritablePrimary: true - setName: rs - minWireVersion: 0 - maxWireVersion: 21 - outcome: - servers: - "a:27017": - type: "RSPrimary" - setName: "rs" - topologyType: "Single" - logicalSessionTimeoutMinutes: - setName: rs diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_rsarbiter.json b/testdata/server-discovery-and-monitoring/single/direct_connection_rsarbiter.json deleted file mode 100644 index e06d284364..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_rsarbiter.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "description": "Direct connection to RSArbiter", - "uri": "mongodb://a/?directConnection=true", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "arbiterOnly": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSArbiter", - "setName": "rs" - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_rsarbiter.yml b/testdata/server-discovery-and-monitoring/single/direct_connection_rsarbiter.yml deleted file mode 100644 index d9fa876655..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_rsarbiter.yml +++ /dev/null @@ -1,38 +0,0 @@ -description: "Direct connection to RSArbiter" - -uri: "mongodb://a/?directConnection=true" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - arbiterOnly: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSArbiter", - setName: "rs" - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_rsprimary.json b/testdata/server-discovery-and-monitoring/single/direct_connection_rsprimary.json deleted file mode 100644 index 45eb1602fb..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_rsprimary.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "description": "Direct connection to RSPrimary", - "uri": "mongodb://a/?directConnection=true", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_rsprimary.yml b/testdata/server-discovery-and-monitoring/single/direct_connection_rsprimary.yml deleted file mode 100644 index 85dcb30a7c..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_rsprimary.yml +++ /dev/null @@ -1,37 +0,0 @@ -description: "Direct connection to RSPrimary" - -uri: "mongodb://a/?directConnection=true" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSPrimary", - setName: "rs" - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_rssecondary.json b/testdata/server-discovery-and-monitoring/single/direct_connection_rssecondary.json deleted file mode 100644 index b1bef8a49f..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_rssecondary.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "description": "Direct connection to RSSecondary", - "uri": "mongodb://a/?directConnection=true", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": false, - "secondary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSSecondary", - "setName": "rs" - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_rssecondary.yml b/testdata/server-discovery-and-monitoring/single/direct_connection_rssecondary.yml deleted file mode 100644 index 2d7da65e41..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_rssecondary.yml +++ /dev/null @@ -1,38 +0,0 @@ -description: "Direct connection to RSSecondary" - -uri: "mongodb://a/?directConnection=true" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: false, - secondary: true, - hosts: ["a:27017", "b:27017"], - setName: "rs", - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "RSSecondary", - setName: "rs" - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_standalone.json b/testdata/server-discovery-and-monitoring/single/direct_connection_standalone.json deleted file mode 100644 index e71ba07e74..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_standalone.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "Direct connection to standalone", - "uri": "mongodb://a/?directConnection=true", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Standalone", - "setName": null - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_standalone.yml b/testdata/server-discovery-and-monitoring/single/direct_connection_standalone.yml deleted file mode 100644 index ab4cb02ad4..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_standalone.yml +++ /dev/null @@ -1,35 +0,0 @@ -description: "Direct connection to standalone" - -uri: "mongodb://a/?directConnection=true" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Standalone", - setName: - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_unavailable_seed.json b/testdata/server-discovery-and-monitoring/single/direct_connection_unavailable_seed.json deleted file mode 100644 index 16f2735da5..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_unavailable_seed.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "description": "Direct connection to unavailable seed", - "uri": "mongodb://a/?directConnection=true", - "phases": [ - { - "responses": [ - [ - "a:27017", - {} - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_unavailable_seed.yml b/testdata/server-discovery-and-monitoring/single/direct_connection_unavailable_seed.yml deleted file mode 100644 index 46284ded6d..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_unavailable_seed.yml +++ /dev/null @@ -1,28 +0,0 @@ -description: "Direct connection to unavailable seed" - -uri: "mongodb://a/?directConnection=true" - -phases: [ - - { - responses: [ - - ["a:27017", {}] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_wrong_set_name.json b/testdata/server-discovery-and-monitoring/single/direct_connection_wrong_set_name.json deleted file mode 100644 index 8014a0a533..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_wrong_set_name.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "description": "Direct connection to RSPrimary with wrong set name", - "uri": "mongodb://a/?directConnection=true&replicaSet=rs", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "wrong", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown" - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017", - "b:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs" - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/direct_connection_wrong_set_name.yml b/testdata/server-discovery-and-monitoring/single/direct_connection_wrong_set_name.yml deleted file mode 100644 index 46b476d049..0000000000 --- a/testdata/server-discovery-and-monitoring/single/direct_connection_wrong_set_name.yml +++ /dev/null @@ -1,40 +0,0 @@ -description: Direct connection to RSPrimary with wrong set name -uri: mongodb://a/?directConnection=true&replicaSet=rs -phases: -- responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - - b:27017 - setName: wrong - minWireVersion: 0 - maxWireVersion: 21 - outcome: - servers: - a:27017: - type: Unknown - topologyType: Single - logicalSessionTimeoutMinutes: - setName: rs -- responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 - - b:27017 - setName: rs - minWireVersion: 0 - maxWireVersion: 21 - outcome: - servers: - a:27017: - type: RSPrimary - setName: rs - topologyType: Single - logicalSessionTimeoutMinutes: - setName: rs diff --git a/testdata/server-discovery-and-monitoring/single/discover_standalone.json b/testdata/server-discovery-and-monitoring/single/discover_standalone.json deleted file mode 100644 index d78c81654b..0000000000 --- a/testdata/server-discovery-and-monitoring/single/discover_standalone.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "Discover standalone", - "uri": "mongodb://a/?directConnection=false", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Standalone", - "setName": null - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/discover_standalone.yml b/testdata/server-discovery-and-monitoring/single/discover_standalone.yml deleted file mode 100644 index bc112d4eac..0000000000 --- a/testdata/server-discovery-and-monitoring/single/discover_standalone.yml +++ /dev/null @@ -1,35 +0,0 @@ -description: "Discover standalone" - -uri: "mongodb://a/?directConnection=false" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Standalone", - setName: - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/discover_unavailable_seed.json b/testdata/server-discovery-and-monitoring/single/discover_unavailable_seed.json deleted file mode 100644 index b1f306c2be..0000000000 --- a/testdata/server-discovery-and-monitoring/single/discover_unavailable_seed.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "description": "Discover unavailable seed", - "uri": "mongodb://a/?directConnection=false", - "phases": [ - { - "responses": [ - [ - "a:27017", - {} - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "Unknown", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/discover_unavailable_seed.yml b/testdata/server-discovery-and-monitoring/single/discover_unavailable_seed.yml deleted file mode 100644 index e451025e8a..0000000000 --- a/testdata/server-discovery-and-monitoring/single/discover_unavailable_seed.yml +++ /dev/null @@ -1,28 +0,0 @@ -description: "Discover unavailable seed" - -uri: "mongodb://a/?directConnection=false" - -phases: [ - - { - responses: [ - - ["a:27017", {}] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "Unknown", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/ls_timeout_standalone.json b/testdata/server-discovery-and-monitoring/single/ls_timeout_standalone.json deleted file mode 100644 index 236eabe00a..0000000000 --- a/testdata/server-discovery-and-monitoring/single/ls_timeout_standalone.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "description": "Parse logicalSessionTimeoutMinutes from standalone", - "uri": "mongodb://a", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "logicalSessionTimeoutMinutes": 7, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Standalone", - "setName": null - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": 7, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/ls_timeout_standalone.yml b/testdata/server-discovery-and-monitoring/single/ls_timeout_standalone.yml deleted file mode 100644 index 4747af6770..0000000000 --- a/testdata/server-discovery-and-monitoring/single/ls_timeout_standalone.yml +++ /dev/null @@ -1,36 +0,0 @@ -description: "Parse logicalSessionTimeoutMinutes from standalone" - -uri: "mongodb://a" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - logicalSessionTimeoutMinutes: 7, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Standalone", - setName: - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: 7, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/not_ok_response.json b/testdata/server-discovery-and-monitoring/single/not_ok_response.json deleted file mode 100644 index cfaac3564a..0000000000 --- a/testdata/server-discovery-and-monitoring/single/not_ok_response.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "description": "Handle a not-ok isWritablePrimary response", - "uri": "mongodb://a", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ], - [ - "a:27017", - { - "ok": 0, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/not_ok_response.yml b/testdata/server-discovery-and-monitoring/single/not_ok_response.yml deleted file mode 100644 index c1ae7d9875..0000000000 --- a/testdata/server-discovery-and-monitoring/single/not_ok_response.yml +++ /dev/null @@ -1,44 +0,0 @@ -description: "Handle a not-ok isWritablePrimary response" - -uri: "mongodb://a" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - minWireVersion: 0, - maxWireVersion: 21 - }], - - ["a:27017", { - - ok: 0, - helloOk: true, - isWritablePrimary: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/standalone_removed.json b/testdata/server-discovery-and-monitoring/single/standalone_removed.json deleted file mode 100644 index 675cdbb008..0000000000 --- a/testdata/server-discovery-and-monitoring/single/standalone_removed.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "Standalone removed from multi-server topology", - "uri": "mongodb://a,b", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "b:27017": { - "type": "Unknown", - "setName": null - } - }, - "topologyType": "Unknown", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/standalone_removed.yml b/testdata/server-discovery-and-monitoring/single/standalone_removed.yml deleted file mode 100644 index c8404463f7..0000000000 --- a/testdata/server-discovery-and-monitoring/single/standalone_removed.yml +++ /dev/null @@ -1,35 +0,0 @@ -description: "Standalone removed from multi-server topology" - -uri: "mongodb://a,b" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - helloOk: true, - isWritablePrimary: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "b:27017": { - - type: "Unknown", - setName: - } - }, - topologyType: "Unknown", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/standalone_using_legacy_hello.json b/testdata/server-discovery-and-monitoring/single/standalone_using_legacy_hello.json deleted file mode 100644 index 488cac4918..0000000000 --- a/testdata/server-discovery-and-monitoring/single/standalone_using_legacy_hello.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "description": "Connect to standalone using legacy hello", - "uri": "mongodb://a", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "ismaster": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Standalone", - "setName": null - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/standalone_using_legacy_hello.yml b/testdata/server-discovery-and-monitoring/single/standalone_using_legacy_hello.yml deleted file mode 100644 index 82c6ccfa7b..0000000000 --- a/testdata/server-discovery-and-monitoring/single/standalone_using_legacy_hello.yml +++ /dev/null @@ -1,34 +0,0 @@ -description: "Connect to standalone using legacy hello" - -uri: "mongodb://a" - -phases: [ - - { - responses: [ - - ["a:27017", { - - ok: 1, - ismaster: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - - outcome: { - - servers: { - - "a:27017": { - - type: "Standalone", - setName: - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/too_new.json b/testdata/server-discovery-and-monitoring/single/too_new.json deleted file mode 100644 index 8dd57d3348..0000000000 --- a/testdata/server-discovery-and-monitoring/single/too_new.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "description": "Standalone with large minWireVersion", - "uri": "mongodb://a", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 999, - "maxWireVersion": 1000 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Standalone", - "setName": null - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null, - "compatible": false - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/too_new.yml b/testdata/server-discovery-and-monitoring/single/too_new.yml deleted file mode 100644 index b176660d96..0000000000 --- a/testdata/server-discovery-and-monitoring/single/too_new.yml +++ /dev/null @@ -1,27 +0,0 @@ -description: "Standalone with large minWireVersion" -uri: "mongodb://a" -phases: [ - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - minWireVersion: 999, - maxWireVersion: 1000 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Standalone", - setName: - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: , - compatible: false - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/too_old.json b/testdata/server-discovery-and-monitoring/single/too_old.json deleted file mode 100644 index 8c027e01db..0000000000 --- a/testdata/server-discovery-and-monitoring/single/too_old.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "description": "Standalone with default maxWireVersion of 0", - "uri": "mongodb://a", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Standalone", - "setName": null - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null, - "compatible": false - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/too_old.yml b/testdata/server-discovery-and-monitoring/single/too_old.yml deleted file mode 100644 index 05cc1dc8f1..0000000000 --- a/testdata/server-discovery-and-monitoring/single/too_old.yml +++ /dev/null @@ -1,25 +0,0 @@ -description: "Standalone with default maxWireVersion of 0" -uri: "mongodb://a" -phases: [ - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Standalone", - setName: - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: , - compatible: false - } - } -] diff --git a/testdata/server-discovery-and-monitoring/single/too_old_then_upgraded.json b/testdata/server-discovery-and-monitoring/single/too_old_then_upgraded.json deleted file mode 100644 index c3dd98cf62..0000000000 --- a/testdata/server-discovery-and-monitoring/single/too_old_then_upgraded.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "description": "Standalone with default maxWireVersion of 0 is upgraded to one with maxWireVersion 21", - "uri": "mongodb://a", - "phases": [ - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Standalone", - "setName": null - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null, - "compatible": false - } - }, - { - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "minWireVersion": 0, - "maxWireVersion": 21 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Standalone", - "setName": null - } - }, - "topologyType": "Single", - "logicalSessionTimeoutMinutes": null, - "setName": null, - "compatible": true - } - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/single/too_old_then_upgraded.yml b/testdata/server-discovery-and-monitoring/single/too_old_then_upgraded.yml deleted file mode 100644 index 87b72b9000..0000000000 --- a/testdata/server-discovery-and-monitoring/single/too_old_then_upgraded.yml +++ /dev/null @@ -1,48 +0,0 @@ -description: "Standalone with default maxWireVersion of 0 is upgraded to one with maxWireVersion 21" -uri: "mongodb://a" -phases: [ - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Standalone", - setName: - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: , - compatible: false - } - }, - { - responses: [ - ["a:27017", { - ok: 1, - helloOk: true, - isWritablePrimary: true, - minWireVersion: 0, - maxWireVersion: 21 - }] - ], - outcome: { - servers: { - "a:27017": { - type: "Standalone", - setName: - } - }, - topologyType: "Single", - logicalSessionTimeoutMinutes: null, - setName: , - compatible: true - } - } -] diff --git a/testdata/server-discovery-and-monitoring/unified/auth-error.json b/testdata/server-discovery-and-monitoring/unified/auth-error.json deleted file mode 100644 index 62d26494c7..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/auth-error.json +++ /dev/null @@ -1,230 +0,0 @@ -{ - "description": "auth-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "auth": true, - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "auth-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "Reset server and pool after AuthenticationFailure error", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "saslContinue" - ], - "appName": "authErrorTest", - "errorCode": 18 - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "appname": "authErrorTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "auth-error" - } - } - ] - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "expectError": { - "isError": true - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "auth-error", - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "auth-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/auth-error.yml b/testdata/server-discovery-and-monitoring/unified/auth-error.yml deleted file mode 100644 index febf4a46dc..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/auth-error.yml +++ /dev/null @@ -1,130 +0,0 @@ -description: auth-error - -schemaVersion: "1.4" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - auth: true - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName auth-error - databaseName: &databaseName sdam-tests - documents: - - _id: 1 - - _id: 2 -tests: - - description: Reset server and pool after AuthenticationFailure error - operations: - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: - - saslContinue - appName: authErrorTest - errorCode: 18 - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - appname: authErrorTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: insertMany - object: *collection - arguments: - documents: - - _id: 3 - - _id: 4 - expectError: - isError: true - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform another operation to ensure the node is rediscovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 5 - - _id: 6 - # Assert the server was marked Unknown and pool was cleared exactly once. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - expectEvents: - # Note: The first insert command is never attempted because connection - # checkout fails. - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: auth-error - documents: - - _id: 5 - - _id: 6 - commandName: insert - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 5 - - _id: 6 diff --git a/testdata/server-discovery-and-monitoring/unified/auth-misc-command-error.json b/testdata/server-discovery-and-monitoring/unified/auth-misc-command-error.json deleted file mode 100644 index fd62fe604e..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/auth-misc-command-error.json +++ /dev/null @@ -1,230 +0,0 @@ -{ - "description": "auth-misc-command-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "auth": true, - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "auth-misc-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "Reset server and pool after misc command error", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "saslContinue" - ], - "appName": "authMiscErrorTest", - "errorCode": 1 - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "appname": "authMiscErrorTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "auth-misc-error" - } - } - ] - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "expectError": { - "isError": true - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "auth-misc-error", - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "auth-misc-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/auth-misc-command-error.yml b/testdata/server-discovery-and-monitoring/unified/auth-misc-command-error.yml deleted file mode 100644 index 9969ca92d4..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/auth-misc-command-error.yml +++ /dev/null @@ -1,132 +0,0 @@ ---- -description: auth-misc-command-error - -schemaVersion: "1.4" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - auth: true - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName auth-misc-error - databaseName: &databaseName sdam-tests - documents: - - _id: 1 - - _id: 2 - -tests: - - description: Reset server and pool after misc command error - operations: - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: - - saslContinue - appName: authMiscErrorTest - errorCode: 1 # InternalError - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - appname: authMiscErrorTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: insertMany - object: *collection - arguments: - documents: - - _id: 3 - - _id: 4 - expectError: - isError: true - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform another operation to ensure the node is rediscovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 5 - - _id: 6 - # Assert the server was marked Unknown and pool was cleared exactly once. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - expectEvents: - # Note: The first insert command is never attempted because connection - # checkout fails. - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: auth-misc-error - documents: - - _id: 5 - - _id: 6 - commandName: insert - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 5 - - _id: 6 diff --git a/testdata/server-discovery-and-monitoring/unified/auth-network-error.json b/testdata/server-discovery-and-monitoring/unified/auth-network-error.json deleted file mode 100644 index 84763af32e..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/auth-network-error.json +++ /dev/null @@ -1,230 +0,0 @@ -{ - "description": "auth-network-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "auth": true, - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "auth-network-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "Reset server and pool after network error during authentication", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "saslContinue" - ], - "closeConnection": true, - "appName": "authNetworkErrorTest" - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "appname": "authNetworkErrorTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "auth-network-error" - } - } - ] - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "expectError": { - "isError": true - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "auth-network-error", - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "auth-network-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/auth-network-error.yml b/testdata/server-discovery-and-monitoring/unified/auth-network-error.yml deleted file mode 100644 index cdf77c56df..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/auth-network-error.yml +++ /dev/null @@ -1,132 +0,0 @@ ---- -description: auth-network-error - -schemaVersion: "1.4" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - auth: true - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName auth-network-error - databaseName: &databaseName sdam-tests - documents: - - _id: 1 - - _id: 2 - -tests: - - description: Reset server and pool after network error during authentication - operations: - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: - - saslContinue - closeConnection: true - appName: authNetworkErrorTest - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - appname: authNetworkErrorTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: insertMany - object: *collection - arguments: - documents: - - _id: 3 - - _id: 4 - expectError: - isError: true - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform another operation to ensure the node is rediscovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 5 - - _id: 6 - # Assert the server was marked Unknown and pool was cleared exactly once. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - expectEvents: - # Note: The first insert command is never attempted because connection - # checkout fails. - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: auth-network-error - documents: - - _id: 5 - - _id: 6 - commandName: insert - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 5 - - _id: 6 diff --git a/testdata/server-discovery-and-monitoring/unified/auth-network-timeout-error.json b/testdata/server-discovery-and-monitoring/unified/auth-network-timeout-error.json deleted file mode 100644 index 3cf9576eba..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/auth-network-timeout-error.json +++ /dev/null @@ -1,233 +0,0 @@ -{ - "description": "auth-network-timeout-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "auth": true, - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "auth-network-timeout-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "Reset server and pool after network timeout error during authentication", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "saslContinue" - ], - "blockConnection": true, - "blockTimeMS": 500, - "appName": "authNetworkTimeoutErrorTest" - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "appname": "authNetworkTimeoutErrorTest", - "connectTimeoutMS": 250, - "socketTimeoutMS": 250 - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "auth-network-timeout-error" - } - } - ] - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "expectError": { - "isError": true - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "auth-network-timeout-error", - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "auth-network-timeout-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/auth-network-timeout-error.yml b/testdata/server-discovery-and-monitoring/unified/auth-network-timeout-error.yml deleted file mode 100644 index 49b91d8373..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/auth-network-timeout-error.yml +++ /dev/null @@ -1,138 +0,0 @@ ---- -description: auth-network-timeout-error - -schemaVersion: "1.4" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - auth: true - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName auth-network-timeout-error - databaseName: &databaseName sdam-tests - documents: - - _id: 1 - - _id: 2 - -tests: - - description: Reset server and pool after network timeout error during authentication - operations: - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: - - saslContinue - blockConnection: true - blockTimeMS: 500 - appName: authNetworkTimeoutErrorTest - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - appname: authNetworkTimeoutErrorTest - # Set a short connect/socket timeout to ensure the fail point causes the - # connection establishment to timeout. - connectTimeoutMS: 250 - socketTimeoutMS: 250 - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: insertMany - object: *collection - arguments: - documents: - - _id: 3 - - _id: 4 - expectError: - isError: true - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform another operation to ensure the node is rediscovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 5 - - _id: 6 - # Assert the server was marked Unknown and pool was cleared exactly once. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - expectEvents: - # Note: The first insert command is never attempted because connection - # checkout fails. - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: auth-network-timeout-error - documents: - - _id: 5 - - _id: 6 - commandName: insert - databaseName: *databaseName - - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 5 - - _id: 6 diff --git a/testdata/server-discovery-and-monitoring/unified/auth-shutdown-error.json b/testdata/server-discovery-and-monitoring/unified/auth-shutdown-error.json deleted file mode 100644 index b9e503af66..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/auth-shutdown-error.json +++ /dev/null @@ -1,230 +0,0 @@ -{ - "description": "auth-shutdown-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "auth": true, - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "auth-shutdown-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "Reset server and pool after shutdown error during authentication", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "saslContinue" - ], - "appName": "authShutdownErrorTest", - "errorCode": 91 - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "appname": "authShutdownErrorTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "auth-shutdown-error" - } - } - ] - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "expectError": { - "isError": true - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "auth-shutdown-error", - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "auth-shutdown-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/auth-shutdown-error.yml b/testdata/server-discovery-and-monitoring/unified/auth-shutdown-error.yml deleted file mode 100644 index f0bb4d17df..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/auth-shutdown-error.yml +++ /dev/null @@ -1,133 +0,0 @@ ---- -description: auth-shutdown-error - -schemaVersion: "1.4" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - auth: true - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName auth-shutdown-error - databaseName: &databaseName sdam-tests - documents: - - _id: 1 - - _id: 2 - -tests: - - description: Reset server and pool after shutdown error during authentication - operations: - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: - - saslContinue - appName: authShutdownErrorTest - errorCode: 91 - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - appname: authShutdownErrorTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: insertMany - object: *collection - arguments: - documents: - - _id: 3 - - _id: 4 - expectError: - isError: true - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform another operation to ensure the node is rediscovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 5 - - _id: 6 - # Assert the server was marked Unknown and pool was cleared exactly once. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - expectEvents: - # Note: The first insert command is never attempted because connection - # checkout fails. - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: auth-shutdown-error - documents: - - _id: 5 - - _id: 6 - commandName: insert - databaseName: *databaseName - - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 5 - - _id: 6 diff --git a/testdata/server-discovery-and-monitoring/unified/cancel-server-check.json b/testdata/server-discovery-and-monitoring/unified/cancel-server-check.json deleted file mode 100644 index a60ccfcb41..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/cancel-server-check.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "description": "cancel-server-check", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "replicaset" - ], - "serverless": "forbid" - }, - { - "minServerVersion": "4.2", - "topologies": [ - "sharded" - ], - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "cancel-server-check", - "databaseName": "sdam-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Cancel server check", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": true, - "heartbeatFrequencyMS": 10000, - "serverSelectionTimeoutMS": 5000, - "appname": "cancelServerCheckTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "cancel-server-check" - } - } - ] - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 1 - } - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - }, - "client": "setupClient" - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 2 - } - }, - "expectResult": { - "insertedId": 2 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 3 - } - }, - "expectResult": { - "insertedId": 3 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - } - ], - "outcome": [ - { - "collectionName": "cancel-server-check", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/cancel-server-check.yml b/testdata/server-discovery-and-monitoring/unified/cancel-server-check.yml deleted file mode 100644 index af46792546..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/cancel-server-check.yml +++ /dev/null @@ -1,143 +0,0 @@ ---- -description: cancel-server-check - -schemaVersion: "1.4" - -runOnRequirements: - # General failCommand requirements (this file does not use appName - # with failCommand). - - minServerVersion: "4.0" - topologies: - - replicaset - serverless: forbid - - minServerVersion: "4.2" - topologies: - - sharded - serverless: forbid - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName cancel-server-check - databaseName: &databaseName sdam-tests - documents: [] - -tests: - - description: Cancel server check - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: true - heartbeatFrequencyMS: 10000 - # Server selection timeout MUST be less than heartbeatFrequencyMS for - # this test. This setting ensures that the retried insert will fail - # after 5 seconds if the driver does not properly cancel the in progress - # check. - serverSelectionTimeoutMS: 5000 - appname: cancelServerCheckTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # Perform an operation to ensure the node is discovered. - - name: insertOne - object: *collection - arguments: - document: - _id: 1 - # Configure the next inserts to fail with a non-timeout network error. - # This should: - # 1) Mark the server Unknown - # 2) Clear the connection pool - # 3) Cancel the in progress hello or legacy hello check and close the Monitor - # connection - # 4) The write will be then we retried, server selection will request an - # immediate check, and block for ~500ms until the next Monitor check - # proceeds. - # 5) The write will succeed on the second attempt. - - name: failPoint - object: testRunner - arguments: - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: - - insert - closeConnection: true - client: *setupClient - - name: insertOne - object: *collection - arguments: - document: - _id: 2 - expectResult: - insertedId: 2 - # The first error should mark the server Unknown and then clear the pool. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform another operation to ensure the node still selectable. - - name: insertOne - object: *collection - arguments: - document: - _id: 3 - expectResult: - insertedId: 3 - # Assert the server was marked Unknown and pool was cleared exactly once. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - - # Order of operations is non-deterministic so we cannot check events. - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 3 diff --git a/testdata/server-discovery-and-monitoring/unified/connectTimeoutMS.json b/testdata/server-discovery-and-monitoring/unified/connectTimeoutMS.json deleted file mode 100644 index d3e860a9cb..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/connectTimeoutMS.json +++ /dev/null @@ -1,221 +0,0 @@ -{ - "description": "connectTimeoutMS", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "connectTimeoutMS", - "databaseName": "sdam-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "connectTimeoutMS=0", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "connectTimeoutMS": 0, - "heartbeatFrequencyMS": 500, - "appname": "connectTimeoutMS=0" - }, - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "connectTimeoutMS" - } - } - ] - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "connectTimeoutMS=0", - "blockConnection": true, - "blockTimeMS": 550 - } - }, - "client": "setupClient" - } - }, - { - "name": "wait", - "object": "testRunner", - "arguments": { - "ms": 750 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 0 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "connectTimeoutMS", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "connectTimeoutMS", - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "connectTimeoutMS", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/connectTimeoutMS.yml b/testdata/server-discovery-and-monitoring/unified/connectTimeoutMS.yml deleted file mode 100644 index 7c610623eb..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/connectTimeoutMS.yml +++ /dev/null @@ -1,130 +0,0 @@ ---- -description: connectTimeoutMS - -schemaVersion: "1.4" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName connectTimeoutMS - databaseName: &databaseName sdam-tests - documents: [] - -tests: - - description: connectTimeoutMS=0 - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - connectTimeoutMS: 0 - heartbeatFrequencyMS: 500 - appname: connectTimeoutMS=0 - useMultipleMongoses: false - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # Perform an operation to ensure the node is discovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 1 - - _id: 2 - # Block the next streaming hello check for longer than - # heartbeatFrequencyMS to ensure that the connection timeout remains - # unlimited. - - name: failPoint - object: testRunner - arguments: - failPoint: - configureFailPoint: failCommand - mode: - times: 2 - data: - failCommands: - - hello - - isMaster - appName: connectTimeoutMS=0 - blockConnection: true - blockTimeMS: 550 - client: *setupClient - - name: wait - object: testRunner - arguments: - ms: 750 - # Perform an operation to ensure the node is still selectable. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 3 - - _id: 4 - # Assert that the server was never marked Unknown and the pool was never - # cleared. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 0 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 0 - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: connectTimeoutMS - documents: - - _id: 1 - - _id: 2 - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - insert: connectTimeoutMS - documents: - - _id: 3 - - _id: 4 - commandName: insert - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 diff --git a/testdata/server-discovery-and-monitoring/unified/find-network-error.json b/testdata/server-discovery-and-monitoring/unified/find-network-error.json deleted file mode 100644 index c1b6db40ca..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/find-network-error.json +++ /dev/null @@ -1,234 +0,0 @@ -{ - "description": "find-network-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "find-network-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "Reset server and pool after network error on find", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true, - "appName": "findNetworkErrorTest" - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "retryReads": false, - "appname": "findNetworkErrorTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "find-network-error" - } - } - ] - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "find-network-error" - }, - "commandName": "find", - "databaseName": "sdam-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "find-network-error", - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "find-network-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/find-network-error.yml b/testdata/server-discovery-and-monitoring/unified/find-network-error.yml deleted file mode 100644 index f97d799a2a..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/find-network-error.yml +++ /dev/null @@ -1,135 +0,0 @@ ---- -description: find-network-error - -schemaVersion: "1.4" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName find-network-error - databaseName: &databaseName sdam-tests - documents: - - _id: 1 - - _id: 2 - -tests: - - description: Reset server and pool after network error on find - operations: - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: - - find - closeConnection: true - appName: findNetworkErrorTest - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - retryReads: false - appname: findNetworkErrorTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: find - object: *collection - arguments: - filter: - _id: 1 - expectError: - isError: true - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform another operation to ensure the node is rediscovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 5 - - _id: 6 - # Assert the server was marked Unknown and pool was cleared exactly once. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - find: find-network-error - commandName: find - databaseName: *databaseName - - commandStartedEvent: - command: - insert: find-network-error - documents: - - _id: 5 - - _id: 6 - commandName: insert - databaseName: *databaseName - - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 5 - - _id: 6 diff --git a/testdata/server-discovery-and-monitoring/unified/find-network-timeout-error.json b/testdata/server-discovery-and-monitoring/unified/find-network-timeout-error.json deleted file mode 100644 index e5ac9f21aa..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/find-network-timeout-error.json +++ /dev/null @@ -1,199 +0,0 @@ -{ - "description": "find-network-timeout-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "find-network-timeout-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "Ignore network timeout error on find", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "blockConnection": true, - "blockTimeMS": 500, - "appName": "findNetworkTimeoutErrorTest" - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "retryReads": false, - "appname": "findNetworkTimeoutErrorTest", - "socketTimeoutMS": 250 - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "find-network-timeout-error" - } - } - ] - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 3 - } - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 0 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "find-network-timeout-error" - }, - "commandName": "find", - "databaseName": "sdam-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "find-network-timeout-error", - "documents": [ - { - "_id": 3 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "find-network-timeout-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/find-network-timeout-error.yml b/testdata/server-discovery-and-monitoring/unified/find-network-timeout-error.yml deleted file mode 100644 index e00b7a2be0..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/find-network-timeout-error.yml +++ /dev/null @@ -1,119 +0,0 @@ ---- -description: find-network-timeout-error - -schemaVersion: "1.4" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName find-network-timeout-error - databaseName: &databaseName sdam-tests - documents: - - _id: 1 - - _id: 2 - -tests: - - description: Ignore network timeout error on find - operations: - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: - - find - blockConnection: true - blockTimeMS: 500 - appName: findNetworkTimeoutErrorTest - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - retryReads: false - appname: findNetworkTimeoutErrorTest - # Set a short socket timeout to ensure the find command times out. - socketTimeoutMS: 250 - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: find - object: *collection - arguments: - filter: - _id: 1 - expectError: - isError: true - # Perform another operation to ensure the node is still usable. - - name: insertOne - object: *collection - arguments: - document: - _id: 3 - # Assert the server was not marked Unknown and the pool was not cleared. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 0 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 0 - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - find: find-network-timeout-error - commandName: find - databaseName: *databaseName - - commandStartedEvent: - command: - insert: find-network-timeout-error - documents: - - _id: 3 - commandName: insert - databaseName: *databaseName - - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 3 diff --git a/testdata/server-discovery-and-monitoring/unified/find-shutdown-error.json b/testdata/server-discovery-and-monitoring/unified/find-shutdown-error.json deleted file mode 100644 index 6e5a2cac05..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/find-shutdown-error.json +++ /dev/null @@ -1,251 +0,0 @@ -{ - "description": "find-shutdown-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "find-shutdown-error", - "databaseName": "sdam-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Concurrent shutdown error on find", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "uriOptions": { - "retryWrites": false, - "retryReads": false, - "heartbeatFrequencyMS": 500, - "appname": "shutdownErrorFindTest" - }, - "observeEvents": [ - "serverDescriptionChangedEvent", - "poolClearedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "find-shutdown-error" - } - } - ] - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 1 - } - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "appName": "shutdownErrorFindTest", - "errorCode": 91, - "blockConnection": true, - "blockTimeMS": 500 - } - }, - "client": "setupClient" - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "thread": { - "id": "thread0" - } - }, - { - "thread": { - "id": "thread1" - } - } - ] - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread0", - "operation": { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread1", - "operation": { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "expectError": { - "isError": true - } - } - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread0" - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread1" - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 4 - } - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - } - ], - "outcome": [ - { - "collectionName": "find-shutdown-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 4 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/find-shutdown-error.yml b/testdata/server-discovery-and-monitoring/unified/find-shutdown-error.yml deleted file mode 100644 index 395215244b..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/find-shutdown-error.yml +++ /dev/null @@ -1,163 +0,0 @@ ---- -description: find-shutdown-error - -schemaVersion: "1.4" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName find-shutdown-error - databaseName: &databaseName sdam-tests - documents: [] - -tests: - - description: Concurrent shutdown error on find - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - uriOptions: - retryWrites: false - retryReads: false - heartbeatFrequencyMS: 500 - appname: shutdownErrorFindTest - observeEvents: - - serverDescriptionChangedEvent - - poolClearedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # Perform an operation to ensure the node is discovered. - - name: insertOne - object: *collection - arguments: - document: - _id: 1 - # Configure the next two finds to fail with a non-timeout shutdown - # errors. Block the connection for 500ms to ensure both operations check - # out connections from the same pool generation. - - name: failPoint - object: testRunner - arguments: - failPoint: - configureFailPoint: failCommand - mode: - times: 2 - data: - failCommands: - - find - appName: shutdownErrorFindTest - errorCode: 91 - blockConnection: true - blockTimeMS: 500 - client: *setupClient - # Start threads. - - name: createEntities - object: testRunner - arguments: - entities: - - thread: - id: &thread0 thread0 - - thread: - id: &thread1 thread1 - # Perform concurrent find operations. Both fail with shutdown errors. - - name: runOnThread - object: testRunner - arguments: - thread: *thread0 - operation: - name: find - object: *collection - arguments: - filter: - _id: 1 - expectError: - isError: true - - name: runOnThread - object: testRunner - arguments: - thread: *thread1 - operation: - name: find - object: *collection - arguments: - filter: - _id: 1 - expectError: - isError: true - # Stop threads. - - name: waitForThread - object: testRunner - arguments: - thread: *thread0 - - name: waitForThread - object: testRunner - arguments: - thread: *thread1 - # The first shutdown error should mark the server Unknown and then clear - # the pool. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform an operation to ensure the node is rediscovered. - - name: insertOne - object: *collection - arguments: - document: - _id: 4 - # Assert the server was marked Unknown and pool was cleared exactly once. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - - # Order of operations is non-deterministic so we cannot check events. - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 4 diff --git a/testdata/server-discovery-and-monitoring/unified/hello-command-error.json b/testdata/server-discovery-and-monitoring/unified/hello-command-error.json deleted file mode 100644 index 87958cb2c0..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/hello-command-error.json +++ /dev/null @@ -1,376 +0,0 @@ -{ - "description": "hello-command-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4.7", - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "hello-command-error", - "databaseName": "sdam-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Command error on Monitor handshake", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "commandErrorHandshakeTest", - "closeConnection": false, - "errorCode": 91 - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "serverDescriptionChangedEvent", - "poolClearedEvent", - "commandStartedEvent" - ], - "uriOptions": { - "retryWrites": false, - "connectTimeoutMS": 250, - "heartbeatFrequencyMS": 500, - "appname": "commandErrorHandshakeTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "hello-command-error" - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "hello-command-error", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "hello-command-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "Command error on Monitor check", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "connectTimeoutMS": 1000, - "heartbeatFrequencyMS": 500, - "appname": "commandErrorCheckTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "hello-command-error" - } - } - ] - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "commandErrorCheckTest", - "closeConnection": false, - "blockConnection": true, - "blockTimeMS": 750, - "errorCode": 91 - } - }, - "client": "setupClient" - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "hello-command-error", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "hello-command-error", - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "hello-command-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/hello-command-error.yml b/testdata/server-discovery-and-monitoring/unified/hello-command-error.yml deleted file mode 100644 index 1c9c079220..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/hello-command-error.yml +++ /dev/null @@ -1,233 +0,0 @@ ---- -description: hello-command-error - -schemaVersion: "1.4" - -runOnRequirements: - # Require SERVER-49336 for failCommand + appName on the initial handshake. - - minServerVersion: "4.4.7" - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName hello-command-error - databaseName: &databaseName sdam-tests - documents: [] - -tests: - - description: Command error on Monitor handshake - operations: - # Configure the next streaming hello check to fail with a command error. - # Use "times: 4" to increase the probability that the Monitor check fails - # since the RTT hello may trigger this failpoint one or many times as - # well. - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 4 - data: - failCommands: - - hello - - isMaster - appName: commandErrorHandshakeTest - closeConnection: false - errorCode: 91 - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - serverDescriptionChangedEvent - - poolClearedEvent - - commandStartedEvent - uriOptions: - retryWrites: false - connectTimeoutMS: 250 - heartbeatFrequencyMS: 500 - appname: commandErrorHandshakeTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # The command error on the initial handshake should mark the server - # Unknown (emitting a ServerDescriptionChangedEvent) and clear the pool. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - # Perform an operation to ensure the node is discovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 1 - - _id: 2 - # We cannot assert the server was marked Unknown and pool was cleared an - # exact number of times because the RTT hello may or may not have - # triggered this failpoint as well. - - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: hello-command-error - documents: - - _id: 1 - - _id: 2 - commandName: insert - databaseName: *databaseName - - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - - description: Command error on Monitor check - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - connectTimeoutMS: 1000 - heartbeatFrequencyMS: 500 - appname: commandErrorCheckTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # Perform an operation to ensure the node is discovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 1 - - _id: 2 - # Configure the next streaming hello check to fail with a command - # error. - # Use times: 2 so that the RTT hello is blocked as well. - - name: failPoint - object: testRunner - arguments: - failPoint: - configureFailPoint: failCommand - mode: - times: 2 - data: - failCommands: - - hello - - isMaster - appName: commandErrorCheckTest - closeConnection: false - blockConnection: true - blockTimeMS: 750 - errorCode: 91 - client: *setupClient - # The command error on the next check should mark the server Unknown and - # clear the pool. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform an operation to ensure the node is rediscovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 3 - - _id: 4 - # Assert the server was marked Unknown and pool was cleared exactly once. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: hello-command-error - documents: - - _id: 1 - - _id: 2 - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - insert: hello-command-error - documents: - - _id: 3 - - _id: 4 - commandName: insert - databaseName: *databaseName - - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 diff --git a/testdata/server-discovery-and-monitoring/unified/hello-network-error.json b/testdata/server-discovery-and-monitoring/unified/hello-network-error.json deleted file mode 100644 index 15ed2b605e..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/hello-network-error.json +++ /dev/null @@ -1,346 +0,0 @@ -{ - "description": "hello-network-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4.7", - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "hello-network-error", - "databaseName": "sdam-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Network error on Monitor handshake", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "networkErrorHandshakeTest", - "closeConnection": true - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "connectTimeoutMS": 250, - "heartbeatFrequencyMS": 500, - "appname": "networkErrorHandshakeTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "hello-network-error" - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "hello-network-error", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "hello-network-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "Network error on Monitor check", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "connectTimeoutMS": 250, - "heartbeatFrequencyMS": 500, - "appname": "networkErrorCheckTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "hello-network-error" - } - } - ] - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "networkErrorCheckTest", - "closeConnection": true - } - }, - "client": "setupClient" - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "hello-network-error", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "hello-network-error", - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "hello-network-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/hello-network-error.yml b/testdata/server-discovery-and-monitoring/unified/hello-network-error.yml deleted file mode 100644 index 5f29194fc6..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/hello-network-error.yml +++ /dev/null @@ -1,227 +0,0 @@ ---- -description: hello-network-error - -schemaVersion: "1.4" - -runOnRequirements: - # Require SERVER-49336 for failCommand + appName on the initial handshake. - - minServerVersion: "4.4.7" - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName hello-network-error - databaseName: &databaseName sdam-tests - documents: [] - -tests: - - description: Network error on Monitor handshake - # Configure the initial handshake to fail with a network error. - # Use times: 2 so that the RTT hello fails as well. - operations: - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 2 - data: - failCommands: - - hello - - isMaster - appName: networkErrorHandshakeTest - closeConnection: true - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - connectTimeoutMS: 250 - heartbeatFrequencyMS: 500 - appname: networkErrorHandshakeTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # The network error on the initial handshake should mark the server - # Unknown (emitting a ServerDescriptionChangedEvent) and clear the pool. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - # Perform an operation to ensure the node is discovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 1 - - _id: 2 - # We cannot assert the server was marked Unknown and pool was cleared an - # exact number of times because the RTT hello may or may not have - # triggered this failpoint as well. - - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: hello-network-error - documents: - - _id: 1 - - _id: 2 - commandName: insert - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - - description: Network error on Monitor check - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - connectTimeoutMS: 250 - heartbeatFrequencyMS: 500 - appname: networkErrorCheckTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # Perform an operation to ensure the node is discovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 1 - - _id: 2 - # Configure the next streaming hello check to fail with a non-timeout - # network error. Use "times: 4" to increase the probability that the - # Monitor check fails since the RTT hello may trigger this failpoint one - # or many times as well. - - name: failPoint - object: testRunner - arguments: - failPoint: - configureFailPoint: failCommand - mode: - times: 4 - data: - failCommands: - - hello - - isMaster - appName: networkErrorCheckTest - closeConnection: true - client: *setupClient - # The network error on the next check should mark the server Unknown and - # clear the pool. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform an operation to ensure the node is rediscovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 3 - - _id: 4 - # We cannot assert the server was marked Unknown and pool was cleared an - # exact number of times because the RTT hello may or may not have - # triggered this failpoint as well. - # - name: assertEventCount - # object: testRunner - # arguments: - # client: *client - # event: - # serverDescriptionChangedEvent: - # newDescription: - # type: Unknown - # count: 1 - # - name: assertEventCount - # object: testRunner - # arguments: - # event: - # poolClearedEvent: {} - # count: 1 - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: hello-network-error - documents: - - _id: 1 - - _id: 2 - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - insert: hello-network-error - documents: - - _id: 3 - - _id: 4 - commandName: insert - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 diff --git a/testdata/server-discovery-and-monitoring/unified/hello-timeout.json b/testdata/server-discovery-and-monitoring/unified/hello-timeout.json deleted file mode 100644 index fe7cf4e78d..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/hello-timeout.json +++ /dev/null @@ -1,514 +0,0 @@ -{ - "description": "hello-timeout", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "hello-timeout", - "databaseName": "sdam-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Network timeout on Monitor handshake", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "timeoutMonitorHandshakeTest", - "blockConnection": true, - "blockTimeMS": 1000 - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "connectTimeoutMS": 250, - "heartbeatFrequencyMS": 500, - "appname": "timeoutMonitorHandshakeTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "hello-timeout" - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "hello-timeout", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "hello-timeout", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "Network timeout on Monitor check", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "connectTimeoutMS": 750, - "heartbeatFrequencyMS": 500, - "appname": "timeoutMonitorCheckTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "hello-timeout" - } - } - ] - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "timeoutMonitorCheckTest", - "blockConnection": true, - "blockTimeMS": 1000 - } - }, - "client": "setupClient" - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "hello-timeout", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "hello-timeout", - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "hello-timeout", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - ] - }, - { - "description": "Driver extends timeout while streaming", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "connectTimeoutMS": 250, - "heartbeatFrequencyMS": 500, - "appname": "extendsTimeoutTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "hello-timeout" - } - } - ] - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - }, - { - "name": "wait", - "object": "testRunner", - "arguments": { - "ms": 2000 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 0 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "hello-timeout", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "hello-timeout", - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "hello-timeout", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/hello-timeout.yml b/testdata/server-discovery-and-monitoring/unified/hello-timeout.yml deleted file mode 100644 index 2a3374d1e7..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/hello-timeout.yml +++ /dev/null @@ -1,318 +0,0 @@ ---- -description: hello-timeout - -schemaVersion: "1.4" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName hello-timeout - databaseName: &databaseName sdam-tests - documents: [] - -tests: - - description: Network timeout on Monitor handshake - operations: - # Configure the initial handshake to fail with a timeout. - # Use times: 2 so that the RTT hello is blocked as well. - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 2 - data: - failCommands: - - hello - - isMaster - appName: timeoutMonitorHandshakeTest - blockConnection: true - blockTimeMS: 1000 - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - connectTimeoutMS: 250 - heartbeatFrequencyMS: 500 - appname: timeoutMonitorHandshakeTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # The network error on the initial handshake should mark the server - # Unknown (emitting a ServerDescriptionChangedEvent) and clear the pool. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - # Perform an operation to ensure the node is discovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 1 - - _id: 2 - # We cannot assert the server was marked Unknown and pool was cleared an - # exact number of times because the RTT hello may or may not have - # triggered this failpoint as well. - # - name: assertEventCount - # object: testRunner - # arguments: - # event: ServerMarkedUnknownEvent - # count: 1 - # - name: assertEventCount - # object: testRunner - # arguments: - # event: PoolClearedEvent - # count: 1 - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: hello-timeout - documents: - - _id: 1 - - _id: 2 - commandName: insert - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - - description: Network timeout on Monitor check - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - connectTimeoutMS: 750 - heartbeatFrequencyMS: 500 - appname: timeoutMonitorCheckTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # Perform an operation to ensure the node is discovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 1 - - _id: 2 - # Configure the next streaming hello check to fail with a timeout. - # Use "times: 4" to increase the probability that the Monitor check times - # out since the RTT hello may trigger this failpoint one or many times as - # well. - - name: failPoint - object: testRunner - arguments: - failPoint: - configureFailPoint: failCommand - mode: - times: 4 - data: - failCommands: - - hello - - isMaster - appName: timeoutMonitorCheckTest - blockConnection: true - # blockTimeMS is evaluated after the waiting for heartbeatFrequencyMS server-side, so this value only - # needs to be greater than connectTimeoutMS. The driver will wait for (500+750)ms and the server will - # respond after (500+1000)ms. - blockTimeMS: 1000 - client: *setupClient - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - # The network error on the next check should mark the server Unknown and - # clear the pool. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform an operation to ensure the node is rediscovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 3 - - _id: 4 - # We cannot assert the server was marked Unknown and pool was cleared an - # exact number of times because the RTT hello may have triggered this - # failpoint one or many times as well. - - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: hello-timeout - documents: - - _id: 1 - - _id: 2 - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - insert: hello-timeout - documents: - - _id: 3 - - _id: 4 - commandName: insert - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 - - - description: Driver extends timeout while streaming - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - connectTimeoutMS: 250 - heartbeatFrequencyMS: 500 - appname: extendsTimeoutTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # Perform an operation to ensure the node is discovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 1 - - _id: 2 - # Wait for multiple monitor checks to complete. - - name: wait - object: testRunner - arguments: - ms: 2000 - # Perform an operation to ensure the node is still selectable. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 3 - - _id: 4 - # Assert that the server was never marked Unknown and the pool was never - # cleared. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 0 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 0 - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: hello-timeout - documents: - - _id: 1 - - _id: 2 - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - insert: hello-timeout - documents: - - _id: 3 - - _id: 4 - commandName: insert - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 diff --git a/testdata/server-discovery-and-monitoring/unified/insert-network-error.json b/testdata/server-discovery-and-monitoring/unified/insert-network-error.json deleted file mode 100644 index bfe41a4cb6..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/insert-network-error.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "description": "insert-network-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "insert-network-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "Reset server and pool after network error on insert", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true, - "appName": "insertNetworkErrorTest" - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent", - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "appname": "insertNetworkErrorTest" - }, - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "insert-network-error" - } - } - ] - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "expectError": { - "isError": true - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "insert-network-error", - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "insert-network-error", - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "insert-network-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/insert-network-error.yml b/testdata/server-discovery-and-monitoring/unified/insert-network-error.yml deleted file mode 100644 index fcedf54357..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/insert-network-error.yml +++ /dev/null @@ -1,137 +0,0 @@ ---- -description: insert-network-error - -schemaVersion: "1.4" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName insert-network-error - databaseName: &databaseName sdam-tests - documents: - - _id: 1 - - _id: 2 - -tests: - - description: Reset server and pool after network error on insert - operations: - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: - - insert - closeConnection: true - appName: insertNetworkErrorTest - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: false - appname: insertNetworkErrorTest - useMultipleMongoses: false - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - name: insertMany - object: *collection - arguments: - documents: - - _id: 3 - - _id: 4 - expectError: - isError: true - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform another operation to ensure the node is rediscovered. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 5 - - _id: 6 - # Assert the server was marked Unknown and pool was cleared exactly once. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: insert-network-error - documents: - - _id: 3 - - _id: 4 - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - insert: insert-network-error - documents: - - _id: 5 - - _id: 6 - commandName: insert - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 5 - - _id: 6 diff --git a/testdata/server-discovery-and-monitoring/unified/insert-shutdown-error.json b/testdata/server-discovery-and-monitoring/unified/insert-shutdown-error.json deleted file mode 100644 index af7c6c987a..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/insert-shutdown-error.json +++ /dev/null @@ -1,250 +0,0 @@ -{ - "description": "insert-shutdown-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "insert-shutdown-error", - "databaseName": "sdam-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Concurrent shutdown error on insert", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "uriOptions": { - "retryWrites": false, - "heartbeatFrequencyMS": 500, - "appname": "shutdownErrorInsertTest" - }, - "observeEvents": [ - "serverDescriptionChangedEvent", - "poolClearedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "insert-shutdown-error" - } - } - ] - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 1 - } - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "appName": "shutdownErrorInsertTest", - "errorCode": 91, - "blockConnection": true, - "blockTimeMS": 500 - } - }, - "client": "setupClient" - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "thread": { - "id": "thread0" - } - }, - { - "thread": { - "id": "thread1" - } - } - ] - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread0", - "operation": { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 2 - } - }, - "expectError": { - "isError": true - } - } - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread1", - "operation": { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 3 - } - }, - "expectError": { - "isError": true - } - } - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread0" - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread1" - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 4 - } - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - } - ], - "outcome": [ - { - "collectionName": "insert-shutdown-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 4 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/insert-shutdown-error.yml b/testdata/server-discovery-and-monitoring/unified/insert-shutdown-error.yml deleted file mode 100644 index ae32229ffa..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/insert-shutdown-error.yml +++ /dev/null @@ -1,162 +0,0 @@ ---- -description: insert-shutdown-error - -schemaVersion: "1.4" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - serverless: forbid - topologies: [ single, replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName insert-shutdown-error - databaseName: &databaseName sdam-tests - documents: [] - -tests: - - description: Concurrent shutdown error on insert - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - uriOptions: - retryWrites: false - heartbeatFrequencyMS: 500 - appname: shutdownErrorInsertTest - observeEvents: - - serverDescriptionChangedEvent - - poolClearedEvent - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # Perform an operation to ensure the node is discovered. - - name: insertOne - object: *collection - arguments: - document: - _id: 1 - # Configure the next two inserts to fail with a non-timeout shutdown - # errors. Block the connection for 500ms to ensure both operations check - # out connections from the same pool generation. - - name: failPoint - object: testRunner - arguments: - failPoint: - configureFailPoint: failCommand - mode: - times: 2 - data: - failCommands: - - insert - appName: shutdownErrorInsertTest - errorCode: 91 - blockConnection: true - blockTimeMS: 500 - client: *setupClient - # Start threads. - - name: createEntities - object: testRunner - arguments: - entities: - - thread: - id: &thread0 thread0 - - thread: - id: &thread1 thread1 - # Perform concurrent insert operations. Both fail with shutdown errors. - - name: runOnThread - object: testRunner - arguments: - thread: *thread0 - operation: - name: insertOne - object: *collection - arguments: - document: - _id: 2 - expectError: - isError: true - - name: runOnThread - object: testRunner - arguments: - thread: *thread1 - operation: - name: insertOne - object: *collection - arguments: - document: - _id: 3 - expectError: - isError: true - # Stop threads. - - name: waitForThread - object: testRunner - arguments: - thread: *thread0 - - name: waitForThread - object: testRunner - arguments: - thread: *thread1 - # The first shutdown error should mark the server Unknown and then clear - # the pool. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform an operation to ensure the node is rediscovered. - - name: insertOne - object: *collection - arguments: - document: - _id: 4 - # Assert the server was marked Unknown and pool was cleared exactly once. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - - # Order of operations is non-deterministic so we cannot check events. - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 4 diff --git a/testdata/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.json b/testdata/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.json deleted file mode 100644 index d9329646d4..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.json +++ /dev/null @@ -1,591 +0,0 @@ -{ - "description": "interruptInUse", - "schemaVersion": "1.11", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid", - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "interruptInUse", - "databaseName": "sdam-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Connection pool clear uses interruptInUseConnections=true after monitor timeout", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "poolClearedEvent", - "connectionClosedEvent", - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent", - "connectionCheckedOutEvent", - "connectionCheckedInEvent" - ], - "uriOptions": { - "connectTimeoutMS": 500, - "heartbeatFrequencyMS": 500, - "appname": "interruptInUse", - "retryReads": false, - "minPoolSize": 0 - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "interruptInUse" - } - }, - { - "thread": { - "id": "thread1" - } - } - ] - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 1 - } - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread1", - "operation": { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "$where": "sleep(2000) || true" - } - }, - "expectError": { - "isError": true - } - } - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "blockConnection": true, - "blockTimeMS": 1500, - "appName": "interruptInUse" - } - } - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread1" - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandSucceededEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - }, - { - "commandFailedEvent": { - "commandName": "find" - } - } - ] - }, - { - "client": "client", - "eventType": "cmap", - "events": [ - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "poolClearedEvent": { - "interruptInUseConnections": true - } - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionClosedEvent": {} - } - ] - } - ], - "outcome": [ - { - "collectionName": "interruptInUse", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Error returned from connection pool clear with interruptInUseConnections=true is retryable", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "poolClearedEvent", - "connectionClosedEvent", - "commandStartedEvent", - "commandFailedEvent", - "commandSucceededEvent", - "connectionCheckedOutEvent", - "connectionCheckedInEvent" - ], - "uriOptions": { - "connectTimeoutMS": 500, - "heartbeatFrequencyMS": 500, - "appname": "interruptInUseRetryable", - "retryReads": true, - "minPoolSize": 0 - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "interruptInUse" - } - }, - { - "thread": { - "id": "thread1" - } - } - ] - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 1 - } - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread1", - "operation": { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "$where": "sleep(2000) || true" - } - } - } - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "blockConnection": true, - "blockTimeMS": 1500, - "appName": "interruptInUseRetryable" - } - } - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread1" - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandSucceededEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - }, - { - "commandFailedEvent": { - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - }, - { - "commandSucceededEvent": { - "commandName": "find" - } - } - ] - }, - { - "client": "client", - "eventType": "cmap", - "events": [ - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "poolClearedEvent": { - "interruptInUseConnections": true - } - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionClosedEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ], - "outcome": [ - { - "collectionName": "interruptInUse", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Error returned from connection pool clear with interruptInUseConnections=true is retryable for write", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "poolClearedEvent", - "connectionClosedEvent", - "commandStartedEvent", - "commandFailedEvent", - "commandSucceededEvent", - "connectionCheckedOutEvent", - "connectionCheckedInEvent" - ], - "uriOptions": { - "connectTimeoutMS": 500, - "heartbeatFrequencyMS": 500, - "appname": "interruptInUseRetryableWrite", - "retryWrites": true, - "minPoolSize": 0 - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "interruptInUse" - } - }, - { - "thread": { - "id": "thread1" - } - } - ] - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 1 - } - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread1", - "operation": { - "name": "updateOne", - "object": "collection", - "arguments": { - "filter": { - "$where": "sleep(2000) || true" - }, - "update": { - "$set": { - "a": "bar" - } - } - } - } - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "blockConnection": true, - "blockTimeMS": 1500, - "appName": "interruptInUseRetryableWrite" - } - } - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread1" - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandSucceededEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "update" - } - }, - { - "commandFailedEvent": { - "commandName": "update" - } - }, - { - "commandStartedEvent": { - "commandName": "update" - } - }, - { - "commandSucceededEvent": { - "commandName": "update" - } - } - ] - }, - { - "client": "client", - "eventType": "cmap", - "events": [ - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "poolClearedEvent": { - "interruptInUseConnections": true - } - }, - { - "connectionCheckedInEvent": {} - }, - { - "connectionClosedEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ], - "outcome": [ - { - "collectionName": "interruptInUse", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1, - "a": "bar" - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.yml b/testdata/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.yml deleted file mode 100644 index 67cd7d3ae3..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.yml +++ /dev/null @@ -1,341 +0,0 @@ ---- -description: interruptInUse - -schemaVersion: "1.11" - -runOnRequirements: - # failCommand appName requirements - - minServerVersion: "4.4" - serverless: forbid - topologies: [ replicaset, sharded ] - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName interruptInUse - databaseName: &databaseName sdam-tests - documents: [] - -tests: - - description: Connection pool clear uses interruptInUseConnections=true after monitor timeout - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - poolClearedEvent - - connectionClosedEvent - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - connectionCheckedOutEvent - - connectionCheckedInEvent - uriOptions: - connectTimeoutMS: 500 - heartbeatFrequencyMS: 500 - appname: interruptInUse - retryReads: false - minPoolSize: 0 - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - thread: - id: &thread1 thread1 - - name: insertOne - object: *collection - arguments: - document: { _id: 1 } - # simulate a long-running query - - name: runOnThread - object: testRunner - arguments: - thread: *thread1 - operation: - name: find - object: *collection - arguments: - filter: - $where : sleep(2000) || true - expectError: - isError: true - # Configure the monitor check to fail with a timeout. - # Use "times: 4" to increase the probability that the Monitor check triggers - # the failpoint, since the RTT hello may trigger this failpoint one or many - # times as well. - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 4 - data: - failCommands: - - hello - - isMaster - blockConnection: true - blockTimeMS: 1500 - appName: interruptInUse - - name: waitForThread - object: testRunner - arguments: - thread: *thread1 - - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - commandName: insert - - commandSucceededEvent: - commandName: insert - - commandStartedEvent: - commandName: find - - commandFailedEvent: - commandName: find - - client: *client - eventType: cmap - events: - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - connectionCheckedOutEvent: {} - - poolClearedEvent: - interruptInUseConnections: true - - connectionCheckedInEvent: {} - - connectionClosedEvent: {} - - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - - description: Error returned from connection pool clear with interruptInUseConnections=true is retryable - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - poolClearedEvent - - connectionClosedEvent - - commandStartedEvent - - commandFailedEvent - - commandSucceededEvent - - connectionCheckedOutEvent - - connectionCheckedInEvent - uriOptions: - connectTimeoutMS: 500 - heartbeatFrequencyMS: 500 - appname: interruptInUseRetryable - retryReads: true - minPoolSize: 0 - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - thread: - id: &thread1 thread1 - - name: insertOne - object: *collection - arguments: - document: { _id: 1 } - # simulate a long-running query - - name: runOnThread - object: testRunner - arguments: - thread: *thread1 - operation: - name: find - object: *collection - arguments: - filter: - $where : sleep(2000) || true - # Configure the monitor check to fail with a timeout. - # Use "times: 4" to increase the probability that the Monitor check triggers - # the failpoint, since the RTT hello may trigger this failpoint one or many - # times as well. - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 4 - data: - failCommands: - - hello - - isMaster - blockConnection: true - blockTimeMS: 1500 - appName: interruptInUseRetryable - - name: waitForThread - object: testRunner - arguments: - thread: *thread1 - - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - commandName: insert - - commandSucceededEvent: - commandName: insert - - commandStartedEvent: - commandName: find - - commandFailedEvent: - commandName: find - - commandStartedEvent: - commandName: find - - commandSucceededEvent: - commandName: find - - client: *client - eventType: cmap - events: - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - connectionCheckedOutEvent: {} - - poolClearedEvent: - interruptInUseConnections: true - - connectionCheckedInEvent: {} - - connectionClosedEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - description: Error returned from connection pool clear with interruptInUseConnections=true is retryable for write - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - poolClearedEvent - - connectionClosedEvent - - commandStartedEvent - - commandFailedEvent - - commandSucceededEvent - - connectionCheckedOutEvent - - connectionCheckedInEvent - uriOptions: - connectTimeoutMS: 500 - heartbeatFrequencyMS: 500 - appname: interruptInUseRetryableWrite - retryWrites: true - minPoolSize: 0 - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - - thread: - id: &thread1 thread1 - # ensure the primary is discovered - - name: insertOne - object: *collection - arguments: - document: { _id: 1 } - # simulate a long-running query - - name: runOnThread - object: testRunner - arguments: - thread: *thread1 - operation: - name: updateOne - object: *collection - arguments: - filter: - $where: sleep(2000) || true - update: - "$set": { "a": "bar" } - # Configure the monitor check to fail with a timeout. - # Use "times: 4" to increase the probability that the Monitor check triggers - # the failpoint, since the RTT hello may trigger this failpoint one or many - # times as well. - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - times: 4 - data: - failCommands: - - hello - - isMaster - blockConnection: true - blockTimeMS: 1500 - appName: interruptInUseRetryableWrite - - name: waitForThread - object: testRunner - arguments: - thread: *thread1 - - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - commandName: insert - - commandSucceededEvent: - commandName: insert - - commandStartedEvent: - commandName: update - - commandFailedEvent: - commandName: update - - commandStartedEvent: - commandName: update - - commandSucceededEvent: - commandName: update - - client: *client - eventType: cmap - events: - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - connectionCheckedOutEvent: {} - - poolClearedEvent: - interruptInUseConnections: true - - connectionCheckedInEvent: {} - - connectionClosedEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} - - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, a : bar } - diff --git a/testdata/server-discovery-and-monitoring/unified/loadbalanced-emit-topology-changed-before-close.json b/testdata/server-discovery-and-monitoring/unified/loadbalanced-emit-topology-changed-before-close.json deleted file mode 100644 index 30c0657630..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/loadbalanced-emit-topology-changed-before-close.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "description": "loadbalanced-emit-topology-description-changed-before-close", - "schemaVersion": "1.20", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ], - "minServerVersion": "4.4" - } - ], - "tests": [ - { - "description": "Topology lifecycle", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "topologyDescriptionChangedEvent", - "topologyOpeningEvent", - "topologyClosedEvent" - ] - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 2 - } - }, - { - "name": "close", - "object": "client" - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "sdam", - "events": [ - { - "topologyOpeningEvent": {} - }, - { - "topologyDescriptionChangedEvent": { - "previousDescription": { - "type": "Unknown" - }, - "newDescription": {} - } - }, - { - "topologyDescriptionChangedEvent": { - "newDescription": { - "type": "LoadBalanced" - } - } - }, - { - "topologyDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - { - "topologyClosedEvent": {} - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/loadbalanced-emit-topology-changed-before-close.yml b/testdata/server-discovery-and-monitoring/unified/loadbalanced-emit-topology-changed-before-close.yml deleted file mode 100644 index c919a8cf8b..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/loadbalanced-emit-topology-changed-before-close.yml +++ /dev/null @@ -1,49 +0,0 @@ -description: "loadbalanced-emit-topology-description-changed-before-close" - -schemaVersion: "1.20" - -runOnRequirements: - - topologies: - - load-balanced - minServerVersion: "4.4" # awaitable hello - -tests: - - description: "Topology lifecycle" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeEvents: - - topologyDescriptionChangedEvent - - topologyOpeningEvent - - topologyClosedEvent - # ensure the topology has been fully discovered before closing the client. - # expected events are initial server discovery and server connect event. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 2 - - name: close - object: *client - expectEvents: - - client: *client - eventType: sdam - events: - - topologyOpeningEvent: {} - - topologyDescriptionChangedEvent: # unknown -> unknown w disconnected server - previousDescription: - type: "Unknown" - newDescription: {} - - topologyDescriptionChangedEvent: # unknown w disconnected server -> loadBalanced - newDescription: - type: "LoadBalanced" - - topologyDescriptionChangedEvent: # loadbalanced -> unknown - newDescription: - type: "Unknown" - - topologyClosedEvent: {} diff --git a/testdata/server-discovery-and-monitoring/unified/logging-loadbalanced.json b/testdata/server-discovery-and-monitoring/unified/logging-loadbalanced.json deleted file mode 100644 index 0ad3b0ceaa..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/logging-loadbalanced.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "description": "loadbalanced-logging", - "schemaVersion": "1.16", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ], - "minServerVersion": "4.4" - } - ], - "tests": [ - { - "description": "Topology lifecycle", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "topology": "debug" - }, - "observeEvents": [ - "topologyDescriptionChangedEvent" - ] - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 2 - } - }, - { - "name": "close", - "object": "client" - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting topology monitoring", - "topologyId": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting server monitoring", - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring", - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped topology monitoring", - "topologyId": { - "$$exists": true - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/logging-loadbalanced.yml b/testdata/server-discovery-and-monitoring/unified/logging-loadbalanced.yml deleted file mode 100644 index 432ec354ed..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/logging-loadbalanced.yml +++ /dev/null @@ -1,81 +0,0 @@ -description: "loadbalanced-logging" - -schemaVersion: "1.16" - -runOnRequirements: - - topologies: - - load-balanced - minServerVersion: "4.4" # awaitable hello - -tests: - - description: "Topology lifecycle" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeLogMessages: - topology: debug - observeEvents: - - topologyDescriptionChangedEvent - # ensure the topology has been fully discovered before closing the client. - # expected events are initial server discovery and server connect event. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 2 - - name: close - object: *client - expectLogMessages: - - client: *client - messages: - - level: debug - component: topology - data: - message: "Starting topology monitoring" - topologyId: { $$exists: true } - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } # unknown topology - newDescription: { $$exists: true } # unknown topology, disconnected server - - level: debug - component: topology - data: - message: "Starting server monitoring" - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } - newDescription: { $$exists: true } # loadBalanced topology - - level: debug - component: topology - data: - message: "Stopped server monitoring" - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } # loadBalanced topology - newDescription: { $$exists: true } # unknown topology - - level: debug - component: topology - data: - message: "Stopped topology monitoring" - topologyId: { $$exists: true } diff --git a/testdata/server-discovery-and-monitoring/unified/logging-replicaset.json b/testdata/server-discovery-and-monitoring/unified/logging-replicaset.json deleted file mode 100644 index e6738225cd..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/logging-replicaset.json +++ /dev/null @@ -1,606 +0,0 @@ -{ - "description": "replicaset-logging", - "schemaVersion": "1.16", - "runOnRequirements": [ - { - "topologies": [ - "replicaset" - ], - "minServerVersion": "4.4" - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient" - } - } - ], - "tests": [ - { - "description": "Topology lifecycle", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "topology": "debug" - }, - "observeEvents": [ - "topologyDescriptionChangedEvent" - ] - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 4 - } - }, - { - "name": "close", - "object": "client" - } - ], - "expectLogMessages": [ - { - "client": "client", - "ignoreMessages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat started" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat succeeded" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat failed" - } - } - ], - "messages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting topology monitoring", - "topologyId": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring", - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring", - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring", - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped topology monitoring", - "topologyId": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "Successful heartbeat", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "topology": "debug" - }, - "observeEvents": [ - "serverHeartbeatSucceededEvent" - ] - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatSucceededEvent": {} - }, - "count": 3 - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "ignoreExtraMessages": true, - "ignoreMessages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat started" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed" - } - } - ], - "messages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting topology monitoring", - "topologyId": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat succeeded", - "awaited": { - "$$exists": true - }, - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "driverConnectionId": { - "$$exists": true - }, - "serverConnectionId": { - "$$exists": true - }, - "durationMS": { - "$$type": [ - "int", - "long" - ] - }, - "reply": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "ok": 1 - } - } - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat succeeded", - "awaited": { - "$$exists": true - }, - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "driverConnectionId": { - "$$exists": true - }, - "serverConnectionId": { - "$$exists": true - }, - "durationMS": { - "$$type": [ - "int", - "long" - ] - }, - "reply": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "ok": 1 - } - } - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat succeeded", - "awaited": { - "$$exists": true - }, - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "driverConnectionId": { - "$$exists": true - }, - "serverConnectionId": { - "$$exists": true - }, - "durationMS": { - "$$type": [ - "int", - "long" - ] - }, - "reply": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "ok": 1 - } - } - } - } - } - ] - } - ] - }, - { - "description": "Failing heartbeat", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "topology": "debug" - }, - "observeEvents": [ - "serverHeartbeatFailedEvent" - ], - "uriOptions": { - "appname": "failingHeartbeatLoggingTest" - } - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "failingHeartbeatLoggingTest", - "closeConnection": true - } - }, - "client": "setupClient" - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatFailedEvent": {} - }, - "count": 1 - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "ignoreExtraMessages": true, - "ignoreMessages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat started" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat succeeded" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed" - } - } - ], - "messages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting topology monitoring", - "topologyId": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat failed", - "awaited": { - "$$exists": true - }, - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "driverConnectionId": { - "$$exists": true - }, - "durationMS": { - "$$type": [ - "int", - "long" - ] - }, - "failure": { - "$$exists": true - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/logging-replicaset.yml b/testdata/server-discovery-and-monitoring/unified/logging-replicaset.yml deleted file mode 100644 index a0b856ec72..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/logging-replicaset.yml +++ /dev/null @@ -1,289 +0,0 @@ -description: "replicaset-logging" - -schemaVersion: "1.16" - -runOnRequirements: - - topologies: - - replicaset - minServerVersion: "4.4" # awaitable hello - -createEntities: - - client: - id: &setupClient setupClient - -tests: - - description: "Topology lifecycle" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeLogMessages: - topology: debug - observeEvents: - - topologyDescriptionChangedEvent - # ensure the topology has been fully discovered before closing the client. - # expected events are initial cluster type change from unknown to ReplicaSet, and connect events for each of 3 servers. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 4 - - name: close - object: *client - expectLogMessages: - - client: *client - ignoreMessages: - - level: debug - component: topology - data: - message: "Starting server monitoring" - - level: debug - component: topology - data: - message: "Server heartbeat started" - - level: debug - component: topology - data: - message: "Server heartbeat succeeded" - - level: debug - component: topology - data: - message: "Server heartbeat failed" - messages: - - level: debug - component: topology - data: - message: "Starting topology monitoring" - topologyId: { $$exists: true } - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } # unknown topology - newDescription: { $$exists: true } # ReplicaSet topology - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } - newDescription: { $$exists: true } # server connected - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } - newDescription: { $$exists: true } # server connected - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } - newDescription: { $$exists: true } # server connected - - level: debug - component: topology - data: - message: "Stopped server monitoring" - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - level: debug - component: topology - data: - message: "Stopped server monitoring" - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - level: debug - component: topology - data: - message: "Stopped server monitoring" - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } # ReplicaSet topology - newDescription: { $$exists: true } # unknown topology - - level: debug - component: topology - data: - message: "Stopped topology monitoring" - topologyId: { $$exists: true } - - description: Successful heartbeat - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: *client - observeLogMessages: - topology: debug - observeEvents: - - serverHeartbeatSucceededEvent - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverHeartbeatSucceededEvent: {} - count: 3 - expectLogMessages: - - client: *client - ignoreExtraMessages: true - ignoreMessages: - - level: debug - component: topology - data: - message: "Server heartbeat started" - - level: debug - component: topology - data: - message: "Starting server monitoring" - - level: debug - component: topology - data: - message: "Stopped server monitoring" - - level: debug - component: topology - data: - message: "Topology description changed" - messages: - - level: debug - component: topology - data: - message: "Starting topology monitoring" - topologyId: { $$exists: true } - - level: debug - component: topology - data: - message: "Server heartbeat succeeded" - awaited: { $$exists: true } - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - driverConnectionId: { $$exists: true } - serverConnectionId: { $$exists: true } - durationMS: { $$type: [int, long] } - reply: - $$matchAsDocument: - "$$matchAsRoot": - ok: 1 - - level: debug - component: topology - data: - message: "Server heartbeat succeeded" - awaited: { $$exists: true } - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - driverConnectionId: { $$exists: true } - serverConnectionId: { $$exists: true } - durationMS: { $$type: [int, long] } - reply: - $$matchAsDocument: - "$$matchAsRoot": - ok: 1 - - level: debug - component: topology - data: - message: "Server heartbeat succeeded" - awaited: { $$exists: true } - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - driverConnectionId: { $$exists: true } - serverConnectionId: { $$exists: true } - durationMS: { $$type: [int, long] } - reply: - $$matchAsDocument: - "$$matchAsRoot": - ok: 1 - - description: Failing heartbeat - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: *client - observeLogMessages: - topology: debug - observeEvents: - - serverHeartbeatFailedEvent - uriOptions: - appname: failingHeartbeatLoggingTest - - name: failPoint - object: testRunner - arguments: - failPoint: - configureFailPoint: failCommand - mode: "alwaysOn" - data: - failCommands: - - hello - - isMaster - appName: failingHeartbeatLoggingTest - closeConnection: true - client: *setupClient - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverHeartbeatFailedEvent: {} - count: 1 - expectLogMessages: - - client: *client - ignoreExtraMessages: true - ignoreMessages: - - level: debug - component: topology - data: - message: "Server heartbeat started" - - level: debug - component: topology - data: - message: "Server heartbeat succeeded" - - level: debug - component: topology - data: - message: "Starting server monitoring" - - level: debug - component: topology - data: - message: "Stopped server monitoring" - - level: debug - component: topology - data: - message: "Topology description changed" - messages: - - level: debug - component: topology - data: - message: "Starting topology monitoring" - topologyId: - "$$exists": true - - level: debug - component: topology - data: - message: "Server heartbeat failed" - awaited: { $$exists: true } - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - driverConnectionId: { $$exists: true } - durationMS: { $$type: [int, long] } - failure: { $$exists: true } \ No newline at end of file diff --git a/testdata/server-discovery-and-monitoring/unified/logging-sharded.json b/testdata/server-discovery-and-monitoring/unified/logging-sharded.json deleted file mode 100644 index 61b27f5be0..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/logging-sharded.json +++ /dev/null @@ -1,492 +0,0 @@ -{ - "description": "sharded-logging", - "schemaVersion": "1.16", - "runOnRequirements": [ - { - "topologies": [ - "sharded" - ], - "minServerVersion": "4.4" - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "tests": [ - { - "description": "Topology lifecycle", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "topology": "debug" - }, - "observeEvents": [ - "topologyDescriptionChangedEvent" - ], - "useMultipleMongoses": true - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 3 - } - }, - { - "name": "close", - "object": "client" - } - ], - "expectLogMessages": [ - { - "client": "client", - "ignoreMessages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat started" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat succeeded" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat failed" - } - } - ], - "messages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting topology monitoring", - "topologyId": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring", - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring", - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped topology monitoring", - "topologyId": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "Successful heartbeat", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "topology": "debug" - }, - "observeEvents": [ - "serverHeartbeatSucceededEvent" - ] - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatSucceededEvent": {} - }, - "count": 1 - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "ignoreExtraMessages": true, - "ignoreMessages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat started" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed" - } - } - ], - "messages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting topology monitoring", - "topologyId": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat succeeded", - "awaited": { - "$$exists": true - }, - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "driverConnectionId": { - "$$exists": true - }, - "serverConnectionId": { - "$$exists": true - }, - "durationMS": { - "$$type": [ - "int", - "long" - ] - }, - "reply": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "ok": 1 - } - } - } - } - } - ] - } - ] - }, - { - "description": "Failing heartbeat", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "topology": "debug" - }, - "observeEvents": [ - "serverHeartbeatStartedEvent", - "serverHeartbeatFailedEvent" - ], - "uriOptions": { - "appname": "failingHeartbeatLoggingTest" - } - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "failingHeartbeatLoggingTest", - "closeConnection": true - } - }, - "client": "setupClient" - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatFailedEvent": {} - }, - "count": 1 - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "ignoreExtraMessages": true, - "ignoreMessages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat started" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat succeeded" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed" - } - } - ], - "messages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting topology monitoring", - "topologyId": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat failed", - "awaited": { - "$$exists": true - }, - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "driverConnectionId": { - "$$exists": true - }, - "durationMS": { - "$$type": [ - "int", - "long" - ] - }, - "failure": { - "$$exists": true - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/logging-sharded.yml b/testdata/server-discovery-and-monitoring/unified/logging-sharded.yml deleted file mode 100644 index 19870878b9..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/logging-sharded.yml +++ /dev/null @@ -1,248 +0,0 @@ -description: "sharded-logging" - -schemaVersion: "1.16" - -runOnRequirements: - - topologies: - - sharded - minServerVersion: "4.4" # awaitable hello - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -tests: - - description: "Topology lifecycle" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeLogMessages: - topology: debug - observeEvents: - - topologyDescriptionChangedEvent - useMultipleMongoses: true - # ensure the topology has been fully discovered before closing the client. - # expected events are initial cluster type change from unknown to sharded, and connect events for each of 2 servers. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 3 - - name: close - object: *client - expectLogMessages: - - client: *client - ignoreMessages: - - level: debug - component: topology - data: - message: "Starting server monitoring" - - level: debug - component: topology - data: - message: "Server heartbeat started" - - level: debug - component: topology - data: - message: "Server heartbeat succeeded" - - level: debug - component: topology - data: - message: "Server heartbeat failed" - messages: - - level: debug - component: topology - data: - message: "Starting topology monitoring" - topologyId: { $$exists: true } - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } # unknown topology - newDescription: { $$exists: true } # Sharded topology - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } - newDescription: { $$exists: true } # shard router connected - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } - newDescription: { $$exists: true } # shard router connected - - level: debug - component: topology - data: - message: "Stopped server monitoring" - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - level: debug - component: topology - data: - message: "Stopped server monitoring" - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } # Sharded topology - newDescription: { $$exists: true } # unknown topology - - level: debug - component: topology - data: - message: "Stopped topology monitoring" - topologyId: { $$exists: true } - - description: Successful heartbeat - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: *client - observeLogMessages: - topology: debug - observeEvents: - - serverHeartbeatSucceededEvent - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverHeartbeatSucceededEvent: {} - count: 1 - expectLogMessages: - - client: *client - ignoreExtraMessages: true - ignoreMessages: - - level: debug - component: topology - data: - message: "Server heartbeat started" - - level: debug - component: topology - data: - message: "Starting server monitoring" - - level: debug - component: topology - data: - message: "Stopped server monitoring" - - level: debug - component: topology - data: - message: "Topology description changed" - messages: - - level: debug - component: topology - data: - message: "Starting topology monitoring" - topologyId: { $$exists: true } - - level: debug - component: topology - data: - message: "Server heartbeat succeeded" - awaited: { $$exists: true } - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - driverConnectionId: { $$exists: true } - serverConnectionId: { $$exists: true } - durationMS: { $$type: [int, long] } - reply: - $$matchAsDocument: - "$$matchAsRoot": - ok: 1 - - description: Failing heartbeat - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: *client - observeLogMessages: - topology: debug - observeEvents: - - serverHeartbeatStartedEvent - - serverHeartbeatFailedEvent - uriOptions: - appname: failingHeartbeatLoggingTest - - name: failPoint - object: testRunner - arguments: - failPoint: - configureFailPoint: failCommand - mode: "alwaysOn" - data: - failCommands: - - hello - - isMaster - appName: failingHeartbeatLoggingTest - closeConnection: true - client: *setupClient - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverHeartbeatFailedEvent: {} - count: 1 - expectLogMessages: - - client: *client - ignoreExtraMessages: true - ignoreMessages: - - level: debug - component: topology - data: - message: "Server heartbeat started" - - level: debug - component: topology - data: - message: "Server heartbeat succeeded" - - level: debug - component: topology - data: - message: "Starting server monitoring" - - level: debug - component: topology - data: - message: "Stopped server monitoring" - - level: debug - component: topology - data: - message: "Topology description changed" - messages: - - level: debug - component: topology - data: - message: "Starting topology monitoring" - topologyId: - "$$exists": true - - level: debug - component: topology - data: - message: "Server heartbeat failed" - awaited: { $$exists: true } - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - driverConnectionId: { $$exists: true } - durationMS: { $$type: [int, long] } - failure: { $$exists: true } \ No newline at end of file diff --git a/testdata/server-discovery-and-monitoring/unified/logging-standalone.json b/testdata/server-discovery-and-monitoring/unified/logging-standalone.json deleted file mode 100644 index 1ee6dbe899..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/logging-standalone.json +++ /dev/null @@ -1,517 +0,0 @@ -{ - "description": "standalone-logging", - "schemaVersion": "1.16", - "runOnRequirements": [ - { - "topologies": [ - "single" - ], - "minServerVersion": "4.4" - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient" - } - } - ], - "tests": [ - { - "description": "Topology lifecycle", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "topology": "debug" - }, - "observeEvents": [ - "topologyDescriptionChangedEvent" - ] - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 2 - } - }, - { - "name": "close", - "object": "client" - } - ], - "expectLogMessages": [ - { - "client": "client", - "ignoreMessages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat started" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat succeeded" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat failed" - } - } - ], - "messages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting topology monitoring", - "topologyId": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting server monitoring", - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring", - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed", - "topologyId": { - "$$exists": true - }, - "previousDescription": { - "$$exists": true - }, - "newDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped topology monitoring", - "topologyId": { - "$$exists": true - } - } - } - ] - } - ] - }, - { - "description": "Successful heartbeat", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "topology": "debug" - }, - "observeEvents": [ - "serverHeartbeatSucceededEvent" - ] - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatSucceededEvent": {} - }, - "count": 1 - } - }, - { - "name": "close", - "object": "client" - } - ], - "expectLogMessages": [ - { - "client": "client", - "ignoreExtraMessages": true, - "ignoreMessages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped topology monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting topology monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat failed" - } - } - ], - "messages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat started", - "awaited": { - "$$exists": true - }, - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "driverConnectionId": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat succeeded", - "awaited": { - "$$exists": true - }, - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "driverConnectionId": { - "$$exists": true - }, - "serverConnectionId": { - "$$exists": true - }, - "durationMS": { - "$$type": [ - "int", - "long" - ] - }, - "reply": { - "$$matchAsDocument": { - "$$matchAsRoot": { - "ok": 1 - } - } - } - } - } - ] - } - ] - }, - { - "description": "Failing heartbeat", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeLogMessages": { - "topology": "debug" - }, - "observeEvents": [ - "serverHeartbeatFailedEvent" - ], - "uriOptions": { - "appname": "failingHeartbeatLoggingTest" - } - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "failingHeartbeatLoggingTest", - "closeConnection": true - } - } - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatFailedEvent": {} - }, - "count": 1 - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "ignoreExtraMessages": true, - "ignoreMessages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped topology monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Stopped server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Topology description changed" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting server monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Starting topology monitoring" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat started" - } - }, - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat succeeded" - } - } - ], - "messages": [ - { - "level": "debug", - "component": "topology", - "data": { - "message": "Server heartbeat failed", - "awaited": { - "$$exists": true - }, - "topologyId": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - }, - "driverConnectionId": { - "$$exists": true - }, - "durationMS": { - "$$type": [ - "int", - "long" - ] - }, - "failure": { - "$$exists": true - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/logging-standalone.yml b/testdata/server-discovery-and-monitoring/unified/logging-standalone.yml deleted file mode 100644 index 80cf98a20e..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/logging-standalone.yml +++ /dev/null @@ -1,258 +0,0 @@ -description: "standalone-logging" - -schemaVersion: "1.16" - -runOnRequirements: - - topologies: - - single - minServerVersion: "4.4" # awaitable hello - -createEntities: - - client: - id: &setupClient setupClient - -tests: - - description: "Topology lifecycle" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeLogMessages: - topology: debug - observeEvents: - - topologyDescriptionChangedEvent - # ensure the topology has been fully discovered before closing the client. - # expected events are initial server discovery and server connect event. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 2 - - name: close - object: *client - expectLogMessages: - - client: *client - ignoreMessages: - - level: debug - component: topology - data: - message: "Server heartbeat started" - - level: debug - component: topology - data: - message: "Server heartbeat succeeded" - - level: debug - component: topology - data: - message: "Server heartbeat failed" - messages: - - level: debug - component: topology - data: - message: "Starting topology monitoring" - topologyId: { $$exists: true } - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } # unknown topology - newDescription: { $$exists: true } # unknown topology, disconnected server - - level: debug - component: topology - data: - message: "Starting server monitoring" - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } - newDescription: { $$exists: true } # standalone topology - - level: debug - component: topology - data: - message: "Stopped server monitoring" - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - level: debug - component: topology - data: - message: "Topology description changed" - topologyId: { $$exists: true } - previousDescription: { $$exists: true } # standalone topology - newDescription: { $$exists: true } # unknown topology - - level: debug - component: topology - data: - message: "Stopped topology monitoring" - topologyId: { $$exists: true } - - description: Successful heartbeat - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeLogMessages: - topology: debug - observeEvents: - - serverHeartbeatSucceededEvent - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverHeartbeatSucceededEvent: {} - count: 1 - - name: close - object: *client - expectLogMessages: - - client: *client - ignoreExtraMessages: true - ignoreMessages: - - level: debug - component: topology - data: - message: "Topology description changed" - - level: debug - component: topology - data: - message: "Stopped topology monitoring" - - level: debug - component: topology - data: - message: "Stopped server monitoring" - - level: debug - component: topology - data: - message: "Topology description changed" - - level: debug - component: topology - data: - message: "Starting server monitoring" - - level: debug - component: topology - data: - message: "Starting topology monitoring" - - level: debug - component: topology - data: - message: "Server heartbeat failed" - messages: - - level: debug - component: topology - data: - message: "Server heartbeat started" - awaited: { $$exists: true } - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - driverConnectionId: { $$exists: true } - - level: debug - component: topology - data: - message: "Server heartbeat succeeded" - awaited: { $$exists: true } - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - driverConnectionId: { $$exists: true } - serverConnectionId: { $$exists: true } - durationMS: { $$type: [int, long] } - reply: - $$matchAsDocument: - "$$matchAsRoot": - ok: 1 - - description: Failing heartbeat - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeLogMessages: - topology: debug - observeEvents: - - serverHeartbeatFailedEvent - uriOptions: - appname: failingHeartbeatLoggingTest - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: "alwaysOn" - data: - failCommands: - - hello - - isMaster - appName: failingHeartbeatLoggingTest - closeConnection: true - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverHeartbeatFailedEvent: {} - count: 1 - expectLogMessages: - - client: *client - ignoreExtraMessages: true - ignoreMessages: - - level: debug - component: topology - data: - message: "Topology description changed" - - level: debug - component: topology - data: - message: "Stopped topology monitoring" - - level: debug - component: topology - data: - message: "Stopped server monitoring" - - level: debug - component: topology - data: - message: "Topology description changed" - - level: debug - component: topology - data: - message: "Starting server monitoring" - - level: debug - component: topology - data: - message: "Starting topology monitoring" - - level: debug - component: topology - data: - message: "Server heartbeat started" - - level: debug - component: topology - data: - message: "Server heartbeat succeeded" - messages: - - level: debug - component: topology - data: - message: "Server heartbeat failed" - awaited: { $$exists: true } - topologyId: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - driverConnectionId: { $$exists: true } - durationMS: { $$type: [int, long] } - failure: { $$exists: true } \ No newline at end of file diff --git a/testdata/server-discovery-and-monitoring/unified/minPoolSize-error.json b/testdata/server-discovery-and-monitoring/unified/minPoolSize-error.json deleted file mode 100644 index bd9e9fcdec..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/minPoolSize-error.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "description": "minPoolSize-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4.7", - "serverless": "forbid", - "topologies": [ - "single" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "sdam-minPoolSize-error", - "databaseName": "sdam-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Network error on minPoolSize background creation", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "skip": 3 - }, - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "SDAMminPoolSizeError", - "closeConnection": true - } - } - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "serverDescriptionChangedEvent", - "poolClearedEvent", - "poolReadyEvent" - ], - "uriOptions": { - "heartbeatFrequencyMS": 10000, - "appname": "SDAMminPoolSizeError", - "minPoolSize": 10, - "serverSelectionTimeoutMS": 1000 - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "sdam-minPoolSize-error" - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolReadyEvent": {} - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "ping": {} - }, - "commandName": "ping" - }, - "expectError": { - "isError": true - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "off" - }, - "client": "setupClient" - } - }, - { - "name": "runCommand", - "object": "database", - "arguments": { - "command": { - "ping": 1 - }, - "commandName": "ping" - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolReadyEvent": {} - }, - "count": 2 - } - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/minPoolSize-error.yml b/testdata/server-discovery-and-monitoring/unified/minPoolSize-error.yml deleted file mode 100644 index 110e647c62..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/minPoolSize-error.yml +++ /dev/null @@ -1,125 +0,0 @@ ---- -description: minPoolSize-error - -schemaVersion: "1.4" - -runOnRequirements: - # Require SERVER-49336 for failCommand + appName on the initial handshake. - - minServerVersion: "4.4.7" - serverless: forbid - topologies: - - single - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName sdam-minPoolSize-error - databaseName: &databaseName sdam-tests - documents: [] - -tests: - - description: Network error on minPoolSize background creation - operations: - # Configure the initial monitor handshake to succeed but the - # first or second background minPoolSize establishments to fail. - - name: failPoint - object: testRunner - arguments: - client: *setupClient - failPoint: - configureFailPoint: failCommand - mode: - skip: 3 - data: - failCommands: - - hello - - isMaster - appName: SDAMminPoolSizeError - closeConnection: true - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - serverDescriptionChangedEvent - - poolClearedEvent - - poolReadyEvent - uriOptions: - heartbeatFrequencyMS: 10000 - appname: SDAMminPoolSizeError - minPoolSize: 10 - serverSelectionTimeoutMS: 1000 - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # Wait for monitor to succeed handshake and mark the pool as ready. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolReadyEvent: {} - count: 1 - # Background connection establishment ensuring minPoolSize should fail, - # causing the pool to be cleared. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # The server should be marked as Unknown as part of this. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - # Executing a command should fail server selection due to not being able - # to find the primary. - - name: runCommand - object: *database - arguments: - command: - ping: {} - commandName: ping - expectError: - isError: true - # Disable the failpoint, allowing the monitor to discover the primary again. - - name: failPoint - object: testRunner - arguments: - failPoint: - configureFailPoint: failCommand - mode: "off" - client: *setupClient - # Perform an operation to ensure the node is discovered. - - name: runCommand - object: *database - arguments: - command: - ping: 1 - commandName: ping - # Assert that the monitor discovered the primary and mark the pool as ready again. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolReadyEvent: {} - count: 2 diff --git a/testdata/server-discovery-and-monitoring/unified/pool-cleared-error.json b/testdata/server-discovery-and-monitoring/unified/pool-cleared-error.json deleted file mode 100644 index b7f6924f2b..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/pool-cleared-error.json +++ /dev/null @@ -1,373 +0,0 @@ -{ - "description": "pool-cleared-error", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.9", - "serverless": "forbid", - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "pool-cleared-error", - "databaseName": "sdam-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "PoolClearedError does not mark server unknown", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": true, - "maxPoolSize": 1, - "appname": "poolClearedErrorTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "pool-cleared-error" - } - } - ] - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 1 - } - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "blockConnection": true, - "blockTimeMS": 100, - "closeConnection": true, - "appName": "poolClearedErrorTest" - } - }, - "client": "setupClient" - } - }, - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "thread": { - "id": "thread0" - } - }, - { - "thread": { - "id": "thread1" - } - }, - { - "thread": { - "id": "thread2" - } - }, - { - "thread": { - "id": "thread3" - } - }, - { - "thread": { - "id": "thread4" - } - }, - { - "thread": { - "id": "thread5" - } - } - ] - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread0", - "operation": { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 2 - } - } - } - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread1", - "operation": { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 3 - } - } - } - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread2", - "operation": { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 4 - } - } - } - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread3", - "operation": { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 5 - } - } - } - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread4", - "operation": { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 6 - } - } - } - } - }, - { - "name": "runOnThread", - "object": "testRunner", - "arguments": { - "thread": "thread5", - "operation": { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 7 - } - } - } - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread0" - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread1" - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread2" - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread3" - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread4" - } - }, - { - "name": "waitForThread", - "object": "testRunner", - "arguments": { - "thread": "thread5" - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 8 - } - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 1 - } - } - ], - "outcome": [ - { - "collectionName": "pool-cleared-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - }, - { - "_id": 5 - }, - { - "_id": 6 - }, - { - "_id": 7 - }, - { - "_id": 8 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/pool-cleared-error.yml b/testdata/server-discovery-and-monitoring/unified/pool-cleared-error.yml deleted file mode 100644 index f3bad7959e..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/pool-cleared-error.yml +++ /dev/null @@ -1,239 +0,0 @@ ---- -description: pool-cleared-error - -schemaVersion: "1.4" - -runOnRequirements: - # This test requires retryable writes, failCommand appName, and - # failCommand blockConnection with closeConnection:true (SERVER-53512). - - minServerVersion: "4.9" - serverless: forbid - topologies: - - replicaset - - sharded - -createEntities: - - client: - id: &setupClient setupClient - useMultipleMongoses: false - -initialData: &initialData - - collectionName: &collectionName pool-cleared-error - databaseName: &databaseName sdam-tests - documents: [] - -tests: - - description: PoolClearedError does not mark server unknown - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: - - serverDescriptionChangedEvent - - poolClearedEvent - uriOptions: - retryWrites: true - maxPoolSize: 1 - appname: poolClearedErrorTest - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # Perform an operation to ensure the node is discovered. - - name: insertOne - object: *collection - arguments: - document: - _id: 1 - # Configure the next insert to fail with a network error which will - # clear the pool leaving it paused until the server is rediscovered. - - name: failPoint - object: testRunner - arguments: - failPoint: - configureFailPoint: failCommand - mode: - times: 1 - data: - failCommands: - - insert - blockConnection: true - blockTimeMS: 100 - closeConnection: true - appName: poolClearedErrorTest - client: *setupClient - # Start threads. - - name: createEntities - object: testRunner - arguments: - entities: - - thread: - id: &thread0 thread0 - - thread: - id: &thread1 thread1 - - thread: - id: &thread2 thread2 - - thread: - id: &thread3 thread3 - - thread: - id: &thread4 thread4 - - thread: - id: &thread5 thread5 - # Perform concurrent insert operations. The first one to execute will - # fail with a network error, mark the server Unknown, clear the pool, - # and retry. - # The other operations will either: - # - Notice the pool is paused, fail with a PoolClearedError, and retry. - # - Or block waiting in server selection until the server is - # rediscovered. - # - # Note that this test does not guarantee that a PoolClearedError will be - # raised but it is likely since the initial insert is delayed. - - name: runOnThread - object: testRunner - arguments: - thread: *thread0 - operation: - name: insertOne - object: *collection - arguments: - document: - _id: 2 - - name: runOnThread - object: testRunner - arguments: - thread: *thread1 - operation: - name: insertOne - object: *collection - arguments: - document: - _id: 3 - - name: runOnThread - object: testRunner - arguments: - thread: *thread2 - operation: - name: insertOne - object: *collection - arguments: - document: - _id: 4 - - name: runOnThread - object: testRunner - arguments: - thread: *thread3 - operation: - name: insertOne - object: *collection - arguments: - document: - _id: 5 - - name: runOnThread - object: testRunner - arguments: - thread: *thread4 - operation: - name: insertOne - object: *collection - arguments: - document: - _id: 6 - - name: runOnThread - object: testRunner - arguments: - thread: *thread5 - operation: - name: insertOne - object: *collection - arguments: - document: - _id: 7 - # Stop threads. - - name: waitForThread - object: testRunner - arguments: - thread: *thread0 - - name: waitForThread - object: testRunner - arguments: - thread: *thread1 - - name: waitForThread - object: testRunner - arguments: - thread: *thread2 - - name: waitForThread - object: testRunner - arguments: - thread: *thread3 - - name: waitForThread - object: testRunner - arguments: - thread: *thread4 - - name: waitForThread - object: testRunner - arguments: - thread: *thread5 - # The first shutdown error should mark the server Unknown and then clear - # the pool. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - # Perform an operation to ensure the node still usable. - - name: insertOne - object: *collection - arguments: - document: - _id: 8 - # Assert the server was marked Unknown and pool was cleared exactly once. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 1 - - # Order of operations is non-deterministic so we cannot check events. - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 - - _id: 5 - - _id: 6 - - _id: 7 - - _id: 8 diff --git a/testdata/server-discovery-and-monitoring/unified/rediscover-quickly-after-step-down.json b/testdata/server-discovery-and-monitoring/unified/rediscover-quickly-after-step-down.json deleted file mode 100644 index 3147a07a1e..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/rediscover-quickly-after-step-down.json +++ /dev/null @@ -1,242 +0,0 @@ -{ - "description": "rediscover-quickly-after-step-down", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid", - "topologies": [ - "replicaset" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient" - } - }, - { - "database": { - "id": "adminDatabase", - "client": "setupClient", - "databaseName": "admin" - } - } - ], - "initialData": [ - { - "collectionName": "test-replSetStepDown", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "Rediscover quickly after replSetStepDown", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "poolClearedEvent", - "commandStartedEvent" - ], - "uriOptions": { - "appname": "replSetStepDownTest", - "heartbeatFrequencyMS": 60000, - "serverSelectionTimeoutMS": 5000, - "w": "majority" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test-replSetStepDown" - } - } - ] - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - }, - { - "name": "recordTopologyDescription", - "object": "testRunner", - "arguments": { - "client": "client", - "id": "topologyDescription" - } - }, - { - "name": "assertTopologyType", - "object": "testRunner", - "arguments": { - "topologyDescription": "topologyDescription", - "topologyType": "ReplicaSetWithPrimary" - } - }, - { - "name": "runCommand", - "object": "adminDatabase", - "arguments": { - "command": { - "replSetFreeze": 0 - }, - "readPreference": { - "mode": "secondary" - }, - "commandName": "replSetFreeze" - } - }, - { - "name": "runCommand", - "object": "adminDatabase", - "arguments": { - "command": { - "replSetStepDown": 30, - "secondaryCatchUpPeriodSecs": 30, - "force": false - }, - "commandName": "replSetStepDown" - } - }, - { - "name": "waitForPrimaryChange", - "object": "testRunner", - "arguments": { - "client": "client", - "priorTopologyDescription": "topologyDescription", - "timeoutMS": 15000 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "poolClearedEvent": {} - }, - "count": 0 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test-replSetStepDown", - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test-replSetStepDown", - "documents": [ - { - "_id": 5 - }, - { - "_id": 6 - } - ] - }, - "commandName": "insert", - "databaseName": "sdam-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test-replSetStepDown", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - }, - { - "_id": 5 - }, - { - "_id": 6 - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/rediscover-quickly-after-step-down.yml b/testdata/server-discovery-and-monitoring/unified/rediscover-quickly-after-step-down.yml deleted file mode 100644 index f3e7509160..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/rediscover-quickly-after-step-down.yml +++ /dev/null @@ -1,144 +0,0 @@ ---- -description: rediscover-quickly-after-step-down - -schemaVersion: "1.4" - -runOnRequirements: - # 4.4 is required for streaming. - # A replica set is required for replSetStepDown. - - minServerVersion: "4.4" - serverless: forbid - topologies: - - replicaset - -createEntities: - - client: - id: &setupClient setupClient - - database: - id: &adminDatabase adminDatabase - client: *setupClient - databaseName: admin - -initialData: &initialData - - collectionName: &collectionName test-replSetStepDown - databaseName: &databaseName sdam-tests - documents: - - _id: 1 - - _id: 2 - -tests: - - description: Rediscover quickly after replSetStepDown - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeEvents: - - poolClearedEvent - - commandStartedEvent - uriOptions: - appname: replSetStepDownTest - # Configure a large heartbeatFrequencyMS - heartbeatFrequencyMS: 60000 - # Configure a much smaller server selection timeout so that the test - # will error when it cannot discover the new primary soon. - serverSelectionTimeoutMS: 5000 - w: majority - - database: - id: &database database - client: *client - databaseName: *databaseName - - collection: - id: &collection collection - database: *database - collectionName: *collectionName - # Discover the primary. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 3 - - _id: 4 - - name: recordTopologyDescription - object: testRunner - arguments: - client: *client - id: &topologyDescription topologyDescription - - name: assertTopologyType - object: testRunner - arguments: - topologyDescription: *topologyDescription - topologyType: ReplicaSetWithPrimary - # Unfreeze a secondary with replSetFreeze:0 to ensure a speedy election. - - name: runCommand - object: *adminDatabase - arguments: - command: - replSetFreeze: 0 - readPreference: - mode: secondary - commandName: replSetFreeze - # Run replSetStepDown on the meta client. - - name: runCommand - object: *adminDatabase - arguments: - command: - replSetStepDown: 30 - secondaryCatchUpPeriodSecs: 30 - force: false - commandName: replSetStepDown - - name: waitForPrimaryChange - object: testRunner - arguments: - client: *client - priorTopologyDescription: *topologyDescription - # We use a relatively large timeout here to workaround slow - # elections on Windows, possibly caused by SERVER-48154. - timeoutMS: 15000 - # Rediscover the new primary. - - name: insertMany - object: *collection - arguments: - documents: - - _id: 5 - - _id: 6 - # Assert that no pools were cleared. - - name: assertEventCount - object: testRunner - arguments: - client: *client - event: - poolClearedEvent: {} - count: 0 - expectEvents: - - client: *client - eventType: command - events: - - commandStartedEvent: - command: - insert: test-replSetStepDown - documents: - - _id: 3 - - _id: 4 - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - insert: test-replSetStepDown - documents: - - _id: 5 - - _id: 6 - commandName: insert - databaseName: *databaseName - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 - - _id: 5 - - _id: 6 diff --git a/testdata/server-discovery-and-monitoring/unified/replicaset-emit-topology-changed-before-close.json b/testdata/server-discovery-and-monitoring/unified/replicaset-emit-topology-changed-before-close.json deleted file mode 100644 index 066a4ffee5..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/replicaset-emit-topology-changed-before-close.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "description": "replicaset-emit-topology-description-changed-before-close", - "schemaVersion": "1.20", - "runOnRequirements": [ - { - "topologies": [ - "replicaset" - ], - "minServerVersion": "4.4" - } - ], - "tests": [ - { - "description": "Topology lifecycle", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "topologyDescriptionChangedEvent", - "topologyOpeningEvent", - "topologyClosedEvent" - ] - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 4 - } - }, - { - "name": "close", - "object": "client" - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "sdam", - "ignoreExtraEvents": false, - "events": [ - { - "topologyOpeningEvent": {} - }, - { - "topologyDescriptionChangedEvent": {} - }, - { - "topologyDescriptionChangedEvent": {} - }, - { - "topologyDescriptionChangedEvent": {} - }, - { - "topologyDescriptionChangedEvent": {} - }, - { - "topologyDescriptionChangedEvent": { - "previousDescription": { - "type": "ReplicaSetWithPrimary" - }, - "newDescription": { - "type": "Unknown" - } - } - }, - { - "topologyClosedEvent": {} - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/replicaset-emit-topology-changed-before-close.yml b/testdata/server-discovery-and-monitoring/unified/replicaset-emit-topology-changed-before-close.yml deleted file mode 100644 index d0a1158ea9..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/replicaset-emit-topology-changed-before-close.yml +++ /dev/null @@ -1,49 +0,0 @@ -description: "replicaset-emit-topology-description-changed-before-close" - -schemaVersion: "1.20" - -runOnRequirements: - - topologies: - - replicaset - minServerVersion: "4.4" # awaitable hello - -tests: - - description: "Topology lifecycle" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeEvents: - - topologyDescriptionChangedEvent - - topologyOpeningEvent - - topologyClosedEvent - # ensure the topology has been fully discovered before closing the client. - # expected events are initial server discovery and 3 server connect events. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 4 - - name: close - object: *client - expectEvents: - - client: *client - eventType: sdam - ignoreExtraEvents: false - events: - - topologyOpeningEvent: {} - - topologyDescriptionChangedEvent: {} # unknown -> replset no primary - - topologyDescriptionChangedEvent: {} # server connected - - topologyDescriptionChangedEvent: {} # server connected - - topologyDescriptionChangedEvent: {} # server connected - - topologyDescriptionChangedEvent: # replicaset -> unknown - previousDescription: - type: "ReplicaSetWithPrimary" - newDescription: - type: "Unknown" - - topologyClosedEvent: {} diff --git a/testdata/server-discovery-and-monitoring/unified/serverMonitoringMode.json b/testdata/server-discovery-and-monitoring/unified/serverMonitoringMode.json deleted file mode 100644 index 4b492f7d85..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/serverMonitoringMode.json +++ /dev/null @@ -1,512 +0,0 @@ -{ - "description": "serverMonitoringMode", - "schemaVersion": "1.17", - "runOnRequirements": [ - { - "topologies": [ - "single", - "sharded", - "sharded-replicaset" - ], - "serverless": "forbid" - } - ], - "tests": [ - { - "description": "connect with serverMonitoringMode=auto >=4.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4.0" - } - ], - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "serverMonitoringMode": "auto" - }, - "useMultipleMongoses": false, - "observeEvents": [ - "serverHeartbeatStartedEvent", - "serverHeartbeatSucceededEvent", - "serverHeartbeatFailedEvent" - ] - } - }, - { - "database": { - "id": "db", - "client": "client", - "databaseName": "sdam-tests" - } - } - ] - } - }, - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectResult": { - "ok": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatStartedEvent": {} - }, - "count": 2 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "sdam", - "ignoreExtraEvents": true, - "events": [ - { - "serverHeartbeatStartedEvent": { - "awaited": false - } - }, - { - "serverHeartbeatSucceededEvent": { - "awaited": false - } - }, - { - "serverHeartbeatStartedEvent": { - "awaited": true - } - } - ] - } - ] - }, - { - "description": "connect with serverMonitoringMode=auto <4.4", - "runOnRequirements": [ - { - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "serverMonitoringMode": "auto", - "heartbeatFrequencyMS": 500 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "serverHeartbeatStartedEvent", - "serverHeartbeatSucceededEvent", - "serverHeartbeatFailedEvent" - ] - } - }, - { - "database": { - "id": "db", - "client": "client", - "databaseName": "sdam-tests" - } - } - ] - } - }, - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectResult": { - "ok": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatStartedEvent": {} - }, - "count": 2 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "sdam", - "ignoreExtraEvents": true, - "events": [ - { - "serverHeartbeatStartedEvent": { - "awaited": false - } - }, - { - "serverHeartbeatSucceededEvent": { - "awaited": false - } - }, - { - "serverHeartbeatStartedEvent": { - "awaited": false - } - } - ] - } - ] - }, - { - "description": "connect with serverMonitoringMode=stream >=4.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4.0" - } - ], - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "serverMonitoringMode": "stream" - }, - "useMultipleMongoses": false, - "observeEvents": [ - "serverHeartbeatStartedEvent", - "serverHeartbeatSucceededEvent", - "serverHeartbeatFailedEvent" - ] - } - }, - { - "database": { - "id": "db", - "client": "client", - "databaseName": "sdam-tests" - } - } - ] - } - }, - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectResult": { - "ok": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatStartedEvent": {} - }, - "count": 2 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "sdam", - "ignoreExtraEvents": true, - "events": [ - { - "serverHeartbeatStartedEvent": { - "awaited": false - } - }, - { - "serverHeartbeatSucceededEvent": { - "awaited": false - } - }, - { - "serverHeartbeatStartedEvent": { - "awaited": true - } - } - ] - } - ] - }, - { - "description": "connect with serverMonitoringMode=stream <4.4", - "runOnRequirements": [ - { - "maxServerVersion": "4.2.99" - } - ], - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "serverMonitoringMode": "stream", - "heartbeatFrequencyMS": 500 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "serverHeartbeatStartedEvent", - "serverHeartbeatSucceededEvent", - "serverHeartbeatFailedEvent" - ] - } - }, - { - "database": { - "id": "db", - "client": "client", - "databaseName": "sdam-tests" - } - } - ] - } - }, - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectResult": { - "ok": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatStartedEvent": {} - }, - "count": 2 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "sdam", - "ignoreExtraEvents": true, - "events": [ - { - "serverHeartbeatStartedEvent": { - "awaited": false - } - }, - { - "serverHeartbeatSucceededEvent": { - "awaited": false - } - }, - { - "serverHeartbeatStartedEvent": { - "awaited": false - } - } - ] - } - ] - }, - { - "description": "connect with serverMonitoringMode=poll", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "serverMonitoringMode": "poll", - "heartbeatFrequencyMS": 500 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "serverHeartbeatStartedEvent", - "serverHeartbeatSucceededEvent", - "serverHeartbeatFailedEvent" - ] - } - }, - { - "database": { - "id": "db", - "client": "client", - "databaseName": "sdam-tests" - } - } - ] - } - }, - { - "name": "runCommand", - "object": "db", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1 - } - }, - "expectResult": { - "ok": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatStartedEvent": {} - }, - "count": 2 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "sdam", - "ignoreExtraEvents": true, - "events": [ - { - "serverHeartbeatStartedEvent": { - "awaited": false - } - }, - { - "serverHeartbeatSucceededEvent": { - "awaited": false - } - }, - { - "serverHeartbeatStartedEvent": { - "awaited": false - } - } - ] - } - ] - }, - { - "description": "poll waits after successful heartbeat", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "uriOptions": { - "serverMonitoringMode": "poll", - "heartbeatFrequencyMS": 1000000 - }, - "useMultipleMongoses": false, - "observeEvents": [ - "serverHeartbeatStartedEvent", - "serverHeartbeatSucceededEvent" - ] - } - }, - { - "database": { - "id": "db", - "client": "client", - "databaseName": "sdam-tests" - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatSucceededEvent": {} - }, - "count": 1 - } - }, - { - "name": "wait", - "object": "testRunner", - "arguments": { - "ms": 500 - } - }, - { - "name": "assertEventCount", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatStartedEvent": {} - }, - "count": 1 - } - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/serverMonitoringMode.yml b/testdata/server-discovery-and-monitoring/unified/serverMonitoringMode.yml deleted file mode 100644 index 5a81f0e1ad..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/serverMonitoringMode.yml +++ /dev/null @@ -1,213 +0,0 @@ -description: serverMonitoringMode - -schemaVersion: "1.17" -# These tests cannot run on replica sets because the order of the expected -# SDAM events are non-deterministic when monitoring multiple servers. -# They also cannot run on Serverless or load balanced clusters where SDAM is disabled. -runOnRequirements: - - topologies: [single, sharded, sharded-replicaset] - serverless: forbid -tests: - - description: "connect with serverMonitoringMode=auto >=4.4" - runOnRequirements: - - minServerVersion: "4.4.0" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: client - uriOptions: - serverMonitoringMode: "auto" - useMultipleMongoses: false - observeEvents: - - serverHeartbeatStartedEvent - - serverHeartbeatSucceededEvent - - serverHeartbeatFailedEvent - - database: - id: db - client: client - databaseName: sdam-tests - - &ping - name: runCommand - object: db - arguments: - commandName: ping - command: { ping: 1 } - expectResult: { ok: 1 } - # Wait for the second serverHeartbeatStartedEvent to ensure we start streaming. - - &waitForSecondHeartbeatStarted - name: waitForEvent - object: testRunner - arguments: - client: client - event: - serverHeartbeatStartedEvent: {} - count: 2 - expectEvents: &streamingStartedEvents - - client: client - eventType: sdam - ignoreExtraEvents: true - events: - - serverHeartbeatStartedEvent: - awaited: False - - serverHeartbeatSucceededEvent: - awaited: False - - serverHeartbeatStartedEvent: - awaited: True - - - description: "connect with serverMonitoringMode=auto <4.4" - runOnRequirements: - - maxServerVersion: "4.2.99" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: client - uriOptions: - serverMonitoringMode: "auto" - heartbeatFrequencyMS: 500 - useMultipleMongoses: false - observeEvents: - - serverHeartbeatStartedEvent - - serverHeartbeatSucceededEvent - - serverHeartbeatFailedEvent - - database: - id: db - client: client - databaseName: sdam-tests - - *ping - # Wait for the second serverHeartbeatStartedEvent to ensure we do not stream. - - *waitForSecondHeartbeatStarted - expectEvents: &pollingStartedEvents - - client: client - eventType: sdam - ignoreExtraEvents: true - events: - - serverHeartbeatStartedEvent: - awaited: False - - serverHeartbeatSucceededEvent: - awaited: False - - serverHeartbeatStartedEvent: - awaited: False - - - description: "connect with serverMonitoringMode=stream >=4.4" - runOnRequirements: - - minServerVersion: "4.4.0" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: client - uriOptions: - serverMonitoringMode: "stream" - useMultipleMongoses: false - observeEvents: - - serverHeartbeatStartedEvent - - serverHeartbeatSucceededEvent - - serverHeartbeatFailedEvent - - database: - id: db - client: client - databaseName: sdam-tests - - *ping - # Wait for the second serverHeartbeatStartedEvent to ensure we start streaming. - - *waitForSecondHeartbeatStarted - expectEvents: *streamingStartedEvents - - - description: "connect with serverMonitoringMode=stream <4.4" - runOnRequirements: - - maxServerVersion: "4.2.99" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: client - uriOptions: - serverMonitoringMode: "stream" - heartbeatFrequencyMS: 500 - useMultipleMongoses: false - observeEvents: - - serverHeartbeatStartedEvent - - serverHeartbeatSucceededEvent - - serverHeartbeatFailedEvent - - database: - id: db - client: client - databaseName: sdam-tests - - *ping - # Wait for the second serverHeartbeatStartedEvent to ensure we do not stream. - - *waitForSecondHeartbeatStarted - expectEvents: *pollingStartedEvents - - - description: "connect with serverMonitoringMode=poll" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: client - uriOptions: - serverMonitoringMode: "poll" - heartbeatFrequencyMS: 500 - useMultipleMongoses: false - observeEvents: - - serverHeartbeatStartedEvent - - serverHeartbeatSucceededEvent - - serverHeartbeatFailedEvent - - database: - id: db - client: client - databaseName: sdam-tests - - *ping - # Wait for the second serverHeartbeatStartedEvent to ensure we do not stream. - - *waitForSecondHeartbeatStarted - expectEvents: *pollingStartedEvents - - - description: "poll waits after successful heartbeat" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: client - uriOptions: - serverMonitoringMode: "poll" - heartbeatFrequencyMS: 1000000 - useMultipleMongoses: false - observeEvents: - - serverHeartbeatStartedEvent - - serverHeartbeatSucceededEvent - - database: - id: db - client: client - databaseName: sdam-tests - # Wait for the first serverHeartbeatSucceededEvent to ensure we start polling. - - name: waitForEvent - object: testRunner - arguments: - client: client - event: - serverHeartbeatSucceededEvent: {} - count: 1 - # Wait for a bit longer to ensure we wait heartbeatFrequencyMS before starting the next check. - - name: wait - object: testRunner - arguments: - ms: 500 - - name: assertEventCount - object: testRunner - arguments: - client: client - event: - serverHeartbeatStartedEvent: {} - count: 1 diff --git a/testdata/server-discovery-and-monitoring/unified/sharded-emit-topology-changed-before-close.json b/testdata/server-discovery-and-monitoring/unified/sharded-emit-topology-changed-before-close.json deleted file mode 100644 index 98fb585531..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/sharded-emit-topology-changed-before-close.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "description": "sharded-emit-topology-description-changed-before-close", - "schemaVersion": "1.20", - "runOnRequirements": [ - { - "topologies": [ - "sharded" - ], - "minServerVersion": "4.4" - } - ], - "tests": [ - { - "description": "Topology lifecycle", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "topologyDescriptionChangedEvent", - "topologyOpeningEvent", - "topologyClosedEvent" - ], - "useMultipleMongoses": true - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 3 - } - }, - { - "name": "close", - "object": "client" - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "sdam", - "ignoreExtraEvents": false, - "events": [ - { - "topologyOpeningEvent": {} - }, - { - "topologyDescriptionChangedEvent": { - "previousDescription": { - "type": "Unknown" - }, - "newDescription": { - "type": "Unknown" - } - } - }, - { - "topologyDescriptionChangedEvent": { - "previousDescription": { - "type": "Unknown" - }, - "newDescription": { - "type": "Sharded" - } - } - }, - { - "topologyDescriptionChangedEvent": { - "previousDescription": { - "type": "Sharded" - }, - "newDescription": { - "type": "Sharded" - } - } - }, - { - "topologyDescriptionChangedEvent": { - "previousDescription": { - "type": "Sharded" - }, - "newDescription": { - "type": "Unknown" - } - } - }, - { - "topologyClosedEvent": {} - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/sharded-emit-topology-changed-before-close.yml b/testdata/server-discovery-and-monitoring/unified/sharded-emit-topology-changed-before-close.yml deleted file mode 100644 index cb6cc5ad4d..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/sharded-emit-topology-changed-before-close.yml +++ /dev/null @@ -1,62 +0,0 @@ -description: "sharded-emit-topology-description-changed-before-close" - -schemaVersion: "1.20" - -runOnRequirements: - - topologies: - - sharded - minServerVersion: "4.4" # awaitable hello - -tests: - - description: "Topology lifecycle" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeEvents: - - topologyDescriptionChangedEvent - - topologyOpeningEvent - - topologyClosedEvent - useMultipleMongoses: true - # ensure the topology has been fully discovered before closing the client. - # expected events are initial cluster type change from unknown to sharded and connect events - # for each of 2 servers - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 3 - - name: close - object: *client - expectEvents: - - client: *client - eventType: sdam - ignoreExtraEvents: false - events: - - topologyOpeningEvent: {} - - topologyDescriptionChangedEvent: # unknown -> unknown w disconnected server - previousDescription: - type: "Unknown" - newDescription: - type: "Unknown" - - topologyDescriptionChangedEvent: # server connected - previousDescription: - type: "Unknown" - newDescription: - type: "Sharded" - - topologyDescriptionChangedEvent: # server connected - previousDescription: - type: "Sharded" - newDescription: - type: "Sharded" - - topologyDescriptionChangedEvent: # sharded -> unknown - previousDescription: - type: "Sharded" - newDescription: - type: "Unknown" - - topologyClosedEvent: {} diff --git a/testdata/server-discovery-and-monitoring/unified/standalone-emit-topology-changed-before-close.json b/testdata/server-discovery-and-monitoring/unified/standalone-emit-topology-changed-before-close.json deleted file mode 100644 index 27b5444d54..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/standalone-emit-topology-changed-before-close.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "description": "standalone-emit-topology-description-changed-before-close", - "schemaVersion": "1.20", - "runOnRequirements": [ - { - "topologies": [ - "single" - ], - "minServerVersion": "4.4" - } - ], - "tests": [ - { - "description": "Topology lifecycle", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "topologyDescriptionChangedEvent", - "topologyOpeningEvent", - "topologyClosedEvent" - ] - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 2 - } - }, - { - "name": "close", - "object": "client" - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "sdam", - "ignoreExtraEvents": false, - "events": [ - { - "topologyOpeningEvent": {} - }, - { - "topologyDescriptionChangedEvent": { - "previousDescription": { - "type": "Unknown" - }, - "newDescription": { - "type": "Unknown" - } - } - }, - { - "topologyDescriptionChangedEvent": { - "previousDescription": { - "type": "Unknown" - }, - "newDescription": { - "type": "Single" - } - } - }, - { - "topologyDescriptionChangedEvent": { - "previousDescription": { - "type": "Single" - }, - "newDescription": { - "type": "Unknown" - } - } - }, - { - "topologyClosedEvent": {} - } - ] - } - ] - } - ] -} diff --git a/testdata/server-discovery-and-monitoring/unified/standalone-emit-topology-changed-before-close.yml b/testdata/server-discovery-and-monitoring/unified/standalone-emit-topology-changed-before-close.yml deleted file mode 100644 index 20fa380bd5..0000000000 --- a/testdata/server-discovery-and-monitoring/unified/standalone-emit-topology-changed-before-close.yml +++ /dev/null @@ -1,55 +0,0 @@ -description: "standalone-emit-topology-description-changed-before-close" - -schemaVersion: "1.20" - -runOnRequirements: - - topologies: - - single - minServerVersion: "4.4" # awaitable hello - -tests: - - description: "Topology lifecycle" - operations: - - name: createEntities - object: testRunner - arguments: - entities: - - client: - id: &client client - observeEvents: - - topologyDescriptionChangedEvent - - topologyOpeningEvent - - topologyClosedEvent - # ensure the topology has been fully discovered before closing the client. - # expected events are initial server discovery and server connect event. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 2 - - name: close - object: *client - expectEvents: - - client: *client - eventType: sdam - ignoreExtraEvents: false - events: - - topologyOpeningEvent: {} - - topologyDescriptionChangedEvent: # unknown -> unknown w disconnected server - previousDescription: - type: "Unknown" - newDescription: - type: "Unknown" - - topologyDescriptionChangedEvent: # unknown w disconnected server -> standalone - previousDescription: - type: "Unknown" - newDescription: - type: "Single" - - topologyDescriptionChangedEvent: # standalone -> unknown - previousDescription: - type: "Single" - newDescription: - type: "Unknown" - - topologyClosedEvent: {} diff --git a/testdata/server-selection/in_window/equilibrium.json b/testdata/server-selection/in_window/equilibrium.json deleted file mode 100644 index c5f177d49b..0000000000 --- a/testdata/server-selection/in_window/equilibrium.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "When in equilibrium selection is evenly distributed", - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "b:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "c:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "mocked_topology_state": [ - { - "address": "a:27017", - "operation_count": 5 - }, - { - "address": "b:27017", - "operation_count": 5 - }, - { - "address": "c:27017", - "operation_count": 5 - } - ], - "iterations": 2000, - "outcome": { - "tolerance": 0.05, - "expected_frequencies": { - "a:27017": 0.33, - "b:27017": 0.33, - "c:27017": 0.33 - } - } -} diff --git a/testdata/server-selection/in_window/equilibrium.yml b/testdata/server-selection/in_window/equilibrium.yml deleted file mode 100644 index a79fa21b1d..0000000000 --- a/testdata/server-selection/in_window/equilibrium.yml +++ /dev/null @@ -1,27 +0,0 @@ -description: When in equilibrium selection is evenly distributed -topology_description: - type: Sharded - servers: - - address: a:27017 - avg_rtt_ms: 35 - type: Mongos - - address: b:27017 - avg_rtt_ms: 35 - type: Mongos - - address: c:27017 - avg_rtt_ms: 35 - type: Mongos -mocked_topology_state: - - address: a:27017 - operation_count: 5 - - address: b:27017 - operation_count: 5 - - address: c:27017 - operation_count: 5 -iterations: 2000 -outcome: - tolerance: 0.05 - expected_frequencies: - a:27017: 0.33 - b:27017: 0.33 - c:27017: 0.33 diff --git a/testdata/server-selection/in_window/many-choices.json b/testdata/server-selection/in_window/many-choices.json deleted file mode 100644 index 7e940513ef..0000000000 --- a/testdata/server-selection/in_window/many-choices.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "description": "Selections from many choices occur at correct frequencies", - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "b:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "c:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "d:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "e:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "f:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "g:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "i:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "mocked_topology_state": [ - { - "address": "a:27017", - "operation_count": 0 - }, - { - "address": "b:27017", - "operation_count": 5 - }, - { - "address": "c:27017", - "operation_count": 5 - }, - { - "address": "d:27017", - "operation_count": 10 - }, - { - "address": "e:27017", - "operation_count": 10 - }, - { - "address": "f:27017", - "operation_count": 20 - }, - { - "address": "g:27017", - "operation_count": 20 - }, - { - "address": "h:27017", - "operation_count": 50 - }, - { - "address": "i:27017", - "operation_count": 60 - } - ], - "iterations": 10000, - "outcome": { - "tolerance": 0.03, - "expected_frequencies": { - "a:27017": 0.22, - "b:27017": 0.18, - "c:27017": 0.18, - "d:27017": 0.125, - "e:27017": 0.125, - "f:27017": 0.074, - "g:27017": 0.074, - "h:27017": 0.0277, - "i:27017": 0 - } - } -} diff --git a/testdata/server-selection/in_window/many-choices.yml b/testdata/server-selection/in_window/many-choices.yml deleted file mode 100644 index 6b3292129d..0000000000 --- a/testdata/server-selection/in_window/many-choices.yml +++ /dev/null @@ -1,63 +0,0 @@ -description: Selections from many choices occur at correct frequencies -topology_description: - type: Sharded - servers: - - address: a:27017 - avg_rtt_ms: 35 - type: Mongos - - address: b:27017 - avg_rtt_ms: 35 - type: Mongos - - address: c:27017 - avg_rtt_ms: 35 - type: Mongos - - address: d:27017 - avg_rtt_ms: 35 - type: Mongos - - address: e:27017 - avg_rtt_ms: 35 - type: Mongos - - address: f:27017 - avg_rtt_ms: 35 - type: Mongos - - address: g:27017 - avg_rtt_ms: 35 - type: Mongos - - address: h:27017 - avg_rtt_ms: 35 - type: Mongos - - address: i:27017 - avg_rtt_ms: 35 - type: Mongos -mocked_topology_state: - - address: a:27017 - operation_count: 0 - - address: b:27017 - operation_count: 5 - - address: c:27017 - operation_count: 5 - - address: d:27017 - operation_count: 10 - - address: e:27017 - operation_count: 10 - - address: f:27017 - operation_count: 20 - - address: g:27017 - operation_count: 20 - - address: h:27017 - operation_count: 50 - - address: i:27017 - operation_count: 60 -iterations: 10000 -outcome: - tolerance: 0.03 - expected_frequencies: - a:27017: 0.22 - b:27017: 0.18 - c:27017: 0.18 - d:27017: 0.125 - e:27017: 0.125 - f:27017: 0.074 - g:27017: 0.074 - h:27017: 0.0277 - i:27017: 0 diff --git a/testdata/server-selection/in_window/one-least-two-tied.json b/testdata/server-selection/in_window/one-least-two-tied.json deleted file mode 100644 index ed7526e716..0000000000 --- a/testdata/server-selection/in_window/one-least-two-tied.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "Least operations gets most selections, two tied share the rest", - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "b:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "c:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "mocked_topology_state": [ - { - "address": "a:27017", - "operation_count": 16 - }, - { - "address": "b:27017", - "operation_count": 10 - }, - { - "address": "c:27017", - "operation_count": 16 - } - ], - "iterations": 2000, - "outcome": { - "tolerance": 0.05, - "expected_frequencies": { - "a:27017": 0.165, - "b:27017": 0.66, - "c:27017": 0.165 - } - } -} diff --git a/testdata/server-selection/in_window/one-least-two-tied.yml b/testdata/server-selection/in_window/one-least-two-tied.yml deleted file mode 100644 index e05bdfaf70..0000000000 --- a/testdata/server-selection/in_window/one-least-two-tied.yml +++ /dev/null @@ -1,27 +0,0 @@ -description: Least operations gets most selections, two tied share the rest -topology_description: - type: Sharded - servers: - - address: a:27017 - avg_rtt_ms: 35 - type: Mongos - - address: b:27017 - avg_rtt_ms: 35 - type: Mongos - - address: c:27017 - avg_rtt_ms: 35 - type: Mongos -mocked_topology_state: - - address: a:27017 - operation_count: 16 - - address: b:27017 - operation_count: 10 - - address: c:27017 - operation_count: 16 -iterations: 2000 -outcome: - tolerance: 0.05 - expected_frequencies: - a:27017: 0.165 - b:27017: 0.66 - c:27017: 0.165 diff --git a/testdata/server-selection/in_window/rs-equilibrium.json b/testdata/server-selection/in_window/rs-equilibrium.json deleted file mode 100644 index 61c6687e50..0000000000 --- a/testdata/server-selection/in_window/rs-equilibrium.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "When in equilibrium selection is evenly distributed (replica set)", - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 35, - "type": "RSPrimary" - }, - { - "address": "b:27017", - "avg_rtt_ms": 35, - "type": "RSSecondary" - }, - { - "address": "c:27017", - "avg_rtt_ms": 35, - "type": "RSSecondary" - } - ] - }, - "mocked_topology_state": [ - { - "address": "a:27017", - "operation_count": 6 - }, - { - "address": "b:27017", - "operation_count": 6 - }, - { - "address": "c:27017", - "operation_count": 6 - } - ], - "iterations": 2000, - "outcome": { - "tolerance": 0.05, - "expected_frequencies": { - "a:27017": 0.33, - "b:27017": 0.33, - "c:27017": 0.33 - } - } -} diff --git a/testdata/server-selection/in_window/rs-equilibrium.yml b/testdata/server-selection/in_window/rs-equilibrium.yml deleted file mode 100644 index 0d8006a2d4..0000000000 --- a/testdata/server-selection/in_window/rs-equilibrium.yml +++ /dev/null @@ -1,27 +0,0 @@ -description: When in equilibrium selection is evenly distributed (replica set) -topology_description: - type: ReplicaSetWithPrimary - servers: - - address: a:27017 - avg_rtt_ms: 35 - type: RSPrimary - - address: b:27017 - avg_rtt_ms: 35 - type: RSSecondary - - address: c:27017 - avg_rtt_ms: 35 - type: RSSecondary -mocked_topology_state: - - address: a:27017 - operation_count: 6 - - address: b:27017 - operation_count: 6 - - address: c:27017 - operation_count: 6 -iterations: 2000 -outcome: - tolerance: 0.05 - expected_frequencies: - a:27017: 0.33 - b:27017: 0.33 - c:27017: 0.33 diff --git a/testdata/server-selection/in_window/rs-three-choices.json b/testdata/server-selection/in_window/rs-three-choices.json deleted file mode 100644 index 3fdc15205c..0000000000 --- a/testdata/server-selection/in_window/rs-three-choices.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "Selections from three servers occur at proper distributions (replica set)", - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 35, - "type": "RSPrimary" - }, - { - "address": "b:27017", - "avg_rtt_ms": 35, - "type": "RSSecondary" - }, - { - "address": "c:27017", - "avg_rtt_ms": 35, - "type": "RSSecondary" - } - ] - }, - "mocked_topology_state": [ - { - "address": "a:27017", - "operation_count": 3 - }, - { - "address": "b:27017", - "operation_count": 6 - }, - { - "address": "c:27017", - "operation_count": 20 - } - ], - "iterations": 2000, - "outcome": { - "tolerance": 0.05, - "expected_frequencies": { - "a:27017": 0.66, - "b:27017": 0.33, - "c:27017": 0 - } - } -} diff --git a/testdata/server-selection/in_window/rs-three-choices.yml b/testdata/server-selection/in_window/rs-three-choices.yml deleted file mode 100644 index 514f7e66b3..0000000000 --- a/testdata/server-selection/in_window/rs-three-choices.yml +++ /dev/null @@ -1,27 +0,0 @@ -description: Selections from three servers occur at proper distributions (replica set) -topology_description: - type: ReplicaSetWithPrimary - servers: - - address: a:27017 - avg_rtt_ms: 35 - type: RSPrimary - - address: b:27017 - avg_rtt_ms: 35 - type: RSSecondary - - address: c:27017 - avg_rtt_ms: 35 - type: RSSecondary -mocked_topology_state: - - address: a:27017 - operation_count: 3 - - address: b:27017 - operation_count: 6 - - address: c:27017 - operation_count: 20 -iterations: 2000 -outcome: - tolerance: 0.05 - expected_frequencies: - a:27017: 0.66 - b:27017: 0.33 - c:27017: 0 diff --git a/testdata/server-selection/in_window/three-choices.json b/testdata/server-selection/in_window/three-choices.json deleted file mode 100644 index 7b5b414549..0000000000 --- a/testdata/server-selection/in_window/three-choices.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "Selections from three servers occur at proper distributions", - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "b:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "c:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "mocked_topology_state": [ - { - "address": "a:27017", - "operation_count": 3 - }, - { - "address": "b:27017", - "operation_count": 6 - }, - { - "address": "c:27017", - "operation_count": 20 - } - ], - "iterations": 2000, - "outcome": { - "tolerance": 0.05, - "expected_frequencies": { - "a:27017": 0.66, - "b:27017": 0.33, - "c:27017": 0 - } - } -} diff --git a/testdata/server-selection/in_window/three-choices.yml b/testdata/server-selection/in_window/three-choices.yml deleted file mode 100644 index ffc9f53ea6..0000000000 --- a/testdata/server-selection/in_window/three-choices.yml +++ /dev/null @@ -1,27 +0,0 @@ -description: Selections from three servers occur at proper distributions -topology_description: - type: Sharded - servers: - - address: a:27017 - avg_rtt_ms: 35 - type: Mongos - - address: b:27017 - avg_rtt_ms: 35 - type: Mongos - - address: c:27017 - avg_rtt_ms: 35 - type: Mongos -mocked_topology_state: - - address: a:27017 - operation_count: 3 - - address: b:27017 - operation_count: 6 - - address: c:27017 - operation_count: 20 -iterations: 2000 -outcome: - tolerance: 0.05 - expected_frequencies: - a:27017: 0.66 - b:27017: 0.33 - c:27017: 0 diff --git a/testdata/server-selection/in_window/two-choices.json b/testdata/server-selection/in_window/two-choices.json deleted file mode 100644 index 2c7a605d8d..0000000000 --- a/testdata/server-selection/in_window/two-choices.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "description": "Better of two choices always selected", - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "b:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "mocked_topology_state": [ - { - "address": "a:27017", - "operation_count": 0 - }, - { - "address": "b:27017", - "operation_count": 5 - } - ], - "iterations": 100, - "outcome": { - "tolerance": 0, - "expected_frequencies": { - "a:27017": 1, - "b:27017": 0 - } - } -} diff --git a/testdata/server-selection/in_window/two-choices.yml b/testdata/server-selection/in_window/two-choices.yml deleted file mode 100644 index ef763d649e..0000000000 --- a/testdata/server-selection/in_window/two-choices.yml +++ /dev/null @@ -1,21 +0,0 @@ -description: Better of two choices always selected -topology_description: - type: Sharded - servers: - - address: a:27017 - avg_rtt_ms: 35 - type: Mongos - - address: b:27017 - avg_rtt_ms: 35 - type: Mongos -mocked_topology_state: - - address: a:27017 - operation_count: 0 - - address: b:27017 - operation_count: 5 -iterations: 100 -outcome: - tolerance: 0.0 - expected_frequencies: - a:27017: 1 - b:27017: 0 diff --git a/testdata/server-selection/in_window/two-least.json b/testdata/server-selection/in_window/two-least.json deleted file mode 100644 index 73214fc647..0000000000 --- a/testdata/server-selection/in_window/two-least.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "Two tied for least operations share all selections", - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "b:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - }, - { - "address": "c:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "mocked_topology_state": [ - { - "address": "a:27017", - "operation_count": 10 - }, - { - "address": "b:27017", - "operation_count": 10 - }, - { - "address": "c:27017", - "operation_count": 16 - } - ], - "iterations": 2000, - "outcome": { - "tolerance": 0.05, - "expected_frequencies": { - "a:27017": 0.5, - "b:27017": 0.5, - "c:27017": 0 - } - } -} diff --git a/testdata/server-selection/in_window/two-least.yml b/testdata/server-selection/in_window/two-least.yml deleted file mode 100644 index ba4bf39ee1..0000000000 --- a/testdata/server-selection/in_window/two-least.yml +++ /dev/null @@ -1,27 +0,0 @@ -description: Two tied for least operations share all selections -topology_description: - type: Sharded - servers: - - address: a:27017 - avg_rtt_ms: 35 - type: Mongos - - address: b:27017 - avg_rtt_ms: 35 - type: Mongos - - address: c:27017 - avg_rtt_ms: 35 - type: Mongos -mocked_topology_state: - - address: a:27017 - operation_count: 10 - - address: b:27017 - operation_count: 10 - - address: c:27017 - operation_count: 16 -iterations: 2000 -outcome: - tolerance: 0.05 - expected_frequencies: - a:27017: 0.5 - b:27017: 0.5 - c:27017: 0 diff --git a/testdata/server-selection/logging/load-balanced.json b/testdata/server-selection/logging/load-balanced.json deleted file mode 100644 index 5855c4e991..0000000000 --- a/testdata/server-selection/logging/load-balanced.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "description": "server-selection-logging", - "schemaVersion": "1.13", - "runOnRequirements": [ - { - "topologies": [ - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "uriOptions": { - "heartbeatFrequencyMS": 500 - }, - "observeLogMessages": { - "serverSelection": "debug" - }, - "observeEvents": [ - "serverDescriptionChangedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "server-selection" - } - } - ], - "tests": [ - { - "description": "A successful operation - load balanced cluster", - "operations": [ - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "LoadBalancer" - } - } - }, - "count": 1 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection started", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection succeeded", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/server-selection/logging/load-balanced.yml b/testdata/server-selection/logging/load-balanced.yml deleted file mode 100644 index 7f86784147..0000000000 --- a/testdata/server-selection/logging/load-balanced.yml +++ /dev/null @@ -1,60 +0,0 @@ -description: "server-selection-logging" - -schemaVersion: "1.13" - -runOnRequirements: - - topologies: - - load-balanced - -createEntities: - - client: - id: &client client - uriOptions: - heartbeatFrequencyMS: 500 - observeLogMessages: - serverSelection: debug - observeEvents: - - serverDescriptionChangedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName logging-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName server-selection - -tests: - - description: "A successful operation - load balanced cluster" - operations: - # ensure we've discovered the entire topology before starting. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: LoadBalancer - count: 1 - - name: insertOne - object: *collection - arguments: - document: { x : 1 } - expectLogMessages: - - client: *client - messages: - - level: debug - component: serverSelection - data: - message: "Server selection started" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - - level: debug - component: serverSelection - data: - message: "Server selection succeeded" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } diff --git a/testdata/server-selection/logging/operation-id.json b/testdata/server-selection/logging/operation-id.json deleted file mode 100644 index 72ebff60d8..0000000000 --- a/testdata/server-selection/logging/operation-id.json +++ /dev/null @@ -1,418 +0,0 @@ -{ - "description": "operation-id", - "schemaVersion": "1.14", - "runOnRequirements": [ - { - "topologies": [ - "single" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "uriOptions": { - "retryWrites": false, - "heartbeatFrequencyMS": 500, - "appName": "loggingClient", - "serverSelectionTimeoutMS": 2000 - }, - "observeLogMessages": { - "serverSelection": "debug" - }, - "observeEvents": [ - "serverDescriptionChangedEvent", - "topologyDescriptionChangedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "server-selection" - } - }, - { - "client": { - "id": "failPointClient" - } - } - ], - "_yamlAnchors": { - "namespace": "logging-tests.server-selection" - }, - "tests": [ - { - "description": "Successful bulkWrite operation: log messages have operationIds", - "operations": [ - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 2 - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "x": 1 - } - } - } - ] - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection started", - "operationId": { - "$$type": [ - "int", - "long" - ] - }, - "operation": "insert" - } - }, - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection succeeded", - "operationId": { - "$$type": [ - "int", - "long" - ] - }, - "operation": "insert" - } - } - ] - } - ] - }, - { - "description": "Failed bulkWrite operation: log messages have operationIds", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "hello", - "ismaster" - ], - "appName": "loggingClient", - "closeConnection": true - } - } - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "x": 1 - } - } - } - ] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection started", - "operationId": { - "$$type": [ - "int", - "long" - ] - }, - "operation": "insert" - } - }, - { - "level": "info", - "component": "serverSelection", - "data": { - "message": "Waiting for suitable server to become available", - "operationId": { - "$$type": [ - "int", - "long" - ] - }, - "operation": "insert" - } - }, - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection failed", - "operationId": { - "$$type": [ - "int", - "long" - ] - }, - "operation": "insert" - } - } - ] - } - ] - }, - { - "description": "Successful client bulkWrite operation: log messages have operationIds", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 2 - } - }, - { - "name": "clientBulkWrite", - "object": "client", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "logging-tests.server-selection", - "document": { - "x": 1 - } - } - } - ] - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection started", - "operationId": { - "$$type": [ - "int", - "long" - ] - }, - "operation": "bulkWrite" - } - }, - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection succeeded", - "operationId": { - "$$type": [ - "int", - "long" - ] - }, - "operation": "bulkWrite" - } - } - ] - } - ] - }, - { - "description": "Failed client bulkWrite operation: log messages have operationIds", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "hello", - "ismaster" - ], - "appName": "loggingClient", - "closeConnection": true - } - } - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "clientBulkWrite", - "object": "client", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "logging-tests.server-selection", - "document": { - "x": 1 - } - } - } - ] - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection started", - "operationId": { - "$$type": [ - "int", - "long" - ] - }, - "operation": "bulkWrite" - } - }, - { - "level": "info", - "component": "serverSelection", - "data": { - "message": "Waiting for suitable server to become available", - "operationId": { - "$$type": [ - "int", - "long" - ] - }, - "operation": "bulkWrite" - } - }, - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection failed", - "operationId": { - "$$type": [ - "int", - "long" - ] - }, - "operation": "bulkWrite" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/server-selection/logging/operation-id.yml b/testdata/server-selection/logging/operation-id.yml deleted file mode 100644 index e5732893fa..0000000000 --- a/testdata/server-selection/logging/operation-id.yml +++ /dev/null @@ -1,223 +0,0 @@ -description: "operation-id" - -schemaVersion: "1.14" - -runOnRequirements: - - topologies: - - single - -createEntities: - - client: - id: &client client - uriOptions: - retryWrites: false # so we don't retry after hitting a failpoint - heartbeatFrequencyMS: 500 - appName: &appName loggingClient - serverSelectionTimeoutMS: 2000 # avoid hanging for 30s in test expecting SS failure due to timeout - observeLogMessages: - serverSelection: debug - observeEvents: - - serverDescriptionChangedEvent - - topologyDescriptionChangedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName logging-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName server-selection - - client: - id: &failPointClient failPointClient - -_yamlAnchors: - namespace: &namespace "logging-tests.server-selection" - -tests: - - description: "Successful bulkWrite operation: log messages have operationIds" - operations: - # ensure we've discovered the server so it is immediately available - # and no extra "waiting for suitable server" messages are emitted. - # expected topology events reflect initial server discovery and server connect event. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 2 - - name: bulkWrite - object: *collection - arguments: - requests: - - insertOne: - document: { x: 1 } - expectLogMessages: - - client: *client - messages: - - level: debug - component: serverSelection - data: - message: "Server selection started" - operationId: { $$type: [int, long] } - operation: insert - - level: debug - component: serverSelection - data: - message: "Server selection succeeded" - operationId: { $$type: [int, long] } - operation: insert - - - description: "Failed bulkWrite operation: log messages have operationIds" - runOnRequirements: - - minServerVersion: "4.4" # failCommand appname support - operations: - # fail all hello/legacy hello commands for the main client. - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: alwaysOn - data: - failCommands: ["hello", "ismaster"] - appName: *appName - closeConnection: true - # wait until we've marked the server unknown due - # to a failed heartbeat. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: bulkWrite - object: *collection - arguments: - requests: - - insertOne: - document: { x: 1 } - expectError: - isClientError: true # server selection timeout - expectLogMessages: - - client: *client - messages: - - level: debug - component: serverSelection - data: - message: "Server selection started" - operationId: { $$type: [int, long] } - operation: insert - - level: info - component: serverSelection - data: - message: "Waiting for suitable server to become available" - operationId: { $$type: [int, long] } - operation: insert - - level: debug - component: serverSelection - data: - message: "Server selection failed" - operationId: { $$type: [int, long] } - operation: insert - - - description: "Successful client bulkWrite operation: log messages have operationIds" - runOnRequirements: - - minServerVersion: "8.0" # required for bulkWrite command - serverless: forbid - operations: - # ensure we've discovered the server so it is immediately available - # and no extra "waiting for suitable server" messages are emitted. - # expected topology events reflect initial server discovery and server connect event. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 2 - - name: clientBulkWrite - object: *client - arguments: - models: - - insertOne: - namespace: *namespace - document: { x: 1 } - expectLogMessages: - - client: *client - messages: - - level: debug - component: serverSelection - data: - message: "Server selection started" - operationId: { $$type: [int, long] } - operation: bulkWrite - - level: debug - component: serverSelection - data: - message: "Server selection succeeded" - operationId: { $$type: [int, long] } - operation: bulkWrite - - - description: "Failed client bulkWrite operation: log messages have operationIds" - runOnRequirements: - - minServerVersion: "8.0" # required for bulkWrite command - serverless: forbid - operations: - # fail all hello/legacy hello commands for the main client. - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: alwaysOn - data: - failCommands: ["hello", "ismaster"] - appName: *appName - closeConnection: true - # wait until we've marked the server unknown due - # to a failed heartbeat. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: clientBulkWrite - object: *client - arguments: - models: - - insertOne: - namespace: *namespace - document: { x: 1 } - expectError: - isClientError: true # server selection timeout - expectLogMessages: - - client: *client - messages: - - level: debug - component: serverSelection - data: - message: "Server selection started" - operationId: { $$type: [int, long] } - operation: bulkWrite - - level: info - component: serverSelection - data: - message: "Waiting for suitable server to become available" - operationId: { $$type: [int, long] } - operation: bulkWrite - - level: debug - component: serverSelection - data: - message: "Server selection failed" - operationId: { $$type: [int, long] } - operation: bulkWrite diff --git a/testdata/server-selection/logging/replica-set.json b/testdata/server-selection/logging/replica-set.json deleted file mode 100644 index 5eba784bf2..0000000000 --- a/testdata/server-selection/logging/replica-set.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "description": "replica-set-logging", - "schemaVersion": "1.14", - "runOnRequirements": [ - { - "topologies": [ - "replicaset" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "uriOptions": { - "retryWrites": false, - "heartbeatFrequencyMS": 500, - "serverSelectionTimeoutMS": 2000 - }, - "observeLogMessages": { - "serverSelection": "debug" - }, - "observeEvents": [ - "serverDescriptionChangedEvent", - "topologyDescriptionChangedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "server-selection" - } - }, - { - "client": { - "id": "failPointClient" - } - }, - { - "collection": { - "id": "unsatisfiableRPColl", - "database": "database", - "collectionName": "unsatisfiableRPColl", - "collectionOptions": { - "readPreference": { - "mode": "Secondary", - "tagSets": [ - { - "nonexistenttag": "a" - } - ] - } - } - } - } - ], - "tests": [ - { - "description": "A successful operation", - "operations": [ - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 4 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection started", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection succeeded", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - }, - { - "description": "Server selection fails due to unsatisfiable read preference", - "runOnRequirements": [ - { - "minServerVersion": "4.0" - } - ], - "operations": [ - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 4 - } - }, - { - "name": "find", - "object": "unsatisfiableRPColl", - "arguments": { - "filter": { - "x": 1 - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection started", - "selector": { - "$$exists": true - }, - "operation": "find", - "topologyDescription": { - "$$exists": true - } - } - }, - { - "level": "info", - "component": "serverSelection", - "data": { - "message": "Waiting for suitable server to become available", - "selector": { - "$$exists": true - }, - "operation": "find", - "topologyDescription": { - "$$exists": true - }, - "remainingTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection failed", - "selector": { - "$$exists": true - }, - "operation": "find", - "topologyDescription": { - "$$exists": true - }, - "failure": { - "$$exists": true - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/server-selection/logging/replica-set.yml b/testdata/server-selection/logging/replica-set.yml deleted file mode 100644 index f360f65f69..0000000000 --- a/testdata/server-selection/logging/replica-set.yml +++ /dev/null @@ -1,126 +0,0 @@ -description: "replica-set-logging" - -schemaVersion: "1.14" - -runOnRequirements: - - topologies: - - replicaset - -createEntities: - - client: - id: &client client - uriOptions: - retryWrites: false # so we don't retry after hitting a failpoint - heartbeatFrequencyMS: 500 - serverSelectionTimeoutMS: 2000 # avoid hanging for 30s in test expecting SS failure due to timeout - observeLogMessages: - serverSelection: debug - observeEvents: - - serverDescriptionChangedEvent - - topologyDescriptionChangedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName logging-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName server-selection - - client: - id: &failPointClient failPointClient - - collection: - id: &unsatisfiableRPColl unsatisfiableRPColl - database: *database - collectionName: &unsatisfiableRPColl unsatisfiableRPColl - collectionOptions: - readPreference: - mode: Secondary - tagSets: - - { nonexistenttag : a } - -tests: - - description: "A successful operation" - operations: - # ensure we've discovered the primary before starting, so we don't get an unexpected "waiting" message - # when server selection happens for the insert, or have extra logs from the driver performing server - # expected events are initial cluster type change from unknown to ReplicaSet, and connect events for each of 3 servers. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 4 - - name: insertOne - object: *collection - arguments: - document: { x : 1 } - expectLogMessages: - - client: *client - messages: - - level: debug - component: serverSelection - data: - message: "Server selection started" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - - level: debug - component: serverSelection - data: - message: "Server selection succeeded" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - description: "Server selection fails due to unsatisfiable read preference" - runOnRequirements: - - minServerVersion: "4.0" # min version for failCommand on mongod - operations: - # ensure we've discovered the primary before starting, so we don't get an unexpected "waiting" message - # when server selection happens for the insert, or have extra logs from the driver performing server - # expected events are initial cluster type change from unknown to ReplicaSet, and connect events for each of 3 servers. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 4 - # the `find` should never succeed due to the unsatisfiable read preference. - - name: find - object: *unsatisfiableRPColl - arguments: - filter: { x : 1 } - expectError: - isClientError: true # server selection error - expectLogMessages: - # the topology won't change during this time, so although we exhaust - # serverSelectionTimeoutMS we only expect a single message. - - client: *client - messages: - - level: debug - component: serverSelection - data: - message: "Server selection started" - selector: { $$exists: true } - operation: find - topologyDescription: { $$exists: true } - - level: info - component: serverSelection - data: - message: "Waiting for suitable server to become available" - selector: { $$exists: true } - operation: find - topologyDescription: { $$exists: true } - remainingTimeMS: { $$type: [int, long] } - - level: debug - component: serverSelection - data: - message: "Server selection failed" - selector: { $$exists: true } - operation: find - topologyDescription: { $$exists: true } - failure: { $$exists: true } diff --git a/testdata/server-selection/logging/sharded.json b/testdata/server-selection/logging/sharded.json deleted file mode 100644 index d42fba9100..0000000000 --- a/testdata/server-selection/logging/sharded.json +++ /dev/null @@ -1,237 +0,0 @@ -{ - "description": "server-selection-logging", - "schemaVersion": "1.14", - "runOnRequirements": [ - { - "topologies": [ - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "uriOptions": { - "retryWrites": false, - "heartbeatFrequencyMS": 500, - "appName": "loggingClient", - "serverSelectionTimeoutMS": 2000 - }, - "observeLogMessages": { - "serverSelection": "debug" - }, - "observeEvents": [ - "serverDescriptionChangedEvent", - "topologyDescriptionChangedEvent" - ], - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "server-selection" - } - }, - { - "client": { - "id": "failPointClient", - "useMultipleMongoses": false - } - } - ], - "tests": [ - { - "description": "A successful operation", - "operations": [ - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 2 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection started", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection succeeded", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - }, - { - "description": "Failure due to unreachable server", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "hello", - "ismaster" - ], - "appName": "loggingClient", - "closeConnection": true - } - } - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection started", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - } - } - }, - { - "level": "info", - "component": "serverSelection", - "data": { - "message": "Waiting for suitable server to become available", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - }, - "remainingTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection failed", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - }, - "failure": { - "$$exists": true - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/server-selection/logging/sharded.yml b/testdata/server-selection/logging/sharded.yml deleted file mode 100644 index 9a2215c85e..0000000000 --- a/testdata/server-selection/logging/sharded.yml +++ /dev/null @@ -1,129 +0,0 @@ -description: "server-selection-logging" - -schemaVersion: "1.14" - -runOnRequirements: - - topologies: - - sharded - -createEntities: - - client: - id: &client client - uriOptions: - retryWrites: false # so we don't retry after hitting a failpoint - heartbeatFrequencyMS: 500 - appName: &appName loggingClient - serverSelectionTimeoutMS: 2000 # avoid hanging for 30s in test expecting SS failure due to timeout - observeLogMessages: - serverSelection: debug - observeEvents: - - serverDescriptionChangedEvent - - topologyDescriptionChangedEvent - useMultipleMongoses: false - - database: - id: &database database - client: *client - databaseName: &databaseName logging-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName server-selection - - client: - id: &failPointClient failPointClient - useMultipleMongoses: false - -tests: - - description: "A successful operation" - operations: - # ensure we've discovered the entire topology before starting. - # expected events are initial cluster type change from unknown to sharded, and connect events for one mongos. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 2 - - name: insertOne - object: *collection - arguments: - document: { x : 1 } - expectLogMessages: - - client: *client - messages: - - level: debug - component: serverSelection - data: - message: "Server selection started" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - - level: debug - component: serverSelection - data: - message: "Server selection succeeded" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - description: "Failure due to unreachable server" - runOnRequirements: - - minServerVersion: "4.4" # failCommand appname support - operations: - # fail all hello/legacy hello commands for the main client. - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: alwaysOn - data: - failCommands: ["hello", "ismaster"] - appName: *appName - closeConnection: true - # wait until we've marked the server unknown due - # to a failed heartbeat. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: insertOne - object: *collection - arguments: - document: { x : 1 } - expectError: - isClientError: true # server selection timeout - expectLogMessages: - - client: *client - messages: - - level: debug - component: serverSelection - data: - message: "Server selection started" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - - level: info - component: serverSelection - data: - message: "Waiting for suitable server to become available" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - remainingTimeMS: { $$type: [int, long] } - - level: debug - component: serverSelection - data: - message: "Server selection failed" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - failure: { $$exists: true } diff --git a/testdata/server-selection/logging/standalone.json b/testdata/server-selection/logging/standalone.json deleted file mode 100644 index 3b3eddd841..0000000000 --- a/testdata/server-selection/logging/standalone.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "description": "standalone-logging", - "schemaVersion": "1.14", - "runOnRequirements": [ - { - "topologies": [ - "single" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "uriOptions": { - "retryWrites": false, - "heartbeatFrequencyMS": 500, - "appName": "loggingClient", - "serverSelectionTimeoutMS": 2000 - }, - "observeLogMessages": { - "serverSelection": "debug" - }, - "observeEvents": [ - "serverDescriptionChangedEvent", - "topologyDescriptionChangedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "logging-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "server-selection" - } - }, - { - "client": { - "id": "failPointClient" - } - } - ], - "tests": [ - { - "description": "A successful operation", - "operations": [ - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "topologyDescriptionChangedEvent": {} - }, - "count": 2 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection started", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - } - } - }, - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection succeeded", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - }, - "serverHost": { - "$$type": "string" - }, - "serverPort": { - "$$type": [ - "int", - "long" - ] - } - } - } - ] - } - ] - }, - { - "description": "Failure due to unreachable server", - "runOnRequirements": [ - { - "minServerVersion": "4.4" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "failPointClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "hello", - "ismaster" - ], - "appName": "loggingClient", - "closeConnection": true - } - } - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": { - "newDescription": { - "type": "Unknown" - } - } - }, - "count": 1 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "x": 1 - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectLogMessages": [ - { - "client": "client", - "messages": [ - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection started", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - } - } - }, - { - "level": "info", - "component": "serverSelection", - "data": { - "message": "Waiting for suitable server to become available", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - }, - "remainingTimeMS": { - "$$type": [ - "int", - "long" - ] - } - } - }, - { - "level": "debug", - "component": "serverSelection", - "data": { - "message": "Server selection failed", - "selector": { - "$$exists": true - }, - "operation": "insert", - "topologyDescription": { - "$$exists": true - }, - "failure": { - "$$exists": true - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/server-selection/logging/standalone.yml b/testdata/server-selection/logging/standalone.yml deleted file mode 100644 index 5ff803ec04..0000000000 --- a/testdata/server-selection/logging/standalone.yml +++ /dev/null @@ -1,128 +0,0 @@ -description: "standalone-logging" - -schemaVersion: "1.14" - -runOnRequirements: - - topologies: - - single - -createEntities: - - client: - id: &client client - uriOptions: - retryWrites: false # so we don't retry after hitting a failpoint - heartbeatFrequencyMS: 500 - appName: &appName loggingClient - serverSelectionTimeoutMS: 2000 # avoid hanging for 30s in test expecting SS failure due to timeout - observeLogMessages: - serverSelection: debug - observeEvents: - - serverDescriptionChangedEvent - - topologyDescriptionChangedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName logging-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName server-selection - - client: - id: &failPointClient failPointClient - -tests: - - description: "A successful operation" - operations: - # ensure we've discovered the server so it is immediately available - # and no extra "waiting for suitable server" messages are emitted. - # expected topology events reflect initial server discovery and server connect event. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - topologyDescriptionChangedEvent: {} - count: 2 - - name: insertOne - object: *collection - arguments: - document: { x : 1 } - expectLogMessages: - - client: *client - messages: - - level: debug - component: serverSelection - data: - message: "Server selection started" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - - level: debug - component: serverSelection - data: - message: "Server selection succeeded" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - serverHost: { $$type: string } - serverPort: { $$type: [int, long] } - - - description: "Failure due to unreachable server" - runOnRequirements: - - minServerVersion: "4.4" # failCommand appname support - operations: - # fail all hello/legacy hello commands for the main client. - - name: failPoint - object: testRunner - arguments: - client: *failPointClient - failPoint: - configureFailPoint: failCommand - mode: alwaysOn - data: - failCommands: ["hello", "ismaster"] - appName: *appName - closeConnection: true - # wait until we've marked the server unknown due - # to a failed heartbeat. - - name: waitForEvent - object: testRunner - arguments: - client: *client - event: - serverDescriptionChangedEvent: - newDescription: - type: Unknown - count: 1 - - name: insertOne - object: *collection - arguments: - document: { x : 1 } - expectError: - isClientError: true # server selection timeout - expectLogMessages: - - client: *client - messages: - - level: debug - component: serverSelection - data: - message: "Server selection started" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - - level: info - component: serverSelection - data: - message: "Waiting for suitable server to become available" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - remainingTimeMS: { $$type: [int, long] } - - level: debug - component: serverSelection - data: - message: "Server selection failed" - selector: { $$exists: true } - operation: insert - topologyDescription: { $$exists: true } - failure: { $$exists: true } diff --git a/testdata/server-selection/rtt/first_value.json b/testdata/server-selection/rtt/first_value.json deleted file mode 100644 index 421944da36..0000000000 --- a/testdata/server-selection/rtt/first_value.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "avg_rtt_ms": "NULL", - "new_rtt_ms": 10, - "new_avg_rtt": 10 -} diff --git a/testdata/server-selection/rtt/first_value.yml b/testdata/server-selection/rtt/first_value.yml deleted file mode 100644 index da48a19282..0000000000 --- a/testdata/server-selection/rtt/first_value.yml +++ /dev/null @@ -1,3 +0,0 @@ -avg_rtt_ms: 'NULL' -new_rtt_ms: 10 -new_avg_rtt: 10 diff --git a/testdata/server-selection/rtt/first_value_zero.json b/testdata/server-selection/rtt/first_value_zero.json deleted file mode 100644 index d5bfc41b25..0000000000 --- a/testdata/server-selection/rtt/first_value_zero.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "avg_rtt_ms": "NULL", - "new_rtt_ms": 0, - "new_avg_rtt": 0 -} diff --git a/testdata/server-selection/rtt/first_value_zero.yml b/testdata/server-selection/rtt/first_value_zero.yml deleted file mode 100644 index 89f4638e95..0000000000 --- a/testdata/server-selection/rtt/first_value_zero.yml +++ /dev/null @@ -1,3 +0,0 @@ -avg_rtt_ms: 'NULL' -new_rtt_ms: 0 -new_avg_rtt: 0 diff --git a/testdata/server-selection/rtt/value_test_1.json b/testdata/server-selection/rtt/value_test_1.json deleted file mode 100644 index ed6a80ce29..0000000000 --- a/testdata/server-selection/rtt/value_test_1.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "avg_rtt_ms": 0, - "new_rtt_ms": 5, - "new_avg_rtt": 1 -} diff --git a/testdata/server-selection/rtt/value_test_1.yml b/testdata/server-selection/rtt/value_test_1.yml deleted file mode 100644 index 10ba5c05ef..0000000000 --- a/testdata/server-selection/rtt/value_test_1.yml +++ /dev/null @@ -1,3 +0,0 @@ -avg_rtt_ms: 0 -new_rtt_ms: 5 -new_avg_rtt: 1.0 diff --git a/testdata/server-selection/rtt/value_test_2.json b/testdata/server-selection/rtt/value_test_2.json deleted file mode 100644 index ccb5a0173b..0000000000 --- a/testdata/server-selection/rtt/value_test_2.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "avg_rtt_ms": 3.1, - "new_rtt_ms": 36, - "new_avg_rtt": 9.68 -} diff --git a/testdata/server-selection/rtt/value_test_2.yml b/testdata/server-selection/rtt/value_test_2.yml deleted file mode 100644 index 118c8ec374..0000000000 --- a/testdata/server-selection/rtt/value_test_2.yml +++ /dev/null @@ -1,3 +0,0 @@ -avg_rtt_ms: 3.1 -new_rtt_ms: 36 -new_avg_rtt: 9.68 diff --git a/testdata/server-selection/rtt/value_test_3.json b/testdata/server-selection/rtt/value_test_3.json deleted file mode 100644 index 6921c94d36..0000000000 --- a/testdata/server-selection/rtt/value_test_3.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "avg_rtt_ms": 9.12, - "new_rtt_ms": 9.12, - "new_avg_rtt": 9.12 -} diff --git a/testdata/server-selection/rtt/value_test_3.yml b/testdata/server-selection/rtt/value_test_3.yml deleted file mode 100644 index e4af46c61a..0000000000 --- a/testdata/server-selection/rtt/value_test_3.yml +++ /dev/null @@ -1,3 +0,0 @@ -avg_rtt_ms: 9.12 -new_rtt_ms: 9.12 -new_avg_rtt: 9.12 diff --git a/testdata/server-selection/rtt/value_test_4.json b/testdata/server-selection/rtt/value_test_4.json deleted file mode 100644 index d9ce3800b8..0000000000 --- a/testdata/server-selection/rtt/value_test_4.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "avg_rtt_ms": 1, - "new_rtt_ms": 1000, - "new_avg_rtt": 200.8 -} diff --git a/testdata/server-selection/rtt/value_test_4.yml b/testdata/server-selection/rtt/value_test_4.yml deleted file mode 100644 index cf68726b2d..0000000000 --- a/testdata/server-selection/rtt/value_test_4.yml +++ /dev/null @@ -1,3 +0,0 @@ -avg_rtt_ms: 1 -new_rtt_ms: 1000 -new_avg_rtt: 200.8 diff --git a/testdata/server-selection/rtt/value_test_5.json b/testdata/server-selection/rtt/value_test_5.json deleted file mode 100644 index 9ae33bc143..0000000000 --- a/testdata/server-selection/rtt/value_test_5.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "avg_rtt_ms": 0, - "new_rtt_ms": 0.25, - "new_avg_rtt": 0.05 -} diff --git a/testdata/server-selection/rtt/value_test_5.yml b/testdata/server-selection/rtt/value_test_5.yml deleted file mode 100644 index 698ee308c2..0000000000 --- a/testdata/server-selection/rtt/value_test_5.yml +++ /dev/null @@ -1,3 +0,0 @@ -avg_rtt_ms: 0 -new_rtt_ms: 0.25 -new_avg_rtt: 0.05 diff --git a/testdata/server-selection/server_selection/LoadBalanced/read/Nearest.json b/testdata/server-selection/server_selection/LoadBalanced/read/Nearest.json deleted file mode 100644 index 76fa336d55..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/read/Nearest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "topology_description": { - "type": "LoadBalanced", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Nearest", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] -} diff --git a/testdata/server-selection/server_selection/LoadBalanced/read/Nearest.yml b/testdata/server-selection/server_selection/LoadBalanced/read/Nearest.yml deleted file mode 100644 index 2e9a16d5e0..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/read/Nearest.yml +++ /dev/null @@ -1,16 +0,0 @@ -topology_description: - type: LoadBalanced - servers: - - &1 - address: g:27017 - avg_rtt_ms: 0 - type: LoadBalancer -operation: read -read_preference: - mode: Nearest - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/LoadBalanced/read/Primary.json b/testdata/server-selection/server_selection/LoadBalanced/read/Primary.json deleted file mode 100644 index 5a4a0aa93a..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/read/Primary.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "topology_description": { - "type": "LoadBalanced", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Primary" - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] -} diff --git a/testdata/server-selection/server_selection/LoadBalanced/read/Primary.yml b/testdata/server-selection/server_selection/LoadBalanced/read/Primary.yml deleted file mode 100644 index 72ea728d6e..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/read/Primary.yml +++ /dev/null @@ -1,14 +0,0 @@ -topology_description: - type: LoadBalanced - servers: - - &1 - address: g:27017 - avg_rtt_ms: 0 - type: LoadBalancer -operation: read -read_preference: - mode: Primary -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/LoadBalanced/read/PrimaryPreferred.json b/testdata/server-selection/server_selection/LoadBalanced/read/PrimaryPreferred.json deleted file mode 100644 index 9aa151cd06..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/read/PrimaryPreferred.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "topology_description": { - "type": "LoadBalanced", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "PrimaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] -} diff --git a/testdata/server-selection/server_selection/LoadBalanced/read/PrimaryPreferred.yml b/testdata/server-selection/server_selection/LoadBalanced/read/PrimaryPreferred.yml deleted file mode 100644 index 96e6ff54c2..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/read/PrimaryPreferred.yml +++ /dev/null @@ -1,16 +0,0 @@ -topology_description: - type: LoadBalanced - servers: - - &1 - address: g:27017 - avg_rtt_ms: 0 - type: LoadBalancer -operation: read -read_preference: - mode: PrimaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/LoadBalanced/read/Secondary.json b/testdata/server-selection/server_selection/LoadBalanced/read/Secondary.json deleted file mode 100644 index c49e30370b..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/read/Secondary.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "topology_description": { - "type": "LoadBalanced", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Secondary", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] -} diff --git a/testdata/server-selection/server_selection/LoadBalanced/read/Secondary.yml b/testdata/server-selection/server_selection/LoadBalanced/read/Secondary.yml deleted file mode 100644 index 2f027d2dc7..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/read/Secondary.yml +++ /dev/null @@ -1,16 +0,0 @@ -topology_description: - type: LoadBalanced - servers: - - &1 - address: g:27017 - avg_rtt_ms: 0 - type: LoadBalancer -operation: read -read_preference: - mode: Secondary - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/LoadBalanced/read/SecondaryPreferred.json b/testdata/server-selection/server_selection/LoadBalanced/read/SecondaryPreferred.json deleted file mode 100644 index 18e46877b4..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/read/SecondaryPreferred.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "topology_description": { - "type": "LoadBalanced", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] -} diff --git a/testdata/server-selection/server_selection/LoadBalanced/read/SecondaryPreferred.yml b/testdata/server-selection/server_selection/LoadBalanced/read/SecondaryPreferred.yml deleted file mode 100644 index f3da0ec4b0..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/read/SecondaryPreferred.yml +++ /dev/null @@ -1,16 +0,0 @@ -topology_description: - type: LoadBalanced - servers: - - &1 - address: g:27017 - avg_rtt_ms: 0 - type: LoadBalancer -operation: read -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/LoadBalanced/write/Nearest.json b/testdata/server-selection/server_selection/LoadBalanced/write/Nearest.json deleted file mode 100644 index e52e343332..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/write/Nearest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "topology_description": { - "type": "LoadBalanced", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "Nearest", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] -} diff --git a/testdata/server-selection/server_selection/LoadBalanced/write/Nearest.yml b/testdata/server-selection/server_selection/LoadBalanced/write/Nearest.yml deleted file mode 100644 index 8e7b59dc4a..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/write/Nearest.yml +++ /dev/null @@ -1,16 +0,0 @@ -topology_description: - type: LoadBalanced - servers: - - &1 - address: g:27017 - avg_rtt_ms: 0 - type: LoadBalancer -operation: write -read_preference: - mode: Nearest - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/LoadBalanced/write/Primary.json b/testdata/server-selection/server_selection/LoadBalanced/write/Primary.json deleted file mode 100644 index 9061b25208..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/write/Primary.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "topology_description": { - "type": "LoadBalanced", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "Primary" - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] -} diff --git a/testdata/server-selection/server_selection/LoadBalanced/write/Primary.yml b/testdata/server-selection/server_selection/LoadBalanced/write/Primary.yml deleted file mode 100644 index 457eb53e58..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/write/Primary.yml +++ /dev/null @@ -1,14 +0,0 @@ -topology_description: - type: LoadBalanced - servers: - - &1 - address: g:27017 - avg_rtt_ms: 0 - type: LoadBalancer -operation: write -read_preference: - mode: Primary -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/LoadBalanced/write/PrimaryPreferred.json b/testdata/server-selection/server_selection/LoadBalanced/write/PrimaryPreferred.json deleted file mode 100644 index 5c94dc410d..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/write/PrimaryPreferred.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "topology_description": { - "type": "LoadBalanced", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "PrimaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] -} diff --git a/testdata/server-selection/server_selection/LoadBalanced/write/PrimaryPreferred.yml b/testdata/server-selection/server_selection/LoadBalanced/write/PrimaryPreferred.yml deleted file mode 100644 index 2a078d1f40..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/write/PrimaryPreferred.yml +++ /dev/null @@ -1,16 +0,0 @@ -topology_description: - type: LoadBalanced - servers: - - &1 - address: g:27017 - avg_rtt_ms: 0 - type: LoadBalancer -operation: write -read_preference: - mode: PrimaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/LoadBalanced/write/Secondary.json b/testdata/server-selection/server_selection/LoadBalanced/write/Secondary.json deleted file mode 100644 index 5493867e12..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/write/Secondary.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "topology_description": { - "type": "LoadBalanced", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "Secondary", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] -} diff --git a/testdata/server-selection/server_selection/LoadBalanced/write/Secondary.yml b/testdata/server-selection/server_selection/LoadBalanced/write/Secondary.yml deleted file mode 100644 index dc67dbc942..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/write/Secondary.yml +++ /dev/null @@ -1,16 +0,0 @@ -topology_description: - type: LoadBalanced - servers: - - &1 - address: g:27017 - avg_rtt_ms: 0 - type: LoadBalancer -operation: write -read_preference: - mode: Secondary - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/LoadBalanced/write/SecondaryPreferred.json b/testdata/server-selection/server_selection/LoadBalanced/write/SecondaryPreferred.json deleted file mode 100644 index f7905f1d5f..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/write/SecondaryPreferred.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "topology_description": { - "type": "LoadBalanced", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 0, - "type": "LoadBalancer" - } - ] -} diff --git a/testdata/server-selection/server_selection/LoadBalanced/write/SecondaryPreferred.yml b/testdata/server-selection/server_selection/LoadBalanced/write/SecondaryPreferred.yml deleted file mode 100644 index 77026a67c0..0000000000 --- a/testdata/server-selection/server_selection/LoadBalanced/write/SecondaryPreferred.yml +++ /dev/null @@ -1,16 +0,0 @@ -topology_description: - type: LoadBalanced - servers: - - &1 - address: g:27017 - avg_rtt_ms: 0 - type: LoadBalancer -operation: write -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest.json deleted file mode 100644 index aa48679e86..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Nearest", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest.yml deleted file mode 100644 index 0615671941..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest.yml +++ /dev/null @@ -1,25 +0,0 @@ -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - &2 - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc -operation: read -read_preference: - mode: Nearest - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_multiple.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_multiple.json deleted file mode 100644 index 1fcfd52a47..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_multiple.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 10, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 20, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Nearest", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 10, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 20, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "avg_rtt_ms": 10, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 20, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_multiple.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_multiple.yml deleted file mode 100644 index cd3abc5820..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_multiple.yml +++ /dev/null @@ -1,26 +0,0 @@ -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: b:27017 - avg_rtt_ms: 10 - type: RSSecondary - tags: - data_center: nyc - - &2 - address: c:27017 - avg_rtt_ms: 20 - type: RSSecondary - tags: - data_center: nyc -operation: read -read_preference: - mode: Nearest - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 -- *2 diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_non_matching.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_non_matching.json deleted file mode 100644 index b72895d8a8..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_non_matching.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Nearest", - "tag_sets": [ - { - "data_center": "sf" - } - ] - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_non_matching.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_non_matching.yml deleted file mode 100644 index 7e24dd1666..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_non_matching.yml +++ /dev/null @@ -1,20 +0,0 @@ -topology_description: - type: ReplicaSetNoPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc -operation: read -read_preference: - mode: Nearest - tag_sets: - - data_center: sf -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimary.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimary.json deleted file mode 100644 index 4d286af830..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimary.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "PossiblePrimary" - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Primary", - "tag_sets": [ - {} - ] - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimary.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimary.yml deleted file mode 100644 index cc5bfa88d5..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimary.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Test that PossiblePrimary isn't candidate for any read preference mode. ---- -topology_description: - type: ReplicaSetNoPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: PossiblePrimary -operation: read -read_preference: - mode: Primary - tag_sets: - - {} -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimaryNearest.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimaryNearest.json deleted file mode 100644 index bf9c70b420..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimaryNearest.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "PossiblePrimary" - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Nearest", - "tag_sets": [ - {} - ] - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimaryNearest.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimaryNearest.yml deleted file mode 100644 index 4e50f31380..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimaryNearest.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Test that PossiblePrimary isn't candidate for any read preference mode. ---- -topology_description: - type: ReplicaSetNoPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: PossiblePrimary -operation: read -read_preference: - mode: Nearest - tag_sets: - - {} -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Primary.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Primary.json deleted file mode 100644 index 550a5f129b..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Primary.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Primary", - "tag_sets": [ - {} - ] - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Primary.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Primary.yml deleted file mode 100644 index 54dbc8c09c..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Primary.yml +++ /dev/null @@ -1,20 +0,0 @@ -topology_description: - type: ReplicaSetNoPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc -operation: read -read_preference: - mode: Primary - tag_sets: - - {} -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred.json deleted file mode 100644 index f87ef4f617..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "PrimaryPreferred", - "tag_sets": [ - {} - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred.yml deleted file mode 100644 index 6b57953ae7..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred.yml +++ /dev/null @@ -1,25 +0,0 @@ -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - &2 - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc -operation: read -read_preference: - mode: PrimaryPreferred - tag_sets: - - {} -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred_non_matching.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred_non_matching.json deleted file mode 100644 index ee96229927..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred_non_matching.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "PrimaryPreferred", - "tag_sets": [ - { - "data_center": "sf" - } - ] - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred_non_matching.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred_non_matching.yml deleted file mode 100644 index 2cbf107da3..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred_non_matching.yml +++ /dev/null @@ -1,20 +0,0 @@ -topology_description: - type: ReplicaSetNoPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc -operation: read -read_preference: - mode: PrimaryPreferred - tag_sets: - - data_center: sf -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary.json deleted file mode 100644 index 3b8f1e97cd..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Secondary", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary.yml deleted file mode 100644 index 382060dad4..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary.yml +++ /dev/null @@ -1,25 +0,0 @@ -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - &2 - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc -operation: read -read_preference: - mode: Secondary - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred.json deleted file mode 100644 index c3142ec115..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred.yml deleted file mode 100644 index 7095e460b1..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred.yml +++ /dev/null @@ -1,25 +0,0 @@ -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - &2 - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc -operation: read -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred_non_matching.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred_non_matching.json deleted file mode 100644 index a2c18bb7d2..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred_non_matching.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "sf" - } - ] - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred_non_matching.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred_non_matching.yml deleted file mode 100644 index abd388b1f5..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred_non_matching.yml +++ /dev/null @@ -1,20 +0,0 @@ -topology_description: - type: ReplicaSetNoPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc -operation: read -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: sf -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_multi_tags.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_multi_tags.json deleted file mode 100644 index b319918e92..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_multi_tags.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "rack": "one", - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "rack": "two", - "data_center": "sf" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Secondary", - "tag_sets": [ - { - "data_center": "nyc", - "rack": "one" - }, - { - "other_tag": "doesntexist" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "rack": "one", - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "rack": "one", - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_multi_tags.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_multi_tags.yml deleted file mode 100644 index c2ca618451..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_multi_tags.yml +++ /dev/null @@ -1,31 +0,0 @@ -# Catch bugs like CDRIVER-1447, ensure clients select a server that matches all -# tags, even when the other server mismatches multiple tags. ---- -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - rack: one - data_center: nyc - - &2 - address: c:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - rack: two - data_center: sf -operation: read -read_preference: - mode: Secondary - tag_sets: - - data_center: nyc - rack: one - - other_tag: doesntexist -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_multi_tags2.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_multi_tags2.json deleted file mode 100644 index 8f64d95ecb..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_multi_tags2.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "rack": "one", - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "rack": "two", - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Secondary", - "tag_sets": [ - { - "data_center": "nyc", - "rack": "one" - }, - { - "other_tag": "doesntexist" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "rack": "one", - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "rack": "one", - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_multi_tags2.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_multi_tags2.yml deleted file mode 100644 index 3a4cb4f2ae..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_multi_tags2.yml +++ /dev/null @@ -1,31 +0,0 @@ -# Ensure clients select a server that matches all tags, even when the other -# server matches one tag and doesn't match the other. ---- -topology_description: - type: ReplicaSetNoPrimary - servers: - - &1 - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - rack: one - data_center: nyc - - &2 - address: c:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - rack: two # mismatch - data_center: nyc # match -operation: read -read_preference: - mode: Secondary - tag_sets: - - data_center: nyc - rack: one - - other_tag: doesntexist -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_non_matching.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_non_matching.json deleted file mode 100644 index 4931e1019a..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_non_matching.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Secondary", - "tag_sets": [ - { - "data_center": "sf" - } - ] - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_non_matching.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_non_matching.yml deleted file mode 100644 index 0772769e23..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_non_matching.yml +++ /dev/null @@ -1,20 +0,0 @@ -topology_description: - type: ReplicaSetNoPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc -operation: read -read_preference: - mode: Secondary - tag_sets: - - data_center: sf -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/write/SecondaryPreferred.json b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/write/SecondaryPreferred.json deleted file mode 100644 index e136cf12a4..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/write/SecondaryPreferred.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetNoPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/write/SecondaryPreferred.yml b/testdata/server-selection/server_selection/ReplicaSetNoPrimary/write/SecondaryPreferred.yml deleted file mode 100644 index 9152e57297..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetNoPrimary/write/SecondaryPreferred.yml +++ /dev/null @@ -1,20 +0,0 @@ -topology_description: - type: ReplicaSetNoPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc -operation: write -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest.json b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest.json deleted file mode 100644 index cfe4965938..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Nearest", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest.yml b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest.yml deleted file mode 100644 index 5e8e0499d2..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest.yml +++ /dev/null @@ -1,32 +0,0 @@ -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - &3 - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc - - &2 - address: a:27017 - avg_rtt_ms: 26 - type: RSPrimary - tags: - data_center: nyc -operation: read -read_preference: - mode: Nearest - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -- *3 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_multiple.json b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_multiple.json deleted file mode 100644 index 67296d434f..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_multiple.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 10, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 20, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Nearest", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 10, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 20, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "avg_rtt_ms": 10, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 20, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_multiple.yml b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_multiple.yml deleted file mode 100644 index 6aacd508fa..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_multiple.yml +++ /dev/null @@ -1,33 +0,0 @@ -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: b:27017 - avg_rtt_ms: 10 - type: RSSecondary - tags: - data_center: nyc - - &3 - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc - - &2 - address: a:27017 - avg_rtt_ms: 20 - type: RSPrimary - tags: - data_center: nyc -operation: read -read_preference: - mode: Nearest - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -- *3 -in_latency_window: -- *1 -- *2 diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_non_matching.json b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_non_matching.json deleted file mode 100644 index a3a85c9a83..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_non_matching.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Nearest", - "tag_sets": [ - { - "data_center": "sf" - } - ] - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_non_matching.yml b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_non_matching.yml deleted file mode 100644 index 5047d4e3ea..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_non_matching.yml +++ /dev/null @@ -1,25 +0,0 @@ -topology_description: - type: ReplicaSetWithPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc - - address: a:27017 - avg_rtt_ms: 26 - type: RSPrimary - tags: - data_center: nyc -operation: read -read_preference: - mode: Nearest - tag_sets: - - data_center: sf -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Primary.json b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Primary.json deleted file mode 100644 index ae04419a5c..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Primary.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Primary", - "tag_sets": [ - {} - ] - }, - "suitable_servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Primary.yml b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Primary.yml deleted file mode 100644 index a08b53ee7f..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Primary.yml +++ /dev/null @@ -1,28 +0,0 @@ -topology_description: - type: ReplicaSetWithPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc - - &1 - address: a:27017 - avg_rtt_ms: 26 - type: RSPrimary - tags: - data_center: nyc -operation: read -read_preference: - mode: Primary - tag_sets: - - {} -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/PrimaryPreferred.json b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/PrimaryPreferred.json deleted file mode 100644 index 306171f3a2..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/PrimaryPreferred.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "PrimaryPreferred", - "tag_sets": [ - {} - ] - }, - "suitable_servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/PrimaryPreferred.yml b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/PrimaryPreferred.yml deleted file mode 100644 index 199cb25f54..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/PrimaryPreferred.yml +++ /dev/null @@ -1,28 +0,0 @@ -topology_description: - type: ReplicaSetWithPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc - - &1 - address: a:27017 - avg_rtt_ms: 26 - type: RSPrimary - tags: - data_center: nyc -operation: read -read_preference: - mode: PrimaryPreferred - tag_sets: - - {} -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/PrimaryPreferred_non_matching.json b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/PrimaryPreferred_non_matching.json deleted file mode 100644 index 722f1cfb1a..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/PrimaryPreferred_non_matching.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "PrimaryPreferred", - "tag_sets": [ - { - "data_center": "sf" - } - ] - }, - "suitable_servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/PrimaryPreferred_non_matching.yml b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/PrimaryPreferred_non_matching.yml deleted file mode 100644 index ed880b2bc3..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/PrimaryPreferred_non_matching.yml +++ /dev/null @@ -1,28 +0,0 @@ -topology_description: - type: ReplicaSetWithPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc - - &1 - address: a:27017 - avg_rtt_ms: 26 - type: RSPrimary - tags: - data_center: nyc -operation: read -read_preference: - mode: PrimaryPreferred - tag_sets: - - data_center: sf -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Secondary.json b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Secondary.json deleted file mode 100644 index 23864a278c..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Secondary.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Secondary", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Secondary.yml b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Secondary.yml deleted file mode 100644 index 85afe014a1..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Secondary.yml +++ /dev/null @@ -1,30 +0,0 @@ -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - &2 - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc - - address: a:27017 - avg_rtt_ms: 26 - type: RSPrimary - tags: - data_center: nyc -operation: read -read_preference: - mode: Secondary - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred.json b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred.json deleted file mode 100644 index d07c24218d..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred.yml b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred.yml deleted file mode 100644 index f067035238..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred.yml +++ /dev/null @@ -1,30 +0,0 @@ -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - &2 - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc - - address: a:27017 - avg_rtt_ms: 26 - type: RSPrimary - tags: - data_center: nyc -operation: read -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_non_matching.json b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_non_matching.json deleted file mode 100644 index f893cc9f82..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_non_matching.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "sf" - } - ] - }, - "suitable_servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_non_matching.yml b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_non_matching.yml deleted file mode 100644 index f74af2214a..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_non_matching.yml +++ /dev/null @@ -1,28 +0,0 @@ -topology_description: - type: ReplicaSetWithPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc - - &1 - address: a:27017 - avg_rtt_ms: 26 - type: RSPrimary - tags: - data_center: nyc -operation: read -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: sf -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_tags.json b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_tags.json deleted file mode 100644 index a74a2dbf33..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_tags.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 5, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "sf" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 5, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "avg_rtt_ms": 5, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_tags.yml b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_tags.yml deleted file mode 100644 index a493a885bc..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/SecondaryPreferred_tags.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Attempt to select the secondary, except its tag doesn't match. -# Fall back to primary. ---- -topology_description: - type: ReplicaSetWithPrimary - servers: - - &1 - address: a:27017 - avg_rtt_ms: 5 - type: RSPrimary - tags: - data_center: nyc - - &2 - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: sf # No match. -operation: read -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -in_latency_window: -- *1 - diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Secondary_non_matching.json b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Secondary_non_matching.json deleted file mode 100644 index 1272180666..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Secondary_non_matching.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Secondary", - "tag_sets": [ - { - "data_center": "sf" - } - ] - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Secondary_non_matching.yml b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Secondary_non_matching.yml deleted file mode 100644 index 6414401e85..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/read/Secondary_non_matching.yml +++ /dev/null @@ -1,25 +0,0 @@ -topology_description: - type: ReplicaSetWithPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc - - address: a:27017 - avg_rtt_ms: 26 - type: RSPrimary - tags: - data_center: nyc -operation: read -read_preference: - mode: Secondary - tag_sets: - - data_center: sf -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/write/SecondaryPreferred.json b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/write/SecondaryPreferred.json deleted file mode 100644 index 65ab3dc640..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/write/SecondaryPreferred.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "topology_description": { - "type": "ReplicaSetWithPrimary", - "servers": [ - { - "address": "b:27017", - "avg_rtt_ms": 5, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "c:27017", - "avg_rtt_ms": 100, - "type": "RSSecondary", - "tags": { - "data_center": "nyc" - } - }, - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "avg_rtt_ms": 26, - "type": "RSPrimary", - "tags": { - "data_center": "nyc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/write/SecondaryPreferred.yml b/testdata/server-selection/server_selection/ReplicaSetWithPrimary/write/SecondaryPreferred.yml deleted file mode 100644 index 9a01da480b..0000000000 --- a/testdata/server-selection/server_selection/ReplicaSetWithPrimary/write/SecondaryPreferred.yml +++ /dev/null @@ -1,28 +0,0 @@ -topology_description: - type: ReplicaSetWithPrimary - servers: - - address: b:27017 - avg_rtt_ms: 5 - type: RSSecondary - tags: - data_center: nyc - - address: c:27017 - avg_rtt_ms: 100 - type: RSSecondary - tags: - data_center: nyc - - &1 - address: a:27017 - avg_rtt_ms: 26 - type: RSPrimary - tags: - data_center: nyc -operation: write -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Sharded/read/Nearest.json b/testdata/server-selection/server_selection/Sharded/read/Nearest.json deleted file mode 100644 index 705a784a0b..0000000000 --- a/testdata/server-selection/server_selection/Sharded/read/Nearest.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Nearest", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - } - ] -} diff --git a/testdata/server-selection/server_selection/Sharded/read/Nearest.yml b/testdata/server-selection/server_selection/Sharded/read/Nearest.yml deleted file mode 100644 index 4b06b4dda6..0000000000 --- a/testdata/server-selection/server_selection/Sharded/read/Nearest.yml +++ /dev/null @@ -1,21 +0,0 @@ -topology_description: - type: Sharded - servers: - - &1 - address: g:27017 - avg_rtt_ms: 5 - type: Mongos - - &2 - address: h:27017 - avg_rtt_ms: 35 - type: Mongos -operation: read -read_preference: - mode: Nearest - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Sharded/read/Primary.json b/testdata/server-selection/server_selection/Sharded/read/Primary.json deleted file mode 100644 index 7a321be2bb..0000000000 --- a/testdata/server-selection/server_selection/Sharded/read/Primary.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Primary" - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - } - ] -} diff --git a/testdata/server-selection/server_selection/Sharded/read/Primary.yml b/testdata/server-selection/server_selection/Sharded/read/Primary.yml deleted file mode 100644 index 1b4b076589..0000000000 --- a/testdata/server-selection/server_selection/Sharded/read/Primary.yml +++ /dev/null @@ -1,19 +0,0 @@ -topology_description: - type: Sharded - servers: - - &1 - address: g:27017 - avg_rtt_ms: 5 - type: Mongos - - &2 - address: h:27017 - avg_rtt_ms: 35 - type: Mongos -operation: read -read_preference: - mode: Primary -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Sharded/read/PrimaryPreferred.json b/testdata/server-selection/server_selection/Sharded/read/PrimaryPreferred.json deleted file mode 100644 index e9bc1421f9..0000000000 --- a/testdata/server-selection/server_selection/Sharded/read/PrimaryPreferred.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "PrimaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - } - ] -} diff --git a/testdata/server-selection/server_selection/Sharded/read/PrimaryPreferred.yml b/testdata/server-selection/server_selection/Sharded/read/PrimaryPreferred.yml deleted file mode 100644 index b908d7ac10..0000000000 --- a/testdata/server-selection/server_selection/Sharded/read/PrimaryPreferred.yml +++ /dev/null @@ -1,21 +0,0 @@ -topology_description: - type: Sharded - servers: - - &1 - address: g:27017 - avg_rtt_ms: 5 - type: Mongos - - &2 - address: h:27017 - avg_rtt_ms: 35 - type: Mongos -operation: read -read_preference: - mode: PrimaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Sharded/read/Secondary.json b/testdata/server-selection/server_selection/Sharded/read/Secondary.json deleted file mode 100644 index 49813f7b9e..0000000000 --- a/testdata/server-selection/server_selection/Sharded/read/Secondary.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "Secondary", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - } - ] -} diff --git a/testdata/server-selection/server_selection/Sharded/read/Secondary.yml b/testdata/server-selection/server_selection/Sharded/read/Secondary.yml deleted file mode 100644 index bf7c6aa88e..0000000000 --- a/testdata/server-selection/server_selection/Sharded/read/Secondary.yml +++ /dev/null @@ -1,21 +0,0 @@ -topology_description: - type: Sharded - servers: - - &1 - address: g:27017 - avg_rtt_ms: 5 - type: Mongos - - &2 - address: h:27017 - avg_rtt_ms: 35 - type: Mongos -operation: read -read_preference: - mode: Secondary - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Sharded/read/SecondaryPreferred.json b/testdata/server-selection/server_selection/Sharded/read/SecondaryPreferred.json deleted file mode 100644 index 62fa13f297..0000000000 --- a/testdata/server-selection/server_selection/Sharded/read/SecondaryPreferred.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - } - ] -} diff --git a/testdata/server-selection/server_selection/Sharded/read/SecondaryPreferred.yml b/testdata/server-selection/server_selection/Sharded/read/SecondaryPreferred.yml deleted file mode 100644 index a9f238901f..0000000000 --- a/testdata/server-selection/server_selection/Sharded/read/SecondaryPreferred.yml +++ /dev/null @@ -1,21 +0,0 @@ -topology_description: - type: Sharded - servers: - - &1 - address: g:27017 - avg_rtt_ms: 5 - type: Mongos - - &2 - address: h:27017 - avg_rtt_ms: 35 - type: Mongos -operation: read -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Sharded/write/Nearest.json b/testdata/server-selection/server_selection/Sharded/write/Nearest.json deleted file mode 100644 index aef7f02ec7..0000000000 --- a/testdata/server-selection/server_selection/Sharded/write/Nearest.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "Nearest", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - } - ] -} diff --git a/testdata/server-selection/server_selection/Sharded/write/Nearest.yml b/testdata/server-selection/server_selection/Sharded/write/Nearest.yml deleted file mode 100644 index 1f3c2da0ee..0000000000 --- a/testdata/server-selection/server_selection/Sharded/write/Nearest.yml +++ /dev/null @@ -1,21 +0,0 @@ -topology_description: - type: Sharded - servers: - - &1 - address: g:27017 - avg_rtt_ms: 5 - type: Mongos - - &2 - address: h:27017 - avg_rtt_ms: 35 - type: Mongos -operation: write -read_preference: - mode: Nearest - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Sharded/write/Primary.json b/testdata/server-selection/server_selection/Sharded/write/Primary.json deleted file mode 100644 index f6ce2e75c1..0000000000 --- a/testdata/server-selection/server_selection/Sharded/write/Primary.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "Primary" - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - } - ] -} diff --git a/testdata/server-selection/server_selection/Sharded/write/Primary.yml b/testdata/server-selection/server_selection/Sharded/write/Primary.yml deleted file mode 100644 index f673af0737..0000000000 --- a/testdata/server-selection/server_selection/Sharded/write/Primary.yml +++ /dev/null @@ -1,19 +0,0 @@ -topology_description: - type: Sharded - servers: - - &1 - address: g:27017 - avg_rtt_ms: 5 - type: Mongos - - &2 - address: h:27017 - avg_rtt_ms: 35 - type: Mongos -operation: write -read_preference: - mode: Primary -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Sharded/write/PrimaryPreferred.json b/testdata/server-selection/server_selection/Sharded/write/PrimaryPreferred.json deleted file mode 100644 index 25f56a5359..0000000000 --- a/testdata/server-selection/server_selection/Sharded/write/PrimaryPreferred.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "PrimaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - } - ] -} diff --git a/testdata/server-selection/server_selection/Sharded/write/PrimaryPreferred.yml b/testdata/server-selection/server_selection/Sharded/write/PrimaryPreferred.yml deleted file mode 100644 index a754720604..0000000000 --- a/testdata/server-selection/server_selection/Sharded/write/PrimaryPreferred.yml +++ /dev/null @@ -1,21 +0,0 @@ -topology_description: - type: Sharded - servers: - - &1 - address: g:27017 - avg_rtt_ms: 5 - type: Mongos - - &2 - address: h:27017 - avg_rtt_ms: 35 - type: Mongos -operation: write -read_preference: - mode: PrimaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Sharded/write/Secondary.json b/testdata/server-selection/server_selection/Sharded/write/Secondary.json deleted file mode 100644 index 1fa026f716..0000000000 --- a/testdata/server-selection/server_selection/Sharded/write/Secondary.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "Secondary", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - } - ] -} diff --git a/testdata/server-selection/server_selection/Sharded/write/Secondary.yml b/testdata/server-selection/server_selection/Sharded/write/Secondary.yml deleted file mode 100644 index 99ac48eb1a..0000000000 --- a/testdata/server-selection/server_selection/Sharded/write/Secondary.yml +++ /dev/null @@ -1,21 +0,0 @@ -topology_description: - type: Sharded - servers: - - &1 - address: g:27017 - avg_rtt_ms: 5 - type: Mongos - - &2 - address: h:27017 - avg_rtt_ms: 35 - type: Mongos -operation: write -read_preference: - mode: Secondary - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Sharded/write/SecondaryPreferred.json b/testdata/server-selection/server_selection/Sharded/write/SecondaryPreferred.json deleted file mode 100644 index f9467472aa..0000000000 --- a/testdata/server-selection/server_selection/Sharded/write/SecondaryPreferred.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "topology_description": { - "type": "Sharded", - "servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - }, - { - "address": "h:27017", - "avg_rtt_ms": 35, - "type": "Mongos" - } - ], - "in_latency_window": [ - { - "address": "g:27017", - "avg_rtt_ms": 5, - "type": "Mongos" - } - ] -} diff --git a/testdata/server-selection/server_selection/Sharded/write/SecondaryPreferred.yml b/testdata/server-selection/server_selection/Sharded/write/SecondaryPreferred.yml deleted file mode 100644 index c4fb9b6c60..0000000000 --- a/testdata/server-selection/server_selection/Sharded/write/SecondaryPreferred.yml +++ /dev/null @@ -1,21 +0,0 @@ -topology_description: - type: Sharded - servers: - - &1 - address: g:27017 - avg_rtt_ms: 5 - type: Mongos - - &2 - address: h:27017 - avg_rtt_ms: 35 - type: Mongos -operation: write -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -- *2 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Single/read/SecondaryPreferred.json b/testdata/server-selection/server_selection/Single/read/SecondaryPreferred.json deleted file mode 100644 index e60496dfdf..0000000000 --- a/testdata/server-selection/server_selection/Single/read/SecondaryPreferred.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "topology_description": { - "type": "Single", - "servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 5, - "type": "Standalone", - "tags": { - "data_center": "dc" - } - } - ] - }, - "operation": "read", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 5, - "type": "Standalone", - "tags": { - "data_center": "dc" - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "avg_rtt_ms": 5, - "type": "Standalone", - "tags": { - "data_center": "dc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/Single/read/SecondaryPreferred.yml b/testdata/server-selection/server_selection/Single/read/SecondaryPreferred.yml deleted file mode 100644 index e926fd5788..0000000000 --- a/testdata/server-selection/server_selection/Single/read/SecondaryPreferred.yml +++ /dev/null @@ -1,18 +0,0 @@ -topology_description: - type: Single - servers: - - &1 - address: a:27017 - avg_rtt_ms: 5 - type: Standalone - tags: - data_center: dc -operation: read -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Single/write/SecondaryPreferred.json b/testdata/server-selection/server_selection/Single/write/SecondaryPreferred.json deleted file mode 100644 index 34fe91d5a2..0000000000 --- a/testdata/server-selection/server_selection/Single/write/SecondaryPreferred.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "topology_description": { - "type": "Single", - "servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 5, - "type": "Standalone", - "tags": { - "data_center": "dc" - } - } - ] - }, - "operation": "write", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [ - { - "address": "a:27017", - "avg_rtt_ms": 5, - "type": "Standalone", - "tags": { - "data_center": "dc" - } - } - ], - "in_latency_window": [ - { - "address": "a:27017", - "avg_rtt_ms": 5, - "type": "Standalone", - "tags": { - "data_center": "dc" - } - } - ] -} diff --git a/testdata/server-selection/server_selection/Single/write/SecondaryPreferred.yml b/testdata/server-selection/server_selection/Single/write/SecondaryPreferred.yml deleted file mode 100644 index c8b592bd93..0000000000 --- a/testdata/server-selection/server_selection/Single/write/SecondaryPreferred.yml +++ /dev/null @@ -1,18 +0,0 @@ -topology_description: - type: Single - servers: - - &1 - address: a:27017 - avg_rtt_ms: 5 - type: Standalone - tags: - data_center: dc -operation: write -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: -- *1 -in_latency_window: -- *1 diff --git a/testdata/server-selection/server_selection/Unknown/read/SecondaryPreferred.json b/testdata/server-selection/server_selection/Unknown/read/SecondaryPreferred.json deleted file mode 100644 index 0ae8075fba..0000000000 --- a/testdata/server-selection/server_selection/Unknown/read/SecondaryPreferred.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "topology_description": { - "type": "Unknown", - "servers": [] - }, - "operation": "read", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/server-selection/server_selection/Unknown/read/SecondaryPreferred.yml b/testdata/server-selection/server_selection/Unknown/read/SecondaryPreferred.yml deleted file mode 100644 index 4c1622fbc5..0000000000 --- a/testdata/server-selection/server_selection/Unknown/read/SecondaryPreferred.yml +++ /dev/null @@ -1,10 +0,0 @@ -topology_description: - type: Unknown - servers: [] -operation: read -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/server-selection/server_selection/Unknown/write/SecondaryPreferred.json b/testdata/server-selection/server_selection/Unknown/write/SecondaryPreferred.json deleted file mode 100644 index a70eece62c..0000000000 --- a/testdata/server-selection/server_selection/Unknown/write/SecondaryPreferred.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "topology_description": { - "type": "Unknown", - "servers": [] - }, - "operation": "write", - "read_preference": { - "mode": "SecondaryPreferred", - "tag_sets": [ - { - "data_center": "nyc" - } - ] - }, - "suitable_servers": [], - "in_latency_window": [] -} diff --git a/testdata/server-selection/server_selection/Unknown/write/SecondaryPreferred.yml b/testdata/server-selection/server_selection/Unknown/write/SecondaryPreferred.yml deleted file mode 100644 index 416728591a..0000000000 --- a/testdata/server-selection/server_selection/Unknown/write/SecondaryPreferred.yml +++ /dev/null @@ -1,10 +0,0 @@ -topology_description: - type: Unknown - servers: [] -operation: write -read_preference: - mode: SecondaryPreferred - tag_sets: - - data_center: nyc -suitable_servers: [] -in_latency_window: [] diff --git a/testdata/sessions/driver-sessions-dirty-session-errors.json b/testdata/sessions/driver-sessions-dirty-session-errors.json deleted file mode 100644 index 6aa1da1df5..0000000000 --- a/testdata/sessions/driver-sessions-dirty-session-errors.json +++ /dev/null @@ -1,968 +0,0 @@ -{ - "description": "driver-sessions-dirty-session-errors", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topologies": [ - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "session-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ], - "tests": [ - { - "description": "Dirty explicit session is discarded (insert)", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "name": "assertSessionNotDirty", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 2 - } - } - } - }, - { - "name": "assertSessionDirty", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "assertSessionDirty", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "endSession", - "object": "session0" - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": -1 - } - }, - "expectResult": [] - }, - { - "name": "assertDifferentLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1 - }, - "commandName": "insert", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1 - }, - "commandName": "insert", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 3 - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 2 - }, - "commandName": "insert", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": -1 - }, - "lsid": { - "$$type": "object" - } - }, - "commandName": "find", - "databaseName": "session-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - ] - }, - { - "description": "Dirty explicit session is discarded (findAndModify)", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "closeConnection": true - } - } - } - }, - { - "name": "assertSessionNotDirty", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "expectResult": { - "_id": 1 - } - }, - { - "name": "assertSessionDirty", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "endSession", - "object": "session0" - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": -1 - } - }, - "expectResult": [] - }, - { - "name": "assertDifferentLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "test", - "query": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "new": false, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "readConcern": { - "$$exists": false - }, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "findAndModify", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "findAndModify": "test", - "query": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "new": false, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "readConcern": { - "$$exists": false - }, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "findAndModify", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": -1 - }, - "lsid": { - "$$type": "object" - } - }, - "commandName": "find", - "databaseName": "session-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1, - "x": 1 - } - ] - } - ] - }, - { - "description": "Dirty implicit session is discarded (insert)", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 2 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 2 - } - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": -1 - } - }, - "expectResult": [] - }, - { - "name": "assertDifferentLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": { - "$$type": "object" - }, - "txnNumber": 1 - }, - "commandName": "insert", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": { - "$$type": "object" - }, - "txnNumber": 1 - }, - "commandName": "insert", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": -1 - }, - "lsid": { - "$$type": "object" - } - }, - "commandName": "find", - "databaseName": "session-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "Dirty implicit session is discarded (findAndModify)", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "closeConnection": true - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "expectResult": { - "_id": 1 - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": -1 - } - }, - "expectResult": [] - }, - { - "name": "assertDifferentLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "test", - "query": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "new": false, - "lsid": { - "$$type": "object" - }, - "txnNumber": 1, - "readConcern": { - "$$exists": false - }, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "findAndModify", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "findAndModify": "test", - "query": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "new": false, - "lsid": { - "$$type": "object" - }, - "txnNumber": 1, - "readConcern": { - "$$exists": false - }, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "findAndModify", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": -1 - }, - "lsid": { - "$$type": "object" - } - }, - "commandName": "find", - "databaseName": "session-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1, - "x": 1 - } - ] - } - ] - }, - { - "description": "Dirty implicit session is discarded (read returning cursor)", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - } - } - }, - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ] - }, - "expectResult": [ - { - "_id": 1 - } - ] - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": -1 - } - }, - "expectResult": [] - }, - { - "name": "assertDifferentLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "lsid": { - "$$type": "object" - } - }, - "commandName": "aggregate", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "lsid": { - "$$type": "object" - } - }, - "commandName": "aggregate", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": -1 - }, - "lsid": { - "$$type": "object" - } - }, - "commandName": "find", - "databaseName": "session-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "Dirty implicit session is discarded (read not returning cursor)", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - } - } - }, - { - "name": "countDocuments", - "object": "collection0", - "arguments": { - "filter": {} - }, - "expectResult": 1 - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": -1 - } - }, - "expectResult": [] - }, - { - "name": "assertDifferentLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ], - "lsid": { - "$$type": "object" - } - }, - "commandName": "aggregate", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$match": {} - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ], - "lsid": { - "$$type": "object" - } - }, - "commandName": "aggregate", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": -1 - }, - "lsid": { - "$$type": "object" - } - }, - "commandName": "find", - "databaseName": "session-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - } - ] -} diff --git a/testdata/sessions/driver-sessions-dirty-session-errors.yml b/testdata/sessions/driver-sessions-dirty-session-errors.yml deleted file mode 100644 index eb7978660d..0000000000 --- a/testdata/sessions/driver-sessions-dirty-session-errors.yml +++ /dev/null @@ -1,351 +0,0 @@ -description: "driver-sessions-dirty-session-errors" - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "4.0" - topologies: [ replicaset ] - - minServerVersion: "4.1.8" - topologies: [ sharded ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name session-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - - session: - id: &session0 session0 - client: *client0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - -tests: - - description: "Dirty explicit session is discarded (insert)" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - closeConnection: true - - name: assertSessionNotDirty - object: testRunner - arguments: - session: *session0 - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 2 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 2 } } } - - name: assertSessionDirty - object: testRunner - arguments: - session: *session0 - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 3 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 3 } } } - - name: assertSessionDirty - object: testRunner - arguments: - session: *session0 - - name: endSession - object: *session0 - - &find_with_implicit_session - name: find - object: *collection0 - arguments: - filter: { _id: -1 } - expectResult: [] - - name: assertDifferentLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: &insert_attempt - command: - insert: *collection0Name - documents: - - { _id: 2 } - ordered: true - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - commandName: insert - databaseName: *database0Name - - commandStartedEvent: *insert_attempt - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - { _id: 3 } - ordered: true - lsid: { $$sessionLsid: *session0 } - txnNumber: 2 - commandName: insert - databaseName: *database0Name - - commandStartedEvent: &find_with_implicit_session_event - command: - find: *collection0Name - filter: { _id: -1 } - # There is no explicit session to use with $$sessionLsid, so - # just assert an arbitrary lsid document - lsid: { $$type: object } - commandName: find - databaseName: *database0Name - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - - { _id: 3 } - - - description: "Dirty explicit session is discarded (findAndModify)" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ findAndModify ] - closeConnection: true - - name: assertSessionNotDirty - object: testRunner - arguments: - session: *session0 - - name: findOneAndUpdate - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: Before - expectResult: { _id: 1 } - - name: assertSessionDirty - object: testRunner - arguments: - session: *session0 - - name: endSession - object: *session0 - - *find_with_implicit_session - - name: assertDifferentLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: &findAndModify_attempt - command: - findAndModify: *collection0Name - query: { _id: 1 } - update: { $inc: { x: 1 } } - new: false - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - readConcern: { $$exists: false } - writeConcern: { $$exists: false } - commandName: findAndModify - databaseName: *database0Name - - commandStartedEvent: *findAndModify_attempt - - commandStartedEvent: *find_with_implicit_session_event - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 1 } - - - description: "Dirty implicit session is discarded (insert)" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - closeConnection: true - - name: insertOne - object: *collection0 - arguments: - document: { _id: 2 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 2 } } } - - *find_with_implicit_session - - name: assertDifferentLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: &insert_attempt - command: - insert: *collection0Name - documents: - - { _id: 2 } - ordered: true - lsid: { $$type: object } - txnNumber: 1 - commandName: insert - databaseName: *database0Name - - commandStartedEvent: *insert_attempt - - commandStartedEvent: *find_with_implicit_session_event - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - - - description: "Dirty implicit session is discarded (findAndModify)" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ findAndModify ] - closeConnection: true - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: Before - expectResult: { _id: 1 } - - *find_with_implicit_session - - name: assertDifferentLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: &findAndModify_attempt - command: - findAndModify: *collection0Name - query: { _id: 1 } - update: { $inc: { x: 1 } } - new: false - lsid: { $$type: object } - txnNumber: 1 - readConcern: { $$exists: false } - writeConcern: { $$exists: false } - commandName: findAndModify - databaseName: *database0Name - - commandStartedEvent: *findAndModify_attempt - - commandStartedEvent: *find_with_implicit_session_event - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 1 } - - - description: "Dirty implicit session is discarded (read returning cursor)" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ aggregate ] - closeConnection: true - - name: aggregate - object: *collection0 - arguments: - pipeline: [ { $project: { _id: 1 } } ] - expectResult: [ { _id: 1 } ] - - *find_with_implicit_session - - name: assertDifferentLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: &aggregate_attempt - command: - aggregate: *collection0Name - pipeline: [ { $project: { _id: 1 } } ] - lsid: { $$type: object } - commandName: aggregate - databaseName: *database0Name - - commandStartedEvent: *aggregate_attempt - - commandStartedEvent: *find_with_implicit_session_event - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - - description: "Dirty implicit session is discarded (read not returning cursor)" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ aggregate ] - closeConnection: true - - name: countDocuments - object: *collection0 - arguments: - filter: {} - expectResult: 1 - - *find_with_implicit_session - - name: assertDifferentLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: &countDocuments_attempt - command: - aggregate: *collection0Name - pipeline: [ { $match: {} }, { $group: { _id: 1, n: { $sum: 1 } } } ] - lsid: { $$type: object } - commandName: aggregate - databaseName: *database0Name - - commandStartedEvent: *countDocuments_attempt - - commandStartedEvent: *find_with_implicit_session_event - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } diff --git a/testdata/sessions/driver-sessions-server-support.json b/testdata/sessions/driver-sessions-server-support.json deleted file mode 100644 index 55312b32eb..0000000000 --- a/testdata/sessions/driver-sessions-server-support.json +++ /dev/null @@ -1,256 +0,0 @@ -{ - "description": "driver-sessions-server-support", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "3.6" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "session-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ], - "tests": [ - { - "description": "Server supports explicit sessions", - "operations": [ - { - "name": "assertSessionNotDirty", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 2 - } - } - } - }, - { - "name": "assertSessionNotDirty", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "endSession", - "object": "session0" - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": -1 - } - }, - "expectResult": [] - }, - { - "name": "assertSameLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session0" - } - }, - "commandName": "insert", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": -1 - }, - "lsid": { - "$$sessionLsid": "session0" - } - }, - "commandName": "find", - "databaseName": "session-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "Server supports implicit sessions", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 2 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 2 - } - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": -1 - } - }, - "expectResult": [] - }, - { - "name": "assertSameLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": { - "$$type": "object" - } - }, - "commandName": "insert", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": -1 - }, - "lsid": { - "$$type": "object" - } - }, - "commandName": "find", - "databaseName": "session-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} diff --git a/testdata/sessions/driver-sessions-server-support.yml b/testdata/sessions/driver-sessions-server-support.yml deleted file mode 100644 index 437b4863f1..0000000000 --- a/testdata/sessions/driver-sessions-server-support.yml +++ /dev/null @@ -1,123 +0,0 @@ -description: "driver-sessions-server-support" - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "3.6" - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name session-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - - session: - id: &session0 session0 - client: *client0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - -tests: - - description: "Server supports explicit sessions" - operations: - - name: assertSessionNotDirty - object: testRunner - arguments: - session: *session0 - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 2 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 2 } } } - - name: assertSessionNotDirty - object: testRunner - arguments: - session: *session0 - - name: endSession - object: *session0 - - &find_with_implicit_session - name: find - object: *collection0 - arguments: - filter: { _id: -1 } - expectResult: [] - - name: assertSameLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: [ { _id: 2 } ] - ordered: true - lsid: { $$sessionLsid: *session0 } - commandName: insert - databaseName: *database0Name - - commandStartedEvent: - command: - find: *collection0Name - filter: { _id: -1 } - lsid: { $$sessionLsid: *session0 } - commandName: find - databaseName: *database0Name - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - - - description: "Server supports implicit sessions" - operations: - - name: insertOne - object: *collection0 - arguments: - document: { _id: 2 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 2 } } } - - *find_with_implicit_session - - name: assertSameLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - { _id: 2 } - ordered: true - # There is no explicit session to use with $$sessionLsid, so - # just assert an arbitrary lsid document - lsid: { $$type: object } - commandName: insert - databaseName: *database0Name - - commandStartedEvent: - command: - find: *collection0Name - filter: { _id: -1 } - lsid: { $$type: object } - commandName: find - databaseName: *database0Name - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } diff --git a/testdata/sessions/implicit-sessions-default-causal-consistency.json b/testdata/sessions/implicit-sessions-default-causal-consistency.json deleted file mode 100644 index 517c8ebc63..0000000000 --- a/testdata/sessions/implicit-sessions-default-causal-consistency.json +++ /dev/null @@ -1,318 +0,0 @@ -{ - "description": "implicit sessions default causal consistency", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "implicit-cc-tests" - } - }, - { - "collection": { - "id": "collectionDefault", - "database": "database0", - "collectionName": "coll-default" - } - }, - { - "collection": { - "id": "collectionSnapshot", - "database": "database0", - "collectionName": "coll-snapshot", - "collectionOptions": { - "readConcern": { - "level": "snapshot" - } - } - } - }, - { - "collection": { - "id": "collectionlinearizable", - "database": "database0", - "collectionName": "coll-linearizable", - "collectionOptions": { - "readConcern": { - "level": "linearizable" - } - } - } - } - ], - "initialData": [ - { - "collectionName": "coll-default", - "databaseName": "implicit-cc-tests", - "documents": [ - { - "_id": 1, - "x": "default" - } - ] - }, - { - "collectionName": "coll-snapshot", - "databaseName": "implicit-cc-tests", - "documents": [ - { - "_id": 1, - "x": "snapshot" - } - ] - }, - { - "collectionName": "coll-linearizable", - "databaseName": "implicit-cc-tests", - "documents": [ - { - "_id": 1, - "x": "linearizable" - } - ] - } - ], - "tests": [ - { - "description": "readConcern is not sent on retried read in implicit session when readConcern level is not specified", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 11600 - } - } - } - }, - { - "name": "find", - "object": "collectionDefault", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": 1, - "x": "default" - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll-default", - "filter": {}, - "readConcern": { - "$$exists": false - } - }, - "databaseName": "implicit-cc-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "coll-default", - "filter": {}, - "readConcern": { - "$$exists": false - } - }, - "databaseName": "implicit-cc-tests" - } - } - ] - } - ] - }, - { - "description": "afterClusterTime is not sent on retried read in implicit session when readConcern level is snapshot", - "runOnRequirements": [ - { - "minServerVersion": "5.0" - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 11600 - } - } - } - }, - { - "name": "find", - "object": "collectionSnapshot", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": 1, - "x": "snapshot" - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll-snapshot", - "filter": {}, - "readConcern": { - "level": "snapshot", - "afterClusterTime": { - "$$exists": false - } - } - }, - "databaseName": "implicit-cc-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "coll-snapshot", - "filter": {}, - "readConcern": { - "level": "snapshot", - "afterClusterTime": { - "$$exists": false - } - } - }, - "databaseName": "implicit-cc-tests" - } - } - ] - } - ] - }, - { - "description": "afterClusterTime is not sent on retried read in implicit session when readConcern level is linearizable", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 11600 - } - } - } - }, - { - "name": "find", - "object": "collectionlinearizable", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": 1, - "x": "linearizable" - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll-linearizable", - "filter": {}, - "readConcern": { - "level": "linearizable", - "afterClusterTime": { - "$$exists": false - } - } - }, - "databaseName": "implicit-cc-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "coll-linearizable", - "filter": {}, - "readConcern": { - "level": "linearizable", - "afterClusterTime": { - "$$exists": false - } - } - }, - "databaseName": "implicit-cc-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/sessions/implicit-sessions-default-causal-consistency.yml b/testdata/sessions/implicit-sessions-default-causal-consistency.yml deleted file mode 100644 index 052c6dac20..0000000000 --- a/testdata/sessions/implicit-sessions-default-causal-consistency.yml +++ /dev/null @@ -1,119 +0,0 @@ -description: "implicit sessions default causal consistency" - -schemaVersion: "1.3" - -runOnRequirements: - - minServerVersion: "4.2" - topologies: [replicaset, sharded, load-balanced] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: [commandStartedEvent] - - database: - id: &database0 database0 - client: *client0 - databaseName: &databaseName implicit-cc-tests - - collection: - id: &collectionDefault collectionDefault - database: *database0 - collectionName: &collectionNameDefault coll-default - - collection: - id: &collectionSnapshot collectionSnapshot - database: *database0 - collectionName: &collectionNameSnapshot coll-snapshot - collectionOptions: - readConcern: { level: snapshot } - - collection: - id: &collectionlinearizable collectionlinearizable - database: *database0 - collectionName: &collectionNamelinearizable coll-linearizable - collectionOptions: - readConcern: { level: linearizable } - -initialData: - - collectionName: *collectionNameDefault - databaseName: *databaseName - documents: - - { _id: 1, x: default } - - collectionName: *collectionNameSnapshot - databaseName: *databaseName - documents: - - { _id: 1, x: snapshot } - - collectionName: *collectionNamelinearizable - databaseName: *databaseName - documents: - - { _id: 1, x: linearizable } - -tests: - - description: "readConcern is not sent on retried read in implicit session when readConcern level is not specified" - operations: - - &failPointCommand - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [find] - errorCode: 11600 #InterruptedAtShutdown - - name: find - object: *collectionDefault - arguments: - filter: {} - expectResult: [{ _id: 1, x: default }] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: &commandStartedEventDefault - command: - find: *collectionNameDefault - filter: {} - readConcern: { $$exists: false } - databaseName: *databaseName - - commandStartedEvent: *commandStartedEventDefault - - - description: "afterClusterTime is not sent on retried read in implicit session when readConcern level is snapshot" - runOnRequirements: - - minServerVersion: "5.0" - operations: - - *failPointCommand - - name: find - object: *collectionSnapshot - arguments: - filter: {} - expectResult: [{ _id: 1, x: snapshot }] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: &commandStartedEventSnapshot - command: - find: *collectionNameSnapshot - filter: {} - readConcern: - { level: snapshot, afterClusterTime: { $$exists: false } } - databaseName: *databaseName - - commandStartedEvent: *commandStartedEventSnapshot - - - description: "afterClusterTime is not sent on retried read in implicit session when readConcern level is linearizable" - operations: - - *failPointCommand - - name: find - object: *collectionlinearizable - arguments: - filter: {} - expectResult: [{ _id: 1, x: linearizable }] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: &commandStartedEventLinearizable - command: - find: *collectionNamelinearizable - filter: {} - readConcern: - { level: linearizable, afterClusterTime: { $$exists: false } } - databaseName: *databaseName - - commandStartedEvent: *commandStartedEventLinearizable diff --git a/testdata/sessions/snapshot-sessions-not-supported-client-error.json b/testdata/sessions/snapshot-sessions-not-supported-client-error.json deleted file mode 100644 index 208e4cfe63..0000000000 --- a/testdata/sessions/snapshot-sessions-not-supported-client-error.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "description": "snapshot-sessions-not-supported-client-error", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "3.6", - "maxServerVersion": "4.4.99" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - }, - { - "session": { - "id": "session0", - "client": "client0", - "sessionOptions": { - "snapshot": true - } - } - } - ], - "initialData": [ - { - "collectionName": "collection0", - "databaseName": "database0", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "Client error on find with snapshot", - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": {} - }, - "expectError": { - "isClientError": true, - "errorContains": "Snapshot reads require MongoDB 5.0 or later" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ] - }, - { - "description": "Client error on aggregate with snapshot", - "operations": [ - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "session": "session0", - "pipeline": [] - }, - "expectError": { - "isClientError": true, - "errorContains": "Snapshot reads require MongoDB 5.0 or later" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ] - }, - { - "description": "Client error on distinct with snapshot", - "operations": [ - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": {}, - "session": "session0" - }, - "expectError": { - "isClientError": true, - "errorContains": "Snapshot reads require MongoDB 5.0 or later" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ] - } - ] -} diff --git a/testdata/sessions/snapshot-sessions-not-supported-client-error.yml b/testdata/sessions/snapshot-sessions-not-supported-client-error.yml deleted file mode 100644 index e725c848d3..0000000000 --- a/testdata/sessions/snapshot-sessions-not-supported-client-error.yml +++ /dev/null @@ -1,75 +0,0 @@ -description: snapshot-sessions-not-supported-client-error - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "3.6" - maxServerVersion: "4.4.99" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent, commandFailedEvent ] - - database: - id: &database0Name database0 - client: *client0 - databaseName: *database0Name - - collection: - id: &collection0Name collection0 - database: *database0Name - collectionName: *collection0Name - - session: - id: session0 - client: client0 - sessionOptions: - snapshot: true - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - -tests: -- description: Client error on find with snapshot - operations: - - name: find - object: collection0 - arguments: - session: session0 - filter: {} - expectError: - isClientError: true - errorContains: Snapshot reads require MongoDB 5.0 or later - expectEvents: - - client: *client0 - events: [] - -- description: Client error on aggregate with snapshot - operations: - - name: aggregate - object: collection0 - arguments: - session: session0 - pipeline: [] - expectError: - isClientError: true - errorContains: Snapshot reads require MongoDB 5.0 or later - expectEvents: - - client: *client0 - events: [] - -- description: Client error on distinct with snapshot - operations: - - name: distinct - object: collection0 - arguments: - fieldName: x - filter: {} - session: session0 - expectError: - isClientError: true - errorContains: Snapshot reads require MongoDB 5.0 or later - expectEvents: - - client: *client0 - events: [] diff --git a/testdata/sessions/snapshot-sessions-not-supported-server-error.json b/testdata/sessions/snapshot-sessions-not-supported-server-error.json deleted file mode 100644 index 79213f314f..0000000000 --- a/testdata/sessions/snapshot-sessions-not-supported-server-error.json +++ /dev/null @@ -1,187 +0,0 @@ -{ - "description": "snapshot-sessions-not-supported-server-error", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "5.0", - "topologies": [ - "single" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - }, - { - "session": { - "id": "session0", - "client": "client0", - "sessionOptions": { - "snapshot": true - } - } - } - ], - "initialData": [ - { - "collectionName": "collection0", - "databaseName": "database0", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "Server returns an error on find with snapshot", - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": {} - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandFailedEvent": { - "commandName": "find" - } - } - ] - } - ] - }, - { - "description": "Server returns an error on aggregate with snapshot", - "operations": [ - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "session": "session0", - "pipeline": [] - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandFailedEvent": { - "commandName": "aggregate" - } - } - ] - } - ] - }, - { - "description": "Server returns an error on distinct with snapshot", - "operations": [ - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": {}, - "session": "session0" - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "distinct": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandFailedEvent": { - "commandName": "distinct" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/sessions/snapshot-sessions-not-supported-server-error.yml b/testdata/sessions/snapshot-sessions-not-supported-server-error.yml deleted file mode 100644 index 4953dbcbe5..0000000000 --- a/testdata/sessions/snapshot-sessions-not-supported-server-error.yml +++ /dev/null @@ -1,102 +0,0 @@ -description: snapshot-sessions-not-supported-server-error - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "5.0" - topologies: [ single ] - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent, commandFailedEvent ] - - database: - id: &database0Name database0 - client: *client0 - databaseName: *database0Name - - collection: - id: &collection0Name collection0 - database: *database0Name - collectionName: *collection0Name - - session: - id: session0 - client: client0 - sessionOptions: - snapshot: true - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - -tests: -- description: Server returns an error on find with snapshot - operations: - - name: find - object: collection0 - arguments: - session: session0 - filter: {} - expectError: - isError: true - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - find: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandFailedEvent: - commandName: find - -- description: Server returns an error on aggregate with snapshot - operations: - - name: aggregate - object: collection0 - arguments: - session: session0 - pipeline: [] - expectError: - isError: true - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - aggregate: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandFailedEvent: - commandName: aggregate - -- description: Server returns an error on distinct with snapshot - operations: - - name: distinct - object: collection0 - arguments: - fieldName: x - filter: {} - session: session0 - expectError: - isError: true - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - distinct: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandFailedEvent: - commandName: distinct diff --git a/testdata/sessions/snapshot-sessions-unsupported-ops.json b/testdata/sessions/snapshot-sessions-unsupported-ops.json deleted file mode 100644 index c41f74d337..0000000000 --- a/testdata/sessions/snapshot-sessions-unsupported-ops.json +++ /dev/null @@ -1,493 +0,0 @@ -{ - "description": "snapshot-sessions-unsupported-ops", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "5.0", - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } - }, - { - "session": { - "id": "session0", - "client": "client0", - "sessionOptions": { - "snapshot": true - } - } - } - ], - "initialData": [ - { - "collectionName": "collection0", - "databaseName": "database0", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "Server returns an error on insertOne with snapshot", - "runOnRequirements": [ - { - "topologies": [ - "replicaset" - ] - } - ], - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 22, - "x": 22 - } - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandFailedEvent": { - "commandName": "insert" - } - } - ] - } - ] - }, - { - "description": "Server returns an error on insertMany with snapshot", - "runOnRequirements": [ - { - "topologies": [ - "replicaset" - ] - } - ], - "operations": [ - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "session": "session0", - "documents": [ - { - "_id": 22, - "x": 22 - }, - { - "_id": 33, - "x": 33 - } - ] - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandFailedEvent": { - "commandName": "insert" - } - } - ] - } - ] - }, - { - "description": "Server returns an error on deleteOne with snapshot", - "runOnRequirements": [ - { - "topologies": [ - "replicaset" - ] - } - ], - "operations": [ - { - "name": "deleteOne", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": {} - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandFailedEvent": { - "commandName": "delete" - } - } - ] - } - ] - }, - { - "description": "Server returns an error on updateOne with snapshot", - "runOnRequirements": [ - { - "topologies": [ - "replicaset" - ] - } - ], - "operations": [ - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandFailedEvent": { - "commandName": "update" - } - } - ] - } - ] - }, - { - "description": "Server returns an error on findOneAndUpdate with snapshot", - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandFailedEvent": { - "commandName": "findAndModify" - } - } - ] - } - ] - }, - { - "description": "Server returns an error on listDatabases with snapshot", - "operations": [ - { - "name": "listDatabases", - "object": "client0", - "arguments": { - "session": "session0" - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "listDatabases": 1, - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandFailedEvent": { - "commandName": "listDatabases" - } - } - ] - } - ] - }, - { - "description": "Server returns an error on listCollections with snapshot", - "operations": [ - { - "name": "listCollections", - "object": "database0", - "arguments": { - "session": "session0" - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "listCollections": 1, - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandFailedEvent": { - "commandName": "listCollections" - } - } - ] - } - ] - }, - { - "description": "Server returns an error on listIndexes with snapshot", - "operations": [ - { - "name": "listIndexes", - "object": "collection0", - "arguments": { - "session": "session0" - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "listIndexes": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandFailedEvent": { - "commandName": "listIndexes" - } - } - ] - } - ] - }, - { - "description": "Server returns an error on runCommand with snapshot", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "session": "session0", - "commandName": "listCollections", - "command": { - "listCollections": 1 - } - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "listCollections": 1, - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandFailedEvent": { - "commandName": "listCollections" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/sessions/snapshot-sessions-unsupported-ops.yml b/testdata/sessions/snapshot-sessions-unsupported-ops.yml deleted file mode 100644 index 91d785e47e..0000000000 --- a/testdata/sessions/snapshot-sessions-unsupported-ops.yml +++ /dev/null @@ -1,258 +0,0 @@ -description: snapshot-sessions-unsupported-ops - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "5.0" - topologies: [replicaset, sharded] - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent, commandFailedEvent ] - - database: - id: &database0Name database0 - client: *client0 - databaseName: *database0Name - - collection: - id: &collection0Name collection0 - database: *database0Name - collectionName: *collection0Name - - session: - id: session0 - client: client0 - sessionOptions: - snapshot: true - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - -tests: -- description: Server returns an error on insertOne with snapshot - # Skip on sharded clusters due to SERVER-58176. - runOnRequirements: - - topologies: [replicaset] - operations: - - name: insertOne - object: collection0 - arguments: - session: session0 - document: - _id: 22 - x: 22 - expectError: - isError: true - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - insert: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandFailedEvent: - commandName: insert - -- description: Server returns an error on insertMany with snapshot - # Skip on sharded clusters due to SERVER-58176. - runOnRequirements: - - topologies: [replicaset] - operations: - - name: insertMany - object: collection0 - arguments: - session: session0 - documents: - - _id: 22 - x: 22 - - _id: 33 - x: 33 - expectError: - isError: true - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - insert: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandFailedEvent: - commandName: insert - -- description: Server returns an error on deleteOne with snapshot - # Skip on sharded clusters due to SERVER-58176. - runOnRequirements: - - topologies: [replicaset] - operations: - - name: deleteOne - object: collection0 - arguments: - session: session0 - filter: {} - expectError: - isError: true - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - delete: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandFailedEvent: - commandName: delete - -- description: Server returns an error on updateOne with snapshot - # Skip on sharded clusters due to SERVER-58176. - runOnRequirements: - - topologies: [replicaset] - operations: - - name: updateOne - object: collection0 - arguments: - session: session0 - filter: { _id: 1 } - update: { $inc: { x: 1 } } - expectError: - isError: true - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - update: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandFailedEvent: - commandName: update - -- description: Server returns an error on findOneAndUpdate with snapshot - operations: - - name: findOneAndUpdate - object: collection0 - arguments: - session: session0 - filter: { _id: 1 } - update: { $inc: { x: 1 } } - expectError: - isError: true - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - findAndModify: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandFailedEvent: - commandName: findAndModify - -- description: Server returns an error on listDatabases with snapshot - operations: - - name: listDatabases - object: client0 - arguments: - session: session0 - expectError: - isError: true - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - listDatabases: 1 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandFailedEvent: - commandName: listDatabases - -- description: Server returns an error on listCollections with snapshot - operations: - - name: listCollections - object: database0 - arguments: - session: session0 - expectError: - isError: true - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - listCollections: 1 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandFailedEvent: - commandName: listCollections - -- description: Server returns an error on listIndexes with snapshot - operations: - - name: listIndexes - object: collection0 - arguments: - session: session0 - expectError: - isError: true - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - listIndexes: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandFailedEvent: - commandName: listIndexes - -- description: Server returns an error on runCommand with snapshot - operations: - - name: runCommand - object: database0 - arguments: - session: session0 - commandName: listCollections - command: - listCollections: 1 - expectError: - isError: true - isClientError: false - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - listCollections: 1 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandFailedEvent: - commandName: listCollections diff --git a/testdata/sessions/snapshot-sessions.json b/testdata/sessions/snapshot-sessions.json deleted file mode 100644 index 260f8b6f48..0000000000 --- a/testdata/sessions/snapshot-sessions.json +++ /dev/null @@ -1,993 +0,0 @@ -{ - "description": "snapshot-sessions", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "5.0", - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "findAndModify", - "insert", - "update" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0", - "collectionOptions": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "session": { - "id": "session0", - "client": "client0", - "sessionOptions": { - "snapshot": true - } - } - }, - { - "session": { - "id": "session1", - "client": "client0", - "sessionOptions": { - "snapshot": true - } - } - } - ], - "initialData": [ - { - "collectionName": "collection0", - "databaseName": "database0", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "Find operation with snapshot", - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - } - ] - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "After" - }, - "expectResult": { - "_id": 1, - "x": 12 - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "session": "session1", - "filter": { - "_id": 1 - } - }, - "expectResult": [ - { - "_id": 1, - "x": 12 - } - ] - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "After" - }, - "expectResult": { - "_id": 1, - "x": 13 - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - } - }, - "expectResult": [ - { - "_id": 1, - "x": 13 - } - ] - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - } - ] - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "session": "session1", - "filter": { - "_id": 1 - } - }, - "expectResult": [ - { - "_id": 1, - "x": 12 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "find": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "find": "collection0", - "readConcern": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "find": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": true - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "find": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": true - } - } - } - } - } - ] - } - ] - }, - { - "description": "Distinct operation with snapshot", - "operations": [ - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": {}, - "session": "session0" - }, - "expectResult": [ - 11 - ] - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "After" - }, - "expectResult": { - "_id": 2, - "x": 12 - } - }, - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": {}, - "session": "session1" - }, - "expectResult": [ - 11, - 12 - ] - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "After" - }, - "expectResult": { - "_id": 2, - "x": 13 - } - }, - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": {} - }, - "expectResult": [ - 11, - 13 - ] - }, - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": {}, - "session": "session0" - }, - "expectResult": [ - 11 - ] - }, - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": {}, - "session": "session1" - }, - "expectResult": [ - 11, - 12 - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "distinct": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "distinct": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "distinct": "collection0", - "readConcern": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "distinct": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": true - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "distinct": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": true - } - } - } - } - } - ] - } - ] - }, - { - "description": "Aggregate operation with snapshot", - "operations": [ - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": 1 - } - } - ], - "session": "session0" - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - } - ] - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "After" - }, - "expectResult": { - "_id": 1, - "x": 12 - } - }, - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": 1 - } - } - ], - "session": "session1" - }, - "expectResult": [ - { - "_id": 1, - "x": 12 - } - ] - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "After" - }, - "expectResult": { - "_id": 1, - "x": 13 - } - }, - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": 1 - } - } - ] - }, - "expectResult": [ - { - "_id": 1, - "x": 13 - } - ] - }, - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": 1 - } - } - ], - "session": "session0" - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - } - ] - }, - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": 1 - } - } - ], - "session": "session1" - }, - "expectResult": [ - { - "_id": 1, - "x": 12 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "readConcern": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": true - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": true - } - } - } - } - } - ] - } - ] - }, - { - "description": "countDocuments operation with snapshot", - "operations": [ - { - "name": "countDocuments", - "object": "collection0", - "arguments": { - "filter": {}, - "session": "session0" - }, - "expectResult": 2 - }, - { - "name": "countDocuments", - "object": "collection0", - "arguments": { - "filter": {}, - "session": "session0" - }, - "expectResult": 2 - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": true - } - } - } - } - } - ] - } - ] - }, - { - "description": "Mixed operation with snapshot", - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - } - ] - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "After" - }, - "expectResult": { - "_id": 1, - "x": 12 - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - } - }, - "expectResult": [ - { - "_id": 1, - "x": 12 - } - ] - }, - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": 1 - } - } - ], - "session": "session0" - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - } - ] - }, - { - "name": "distinct", - "object": "collection0", - "arguments": { - "fieldName": "x", - "filter": {}, - "session": "session0" - }, - "expectResult": [ - 11 - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "find": "collection0", - "readConcern": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": true - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "distinct": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": true - } - } - } - } - } - ] - } - ] - }, - { - "description": "Write commands with snapshot session do not affect snapshot reads", - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {}, - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 22, - "x": 33 - } - } - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "session": "session0" - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "find": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": true - } - } - } - } - } - ] - } - ] - }, - { - "description": "First snapshot read does not send atClusterTime", - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {}, - "session": "session0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection0", - "readConcern": { - "level": "snapshot", - "atClusterTime": { - "$$exists": false - } - } - }, - "commandName": "find", - "databaseName": "database0" - } - } - ] - } - ] - }, - { - "description": "StartTransaction fails in snapshot session", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "expectError": { - "isError": true, - "isClientError": true, - "errorContains": "Transactions are not supported in snapshot sessions" - } - } - ] - } - ] -} diff --git a/testdata/sessions/snapshot-sessions.yml b/testdata/sessions/snapshot-sessions.yml deleted file mode 100644 index bcf0f7eec6..0000000000 --- a/testdata/sessions/snapshot-sessions.yml +++ /dev/null @@ -1,482 +0,0 @@ -description: snapshot-sessions - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "5.0" - topologies: [replicaset, sharded] - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent] - ignoreCommandMonitoringEvents: [ findAndModify, insert, update ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name collection0 - collectionOptions: - writeConcern: { w: majority } - - session: - id: session0 - client: client0 - sessionOptions: - snapshot: true - - session: - id: session1 - client: client0 - sessionOptions: - snapshot: true - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 11 } - -tests: -- description: Find operation with snapshot - operations: - - name: find - object: collection0 - arguments: - session: session0 - filter: { _id: 1 } - expectResult: - - {_id: 1, x: 11} - - name: findOneAndUpdate - object: collection0 - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: After - expectResult: { _id: 1, x: 12 } - - name: find - object: collection0 - arguments: - session: session1 - filter: { _id: 1 } - expectResult: - - { _id: 1, x: 12 } - - name: findOneAndUpdate - object: collection0 - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: After - expectResult: { _id: 1, x: 13 } - - name: find - object: collection0 - arguments: - filter: { _id: 1 } - expectResult: - - { _id: 1, x: 13 } - - name: find - object: collection0 - arguments: - session: session0 - filter: { _id: 1 } - expectResult: - - {_id: 1, x: 11} - - name: find - object: collection0 - arguments: - session: session1 - filter: { _id: 1 } - expectResult: - - {_id: 1, x: 12} - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - find: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandStartedEvent: - command: - find: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandStartedEvent: - command: - find: collection0 - readConcern: - "$$exists": false - - commandStartedEvent: - command: - find: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": true - - commandStartedEvent: - command: - find: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": true - -- description: Distinct operation with snapshot - operations: - - name: distinct - object: collection0 - arguments: - fieldName: x - filter: {} - session: session0 - expectResult: - - 11 - - name: findOneAndUpdate - object: collection0 - arguments: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - returnDocument: After - expectResult: { _id: 2, x: 12 } - - name: distinct - object: collection0 - arguments: - fieldName: x - filter: {} - session: session1 - expectResult: [11, 12] - - name: findOneAndUpdate - object: collection0 - arguments: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - returnDocument: After - expectResult: { _id: 2, x: 13 } - - name: distinct - object: collection0 - arguments: - fieldName: x - filter: {} - expectResult: [ 11, 13 ] - - name: distinct - object: collection0 - arguments: - fieldName: x - filter: {} - session: session0 - expectResult: [ 11 ] - - name: distinct - object: collection0 - arguments: - fieldName: x - filter: {} - session: session1 - expectResult: [ 11, 12 ] - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - distinct: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandStartedEvent: - command: - distinct: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandStartedEvent: - command: - distinct: collection0 - readConcern: - "$$exists": false - - commandStartedEvent: - command: - distinct: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": true - - commandStartedEvent: - command: - distinct: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": true - -- description: Aggregate operation with snapshot - operations: - - name: aggregate - object: collection0 - arguments: - pipeline: - - "$match": { _id: 1 } - session: session0 - expectResult: - - { _id: 1, x: 11 } - - name: findOneAndUpdate - object: collection0 - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: After - expectResult: { _id: 1, x: 12 } - - name: aggregate - object: collection0 - arguments: - pipeline: - - "$match": - _id: 1 - session: session1 - expectResult: - - {_id: 1, x: 12} - - name: findOneAndUpdate - object: collection0 - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: After - expectResult: { _id: 1, x: 13 } - - name: aggregate - object: collection0 - arguments: - pipeline: - - "$match": { _id: 1 } - expectResult: - - { _id: 1, x: 13 } - - name: aggregate - object: collection0 - arguments: - pipeline: - - "$match": - _id: 1 - session: session0 - expectResult: - - { _id: 1, x: 11 } - - name: aggregate - object: collection0 - arguments: - pipeline: - - "$match": { _id: 1 } - session: session1 - expectResult: - - { _id: 1, x: 12 } - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - aggregate: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandStartedEvent: - command: - aggregate: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandStartedEvent: - command: - aggregate: collection0 - readConcern: - "$$exists": false - - commandStartedEvent: - command: - aggregate: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": true - - commandStartedEvent: - command: - aggregate: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": true - -- description: countDocuments operation with snapshot - operations: - - name: countDocuments - object: collection0 - arguments: - filter: {} - session: session0 - expectResult: 2 - - name: countDocuments - object: collection0 - arguments: - filter: {} - session: session0 - expectResult: 2 - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - aggregate: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandStartedEvent: - command: - aggregate: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": true - -- description: Mixed operation with snapshot - operations: - - name: find - object: collection0 - arguments: - session: session0 - filter: { _id: 1 } - expectResult: - - { _id: 1, x: 11 } - - name: findOneAndUpdate - object: collection0 - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: After - expectResult: { _id: 1, x: 12 } - - name: find - object: collection0 - arguments: - filter: { _id: 1 } - expectResult: - - { _id: 1, x: 12 } - - name: aggregate - object: collection0 - arguments: - pipeline: - - "$match": - _id: 1 - session: session0 - expectResult: - - { _id: 1, x: 11 } - - name: distinct - object: collection0 - arguments: - fieldName: x - filter: {} - session: session0 - expectResult: [ 11 ] - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - find: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandStartedEvent: - command: - find: collection0 - readConcern: - "$$exists": false - - commandStartedEvent: - command: - aggregate: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": true - - commandStartedEvent: - command: - distinct: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": true - -- description: Write commands with snapshot session do not affect snapshot reads - operations: - - name: find - object: collection0 - arguments: - filter: {} - session: session0 - - name: insertOne - object: collection0 - arguments: - document: - _id: 22 - x: 33 - - name: updateOne - object: collection0 - arguments: - filter: { _id: 1 } - update: { $inc: { x: 1 } } - - name: find - object: collection0 - arguments: - filter: { _id: 1 } - session: session0 - expectResult: - - {_id: 1, x: 11} - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - find: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - - commandStartedEvent: - command: - find: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": true - -- description: First snapshot read does not send atClusterTime - operations: - - name: find - object: collection0 - arguments: - filter: {} - session: session0 - expectEvents: - - client: client0 - events: - - commandStartedEvent: - command: - find: collection0 - readConcern: - level: snapshot - atClusterTime: - "$$exists": false - commandName: find - databaseName: database0 - -- description: StartTransaction fails in snapshot session - operations: - - name: startTransaction - object: session0 - expectError: - isError: true - isClientError: true - errorContains: Transactions are not supported in snapshot sessions diff --git a/testdata/single_and_multi_document/large_doc.json.gz b/testdata/single_and_multi_document/large_doc.json.gz deleted file mode 100644 index 58f659c572..0000000000 Binary files a/testdata/single_and_multi_document/large_doc.json.gz and /dev/null differ diff --git a/testdata/single_and_multi_document/small_doc.json.gz b/testdata/single_and_multi_document/small_doc.json.gz deleted file mode 100644 index a6d02f3613..0000000000 Binary files a/testdata/single_and_multi_document/small_doc.json.gz and /dev/null differ diff --git a/testdata/single_and_multi_document/tweet.json.gz b/testdata/single_and_multi_document/tweet.json.gz deleted file mode 100644 index 92d96883a1..0000000000 Binary files a/testdata/single_and_multi_document/tweet.json.gz and /dev/null differ diff --git a/testdata/specifications b/testdata/specifications index 43d2c7bacd..4e5d624565 160000 --- a/testdata/specifications +++ b/testdata/specifications @@ -1 +1 @@ -Subproject commit 43d2c7bacd62249de8d2173bf8ee39e6fd7a686e +Subproject commit 4e5d6245655f30f13e42a15bd340f57f6729bb27 diff --git a/testdata/transactions/legacy/abort.json b/testdata/transactions/legacy/abort.json deleted file mode 100644 index 3729a98298..0000000000 --- a/testdata/transactions/legacy/abort.json +++ /dev/null @@ -1,621 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "abort", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": { - "afterClusterTime": 42 - }, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "implicit abort", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "two aborts", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "abortTransaction", - "object": "session0", - "result": { - "errorContains": "cannot call abortTransaction twice" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abort without start", - "operations": [ - { - "name": "abortTransaction", - "object": "session0", - "result": { - "errorContains": "no transaction started" - } - } - ], - "expectations": [], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abort directly after no-op commit", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "abortTransaction", - "object": "session0", - "result": { - "errorContains": "Cannot call abortTransaction after calling commitTransaction" - } - } - ], - "expectations": [], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abort directly after commit", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "abortTransaction", - "object": "session0", - "result": { - "errorContains": "Cannot call abortTransaction after calling commitTransaction" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "abort ignores TransactionAborted", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "errorLabelsOmit": [ - "TransientTransactionError", - "UnknownTransactionCommitResult" - ], - "errorContains": "E11000" - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "errorCodeName": "NoSuchTransaction", - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abort does not apply writeConcern", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": 10 - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "outcome": { - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/abort.yml b/testdata/transactions/legacy/abort.yml deleted file mode 100644 index aa79043232..0000000000 --- a/testdata/transactions/legacy/abort.yml +++ /dev/null @@ -1,413 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: abort - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - "$numberLong": "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - afterClusterTime: 42 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: implicit abort - - operations: - # Start a transaction but don't commit - the driver calls abortTransaction - # from ClientSession.endSession(). - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: two aborts - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - name: abortTransaction - object: session0 - result: - errorContains: cannot call abortTransaction twice - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abort without start - - operations: - - name: abortTransaction - object: session0 - result: - errorContains: no transaction started - - expectations: [] - - outcome: - collection: - data: [] - - - description: abort directly after no-op commit - - operations: - - name: startTransaction - object: session0 - - name: commitTransaction - object: session0 - - name: abortTransaction # Error calling abort after no-op commit. - object: session0 - result: - errorContains: Cannot call abortTransaction after calling commitTransaction - - expectations: [] - - outcome: - collection: - data: [] - - - description: abort directly after commit - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - name: abortTransaction # Error calling abort after commit. - object: session0 - result: - errorContains: Cannot call abortTransaction after calling commitTransaction - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: abort ignores TransactionAborted - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - # Abort the server transaction with a duplicate key error. - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - errorLabelsOmit: ["TransientTransactionError", "UnknownTransactionCommitResult"] - # DuplicateKey error code included in the bulk write error message - # returned by the server - errorContains: E11000 - # Make sure the server aborted the transaction. - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - errorCodeName: NoSuchTransaction - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["UnknownTransactionCommitResult"] - # abortTransaction must ignore the TransactionAborted and succeed. - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - - outcome: - collection: - data: [] - - - description: abort does not apply writeConcern - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: 10 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - # No write concern error. - - outcome: - collection: - data: [] diff --git a/testdata/transactions/legacy/bulk.json b/testdata/transactions/legacy/bulk.json deleted file mode 100644 index 8a9793b8b3..0000000000 --- a/testdata/transactions/legacy/bulk.json +++ /dev/null @@ -1,531 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "bulk", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "result": { - "deletedCount": 1 - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "session": "session0", - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1 - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - }, - { - "name": "updateOne", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$set": { - "x": 2 - } - }, - "upsert": true - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 3 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 4 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 5 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 6 - } - } - }, - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 7 - } - } - }, - { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "y": 1 - } - } - }, - { - "name": "replaceOne", - "arguments": { - "filter": { - "_id": 2 - }, - "replacement": { - "y": 2 - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 3 - } - } - }, - { - "name": "deleteOne", - "arguments": { - "filter": { - "_id": 4 - } - } - }, - { - "name": "updateMany", - "arguments": { - "filter": { - "_id": { - "$gte": 2 - } - }, - "update": { - "$set": { - "z": 1 - } - } - } - }, - { - "name": "deleteMany", - "arguments": { - "filter": { - "_id": { - "$gte": 6 - } - } - } - } - ] - }, - "result": { - "deletedCount": 4, - "insertedCount": 6, - "insertedIds": { - "0": 1, - "3": 3, - "4": 4, - "5": 5, - "6": 6, - "7": 7 - }, - "matchedCount": 7, - "modifiedCount": 7, - "upsertedCount": 1, - "upsertedIds": { - "2": 2 - } - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": 1 - }, - "limit": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "delete", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$set": { - "x": 1 - } - } - }, - { - "q": { - "_id": 2 - }, - "u": { - "$set": { - "x": 2 - } - }, - "upsert": true - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - }, - { - "_id": 5 - }, - { - "_id": 6 - }, - { - "_id": 7 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "y": 1 - } - }, - { - "q": { - "_id": 2 - }, - "u": { - "y": 2 - } - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": 3 - }, - "limit": 1 - }, - { - "q": { - "_id": 4 - }, - "limit": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "delete", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": { - "$gte": 2 - } - }, - "u": { - "$set": { - "z": 1 - } - }, - "multi": true - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": { - "$gte": 6 - } - }, - "limit": 0 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "delete", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "y": 1 - }, - { - "_id": 2, - "y": 2, - "z": 1 - }, - { - "_id": 5, - "z": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/bulk.yml b/testdata/transactions/legacy/bulk.yml deleted file mode 100644 index 513bcb09ed..0000000000 --- a/testdata/transactions/legacy/bulk.yml +++ /dev/null @@ -1,268 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: bulk - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: deleteOne - object: collection - arguments: - session: session0 - filter: - _id: 1 - result: - deletedCount: 1 - - name: bulkWrite - object: collection - arguments: - session: session0 - requests: - - name: insertOne - arguments: - document: {_id: 1} - - name: updateOne - arguments: - filter: {_id: 1} - update: {$set: {x: 1}} - - name: updateOne - arguments: - filter: {_id: 2} - update: {$set: {x: 2}} - upsert: true # Produces upsertedIds: {2: 2} in the result. - - name: insertOne - arguments: - document: {_id: 3} - - name: insertOne - arguments: - document: {_id: 4} - - name: insertOne - arguments: - document: {_id: 5} - - name: insertOne - arguments: - document: {_id: 6} - - name: insertOne - arguments: - document: {_id: 7} - # Keep replaces segregated from updates, so that drivers that aren't able to coalesce - # adjacent updates and replaces into a single update command will still pass this test - - name: replaceOne - arguments: - filter: {_id: 1} - replacement: {y: 1} - - name: replaceOne - arguments: - filter: {_id: 2} - replacement: {y: 2} - - name: deleteOne - arguments: - filter: {_id: 3} - - name: deleteOne - arguments: - filter: {_id: 4} - - name: updateMany - arguments: - filter: {_id: {$gte: 2}} - update: {$set: {z: 1}} - # Keep deleteMany segregated from deleteOne, so that drivers that aren't able to coalesce - # adjacent mixed deletes into a single delete command will still pass this test - - name: deleteMany - arguments: - filter: {_id: {$gte: 6}} - result: - deletedCount: 4 - insertedCount: 6 - insertedIds: {0: 1, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} - matchedCount: 7 - modifiedCount: 7 - upsertedCount: 1 - upsertedIds: {2: 2} - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - delete: *collection_name - deletes: - - q: {_id: 1} - limit: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: delete - database_name: *database_name - # Commands in the bulkWrite. - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - update: *collection_name - updates: - - q: {_id: 1} - u: {$set: {x: 1}} - - q: {_id: 2} - u: {$set: {x: 2}} - upsert: true - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: update - database_name: *database_name - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 3 - - _id: 4 - - _id: 5 - - _id: 6 - - _id: 7 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - update: *collection_name - updates: - - q: {_id: 1} - u: {y: 1} - - q: {_id: 2} - u: {y: 2} - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: update - database_name: *database_name - - command_started_event: - command: - delete: *collection_name - deletes: - - q: {_id: 3} - limit: 1 - - q: {_id: 4} - limit: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: delete - database_name: *database_name - - command_started_event: - command: - update: *collection_name - updates: - - q: {_id: {$gte: 2}} - u: {$set: {z: 1}} - multi: true - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: update - database_name: *database_name - - command_started_event: - command: - delete: *collection_name - deletes: - - q: {_id: {$gte: 6}} - limit: 0 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: delete - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - {_id: 1, y: 1} - - {_id: 2, y: 2, z: 1} - - {_id: 5, z: 1} diff --git a/testdata/transactions/legacy/causal-consistency.json b/testdata/transactions/legacy/causal-consistency.json deleted file mode 100644 index 0e81bf2ff2..0000000000 --- a/testdata/transactions/legacy/causal-consistency.json +++ /dev/null @@ -1,305 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [ - { - "_id": 1, - "count": 0 - } - ], - "tests": [ - { - "description": "causal consistency", - "clientOptions": { - "retryWrites": false - }, - "operations": [ - { - "name": "updateOne", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "count": 1 - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "count": 1 - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$inc": { - "count": 1 - } - } - } - ], - "ordered": true, - "lsid": "session0", - "readConcern": null, - "txnNumber": null, - "startTransaction": null, - "autocommit": null, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$inc": { - "count": 1 - } - } - } - ], - "ordered": true, - "readConcern": { - "afterClusterTime": 42 - }, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "count": 2 - } - ] - } - } - }, - { - "description": "causal consistency disabled", - "clientOptions": { - "retryWrites": false - }, - "sessionOptions": { - "session0": { - "causalConsistency": false - } - }, - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "count": 1 - } - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": null, - "autocommit": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 1 - }, - "u": { - "$inc": { - "count": 1 - } - } - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1, - "count": 1 - }, - { - "_id": 2 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/causal-consistency.yml b/testdata/transactions/legacy/causal-consistency.yml deleted file mode 100644 index aaac8ac60e..0000000000 --- a/testdata/transactions/legacy/causal-consistency.yml +++ /dev/null @@ -1,175 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: - - _id: 1 - count: 0 - -tests: - - description: causal consistency - clientOptions: - retryWrites: false - operations: - # Update a document without a transaction. - - &updateOne - name: updateOne - object: collection - arguments: - session: session0 - filter: {_id: 1} - update: - $inc: {count: 1} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - # Updating the same document inside a transaction. - # Casual consistency ensures that the transaction snapshot is causally - # after the first updateOne. - - name: startTransaction - object: session0 - - *updateOne - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - update: *collection_name - updates: - - q: {_id: 1} - u: {$inc: {count: 1}} - ordered: true - lsid: session0 - readConcern: - txnNumber: - startTransaction: - autocommit: - writeConcern: - command_name: update - database_name: *database_name - - command_started_event: - command: - update: *collection_name - updates: - - q: {_id: 1} - u: {$inc: {count: 1}} - ordered: true - readConcern: - afterClusterTime: 42 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: update - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - count: 2 - - - description: causal consistency disabled - clientOptions: - retryWrites: false - sessionOptions: - session0: - causalConsistency: false - - operations: - # Insert a document without a transaction. - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 2 - result: - insertedId: 2 - - name: startTransaction - object: session0 - - name: updateOne - object: collection - arguments: - session: session0 - filter: {_id: 1} - update: - $inc: {count: 1} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - ordered: true - readConcern: - lsid: session0 - txnNumber: - autocommit: - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - update: *collection_name - updates: - - q: {_id: 1} - u: {$inc: {count: 1}} - ordered: true - # No afterClusterTime - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: update - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - count: 1 - - _id: 2 diff --git a/testdata/transactions/legacy/commit.json b/testdata/transactions/legacy/commit.json deleted file mode 100644 index faa39a65f1..0000000000 --- a/testdata/transactions/legacy/commit.json +++ /dev/null @@ -1,925 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "commit", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "readConcern": { - "afterClusterTime": 42 - }, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - }, - { - "description": "rerun commit after empty transaction", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "multiple commits in a row", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "write concern error on commit", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": 10 - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsOmit": [ - "TransientTransactionError", - "UnknownTransactionCommitResult" - ] - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commit without start", - "operations": [ - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorContains": "no transaction started" - } - } - ], - "expectations": [], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "commit after no-op abort", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorContains": "Cannot call commitTransaction after calling abortTransaction" - } - } - ], - "expectations": [], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "commit after abort", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorContains": "Cannot call commitTransaction after calling abortTransaction" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ] - }, - { - "description": "multiple commits after empty transaction", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": { - "afterClusterTime": 42 - }, - "lsid": "session0", - "txnNumber": { - "$numberLong": "3" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "3" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "reset session state commit", - "clientOptions": { - "retryWrites": false - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorContains": "no transaction started" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": null, - "startTransaction": null, - "autocommit": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - }, - { - "description": "reset session state abort", - "clientOptions": { - "retryWrites": false - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "abortTransaction", - "object": "session0", - "result": { - "errorContains": "no transaction started" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": null, - "startTransaction": null, - "autocommit": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 2 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/commit.yml b/testdata/transactions/legacy/commit.yml deleted file mode 100644 index 3758bf57da..0000000000 --- a/testdata/transactions/legacy/commit.yml +++ /dev/null @@ -1,603 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] -tests: - - description: commit - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - # Again, to verify that txnNumber is incremented. - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 2 - result: - insertedId: 2 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - ordered: true - readConcern: - afterClusterTime: 42 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - _id: 2 - - - description: rerun commit after empty transaction - - operations: - - name: startTransaction - object: session0 - - name: commitTransaction - object: session0 - # Rerun the commit (which does not increment the txnNumber). - - name: commitTransaction - object: session0 - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: multiple commits in a row - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - name: commitTransaction - object: session0 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: write concern error on commit - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: 10 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - # { - # 'ok': 1.0, - # 'writeConcernError': { - # 'code': 100, - # 'codeName': 'UnsatisfiableWriteConcern', - # 'errmsg': 'Not enough data-bearing nodes' - # } - # } - errorLabelsOmit: ["TransientTransactionError", "UnknownTransactionCommitResult"] - - outcome: - collection: - data: - - _id: 1 - - - description: commit without start - - operations: - - name: commitTransaction - object: session0 - result: - errorContains: no transaction started - - expectations: [] - - outcome: - collection: - data: [] - - - description: commit after no-op abort - - operations: - - name: startTransaction - object: session0 - - name: abortTransaction - object: session0 - - name: commitTransaction - object: session0 - result: - errorContains: Cannot call commitTransaction after calling abortTransaction - - expectations: [] - - outcome: - collection: - data: [] - - - description: commit after abort - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - name: commitTransaction - object: session0 - result: - errorContains: Cannot call commitTransaction after calling abortTransaction - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - - description: multiple commits after empty transaction - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - # Increments txnNumber. - - name: startTransaction - object: session0 - # These commits aren't sent to server, transaction is empty. - - name: commitTransaction - object: session0 - - name: commitTransaction - object: session0 - # Verify that previous, empty transaction incremented txnNumber. - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - afterClusterTime: 42 - lsid: session0 - # txnNumber 2 was skipped. - txnNumber: - $numberLong: "3" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "3" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: reset session state commit - clientOptions: - retryWrites: false - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - # Running any operation after an ended transaction resets the session - # state to "no transaction". - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 2 - result: - insertedId: 2 - # Calling commit again should error instead of re-running the commit. - - name: commitTransaction - object: session0 - result: - errorContains: no transaction started - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - ordered: true - readConcern: - lsid: session0 - txnNumber: - startTransaction: - autocommit: - command_name: insert - database_name: *database_name - - outcome: - collection: - data: - - _id: 1 - - _id: 2 - - - description: reset session state abort - clientOptions: - retryWrites: false - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - # Running any operation after an ended transaction resets the session - # state to "no transaction". - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 2 - result: - insertedId: 2 - # Calling abort should error with "no transaction started" instead of - # "cannot call abortTransaction twice". - - name: abortTransaction - object: session0 - result: - errorContains: no transaction started - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - ordered: true - readConcern: - lsid: session0 - txnNumber: - startTransaction: - autocommit: - command_name: insert - database_name: *database_name - - outcome: - collection: - data: - - _id: 2 diff --git a/testdata/transactions/legacy/count.json b/testdata/transactions/legacy/count.json deleted file mode 100644 index 169296416a..0000000000 --- a/testdata/transactions/legacy/count.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0.2", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ], - "tests": [ - { - "description": "count", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "count", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "result": { - "errorCodeName": "OperationNotSupportedInTransaction", - "errorLabelsOmit": [ - "TransientTransactionError", - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "count": "test", - "query": { - "_id": 1 - }, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "count", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/count.yml b/testdata/transactions/legacy/count.yml deleted file mode 100644 index e3a1da2fc8..0000000000 --- a/testdata/transactions/legacy/count.yml +++ /dev/null @@ -1,67 +0,0 @@ -runOn: - # SERVER-35388 introduced OperationNotSupportedInTransaction in 4.0.2 - - - minServerVersion: "4.0.2" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: &data - - {_id: 1} - - {_id: 2} - - {_id: 3} - - {_id: 4} - -tests: - - description: count - - operations: - - name: startTransaction - object: session0 - - name: count - object: collection - arguments: - session: session0 - filter: - _id: 1 - result: - errorCodeName: OperationNotSupportedInTransaction - errorLabelsOmit: ["TransientTransactionError", "UnknownTransactionCommitResult"] - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - count: *collection_name - query: - _id: 1 - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: count - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: - *data diff --git a/testdata/transactions/legacy/create-collection.json b/testdata/transactions/legacy/create-collection.json deleted file mode 100644 index 9071c59c41..0000000000 --- a/testdata/transactions/legacy/create-collection.json +++ /dev/null @@ -1,204 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.4", - "topology": [ - "replicaset", - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "explicitly create collection using create command", - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "test" - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "session": "session0", - "collection": "test" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "transaction-tests", - "collection": "test" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "transaction-tests", - "collection": "test" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "drop": "test", - "writeConcern": null - }, - "command_name": "drop", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "create": "test", - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "create", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ] - }, - { - "description": "implicitly create collection using insert", - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "test" - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "database": "transaction-tests", - "collection": "test" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "database": "transaction-tests", - "collection": "test" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "drop": "test", - "writeConcern": null - }, - "command_name": "drop", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ] - } - ] -} diff --git a/testdata/transactions/legacy/create-collection.yml b/testdata/transactions/legacy/create-collection.yml deleted file mode 100644 index b94326a168..0000000000 --- a/testdata/transactions/legacy/create-collection.yml +++ /dev/null @@ -1,131 +0,0 @@ -runOn: - - - minServerVersion: "4.3.4" - topology: ["replicaset", "sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: explicitly create collection using create command - - operations: - - name: dropCollection - object: database - arguments: - collection: *collection_name - - name: startTransaction - object: session0 - - name: createCollection - object: database - arguments: - session: session0 - collection: *collection_name - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *collection_name - - name: commitTransaction - object: session0 - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *collection_name - - expectations: - - command_started_event: - command: - drop: *collection_name - writeConcern: - command_name: drop - database_name: *database_name - - command_started_event: - command: - create: *collection_name - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: create - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - - description: implicitly create collection using insert - - operations: - - name: dropCollection - object: database - arguments: - collection: *collection_name - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: assertCollectionNotExists - object: testRunner - arguments: - database: *database_name - collection: *collection_name - - name: commitTransaction - object: session0 - - name: assertCollectionExists - object: testRunner - arguments: - database: *database_name - collection: *collection_name - - expectations: - - command_started_event: - command: - drop: *collection_name - writeConcern: - command_name: drop - database_name: *database_name - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin diff --git a/testdata/transactions/legacy/create-index.json b/testdata/transactions/legacy/create-index.json deleted file mode 100644 index 2ff09c9288..0000000000 --- a/testdata/transactions/legacy/create-index.json +++ /dev/null @@ -1,237 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.4", - "topology": [ - "replicaset", - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "create index on a non-existing collection", - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "test" - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "createIndex", - "object": "collection", - "arguments": { - "session": "session0", - "name": "t_1", - "keys": { - "x": 1 - } - } - }, - { - "name": "assertIndexNotExists", - "object": "testRunner", - "arguments": { - "database": "transaction-tests", - "collection": "test", - "index": "t_1" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "database": "transaction-tests", - "collection": "test", - "index": "t_1" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "drop": "test", - "writeConcern": null - }, - "command_name": "drop", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "createIndexes": "test", - "indexes": [ - { - "name": "t_1", - "key": { - "x": 1 - } - } - ], - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "createIndexes", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ] - }, - { - "description": "create index on a collection created within the same transaction", - "operations": [ - { - "name": "dropCollection", - "object": "database", - "arguments": { - "collection": "test" - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "createCollection", - "object": "database", - "arguments": { - "session": "session0", - "collection": "test" - } - }, - { - "name": "createIndex", - "object": "collection", - "arguments": { - "session": "session0", - "name": "t_1", - "keys": { - "x": 1 - } - } - }, - { - "name": "assertIndexNotExists", - "object": "testRunner", - "arguments": { - "database": "transaction-tests", - "collection": "test", - "index": "t_1" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "database": "transaction-tests", - "collection": "test", - "index": "t_1" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "drop": "test", - "writeConcern": null - }, - "command_name": "drop", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "create": "test", - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "create", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "createIndexes": "test", - "indexes": [ - { - "name": "t_1", - "key": { - "x": 1 - } - } - ], - "lsid": "session0", - "writeConcern": null - }, - "command_name": "createIndexes", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ] - } - ] -} diff --git a/testdata/transactions/legacy/create-index.yml b/testdata/transactions/legacy/create-index.yml deleted file mode 100644 index d2380f4745..0000000000 --- a/testdata/transactions/legacy/create-index.yml +++ /dev/null @@ -1,152 +0,0 @@ -runOn: - - - minServerVersion: "4.3.4" - topology: ["replicaset", "sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: create index on a non-existing collection - - operations: - - name: dropCollection - object: database - arguments: - collection: *collection_name - - name: startTransaction - object: session0 - - name: createIndex - object: collection - arguments: - session: session0 - name: &index_name "t_1" - keys: - x: 1 - - name: assertIndexNotExists - object: testRunner - arguments: - database: *database_name - collection: *collection_name - index: *index_name - - name: commitTransaction - object: session0 - - name: assertIndexExists - object: testRunner - arguments: - database: *database_name - collection: *collection_name - index: *index_name - - expectations: - - command_started_event: - command: - drop: *collection_name - writeConcern: - command_name: drop - database_name: *database_name - - command_started_event: - command: - createIndexes: *collection_name - indexes: - - name: *index_name - key: - x: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: createIndexes - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - - description: create index on a collection created within the same transaction - - operations: - - name: dropCollection - object: database - arguments: - collection: *collection_name - - name: startTransaction - object: session0 - - name: createCollection - object: database - arguments: - session: session0 - collection: *collection_name - - name: createIndex - object: collection - arguments: - session: session0 - name: *index_name - keys: - x: 1 - - name: assertIndexNotExists - object: testRunner - arguments: - database: *database_name - collection: *collection_name - index: *index_name - - name: commitTransaction - object: session0 - - name: assertIndexExists - object: testRunner - arguments: - database: *database_name - collection: *collection_name - index: *index_name - - expectations: - - command_started_event: - command: - drop: *collection_name - writeConcern: - command_name: drop - database_name: *database_name - - command_started_event: - command: - create: *collection_name - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: create - database_name: *database_name - - command_started_event: - command: - createIndexes: *collection_name - indexes: - - name: *index_name - key: - x: 1 - lsid: session0 - writeConcern: - command_name: createIndexes - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin diff --git a/testdata/transactions/legacy/delete.json b/testdata/transactions/legacy/delete.json deleted file mode 100644 index 65b8327039..0000000000 --- a/testdata/transactions/legacy/delete.json +++ /dev/null @@ -1,327 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - }, - { - "_id": 5 - } - ], - "tests": [ - { - "description": "delete", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "result": { - "deletedCount": 1 - } - }, - { - "name": "deleteMany", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$lte": 3 - } - } - }, - "result": { - "deletedCount": 2 - } - }, - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 4 - } - }, - "result": { - "deletedCount": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": 1 - }, - "limit": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "delete", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": { - "$lte": 3 - } - }, - "limit": 0 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "delete", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": 4 - }, - "limit": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "delete", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 5 - } - ] - } - } - }, - { - "description": "collection writeConcern ignored for delete", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "deleteOne", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": "majority" - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "result": { - "deletedCount": 1 - } - }, - { - "name": "deleteMany", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": "majority" - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$lte": 3 - } - } - }, - "result": { - "deletedCount": 2 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": 1 - }, - "limit": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "delete", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": { - "$lte": 3 - } - }, - "limit": 0 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "delete", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ] - } - ] -} diff --git a/testdata/transactions/legacy/delete.yml b/testdata/transactions/legacy/delete.yml deleted file mode 100644 index a1c8fd6089..0000000000 --- a/testdata/transactions/legacy/delete.yml +++ /dev/null @@ -1,192 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 - - _id: 5 - -tests: - - description: delete - - operations: - - name: startTransaction - object: session0 - - name: deleteOne - object: collection - arguments: - session: session0 - filter: - _id: 1 - result: - deletedCount: 1 - - name: deleteMany - object: collection - arguments: - session: session0 - filter: - _id: {$lte: 3} - result: - deletedCount: 2 - - name: deleteOne - object: collection - arguments: - session: session0 - filter: - _id: 4 - result: - deletedCount: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - delete: *collection_name - deletes: - - q: {_id: 1} - limit: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: delete - database_name: *database_name - - command_started_event: - command: - delete: *collection_name - deletes: - - q: {_id: {$lte: 3}} - limit: 0 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: delete - database_name: *database_name - - command_started_event: - command: - delete: *collection_name - deletes: - - q: {_id: 4} - limit: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: delete - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 5 - - - description: collection writeConcern ignored for delete - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: deleteOne - object: collection - collectionOptions: - writeConcern: - w: majority - arguments: - session: session0 - filter: - _id: 1 - result: - deletedCount: 1 - - name: deleteMany - object: collection - collectionOptions: - writeConcern: - w: majority - arguments: - session: session0 - filter: - _id: {$lte: 3} - result: - deletedCount: 2 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - delete: *collection_name - deletes: - - q: {_id: 1} - limit: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: delete - database_name: *database_name - - command_started_event: - command: - delete: *collection_name - deletes: - - q: {_id: {$lte: 3}} - limit: 0 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: delete - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin diff --git a/testdata/transactions/legacy/error-labels.json b/testdata/transactions/legacy/error-labels.json deleted file mode 100644 index 8bb5af7700..0000000000 --- a/testdata/transactions/legacy/error-labels.json +++ /dev/null @@ -1,2089 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ], - "serverless": "forbid" - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "DuplicateKey errors do not contain transient label", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "session": "session0", - "documents": [ - { - "_id": 1 - }, - { - "_id": 1 - } - ] - }, - "result": { - "errorLabelsOmit": [ - "TransientTransactionError", - "UnknownTransactionCommitResult" - ], - "errorContains": "E11000" - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - }, - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "NotWritablePrimary errors contain transient label", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 10107 - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "WriteConflict errors contain transient label", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 112 - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "NoSuchTransaction errors contain transient label", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 251 - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "NoSuchTransaction errors on commit contain transient label", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 251 - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ] - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "add TransientTransactionError label to connection errors, but do not add RetryableWriteError label", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 4 - }, - "data": { - "failCommands": [ - "insert", - "find", - "aggregate", - "distinct" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "session": "session0" - }, - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "session": "session0" - }, - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "_id", - "session": "session0" - }, - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "test", - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "find", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "cursor": {}, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "aggregate", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "test", - "key": "_id", - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "distinct", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "add RetryableWriteError and UnknownTransactionCommitResult labels to connection errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsContain": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ], - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "add RetryableWriteError and UnknownTransactionCommitResult labels to retryable commit errors", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 11602, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsContain": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ], - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "add RetryableWriteError and UnknownTransactionCommitResult labels to writeConcernError ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsContain": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ], - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "do not add RetryableWriteError label to writeConcernError ShutdownInProgress that occurs within transaction", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "errorLabelsContain": [], - "errorLabelsOmit": [ - "RetryableWriteError", - "TransientTransactionError", - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "add UnknownTransactionCommitResult label to writeConcernError WriteConcernFailed", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 64, - "errmsg": "multiple errors reported" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsContain": [ - "UnknownTransactionCommitResult" - ], - "errorLabelsOmit": [ - "RetryableWriteError", - "TransientTransactionError" - ] - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "add UnknownTransactionCommitResult label to writeConcernError WriteConcernFailed with wtimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 64, - "codeName": "WriteConcernFailed", - "errmsg": "waiting for replication timed out", - "errInfo": { - "wtimeout": true - } - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsContain": [ - "UnknownTransactionCommitResult" - ], - "errorLabelsOmit": [ - "RetryableWriteError", - "TransientTransactionError" - ] - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "omit UnknownTransactionCommitResult label from writeConcernError UnsatisfiableWriteConcern", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 100, - "errmsg": "Not enough data-bearing nodes" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsOmit": [ - "RetryableWriteError", - "TransientTransactionError", - "UnknownTransactionCommitResult" - ] - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "omit UnknownTransactionCommitResult label from writeConcernError UnknownReplWriteConcern", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 79, - "errmsg": "No write concern mode named 'blah' found in replica set configuration" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsOmit": [ - "RetryableWriteConcern", - "TransientTransactionError", - "UnknownTransactionCommitResult" - ] - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "do not add UnknownTransactionCommitResult label to MaxTimeMSExpired inside transactions", - "skipReason": "GODRIVER-2348: maxTimeMS is deprecated", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 50 - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "maxTimeMS": 60000, - "session": "session0" - }, - "result": { - "errorLabelsOmit": [ - "RetryableWriteError", - "UnknownTransactionCommitResult", - "TransientTransactionError" - ] - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "cursor": {}, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "maxTimeMS": 60000 - }, - "command_name": "aggregate", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "add UnknownTransactionCommitResult label to MaxTimeMSExpired", - "skipReason": "GODRIVER-2348: maxCommitTimeMS is deprecated", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 50 - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - }, - "maxCommitTimeMS": 60000 - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsContain": [ - "UnknownTransactionCommitResult" - ], - "errorLabelsOmit": [ - "RetryableWriteError", - "TransientTransactionError" - ] - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - }, - "maxTimeMS": 60000 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "maxTimeMS": 60000 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "add UnknownTransactionCommitResult label to writeConcernError MaxTimeMSExpired", - "skipReason": "GODRIVER-2348: maxCommitTimeMS is deprecated", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 50, - "errmsg": "operation exceeded time limit" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - }, - "maxCommitTimeMS": 60000 - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsContain": [ - "UnknownTransactionCommitResult" - ], - "errorLabelsOmit": [ - "RetryableWriteError", - "TransientTransactionError" - ] - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - }, - "maxTimeMS": 60000 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "maxTimeMS": 60000 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/error-labels.yml b/testdata/transactions/legacy/error-labels.yml deleted file mode 100644 index d9c461eadf..0000000000 --- a/testdata/transactions/legacy/error-labels.yml +++ /dev/null @@ -1,1276 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - # serverless proxy doesn't append error labels to errors in transactions - # caused by failpoints (CLOUDP-88216) - serverless: "forbid" - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: DuplicateKey errors do not contain transient label - - operations: - - name: startTransaction - object: session0 - - name: insertMany - object: collection - arguments: - session: session0 - documents: - - _id: 1 - - _id: 1 - result: - errorLabelsOmit: ["TransientTransactionError", "UnknownTransactionCommitResult"] - # DuplicateKey error code included in the bulk write error message - # returned by the server - errorContains: E11000 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: NotWritablePrimary errors contain transient label - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 10107 # NotWritablePrimary - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - # Note, the server will return the errorLabel in this case. - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["RetryableWriteError", "UnknownTransactionCommitResult"] - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: WriteConflict errors contain transient label - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 112 # WriteConflict - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - # Note, the server will return the errorLabel in this case. - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["RetryableWriteError", "UnknownTransactionCommitResult"] - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: NoSuchTransaction errors contain transient label - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - errorCode: 251 # NoSuchTransaction - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - # Note, the server will return the errorLabel in this case. - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["RetryableWriteError", "UnknownTransactionCommitResult"] - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: NoSuchTransaction errors on commit contain transient label - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 251 # NoSuchTransaction - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - # Note, the server will return the errorLabel in this case. - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["RetryableWriteError", "UnknownTransactionCommitResult"] - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: add TransientTransactionError label to connection errors, but do not add RetryableWriteError label - - failPoint: - configureFailPoint: failCommand - mode: { times: 4 } - data: - failCommands: ["insert", "find", "aggregate", "distinct"] - closeConnection: true - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: &transient_label_only - errorLabelsContain: ["TransientTransactionError"] - # While a connection error would normally be retryable, these are not because - # they occur within a transaction; ensure the driver does not add the - # RetryableWriteError label to these errors. - errorLabelsOmit: ["RetryableWriteError", "UnknownTransactionCommitResult"] - - name: find - object: collection - arguments: - session: session0 - result: *transient_label_only - - name: aggregate - object: collection - arguments: - pipeline: - - $project: - _id: 1 - session: session0 - result: *transient_label_only - - name: distinct - object: collection - arguments: - fieldName: _id - session: session0 - result: *transient_label_only - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - find: *collection_name - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: find - database_name: *database_name - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - $project: - _id: 1 - cursor: {} - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: aggregate - database_name: *database_name - - command_started_event: - command: - distinct: *collection_name - key: _id - lsid: session0 - readConcern: - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: distinct - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: add RetryableWriteError and UnknownTransactionCommitResult labels to connection errors - - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - closeConnection: true - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - errorLabelsContain: ["RetryableWriteError", "UnknownTransactionCommitResult"] - errorLabelsOmit: ["TransientTransactionError"] - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: add RetryableWriteError and UnknownTransactionCommitResult labels to retryable commit errors - - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - errorCode: 11602 # InterruptedDueToReplStateChange - errorLabels: ["RetryableWriteError"] - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - errorLabelsContain: ["RetryableWriteError", "UnknownTransactionCommitResult"] - errorLabelsOmit: ["TransientTransactionError"] - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: add RetryableWriteError and UnknownTransactionCommitResult labels to writeConcernError ShutdownInProgress - - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - errorLabelsContain: ["RetryableWriteError", "UnknownTransactionCommitResult"] - errorLabelsOmit: ["TransientTransactionError"] - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: do not add RetryableWriteError label to writeConcernError ShutdownInProgress that occurs within transaction - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - errorLabelsContain: [] - errorLabelsOmit: ["RetryableWriteError", "TransientTransactionError", "UnknownTransactionCommitResult"] - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: add UnknownTransactionCommitResult label to writeConcernError WriteConcernFailed - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 64 # WriteConcernFailed without wtimeout - errmsg: multiple errors reported - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - errorLabelsContain: ["UnknownTransactionCommitResult"] - errorLabelsOmit: ["RetryableWriteError", "TransientTransactionError"] - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: add UnknownTransactionCommitResult label to writeConcernError WriteConcernFailed with wtimeout - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 64 - codeName: WriteConcernFailed - errmsg: waiting for replication timed out - errInfo: {wtimeout: True} - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - errorLabelsContain: ["UnknownTransactionCommitResult"] - errorLabelsOmit: ["RetryableWriteError", "TransientTransactionError"] - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: omit UnknownTransactionCommitResult label from writeConcernError UnsatisfiableWriteConcern - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 100 # UnsatisfiableWriteConcern - errmsg: Not enough data-bearing nodes - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - errorLabelsOmit: ["RetryableWriteError", "TransientTransactionError", "UnknownTransactionCommitResult"] - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: omit UnknownTransactionCommitResult label from writeConcernError UnknownReplWriteConcern - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 79 # UnknownReplWriteConcern - errmsg: No write concern mode named 'blah' found in replica set configuration - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - errorLabelsOmit: ["RetryableWriteConcern", "TransientTransactionError", "UnknownTransactionCommitResult"] - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: do not add UnknownTransactionCommitResult label to MaxTimeMSExpired inside transactions - skipReason: "GODRIVER-2348: maxTimeMS is deprecated" - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["aggregate"] - errorCode: 50 # MaxTimeMSExpired - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: aggregate - object: collection - arguments: - pipeline: - - $project: - _id: 1 - maxTimeMS: 60000 - session: session0 - result: - errorLabelsOmit: ["RetryableWriteError", "UnknownTransactionCommitResult", "TransientTransactionError"] - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - $project: - _id: 1 - cursor: {} - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - autocommit: false - maxTimeMS: 60000 - command_name: aggregate - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: add UnknownTransactionCommitResult label to MaxTimeMSExpired - skipReason: "GODRIVER-2348: maxCommitTimeMS is deprecated" - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 50 # MaxTimeMSExpired - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - maxCommitTimeMS: 60000 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - errorLabelsContain: ["UnknownTransactionCommitResult"] - errorLabelsOmit: ["RetryableWriteError", "TransientTransactionError"] - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - maxTimeMS: 60000 - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - maxTimeMS: 60000 - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: add UnknownTransactionCommitResult label to writeConcernError MaxTimeMSExpired - skipReason: "GODRIVER-2348: maxCommitTimeMS is deprecated" - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 50 # MaxTimeMSExpired - errmsg: operation exceeded time limit - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - maxCommitTimeMS: 60000 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - errorLabelsContain: ["UnknownTransactionCommitResult"] - errorLabelsOmit: ["RetryableWriteError", "TransientTransactionError"] - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - maxTimeMS: 60000 - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - maxTimeMS: 60000 - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 diff --git a/testdata/transactions/legacy/errors-client.json b/testdata/transactions/legacy/errors-client.json deleted file mode 100644 index 15fae96fec..0000000000 --- a/testdata/transactions/legacy/errors-client.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "Client side error in command starting transaction", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "x": 1 - } - }, - "error": true - }, - { - "name": "assertSessionTransactionState", - "object": "testRunner", - "arguments": { - "session": "session0", - "state": "starting" - } - } - ] - }, - { - "description": "Client side error when transaction is in progress", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "x": 1 - } - }, - "error": true - }, - { - "name": "assertSessionTransactionState", - "object": "testRunner", - "arguments": { - "session": "session0", - "state": "in_progress" - } - } - ] - } - ] -} diff --git a/testdata/transactions/legacy/errors-client.yml b/testdata/transactions/legacy/errors-client.yml deleted file mode 100644 index 38b110424d..0000000000 --- a/testdata/transactions/legacy/errors-client.yml +++ /dev/null @@ -1,55 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] -tests: - - description: Client side error in command starting transaction - - operations: - - name: startTransaction - object: session0 - - name: updateOne - object: collection - arguments: - session: session0 - filter: { _id: 1 } - update: { x: 1 } - error: true - - name: assertSessionTransactionState - object: testRunner - arguments: - session: session0 - state: starting - - - description: Client side error when transaction is in progress - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: { _id: 1 } - result: - insertedId: 1 - - name: updateOne - object: collection - arguments: - session: session0 - filter: { _id: 1 } - update: { x: 1 } - error: true - - name: assertSessionTransactionState - object: testRunner - arguments: - session: session0 - state: in_progress diff --git a/testdata/transactions/legacy/errors.json b/testdata/transactions/legacy/errors.json deleted file mode 100644 index 5fc4905e8c..0000000000 --- a/testdata/transactions/legacy/errors.json +++ /dev/null @@ -1,222 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "start insert start", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "startTransaction", - "object": "session0", - "result": { - "errorContains": "transaction already in progress" - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ] - }, - { - "description": "start twice", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0", - "result": { - "errorContains": "transaction already in progress" - } - } - ] - }, - { - "description": "commit and start twice", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0", - "result": { - "errorContains": "transaction already in progress" - } - } - ] - }, - { - "description": "write conflict commit", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "startTransaction", - "object": "session1" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session1", - "document": { - "_id": 1 - } - }, - "result": { - "errorCodeName": "WriteConflict", - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session1", - "result": { - "errorCodeName": "NoSuchTransaction", - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "UnknownTransactionCommitResult" - ] - } - } - ] - }, - { - "description": "write conflict abort", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "startTransaction", - "object": "session1" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session1", - "document": { - "_id": 1 - } - }, - "result": { - "errorCodeName": "WriteConflict", - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "abortTransaction", - "object": "session1" - } - ] - } - ] -} diff --git a/testdata/transactions/legacy/errors.yml b/testdata/transactions/legacy/errors.yml deleted file mode 100644 index 4a7ee67c31..0000000000 --- a/testdata/transactions/legacy/errors.yml +++ /dev/null @@ -1,133 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] -tests: - - description: start insert start - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: startTransaction - object: session0 - result: - # Client-side error. - errorContains: transaction already in progress - # Just to clean up. - - name: commitTransaction - object: session0 - - - description: start twice - - operations: - - name: startTransaction - object: session0 - - name: startTransaction - object: session0 - result: - # Client-side error. - errorContains: transaction already in progress - - - description: commit and start twice - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - name: startTransaction - object: session0 - - name: startTransaction - object: session0 - result: - # Client-side error. - errorContains: transaction already in progress - - - description: write conflict commit - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: startTransaction - object: session1 - - name: insertOne - object: collection - arguments: - session: session1 - document: - _id: 1 - result: - errorCodeName: WriteConflict - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["UnknownTransactionCommitResult"] - - name: commitTransaction - object: session0 - - name: commitTransaction - object: session1 - result: - errorCodeName: NoSuchTransaction - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["UnknownTransactionCommitResult"] - - - description: write conflict abort - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: startTransaction - object: session1 - - name: insertOne - object: collection - arguments: - session: session1 - document: - _id: 1 - result: - errorCodeName: WriteConflict - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["UnknownTransactionCommitResult"] - - name: commitTransaction - object: session0 - # Driver ignores "NoSuchTransaction" error. - - name: abortTransaction - object: session1 diff --git a/testdata/transactions/legacy/findOneAndDelete.json b/testdata/transactions/legacy/findOneAndDelete.json deleted file mode 100644 index d82657a9f5..0000000000 --- a/testdata/transactions/legacy/findOneAndDelete.json +++ /dev/null @@ -1,221 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ], - "tests": [ - { - "description": "findOneAndDelete", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 3 - } - }, - "result": { - "_id": 3 - } - }, - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 4 - } - }, - "result": null - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 3 - }, - "remove": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 4 - }, - "remove": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - }, - { - "description": "collection writeConcern ignored for findOneAndDelete", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": "majority" - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": 3 - } - }, - "result": { - "_id": 3 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 3 - }, - "remove": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ] - } - ] -} diff --git a/testdata/transactions/legacy/findOneAndDelete.yml b/testdata/transactions/legacy/findOneAndDelete.yml deleted file mode 100644 index fe2e63974e..0000000000 --- a/testdata/transactions/legacy/findOneAndDelete.yml +++ /dev/null @@ -1,134 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: - - _id: 1 - - _id: 2 - - _id: 3 - -tests: - - description: findOneAndDelete - - operations: - - name: startTransaction - object: session0 - - name: findOneAndDelete - object: collection - arguments: - session: session0 - filter: {_id: 3} - result: {_id: 3} - - name: findOneAndDelete - object: collection - arguments: - session: session0 - filter: {_id: 4} - result: - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 3} - remove: True - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - writeConcern: - command_name: findAndModify - database_name: *database_name - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 4} - remove: True - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: findAndModify - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - {_id: 1} - - {_id: 2} - - - description: collection writeConcern ignored for findOneAndDelete - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: findOneAndDelete - object: collection - collectionOptions: - writeConcern: - w: majority - arguments: - session: session0 - filter: {_id: 3} - result: {_id: 3} - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 3} - remove: True - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - writeConcern: - command_name: findAndModify - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin diff --git a/testdata/transactions/legacy/findOneAndReplace.json b/testdata/transactions/legacy/findOneAndReplace.json deleted file mode 100644 index 7a54ca3433..0000000000 --- a/testdata/transactions/legacy/findOneAndReplace.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ], - "tests": [ - { - "description": "findOneAndReplace", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 3 - }, - "replacement": { - "x": 1 - }, - "returnDocument": "Before" - }, - "result": { - "_id": 3 - } - }, - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 4 - }, - "replacement": { - "x": 1 - }, - "upsert": true, - "returnDocument": "After" - }, - "result": { - "_id": 4, - "x": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 3 - }, - "update": { - "x": 1 - }, - "new": false, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 4 - }, - "update": { - "x": 1 - }, - "new": true, - "upsert": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3, - "x": 1 - }, - { - "_id": 4, - "x": 1 - } - ] - } - } - }, - { - "description": "collection writeConcern ignored for findOneAndReplace", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": "majority" - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": 3 - }, - "replacement": { - "x": 1 - }, - "returnDocument": "Before" - }, - "result": { - "_id": 3 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 3 - }, - "update": { - "x": 1 - }, - "new": false, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ] - } - ] -} diff --git a/testdata/transactions/legacy/findOneAndReplace.yml b/testdata/transactions/legacy/findOneAndReplace.yml deleted file mode 100644 index 0d6c79aa0e..0000000000 --- a/testdata/transactions/legacy/findOneAndReplace.yml +++ /dev/null @@ -1,148 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: - - _id: 1 - - _id: 2 - - _id: 3 - -tests: - - description: findOneAndReplace - - operations: - - name: startTransaction - object: session0 - - name: findOneAndReplace - object: collection - arguments: - session: session0 - filter: {_id: 3} - replacement: {x: 1} - returnDocument: Before - result: {_id: 3} - - name: findOneAndReplace - object: collection - arguments: - session: session0 - filter: {_id: 4} - replacement: {x: 1} - upsert: true - returnDocument: After - result: {_id: 4, x: 1} - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 3} - update: {x: 1} - new: false - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - writeConcern: - command_name: findAndModify - database_name: *database_name - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 4} - update: {x: 1} - new: true - upsert: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: findAndModify - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - {_id: 1} - - {_id: 2} - - {_id: 3, x: 1} - - {_id: 4, x: 1} - - - description: collection writeConcern ignored for findOneAndReplace - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: findOneAndReplace - object: collection - collectionOptions: - writeConcern: - w: majority - arguments: - session: session0 - filter: {_id: 3} - replacement: {x: 1} - returnDocument: Before - result: {_id: 3} - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 3} - update: {x: 1} - new: false - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - writeConcern: - command_name: findAndModify - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - diff --git a/testdata/transactions/legacy/findOneAndUpdate.json b/testdata/transactions/legacy/findOneAndUpdate.json deleted file mode 100644 index 7af54ba808..0000000000 --- a/testdata/transactions/legacy/findOneAndUpdate.json +++ /dev/null @@ -1,413 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ], - "tests": [ - { - "description": "findOneAndUpdate", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 3 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 3 - } - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "upsert": true, - "returnDocument": "After" - }, - "result": { - "_id": 4, - "x": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 3 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 3, - "x": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 3 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 3, - "x": 2 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 3 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "new": false, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "new": true, - "upsert": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 3 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "new": false, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "afterClusterTime": 42 - }, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 3 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "new": false, - "lsid": "session0", - "txnNumber": { - "$numberLong": "3" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "afterClusterTime": 42 - }, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "3" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3, - "x": 2 - }, - { - "_id": 4, - "x": 1 - } - ] - } - } - }, - { - "description": "collection writeConcern ignored for findOneAndUpdate", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": "majority" - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": 3 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 3 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 3 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "new": false, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ] - } - ] -} diff --git a/testdata/transactions/legacy/findOneAndUpdate.yml b/testdata/transactions/legacy/findOneAndUpdate.yml deleted file mode 100644 index afb9ad63b0..0000000000 --- a/testdata/transactions/legacy/findOneAndUpdate.yml +++ /dev/null @@ -1,236 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: - - _id: 1 - - _id: 2 - - _id: 3 - -tests: - - description: findOneAndUpdate - - operations: - - name: startTransaction - object: session0 - - name: findOneAndUpdate - object: collection - arguments: - session: session0 - filter: {_id: 3} - update: - $inc: {x: 1} - returnDocument: Before - result: {_id: 3} - - name: findOneAndUpdate - object: collection - arguments: - session: session0 - filter: {_id: 4} - update: - $inc: {x: 1} - upsert: true - returnDocument: After - result: {_id: 4, x: 1} - - name: commitTransaction - object: session0 - - name: startTransaction - object: session0 - # Test a second time to ensure txnNumber is incremented. - - name: findOneAndUpdate - object: collection - arguments: - session: session0 - filter: {_id: 3} - update: - $inc: {x: 1} - returnDocument: Before - result: {_id: 3, x: 1} - - name: commitTransaction - object: session0 - # Test a third time to ensure abort works. - - name: startTransaction - object: session0 - - name: findOneAndUpdate - object: collection - arguments: - session: session0 - filter: {_id: 3} - update: - $inc: {x: 1} - returnDocument: Before - result: {_id: 3, x: 2} - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 3} - update: {$inc: {x: 1}} - new: false - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - writeConcern: - command_name: findAndModify - database_name: *database_name - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 4} - update: {$inc: {x: 1}} - new: true - upsert: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: findAndModify - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 3} - update: {$inc: {x: 1}} - new: false - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - readConcern: - afterClusterTime: 42 - writeConcern: - command_name: findAndModify - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 3} - update: {$inc: {x: 1}} - new: false - lsid: session0 - txnNumber: - $numberLong: "3" - startTransaction: true - autocommit: false - readConcern: - afterClusterTime: 42 - writeConcern: - command_name: findAndModify - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "3" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: - - {_id: 1} - - {_id: 2} - - {_id: 3, x: 2} - - {_id: 4, x: 1} - - - description: collection writeConcern ignored for findOneAndUpdate - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: findOneAndUpdate - object: collection - collectionOptions: - writeConcern: - w: majority - arguments: - session: session0 - filter: {_id: 3} - update: - $inc: {x: 1} - returnDocument: Before - result: {_id: 3} - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 3} - update: - $inc: {x: 1} - new: false - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - writeConcern: - command_name: findAndModify - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - diff --git a/testdata/transactions/legacy/insert.json b/testdata/transactions/legacy/insert.json deleted file mode 100644 index f26e7c2a76..0000000000 --- a/testdata/transactions/legacy/insert.json +++ /dev/null @@ -1,648 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "insert", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 2 - }, - { - "_id": 3 - } - ], - "session": "session0" - }, - "result": { - "insertedIds": { - "0": 2, - "1": 3 - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 4 - } - }, - "result": { - "insertedId": 4 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 5 - } - }, - "result": { - "insertedId": 5 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - }, - { - "_id": 3 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 4 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 5 - } - ], - "ordered": true, - "readConcern": { - "afterClusterTime": 42 - }, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - }, - { - "_id": 5 - } - ] - } - } - }, - { - "description": "insert with session1", - "operations": [ - { - "name": "startTransaction", - "object": "session1" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session1", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 2 - }, - { - "_id": 3 - } - ], - "session": "session1" - }, - "result": { - "insertedIds": { - "0": 2, - "1": 3 - } - } - }, - { - "name": "commitTransaction", - "object": "session1" - }, - { - "name": "startTransaction", - "object": "session1" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session1", - "document": { - "_id": 4 - } - }, - "result": { - "insertedId": 4 - } - }, - { - "name": "abortTransaction", - "object": "session1" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session1", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - }, - { - "_id": 3 - } - ], - "ordered": true, - "lsid": "session1", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session1", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 4 - } - ], - "ordered": true, - "readConcern": { - "afterClusterTime": 42 - }, - "lsid": "session1", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session1", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - } - }, - { - "description": "collection writeConcern without transaction", - "clientOptions": { - "retryWrites": false - }, - "operations": [ - { - "name": "insertOne", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": "majority" - } - }, - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": null, - "startTransaction": null, - "autocommit": null, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "collection writeConcern ignored for insert", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": "majority" - } - }, - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "insertMany", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": "majority" - } - }, - "arguments": { - "documents": [ - { - "_id": 2 - }, - { - "_id": 3 - } - ], - "session": "session0" - }, - "result": { - "insertedIds": { - "0": 2, - "1": 3 - } - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - }, - { - "_id": 3 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/insert.yml b/testdata/transactions/legacy/insert.yml deleted file mode 100644 index d2062fcfdd..0000000000 --- a/testdata/transactions/legacy/insert.yml +++ /dev/null @@ -1,390 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: insert - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: insertMany - object: collection - arguments: - documents: - - _id: 2 - - _id: 3 - session: session0 - result: - insertedIds: {0: 2, 1: 3} - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 4 - result: - insertedId: 4 - - name: commitTransaction - object: session0 - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 5 - result: - insertedId: 5 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - - _id: 3 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 4 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 5 - ordered: true - readConcern: - afterClusterTime: 42 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 - - _id: 5 - - # This test proves that the driver uses "session1" correctly in operations - # and APM expectations. - - description: insert with session1 - - operations: - - name: startTransaction - object: session1 - - name: insertOne - object: collection - arguments: - session: session1 - document: - _id: 1 - result: - insertedId: 1 - - name: insertMany - object: collection - arguments: - documents: - - _id: 2 - - _id: 3 - session: session1 - result: - insertedIds: {0: 2, 1: 3} - - name: commitTransaction - object: session1 - - name: startTransaction - object: session1 - - name: insertOne - object: collection - arguments: - session: session1 - document: - _id: 4 - result: - insertedId: 4 - - name: abortTransaction - object: session1 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session1 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - - _id: 3 - ordered: true - lsid: session1 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session1 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 4 - ordered: true - readConcern: - afterClusterTime: 42 - lsid: session1 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session1 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - _id: 2 - - _id: 3 - - # This test proves that the driver parses the collectionOptions writeConcern. - - description: collection writeConcern without transaction - clientOptions: - retryWrites: false - operations: - - name: insertOne - object: collection - collectionOptions: - writeConcern: - w: majority - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - startTransaction: - autocommit: - writeConcern: - w: majority - command_name: insert - database_name: *database_name - - outcome: - collection: - data: - - _id: 1 - - - description: collection writeConcern ignored for insert - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - collectionOptions: - writeConcern: - w: majority - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: insertMany - object: collection - collectionOptions: - writeConcern: - w: majority - arguments: - documents: - - _id: 2 - - _id: 3 - session: session0 - result: - insertedIds: {0: 2, 1: 3} - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - - _id: 3 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - _id: 2 - - _id: 3 diff --git a/testdata/transactions/legacy/isolation.json b/testdata/transactions/legacy/isolation.json deleted file mode 100644 index f16b28a5e6..0000000000 --- a/testdata/transactions/legacy/isolation.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "one transaction", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1 - } - ] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "session": "session1", - "filter": { - "_id": 1 - } - }, - "result": [] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [] - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "find", - "object": "collection", - "arguments": { - "session": "session1", - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1 - } - ] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1 - } - ] - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "two transactions", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session1" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1 - } - ] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "session": "session1", - "filter": { - "_id": 1 - } - }, - "result": [] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [] - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "find", - "object": "collection", - "arguments": { - "session": "session1", - "filter": { - "_id": 1 - } - }, - "result": [] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - }, - "result": [ - { - "_id": 1 - } - ] - }, - { - "name": "commitTransaction", - "object": "session1" - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/isolation.yml b/testdata/transactions/legacy/isolation.yml deleted file mode 100644 index d48a07f292..0000000000 --- a/testdata/transactions/legacy/isolation.yml +++ /dev/null @@ -1,133 +0,0 @@ -# Test snapshot isolation. -# This test doesn't check contents of command-started events. -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: one transaction - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: find - object: collection - arguments: - session: session0 - filter: - _id: 1 - result: - - {_id: 1} - - name: find - object: collection - arguments: - session: session1 - filter: - _id: 1 - result: [] - - name: find - object: collection - arguments: - filter: - _id: 1 - result: [] - - name: commitTransaction - object: session0 - - name: find - object: collection - arguments: - session: session1 - filter: - _id: 1 - result: - - {_id: 1} - - name: find - object: collection - arguments: - filter: - _id: 1 - result: - - {_id: 1} - - outcome: - collection: - data: - - _id: 1 - - - description: two transactions - - operations: - - name: startTransaction - object: session0 - - name: startTransaction - object: session1 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: find - object: collection - arguments: - session: session0 - filter: - _id: 1 - result: - - {_id: 1} - - name: find - object: collection - arguments: - session: session1 - filter: - _id: 1 - result: [] - - name: find - object: collection - arguments: - filter: - _id: 1 - result: [] - - name: commitTransaction - object: session0 - # Snapshot isolation in session1, not read-committed. - - name: find - object: collection - arguments: - session: session1 - filter: - _id: 1 - result: [] - - name: find - object: collection - arguments: - filter: - _id: 1 - result: - - {_id: 1} - - name: commitTransaction - object: session1 - - outcome: - collection: - data: - - {_id: 1} diff --git a/testdata/transactions/legacy/mongos-recovery-token.json b/testdata/transactions/legacy/mongos-recovery-token.json deleted file mode 100644 index 02c2002f75..0000000000 --- a/testdata/transactions/legacy/mongos-recovery-token.json +++ /dev/null @@ -1,511 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ], - "serverless": "forbid" - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "commitTransaction explicit retries include recoveryToken", - "useMultipleMongoses": true, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null, - "recoveryToken": 42 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "recoveryToken": 42 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "recoveryToken": 42 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction retry succeeds on new mongos", - "useMultipleMongoses": true, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down", - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - }, - "recoveryToken": 42 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "recoveryToken": 42 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction retry fails on new mongos", - "useMultipleMongoses": true, - "clientOptions": { - "heartbeatFrequencyMS": 30000 - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 7 - }, - "data": { - "failCommands": [ - "commitTransaction", - "isMaster", - "hello" - ], - "closeConnection": true - } - } - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "UnknownTransactionCommitResult" - ], - "errorCodeName": "NoSuchTransaction" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null, - "recoveryToken": 42 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - }, - "recoveryToken": 42 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction sends recoveryToken", - "useMultipleMongoses": true, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "closeConnection": true - } - } - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null, - "recoveryToken": 42 - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null, - "recoveryToken": 42 - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/mongos-recovery-token.yml b/testdata/transactions/legacy/mongos-recovery-token.yml deleted file mode 100644 index 688f08256f..0000000000 --- a/testdata/transactions/legacy/mongos-recovery-token.yml +++ /dev/null @@ -1,350 +0,0 @@ -runOn: - - - minServerVersion: "4.1.8" - topology: ["sharded"] - # serverless proxy doesn't use recovery tokens - serverless: "forbid" - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: commitTransaction explicit retries include recoveryToken - useMultipleMongoses: true - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - name: commitTransaction - object: session0 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - recoveryToken: 42 - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - recoveryToken: 42 - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - recoveryToken: 42 - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction retry succeeds on new mongos - useMultipleMongoses: true - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - # Enable the fail point only on the Mongos that session0 is pinned to. - - name: targetedFailPoint - object: testRunner - arguments: - session: session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 91 - errmsg: Replication is being shut down - errorLabels: ["RetryableWriteError"] - # The client sees a retryable writeConcernError on the first - # commitTransaction due to the fail point but it actually succeeds on the - # server (SERVER-39346). The retry will succeed both on a new mongos and - # on the original. - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - recoveryToken: 42 - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - recoveryToken: 42 - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction retry fails on new mongos - useMultipleMongoses: true - clientOptions: - # Increase heartbeatFrequencyMS to avoid the race condition where an in - # flight heartbeat refreshes the first mongoes' SDAM state in between - # the initial commitTransaction and the retry attempt. - heartbeatFrequencyMS: 30000 - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - # Enable the fail point only on the Mongos that session0 is pinned to. - # Fail hello/legacy hello to prevent the heartbeat requested directly after the - # retryable commit error from racing with server selection for the retry. - # Note: times: 7 is slightly artbitrary but it accounts for one failed - # commit and some SDAM heartbeats. A test runner will have multiple - # clients connected to this server so this fail point configuration - # is also racy. - - name: targetedFailPoint - object: testRunner - arguments: - session: session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 7 } - data: - failCommands: ["commitTransaction", "isMaster", "hello"] - closeConnection: true - # The first commitTransaction sees a retryable connection error due to - # the fail point and also fails on the server. The retry attempt on a - # new mongos will wait for the transaction to timeout and will fail - # because the transaction was aborted. Note that the retry attempt should - # not select the original mongos because that server's SDAM state is - # reset by the connection error, heartbeatFrequencyMS is high, and - # subsequent heartbeats should fail. - - name: commitTransaction - object: session0 - result: - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["UnknownTransactionCommitResult"] - errorCodeName: NoSuchTransaction - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - recoveryToken: 42 - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - recoveryToken: 42 - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction sends recoveryToken - useMultipleMongoses: true - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - # Enable the fail point only on the Mongos that session0 is pinned to. - - name: targetedFailPoint - object: testRunner - arguments: - session: session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - closeConnection: true - # The first abortTransaction sees a retryable connection error due to - # the fail point. The retry attempt on a new mongos will send the - # recoveryToken. Note that the retry attempt will also fail because the - # server does not yet support aborting from a new mongos, however this - # operation should "succeed" since abortTransaction ignores errors. - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - recoveryToken: 42 - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - recoveryToken: 42 - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] diff --git a/testdata/transactions/legacy/pin-mongos.json b/testdata/transactions/legacy/pin-mongos.json deleted file mode 100644 index 485a3d9322..0000000000 --- a/testdata/transactions/legacy/pin-mongos.json +++ /dev/null @@ -1,1229 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ], - "serverless": "forbid" - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ], - "tests": [ - { - "description": "countDocuments", - "useMultipleMongoses": true, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - }, - { - "description": "distinct", - "useMultipleMongoses": true, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "_id", - "session": "session0" - }, - "result": [ - 1, - 2 - ] - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "_id", - "session": "session0" - }, - "result": [ - 1, - 2 - ] - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "_id", - "session": "session0" - }, - "result": [ - 1, - 2 - ] - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "_id", - "session": "session0" - }, - "result": [ - 1, - 2 - ] - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "_id", - "session": "session0" - }, - "result": [ - 1, - 2 - ] - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "_id", - "session": "session0" - }, - "result": [ - 1, - 2 - ] - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "_id", - "session": "session0" - }, - "result": [ - 1, - 2 - ] - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "_id", - "session": "session0" - }, - "result": [ - 1, - 2 - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - }, - { - "description": "find", - "useMultipleMongoses": true, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": [ - { - "_id": 2 - } - ] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": [ - { - "_id": 2 - } - ] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": [ - { - "_id": 2 - } - ] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": [ - { - "_id": 2 - } - ] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": [ - { - "_id": 2 - } - ] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": [ - { - "_id": 2 - } - ] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": [ - { - "_id": 2 - } - ] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "session": "session0" - }, - "result": [ - { - "_id": 2 - } - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - }, - { - "description": "insertOne", - "useMultipleMongoses": true, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 3 - }, - "session": "session0" - }, - "result": { - "insertedId": 3 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 4 - }, - "session": "session0" - }, - "result": { - "insertedId": 4 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 5 - }, - "session": "session0" - }, - "result": { - "insertedId": 5 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 6 - }, - "session": "session0" - }, - "result": { - "insertedId": 6 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 7 - }, - "session": "session0" - }, - "result": { - "insertedId": 7 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 8 - }, - "session": "session0" - }, - "result": { - "insertedId": 8 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 9 - }, - "session": "session0" - }, - "result": { - "insertedId": 9 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 10 - }, - "session": "session0" - }, - "result": { - "insertedId": 10 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - }, - { - "_id": 5 - }, - { - "_id": 6 - }, - { - "_id": 7 - }, - { - "_id": 8 - }, - { - "_id": 9 - }, - { - "_id": 10 - } - ] - } - } - }, - { - "description": "mixed read write operations", - "useMultipleMongoses": true, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 3 - }, - "session": "session0" - }, - "result": { - "insertedId": 3 - } - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 3 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 3 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 3 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 3 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "_id": 3 - }, - "session": "session0" - }, - "result": 1 - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 4 - }, - "session": "session0" - }, - "result": { - "insertedId": 4 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 5 - }, - "session": "session0" - }, - "result": { - "insertedId": 5 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 6 - }, - "session": "session0" - }, - "result": { - "insertedId": 6 - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 7 - }, - "session": "session0" - }, - "result": { - "insertedId": 7 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - }, - { - "_id": 5 - }, - { - "_id": 6 - }, - { - "_id": 7 - } - ] - } - } - }, - { - "description": "multiple commits", - "useMultipleMongoses": true, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ], - "session": "session0" - }, - "result": { - "insertedIds": { - "0": 3, - "1": 4 - } - } - }, - { - "name": "assertSessionPinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertSessionPinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertSessionPinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "remain pinned after non-transient error on commit", - "useMultipleMongoses": true, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ], - "session": "session0" - }, - "result": { - "insertedIds": { - "0": 3, - "1": 4 - } - } - }, - { - "name": "assertSessionPinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 51 - } - } - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsOmit": [ - "TransientTransactionError" - ], - "errorCode": 51 - } - }, - { - "name": "assertSessionPinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertSessionPinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "unpin after transient error within a transaction", - "useMultipleMongoses": true, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "result": { - "insertedId": 3 - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 4 - } - }, - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 3 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 4 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null, - "recoveryToken": 42 - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - }, - { - "description": "unpin after transient error within a transaction and commit", - "useMultipleMongoses": true, - "clientOptions": { - "heartbeatFrequencyMS": 30000 - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "result": { - "insertedId": 3 - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 7 - }, - "data": { - "failCommands": [ - "insert", - "isMaster", - "hello" - ], - "closeConnection": true - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 4 - } - }, - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "UnknownTransactionCommitResult" - ], - "errorCodeName": "NoSuchTransaction" - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 3 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 4 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null, - "recoveryToken": 42 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/pin-mongos.yml b/testdata/transactions/legacy/pin-mongos.yml deleted file mode 100644 index 067506dba2..0000000000 --- a/testdata/transactions/legacy/pin-mongos.yml +++ /dev/null @@ -1,559 +0,0 @@ -# Test that all the operations go to the same mongos. -# -# In tests that don't include command-started events the assertion is implicit: -# that all the read operations succeed. If the driver does not properly pin to -# a single mongos then one of the operations in a transaction will eventually -# be sent to a different mongos, which is unaware of the transaction, and the -# mongos will return a command error. An example of such an error is: -# { -# 'ok': 0.0, -# 'errmsg': 'cannot continue txnId -1 for session 28938f50-9d29-4ca5-8de5-ddaf261267c4 - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= with txnId 1', -# 'code': 251, -# 'codeName': 'NoSuchTransaction', -# 'errorLabels': ['TransientTransactionError'] -# } -runOn: - - - minServerVersion: "4.1.8" - topology: ["sharded"] - # serverless proxy doesn't append error labels to errors in transactions - # caused by failpoints (CLOUDP-88216) - serverless: "forbid" - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: &data - - {_id: 1} - - {_id: 2} - -tests: - - description: countDocuments - useMultipleMongoses: true - operations: - - &startTransaction - name: startTransaction - object: session0 - - &countDocuments - name: countDocuments - object: collection - arguments: - filter: - _id: 2 - session: session0 - result: 1 - - *countDocuments - - *countDocuments - - *countDocuments - - *countDocuments - - *countDocuments - - *countDocuments - - *countDocuments - - &commitTransaction - name: commitTransaction - object: session0 - - outcome: - collection: - data: *data - - - description: distinct - useMultipleMongoses: true - operations: - - *startTransaction - - &distinct - name: distinct - object: collection - arguments: - fieldName: _id - session: session0 - result: [1, 2] - - *distinct - - *distinct - - *distinct - - *distinct - - *distinct - - *distinct - - *distinct - - *commitTransaction - - outcome: - collection: - data: *data - - - description: find - useMultipleMongoses: true - operations: - - name: startTransaction - object: session0 - - &find - name: find - object: collection - arguments: - filter: - _id: 2 - session: session0 - result: - - {_id: 2} - - *find - - *find - - *find - - *find - - *find - - *find - - *find - - *commitTransaction - - outcome: - collection: - data: *data - - - description: insertOne - useMultipleMongoses: true - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - document: - _id: 3 - session: session0 - result: - insertedId: 3 - - name: insertOne - object: collection - arguments: - document: - _id: 4 - session: session0 - result: - insertedId: 4 - - name: insertOne - object: collection - arguments: - document: - _id: 5 - session: session0 - result: - insertedId: 5 - - name: insertOne - object: collection - arguments: - document: - _id: 6 - session: session0 - result: - insertedId: 6 - - name: insertOne - object: collection - arguments: - document: - _id: 7 - session: session0 - result: - insertedId: 7 - - name: insertOne - object: collection - arguments: - document: - _id: 8 - session: session0 - result: - insertedId: 8 - - name: insertOne - object: collection - arguments: - document: - _id: 9 - session: session0 - result: - insertedId: 9 - - name: insertOne - object: collection - arguments: - document: - _id: 10 - session: session0 - result: - insertedId: 10 - - *commitTransaction - - outcome: - collection: - data: - - {_id: 1} - - {_id: 2} - - {_id: 3} - - {_id: 4} - - {_id: 5} - - {_id: 6} - - {_id: 7} - - {_id: 8} - - {_id: 9} - - {_id: 10} - - - description: mixed read write operations - useMultipleMongoses: true - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - document: - _id: 3 - session: session0 - result: - insertedId: 3 - - &countDocuments - name: countDocuments - object: collection - arguments: - filter: - _id: 3 - session: session0 - result: 1 - - *countDocuments - - *countDocuments - - *countDocuments - - *countDocuments - - name: insertOne - object: collection - arguments: - document: - _id: 4 - session: session0 - result: - insertedId: 4 - - name: insertOne - object: collection - arguments: - document: - _id: 5 - session: session0 - result: - insertedId: 5 - - name: insertOne - object: collection - arguments: - document: - _id: 6 - session: session0 - result: - insertedId: 6 - - name: insertOne - object: collection - arguments: - document: - _id: 7 - session: session0 - result: - insertedId: 7 - - *commitTransaction - - outcome: - collection: - data: - - {_id: 1} - - {_id: 2} - - {_id: 3} - - {_id: 4} - - {_id: 5} - - {_id: 6} - - {_id: 7} - - - description: multiple commits - useMultipleMongoses: true - operations: - - name: startTransaction - object: session0 - - name: insertMany - object: collection - arguments: - documents: - - _id: 3 - - _id: 4 - session: session0 - result: - insertedIds: {0: 3, 1: 4} - # Session is pinned and remains pinned after successful commits. - - &assertSessionPinned - name: assertSessionPinned - object: testRunner - arguments: - session: session0 - - *commitTransaction - - *assertSessionPinned - - *commitTransaction - - *commitTransaction - - *commitTransaction - - *commitTransaction - - *commitTransaction - - *commitTransaction - - *commitTransaction - - *commitTransaction - - *commitTransaction - - *assertSessionPinned - - outcome: - collection: - data: - - {_id: 1} - - {_id: 2} - - {_id: 3} - - {_id: 4} - - - description: remain pinned after non-transient error on commit - useMultipleMongoses: true - operations: - - name: startTransaction - object: session0 - - name: insertMany - object: collection - arguments: - documents: - - _id: 3 - - _id: 4 - session: session0 - result: - insertedIds: {0: 3, 1: 4} - # Session is pinned. - - *assertSessionPinned - # Fail the commit with a non-transient error. - - name: targetedFailPoint - object: testRunner - arguments: - session: session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 51 # ManualInterventionRequired - - name: commitTransaction - object: session0 - result: - errorLabelsOmit: ["TransientTransactionError"] - errorCode: 51 - - *assertSessionPinned - # The next commit should succeed. - - name: commitTransaction - object: session0 - - *assertSessionPinned - - outcome: - collection: - data: - - {_id: 1} - - {_id: 2} - - {_id: 3} - - {_id: 4} - - - description: unpin after transient error within a transaction - useMultipleMongoses: true - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 3 - result: - insertedId: 3 - # Enable the fail point only on the Mongos that session0 is pinned to. - - name: targetedFailPoint - object: testRunner - arguments: - session: session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - closeConnection: true - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 4 - result: - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["UnknownTransactionCommitResult"] - # Session unpins from the first mongos after the insert error and - # abortTransaction succeeds immediately on any mongos. - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 3 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 4 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - recoveryToken: 42 - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - _id: 2 - - # Applications should not run commitTransaction after transient errors but - # the transactions API allows it and this test confirms unpinning behavior. - # In a sharded cluster, a transient error within a transaction unpins the - # session. This way a subsequent abort can "succeed" immediately instead of - # blocking for serverSelectionTimeoutMS in the case the mongos went down. - # However since the abortTransaction helper ignores errors, this test uses - # commitTransaction to prove the session was unpinned. - - description: unpin after transient error within a transaction and commit - useMultipleMongoses: true - clientOptions: - # Increase heartbeatFrequencyMS to avoid the race condition where an in - # flight heartbeat refreshes the first mongoes' SDAM state in between - # the insert connection error and the single commit attempt. - heartbeatFrequencyMS: 30000 - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 3 - result: - insertedId: 3 - # Enable the fail point only on the Mongos that session0 is pinned to. - # Fail hello/legacy hello to prevent the heartbeat requested directly after the - # insert error from racing with server selection for the commit. - # Note: times: 7 is slightly artbitrary but it accounts for one failed - # insert and some SDAM heartbeats. A test runner will have multiple - # clients connected to this server so this fail point configuration - # is also racy. - - name: targetedFailPoint - object: testRunner - arguments: - session: session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 7 } - data: - failCommands: ["insert", "isMaster", "hello"] - closeConnection: true - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 4 - result: - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["UnknownTransactionCommitResult"] - # Session unpins from the first mongos after the insert error and - # commitTransaction selects the second mongos which is unaware of the - # transaction and therefore fails with NoSuchTransaction error. If this - # commit succeeds it indicates a bug, either: - # - the driver mistakenly remained pinned even after the insert error, or - # - the test client was initialized with a single mongos seed - # - # Note that the commit attempt should not select the original mongos - # because that server's SDAM state is reset by the connection error, - # heartbeatFrequencyMS is high, and subsequent heartbeats - # should fail. - - name: commitTransaction - object: session0 - result: - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["UnknownTransactionCommitResult"] - errorCodeName: NoSuchTransaction - - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 3 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 4 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - recoveryToken: 42 - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - _id: 2 diff --git a/testdata/transactions/legacy/read-concern.json b/testdata/transactions/legacy/read-concern.json deleted file mode 100644 index dd9243e2f7..0000000000 --- a/testdata/transactions/legacy/read-concern.json +++ /dev/null @@ -1,1628 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ], - "tests": [ - { - "description": "only first countDocuments includes readConcern", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readConcern": { - "level": "majority" - } - } - } - }, - { - "name": "countDocuments", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$gte": 2 - } - } - }, - "result": 3 - }, - { - "name": "countDocuments", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$gte": 2 - } - } - }, - "result": 3 - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$match": { - "_id": { - "$gte": 2 - } - } - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ], - "cursor": {}, - "lsid": "session0", - "readConcern": { - "level": "majority" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false - }, - "command_name": "aggregate", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$match": { - "_id": { - "$gte": 2 - } - } - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ], - "cursor": {}, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "aggregate", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "only first find includes readConcern", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readConcern": { - "level": "majority" - } - } - } - }, - { - "name": "find", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0", - "batchSize": 3 - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "find", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0", - "batchSize": 3 - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "test", - "batchSize": 3, - "lsid": "session0", - "readConcern": { - "level": "majority" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false - }, - "command_name": "find", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$numberLong": "42" - }, - "collection": "test", - "batchSize": 3, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "getMore", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "test", - "batchSize": 3, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "find", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$numberLong": "42" - }, - "collection": "test", - "batchSize": 3, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "getMore", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "only first aggregate includes readConcern", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readConcern": { - "level": "majority" - } - } - } - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "batchSize": 3, - "session": "session0" - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "batchSize": 3, - "session": "session0" - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "cursor": { - "batchSize": 3 - }, - "lsid": "session0", - "readConcern": { - "level": "majority" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false - }, - "command_name": "aggregate", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$numberLong": "42" - }, - "collection": "test", - "batchSize": 3, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "getMore", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "cursor": { - "batchSize": 3 - }, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "aggregate", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$numberLong": "42" - }, - "collection": "test", - "batchSize": 3, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "getMore", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "only first distinct includes readConcern", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readConcern": { - "level": "majority" - } - } - } - }, - { - "name": "distinct", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0", - "fieldName": "_id" - }, - "result": [ - 1, - 2, - 3, - 4 - ] - }, - { - "name": "distinct", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0", - "fieldName": "_id" - }, - "result": [ - 1, - 2, - 3, - 4 - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "test", - "key": "_id", - "lsid": "session0", - "readConcern": { - "level": "majority" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "distinct", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "test", - "key": "_id", - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "distinct", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "only first runCommand includes readConcern", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readConcern": { - "level": "majority" - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "command_name": "find", - "arguments": { - "session": "session0", - "command": { - "find": "test" - } - } - }, - { - "name": "runCommand", - "object": "database", - "command_name": "find", - "arguments": { - "session": "session0", - "command": { - "find": "test" - } - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "test", - "lsid": "session0", - "readConcern": { - "level": "majority" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "find", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "test", - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "find", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "countDocuments ignores collection readConcern", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "countDocuments", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$gte": 2 - } - } - }, - "result": 3 - }, - { - "name": "countDocuments", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$gte": 2 - } - } - }, - "result": 3 - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$match": { - "_id": { - "$gte": 2 - } - } - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ], - "cursor": {}, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false - }, - "command_name": "aggregate", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$match": { - "_id": { - "$gte": 2 - } - } - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ], - "cursor": {}, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "aggregate", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "find ignores collection readConcern", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "find", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0", - "batchSize": 3 - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "find", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0", - "batchSize": 3 - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "test", - "batchSize": 3, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false - }, - "command_name": "find", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$numberLong": "42" - }, - "collection": "test", - "batchSize": 3, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "getMore", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "test", - "batchSize": 3, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "find", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$numberLong": "42" - }, - "collection": "test", - "batchSize": 3, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "getMore", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "aggregate ignores collection readConcern", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "batchSize": 3, - "session": "session0" - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "batchSize": 3, - "session": "session0" - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "cursor": { - "batchSize": 3 - }, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false - }, - "command_name": "aggregate", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$numberLong": "42" - }, - "collection": "test", - "batchSize": 3, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "getMore", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "cursor": { - "batchSize": 3 - }, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "aggregate", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$numberLong": "42" - }, - "collection": "test", - "batchSize": 3, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "getMore", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "distinct ignores collection readConcern", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "distinct", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0", - "fieldName": "_id" - }, - "result": [ - 1, - 2, - 3, - 4 - ] - }, - { - "name": "distinct", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0", - "fieldName": "_id" - }, - "result": [ - 1, - 2, - 3, - 4 - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "test", - "key": "_id", - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "distinct", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "distinct": "test", - "key": "_id", - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "distinct", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "runCommand ignores database readConcern", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "runCommand", - "object": "database", - "databaseOptions": { - "readConcern": { - "level": "majority" - } - }, - "command_name": "find", - "arguments": { - "session": "session0", - "command": { - "find": "test" - } - } - }, - { - "name": "runCommand", - "object": "database", - "command_name": "find", - "arguments": { - "session": "session0", - "command": { - "find": "test" - } - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "test", - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "find", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "test", - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "find", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/read-concern.yml b/testdata/transactions/legacy/read-concern.yml deleted file mode 100644 index 769da34365..0000000000 --- a/testdata/transactions/legacy/read-concern.yml +++ /dev/null @@ -1,623 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: &data - - {_id: 1} - - {_id: 2} - - {_id: 3} - - {_id: 4} - -tests: - - description: only first countDocuments includes readConcern - - operations: - - &startTransaction - name: startTransaction - object: session0 - arguments: - options: - readConcern: - level: majority - - &countDocuments - name: countDocuments - object: collection - collectionOptions: - readConcern: - level: majority - arguments: - session: session0 - filter: {_id: {$gte: 2}} - result: 3 - - *countDocuments - - &commitTransaction - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - $match: {_id: {$gte: 2}} - - $group: {_id: 1, n: {$sum: 1}} - cursor: {} - lsid: session0 - readConcern: - level: majority - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - command_name: aggregate - database_name: *database_name - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - $match: {_id: {$gte: 2}} - - $group: {_id: 1, n: {$sum: 1}} - cursor: {} - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: aggregate - database_name: *database_name - - &commitTransactionEvent - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - readConcern: - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: &outcome - collection: - data: - *data - - - description: only first find includes readConcern - - operations: - - *startTransaction - - &find - name: find - object: collection - collectionOptions: - readConcern: - level: majority - arguments: - session: session0 - batchSize: 3 - result: *data - - *find - - *commitTransaction - - expectations: - - command_started_event: - command: - find: *collection_name - batchSize: 3 - lsid: session0 - readConcern: - level: majority - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - command_name: find - database_name: *database_name - - command_started_event: - command: - getMore: - # 42 is a fake placeholder value for the cursorId. - $numberLong: '42' - collection: *collection_name - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: getMore - database_name: *database_name - - command_started_event: - command: - find: *collection_name - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: find - database_name: *database_name - - command_started_event: - command: - getMore: - $numberLong: '42' - collection: *collection_name - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: getMore - database_name: *database_name - - *commitTransactionEvent - - outcome: &outcome - collection: - data: - *data - - - description: only first aggregate includes readConcern - - operations: - - *startTransaction - - &aggregate - name: aggregate - object: collection - collectionOptions: - readConcern: - level: majority - arguments: - pipeline: - - $project: - _id: 1 - batchSize: 3 - session: session0 - result: *data - - *aggregate - - *commitTransaction - - expectations: - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - $project: - _id: 1 - cursor: - batchSize: 3 - lsid: session0 - readConcern: - level: majority - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - command_name: aggregate - database_name: *database_name - - command_started_event: - command: - getMore: - # 42 is a fake placeholder value for the cursorId. - $numberLong: '42' - collection: *collection_name - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: getMore - database_name: *database_name - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - $project: - _id: 1 - cursor: - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: aggregate - database_name: *database_name - - command_started_event: - command: - getMore: - $numberLong: '42' - collection: *collection_name - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: getMore - database_name: *database_name - - *commitTransactionEvent - - outcome: *outcome - - - description: only first distinct includes readConcern - - operations: - - *startTransaction - - &distinct - name: distinct - object: collection - collectionOptions: - readConcern: - level: majority - arguments: - session: session0 - fieldName: _id - result: [1, 2, 3, 4] - - *distinct - - *commitTransaction - - expectations: - - command_started_event: - command: - distinct: *collection_name - key: _id - lsid: session0 - readConcern: - level: majority - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: distinct - database_name: *database_name - - command_started_event: - command: - distinct: *collection_name - key: _id - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: distinct - database_name: *database_name - - *commitTransactionEvent - - outcome: *outcome - - - description: only first runCommand includes readConcern - - operations: - - *startTransaction - - &runCommand - name: runCommand - object: database - command_name: find - arguments: - session: session0 - command: - find: *collection_name - - *runCommand - - *commitTransaction - - expectations: - - command_started_event: - command: - find: *collection_name - lsid: session0 - readConcern: - level: majority - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: find - database_name: *database_name - - command_started_event: - command: - find: *collection_name - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: find - database_name: *database_name - - *commitTransactionEvent - - outcome: *outcome - - - description: countDocuments ignores collection readConcern - - operations: - - &startTransactionNoReadConcern - name: startTransaction - object: session0 - - *countDocuments - - *countDocuments - - *commitTransaction - - expectations: - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - $match: {_id: {$gte: 2}} - - $group: {_id: 1, n: {$sum: 1}} - cursor: {} - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - command_name: aggregate - database_name: *database_name - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - $match: {_id: {$gte: 2}} - - $group: {_id: 1, n: {$sum: 1}} - cursor: {} - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: aggregate - database_name: *database_name - - *commitTransactionEvent - - outcome: *outcome - - - description: find ignores collection readConcern - - operations: - - *startTransactionNoReadConcern - - *find - - *find - - *commitTransaction - - expectations: - - command_started_event: - command: - find: *collection_name - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - command_name: find - database_name: *database_name - - command_started_event: - command: - getMore: - # 42 is a fake placeholder value for the cursorId. - $numberLong: '42' - collection: *collection_name - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: getMore - database_name: *database_name - - command_started_event: - command: - find: *collection_name - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: find - database_name: *database_name - - command_started_event: - command: - getMore: - $numberLong: '42' - collection: *collection_name - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: getMore - database_name: *database_name - - *commitTransactionEvent - - outcome: *outcome - - - description: aggregate ignores collection readConcern - - operations: - - *startTransactionNoReadConcern - - *aggregate - - *aggregate - - *commitTransaction - - expectations: - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - $project: - _id: 1 - cursor: - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - command_name: aggregate - database_name: *database_name - - command_started_event: - command: - getMore: - # 42 is a fake placeholder value for the cursorId. - $numberLong: '42' - collection: *collection_name - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: getMore - database_name: *database_name - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - $project: - _id: 1 - cursor: - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: aggregate - database_name: *database_name - - command_started_event: - command: - getMore: - $numberLong: '42' - collection: *collection_name - batchSize: 3 - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: getMore - database_name: *database_name - - *commitTransactionEvent - - outcome: *outcome - - - description: distinct ignores collection readConcern - - operations: - - *startTransactionNoReadConcern - - *distinct - - *distinct - - *commitTransaction - - expectations: - - command_started_event: - command: - distinct: *collection_name - key: _id - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: distinct - database_name: *database_name - - command_started_event: - command: - distinct: *collection_name - key: _id - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: distinct - database_name: *database_name - - *commitTransactionEvent - - outcome: *outcome - - - description: runCommand ignores database readConcern - - operations: - - *startTransactionNoReadConcern - - name: runCommand - object: database - databaseOptions: - readConcern: - level: majority - command_name: find - arguments: - session: session0 - command: - find: *collection_name - - *runCommand - - *commitTransaction - - expectations: - - command_started_event: - command: - find: *collection_name - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: find - database_name: *database_name - - command_started_event: - command: - find: *collection_name - lsid: session0 - readConcern: # No readConcern - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: find - database_name: *database_name - - *commitTransactionEvent - - outcome: *outcome diff --git a/testdata/transactions/legacy/read-pref.json b/testdata/transactions/legacy/read-pref.json deleted file mode 100644 index bf1f1970eb..0000000000 --- a/testdata/transactions/legacy/read-pref.json +++ /dev/null @@ -1,720 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "default readPreference", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ], - "session": "session0" - }, - "result": { - "insertedIds": { - "0": 1, - "1": 2, - "2": 3, - "3": 4 - } - } - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Secondary" - } - }, - "arguments": { - "session": "session0", - "pipeline": [ - { - "$match": { - "_id": 1 - } - }, - { - "$count": "count" - } - ] - }, - "result": [ - { - "count": 1 - } - ] - }, - { - "name": "find", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Secondary" - } - }, - "arguments": { - "session": "session0", - "batchSize": 3 - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Secondary" - } - }, - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "batchSize": 3, - "session": "session0" - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "primary readPreference", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readPreference": { - "mode": "Primary" - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ], - "session": "session0" - }, - "result": { - "insertedIds": { - "0": 1, - "1": 2, - "2": 3, - "3": 4 - } - } - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Secondary" - } - }, - "arguments": { - "session": "session0", - "pipeline": [ - { - "$match": { - "_id": 1 - } - }, - { - "$count": "count" - } - ] - }, - "result": [ - { - "count": 1 - } - ] - }, - { - "name": "find", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Secondary" - } - }, - "arguments": { - "session": "session0", - "batchSize": 3 - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Secondary" - } - }, - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "batchSize": 3, - "session": "session0" - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "secondary readPreference", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readPreference": { - "mode": "Secondary" - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ], - "session": "session0" - }, - "result": { - "insertedIds": { - "0": 1, - "1": 2, - "2": 3, - "3": 4 - } - } - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Primary" - } - }, - "arguments": { - "session": "session0", - "pipeline": [ - { - "$match": { - "_id": 1 - } - }, - { - "$count": "count" - } - ] - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - }, - { - "name": "find", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Primary" - } - }, - "arguments": { - "session": "session0", - "batchSize": 3 - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Primary" - } - }, - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "batchSize": 3, - "session": "session0" - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "primaryPreferred readPreference", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readPreference": { - "mode": "PrimaryPreferred" - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ], - "session": "session0" - }, - "result": { - "insertedIds": { - "0": 1, - "1": 2, - "2": 3, - "3": 4 - } - } - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Primary" - } - }, - "arguments": { - "session": "session0", - "pipeline": [ - { - "$match": { - "_id": 1 - } - }, - { - "$count": "count" - } - ] - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - }, - { - "name": "find", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Primary" - } - }, - "arguments": { - "session": "session0", - "batchSize": 3 - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Primary" - } - }, - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "batchSize": 3, - "session": "session0" - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "nearest readPreference", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readPreference": { - "mode": "Nearest" - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ], - "session": "session0" - }, - "result": { - "insertedIds": { - "0": 1, - "1": 2, - "2": 3, - "3": 4 - } - } - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Primary" - } - }, - "arguments": { - "session": "session0", - "pipeline": [ - { - "$match": { - "_id": 1 - } - }, - { - "$count": "count" - } - ] - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - }, - { - "name": "find", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Primary" - } - }, - "arguments": { - "session": "session0", - "batchSize": 3 - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - }, - { - "name": "aggregate", - "object": "collection", - "collectionOptions": { - "readPreference": { - "mode": "Primary" - } - }, - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "batchSize": 3, - "session": "session0" - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "secondary write only", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readPreference": { - "mode": "Secondary" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/read-pref.yml b/testdata/transactions/legacy/read-pref.yml deleted file mode 100644 index 6d94e3a199..0000000000 --- a/testdata/transactions/legacy/read-pref.yml +++ /dev/null @@ -1,348 +0,0 @@ -# This test doesn't check contents of command-started events. -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: default readPreference - - operations: - - name: startTransaction - object: session0 - - name: insertMany - object: collection - arguments: - documents: &insertedDocs - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 - session: session0 - result: - insertedIds: {0: 1, 1: 2, 2: 3, 3: 4} - - name: aggregate - object: collection - collectionOptions: - # The driver overrides the collection's read pref with the - # transaction's so count runs with Primary and succeeds. - readPreference: - mode: Secondary - arguments: - session: session0 - pipeline: - - $match: - _id: 1 - - $count: count - result: - - count: 1 - - name: find - object: collection - collectionOptions: - readPreference: - mode: Secondary - arguments: - session: session0 - batchSize: 3 - result: *insertedDocs - - name: aggregate - object: collection - collectionOptions: - readPreference: - mode: Secondary - arguments: - pipeline: - - $project: - _id: 1 - batchSize: 3 - session: session0 - result: *insertedDocs - - name: commitTransaction - object: session0 - - outcome: - collection: - data: *insertedDocs - - - description: primary readPreference - - operations: - - name: startTransaction - object: session0 - arguments: - options: - readPreference: - mode: Primary - - name: insertMany - object: collection - arguments: - documents: &insertedDocs - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 - session: session0 - result: - insertedIds: {0: 1, 1: 2, 2: 3, 3: 4} - - name: aggregate - object: collection - collectionOptions: - readPreference: - mode: Secondary - arguments: - session: session0 - pipeline: - - $match: - _id: 1 - - $count: count - result: - - count: 1 - - name: find - object: collection - collectionOptions: - readPreference: - mode: Secondary - arguments: - session: session0 - batchSize: 3 - result: *insertedDocs - - name: aggregate - object: collection - collectionOptions: - readPreference: - mode: Secondary - arguments: - pipeline: - - $project: - _id: 1 - batchSize: 3 - session: session0 - result: *insertedDocs - - name: commitTransaction - object: session0 - - outcome: - collection: - data: *insertedDocs - - - description: secondary readPreference - - operations: - - name: startTransaction - object: session0 - arguments: - options: - readPreference: - mode: Secondary - - name: insertMany - object: collection - arguments: - documents: &insertedDocs - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 - session: session0 - result: - insertedIds: {0: 1, 1: 2, 2: 3, 3: 4} - - name: aggregate - object: collection - collectionOptions: - readPreference: - mode: Primary - arguments: - session: session0 - pipeline: - - $match: - _id: 1 - - $count: count - result: - errorContains: read preference in a transaction must be primary - - name: find - object: collection - collectionOptions: - readPreference: - mode: Primary - arguments: - session: session0 - batchSize: 3 - result: - errorContains: read preference in a transaction must be primary - - name: aggregate - object: collection - collectionOptions: - readPreference: - mode: Primary - arguments: - pipeline: - - $project: - _id: 1 - batchSize: 3 - session: session0 - result: - errorContains: read preference in a transaction must be primary - - name: abortTransaction - object: session0 - - outcome: - collection: - data: [] - - - description: primaryPreferred readPreference - - operations: - - name: startTransaction - object: session0 - arguments: - options: - readPreference: - mode: PrimaryPreferred - - name: insertMany - object: collection - arguments: - documents: &insertedDocs - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 - session: session0 - result: - insertedIds: {0: 1, 1: 2, 2: 3, 3: 4} - - name: aggregate - object: collection - collectionOptions: - readPreference: - mode: Primary - arguments: - session: session0 - pipeline: - - $match: - _id: 1 - - $count: count - result: - errorContains: read preference in a transaction must be primary - - name: find - object: collection - collectionOptions: - readPreference: - mode: Primary - arguments: - session: session0 - batchSize: 3 - result: - errorContains: read preference in a transaction must be primary - - name: aggregate - object: collection - collectionOptions: - readPreference: - mode: Primary - arguments: - pipeline: - - $project: - _id: 1 - batchSize: 3 - session: session0 - result: - errorContains: read preference in a transaction must be primary - - name: abortTransaction - object: session0 - - outcome: - collection: - data: [] - - - description: nearest readPreference - - operations: - - name: startTransaction - object: session0 - arguments: - options: - readPreference: - mode: Nearest - - name: insertMany - object: collection - arguments: - documents: &insertedDocs - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 - session: session0 - result: - insertedIds: {0: 1, 1: 2, 2: 3, 3: 4} - - name: aggregate - object: collection - collectionOptions: - readPreference: - mode: Primary - arguments: - session: session0 - pipeline: - - $match: - _id: 1 - - $count: count - result: - errorContains: read preference in a transaction must be primary - - name: find - object: collection - collectionOptions: - readPreference: - mode: Primary - arguments: - session: session0 - batchSize: 3 - result: - errorContains: read preference in a transaction must be primary - - name: aggregate - object: collection - collectionOptions: - readPreference: - mode: Primary - arguments: - pipeline: - - $project: - _id: 1 - batchSize: 3 - session: session0 - result: - errorContains: read preference in a transaction must be primary - - name: abortTransaction - object: session0 - - outcome: - collection: - data: [] - - - description: secondary write only - - operations: - - name: startTransaction - object: session0 - arguments: - options: - readPreference: - mode: Secondary - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - outcome: - collection: - data: - - _id: 1 diff --git a/testdata/transactions/legacy/reads.json b/testdata/transactions/legacy/reads.json deleted file mode 100644 index 9fc587f482..0000000000 --- a/testdata/transactions/legacy/reads.json +++ /dev/null @@ -1,543 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ], - "tests": [ - { - "description": "collection readConcern without transaction", - "operations": [ - { - "name": "find", - "object": "collection", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - }, - "arguments": { - "session": "session0" - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "test", - "readConcern": { - "level": "majority" - }, - "lsid": "session0", - "txnNumber": null, - "startTransaction": null, - "autocommit": null - }, - "command_name": "find", - "database_name": "transaction-tests" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "find", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "find", - "object": "collection", - "arguments": { - "session": "session0", - "batchSize": 3 - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "find", - "object": "collection", - "arguments": { - "session": "session0", - "batchSize": 3 - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "find": "test", - "batchSize": 3, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false - }, - "command_name": "find", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$numberLong": "42" - }, - "collection": "test", - "batchSize": 3, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "getMore", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "find": "test", - "batchSize": 3, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "find", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$numberLong": "42" - }, - "collection": "test", - "batchSize": 3, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "getMore", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "aggregate", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "batchSize": 3, - "session": "session0" - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "batchSize": 3, - "session": "session0" - }, - "result": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "cursor": { - "batchSize": 3 - }, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false - }, - "command_name": "aggregate", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$numberLong": "42" - }, - "collection": "test", - "batchSize": 3, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "getMore", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$project": { - "_id": 1 - } - } - ], - "cursor": { - "batchSize": 3 - }, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "aggregate", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "getMore": { - "$numberLong": "42" - }, - "collection": "test", - "batchSize": 3, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false - }, - "command_name": "getMore", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - }, - { - "description": "distinct", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "distinct", - "object": "collection", - "arguments": { - "session": "session0", - "fieldName": "_id" - }, - "result": [ - 1, - 2, - 3, - 4 - ] - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "distinct": "test", - "key": "_id", - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "distinct", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "readConcern": null, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/reads.yml b/testdata/transactions/legacy/reads.yml deleted file mode 100644 index cee4184a73..0000000000 --- a/testdata/transactions/legacy/reads.yml +++ /dev/null @@ -1,261 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: &data - - {_id: 1} - - {_id: 2} - - {_id: 3} - - {_id: 4} - -tests: - - description: collection readConcern without transaction - - operations: - - name: find - object: collection - collectionOptions: - readConcern: - level: majority - arguments: - session: session0 - result: *data - - expectations: - - command_started_event: - command: - find: *collection_name - readConcern: - level: majority - lsid: session0 - txnNumber: - startTransaction: - autocommit: - command_name: find - database_name: *database_name - - outcome: &outcome - collection: - data: - *data - - - description: find - - operations: - - &startTransaction - name: startTransaction - object: session0 - - &find - name: find - object: collection - arguments: - session: session0 - batchSize: 3 - result: *data - - *find - - &commitTransaction - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - find: *collection_name - batchSize: 3 - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - command_name: find - database_name: *database_name - - command_started_event: - command: - getMore: - # 42 is a fake placeholder value for the cursorId. - $numberLong: '42' - collection: *collection_name - batchSize: 3 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: getMore - database_name: *database_name - - command_started_event: - command: - find: *collection_name - batchSize: 3 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: find - database_name: *database_name - - command_started_event: - command: - getMore: - $numberLong: '42' - collection: *collection_name - batchSize: 3 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: getMore - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: *outcome - - - description: aggregate - - operations: - - *startTransaction - - &aggregate - name: aggregate - object: collection - arguments: - pipeline: - - $project: - _id: 1 - batchSize: 3 - session: session0 - result: *data - - *aggregate - - *commitTransaction - - expectations: - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - $project: - _id: 1 - cursor: - batchSize: 3 - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - command_name: aggregate - database_name: *database_name - - command_started_event: - command: - getMore: - # 42 is a fake placeholder value for the cursorId. - $numberLong: '42' - collection: *collection_name - batchSize: 3 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: getMore - database_name: *database_name - - command_started_event: - command: - aggregate: *collection_name - pipeline: - - $project: - _id: 1 - cursor: - batchSize: 3 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: aggregate - database_name: *database_name - - command_started_event: - command: - getMore: - $numberLong: '42' - collection: *collection_name - batchSize: 3 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - command_name: getMore - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: *outcome - - - description: distinct - - operations: - - *startTransaction - - name: distinct - object: collection - arguments: - session: session0 - fieldName: _id - result: [1, 2, 3, 4] - - *commitTransaction - - expectations: - - command_started_event: - command: - distinct: *collection_name - key: _id - lsid: session0 - readConcern: - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: distinct - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - readConcern: - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: *outcome diff --git a/testdata/transactions/legacy/retryable-abort-errorLabels.json b/testdata/transactions/legacy/retryable-abort-errorLabels.json deleted file mode 100644 index 1110ce2c32..0000000000 --- a/testdata/transactions/legacy/retryable-abort-errorLabels.json +++ /dev/null @@ -1,204 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.1", - "topology": [ - "replicaset", - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "abortTransaction only retries once with RetryableWriteError from server", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 112, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction does not retry without RetryableWriteError label", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 11600, - "errorLabels": [] - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/retryable-abort-errorLabels.yml b/testdata/transactions/legacy/retryable-abort-errorLabels.yml deleted file mode 100644 index edd0d18c05..0000000000 --- a/testdata/transactions/legacy/retryable-abort-errorLabels.yml +++ /dev/null @@ -1,124 +0,0 @@ -runOn: - - - minServerVersion: "4.3.1" - topology: ["replicaset", "sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] -tests: - - description: abortTransaction only retries once with RetryableWriteError from server - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["abortTransaction"] - errorCode: 112 # WriteConflict, not a retryable error code - errorLabels: ["RetryableWriteError"] # Override server behavior: send RetryableWriteError label with non-retryable error code - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: # Driver retries abort once - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - outcome: - collection: - data: [] - - - description: abortTransaction does not retry without RetryableWriteError label - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 11600 # InterruptedAtShutdown, normally a retryable error code - errorLabels: [] # Override server behavior: do not send RetryableWriteError label with retryable code - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - outcome: # Driver does not retry abort - collection: - data: [] diff --git a/testdata/transactions/legacy/retryable-abort.json b/testdata/transactions/legacy/retryable-abort.json deleted file mode 100644 index b712e80862..0000000000 --- a/testdata/transactions/legacy/retryable-abort.json +++ /dev/null @@ -1,2017 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "abortTransaction only performs a single retry", - "clientOptions": { - "retryWrites": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction does not retry after Interrupted", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 11601, - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction does not retry after WriteConcernError Interrupted", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "writeConcernError": { - "code": 11601, - "errmsg": "operation was interrupted" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after connection error", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 10107, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 13436, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 13435, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 11602, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 11600, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 91, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 6, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 9001, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 89, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after WriteConcernError InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "writeConcernError": { - "code": 11600, - "errorLabels": [ - "RetryableWriteError" - ], - "errmsg": "Replication is being shut down" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after WriteConcernError InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "writeConcernError": { - "code": 11602, - "errorLabels": [ - "RetryableWriteError" - ], - "errmsg": "Replication is being shut down" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after WriteConcernError PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "writeConcernError": { - "code": 189, - "errorLabels": [ - "RetryableWriteError" - ], - "errmsg": "Replication is being shut down" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "abortTransaction succeeds after WriteConcernError ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "writeConcernError": { - "code": 91, - "errorLabels": [ - "RetryableWriteError" - ], - "errmsg": "Replication is being shut down" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/retryable-abort.yml b/testdata/transactions/legacy/retryable-abort.yml deleted file mode 100644 index a6ccc531b7..0000000000 --- a/testdata/transactions/legacy/retryable-abort.yml +++ /dev/null @@ -1,1315 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: abortTransaction only performs a single retry - - clientOptions: - retryWrites: false - - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["abortTransaction"] - closeConnection: true - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - # Call to abort returns no error even when the retry attempt fails. - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction does not retry after Interrupted - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 11601 - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction does not retry after WriteConcernError Interrupted - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - writeConcernError: - code: 11601 - errmsg: operation was interrupted - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after connection error - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - closeConnection: true - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after NotWritablePrimary - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 10107 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after NotPrimaryOrSecondary - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 13436 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after NotPrimaryNoSecondaryOk - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 13435 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after InterruptedDueToReplStateChange - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 11602 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after InterruptedAtShutdown - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 11600 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after PrimarySteppedDown - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 189 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after ShutdownInProgress - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 91 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after HostNotFound - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 7 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after HostUnreachable - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 6 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after SocketException - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 9001 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after NetworkTimeout - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - errorCode: 89 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after WriteConcernError InterruptedAtShutdown - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - writeConcernError: - code: 11600 - errorLabels: ["RetryableWriteError"] - errmsg: Replication is being shut down - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after WriteConcernError InterruptedDueToReplStateChange - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - writeConcernError: - code: 11602 - errorLabels: ["RetryableWriteError"] - errmsg: Replication is being shut down - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after WriteConcernError PrimarySteppedDown - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - writeConcernError: - code: 189 - errorLabels: ["RetryableWriteError"] - errmsg: Replication is being shut down - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: abortTransaction succeeds after WriteConcernError ShutdownInProgress - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["abortTransaction"] - writeConcernError: - code: 91 - errorLabels: ["RetryableWriteError"] - errmsg: Replication is being shut down - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] diff --git a/testdata/transactions/legacy/retryable-commit-errorLabels.json b/testdata/transactions/legacy/retryable-commit-errorLabels.json deleted file mode 100644 index e0818f237b..0000000000 --- a/testdata/transactions/legacy/retryable-commit-errorLabels.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.3.1", - "topology": [ - "replicaset", - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "commitTransaction does not retry error without RetryableWriteError label", - "clientOptions": { - "retryWrites": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 11600, - "errorLabels": [] - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsOmit": [ - "RetryableWriteError", - "TransientTransactionError" - ] - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "commitTransaction retries once with RetryableWriteError from server", - "clientOptions": { - "retryWrites": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 112, - "errorLabels": [ - "RetryableWriteError" - ] - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/retryable-commit-errorLabels.yml b/testdata/transactions/legacy/retryable-commit-errorLabels.yml deleted file mode 100644 index d0425d5946..0000000000 --- a/testdata/transactions/legacy/retryable-commit-errorLabels.yml +++ /dev/null @@ -1,132 +0,0 @@ -runOn: - - - minServerVersion: "4.3.1" - topology: ["replicaset", "sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: commitTransaction does not retry error without RetryableWriteError label - clientOptions: - retryWrites: false - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 11600 # InterruptedAtShutdown, normally a retryable error code - errorLabels: [] # Override server behavior: do not send RetryableWriteError label with retryable code - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - errorLabelsOmit: ["RetryableWriteError", "TransientTransactionError"] - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - outcome: # Driver does not retry commit because there was no RetryableWriteError label on response - collection: - data: [] - - - description: commitTransaction retries once with RetryableWriteError from server - clientOptions: - retryWrites: false - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 112 # WriteConflict, not a retryable error code - errorLabels: ["RetryableWriteError"] # Override server behavior: send RetryableWriteError label with non-retryable error code - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - outcome: # Driver retries commit and it succeeds - collection: - data: - - _id: 1 diff --git a/testdata/transactions/legacy/retryable-commit.json b/testdata/transactions/legacy/retryable-commit.json deleted file mode 100644 index dde1714603..0000000000 --- a/testdata/transactions/legacy/retryable-commit.json +++ /dev/null @@ -1,2337 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "commitTransaction fails after two errors", - "clientOptions": { - "retryWrites": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsContain": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ], - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction applies majority write concern on retries", - "skipReason": "GODRIVER-2348: wtimeout is deprecated", - "clientOptions": { - "retryWrites": false - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": 2, - "j": true, - "wtimeout": 5000 - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsContain": [ - "RetryableWriteError", - "UnknownTransactionCommitResult" - ], - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": 2, - "j": true, - "wtimeout": 5000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "j": true, - "wtimeout": 5000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "j": true, - "wtimeout": 5000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction fails after Interrupted", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 11601, - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorCodeName": "Interrupted", - "errorLabelsOmit": [ - "RetryableWriteError", - "TransientTransactionError", - "UnknownTransactionCommitResult" - ] - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "commitTransaction is not retried after UnsatisfiableWriteConcern error", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 100, - "errmsg": "Not enough data-bearing nodes" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0", - "result": { - "errorLabelsOmit": [ - "RetryableWriteError", - "TransientTransactionError", - "UnknownTransactionCommitResult" - ] - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after connection error", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after NotWritablePrimary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 10107, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after NotPrimaryOrSecondary", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 13436, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after NotPrimaryNoSecondaryOk", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 13435, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 11602, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 11600, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 91, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after HostNotFound", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 7, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after HostUnreachable", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 6, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after SocketException", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 9001, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after NetworkTimeout", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 89, - "errorLabels": [ - "RetryableWriteError" - ], - "closeConnection": false - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after WriteConcernError InterruptedAtShutdown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 11600, - "errorLabels": [ - "RetryableWriteError" - ], - "errmsg": "Replication is being shut down" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after WriteConcernError InterruptedDueToReplStateChange", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 11602, - "errorLabels": [ - "RetryableWriteError" - ], - "errmsg": "Replication is being shut down" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after WriteConcernError PrimarySteppedDown", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 189, - "errorLabels": [ - "RetryableWriteError" - ], - "errmsg": "Replication is being shut down" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commitTransaction succeeds after WriteConcernError ShutdownInProgress", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "writeConcernError": { - "code": 91, - "errorLabels": [ - "RetryableWriteError" - ], - "errmsg": "Replication is being shut down" - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority", - "wtimeout": 10000 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/retryable-commit.yml b/testdata/transactions/legacy/retryable-commit.yml deleted file mode 100644 index f48b53f1b9..0000000000 --- a/testdata/transactions/legacy/retryable-commit.yml +++ /dev/null @@ -1,1461 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: commitTransaction fails after two errors - - clientOptions: - retryWrites: false - - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - closeConnection: true - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - # First call to commit fails after a single retry attempt. - - name: commitTransaction - object: session0 - result: - errorLabelsContain: ["RetryableWriteError", "UnknownTransactionCommitResult"] - errorLabelsOmit: ["TransientTransactionError"] - # Second call to commit succeeds because the failpoint was disabled. - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction applies majority write concern on retries - skipReason: "GODRIVER-2348: wtimeout is deprecated" - - clientOptions: - retryWrites: false - - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: ["commitTransaction"] - closeConnection: true - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: { w: 2, j: true, wtimeout: 5000 } - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - # First call to commit fails after a single retry attempt. - - name: commitTransaction - object: session0 - result: - errorLabelsContain: ["RetryableWriteError", "UnknownTransactionCommitResult"] - errorLabelsOmit: ["TransientTransactionError"] - # Second call to commit succeeds because the failpoint was disabled. - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: { w: 2, j: true, wtimeout: 5000 } - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, j: true, wtimeout: 5000 } - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: { w: majority, j: true, wtimeout: 5000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction fails after Interrupted - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 11601 - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - errorCodeName: Interrupted - errorLabelsOmit: ["RetryableWriteError", "TransientTransactionError", "UnknownTransactionCommitResult"] - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: [] - - - description: commitTransaction is not retried after UnsatisfiableWriteConcern error - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 100 - errmsg: Not enough data-bearing nodes - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - result: - errorLabelsOmit: ["RetryableWriteError", "TransientTransactionError", "UnknownTransactionCommitResult"] - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after connection error - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - closeConnection: true - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after NotWritablePrimary - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 10107 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after NotPrimaryOrSecondary - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 13436 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after NotPrimaryNoSecondaryOk - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 13435 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after InterruptedDueToReplStateChange - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 11602 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after InterruptedAtShutdown - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 11600 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after PrimarySteppedDown - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 189 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after ShutdownInProgress - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 91 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after HostNotFound - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 7 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after HostUnreachable - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 6 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after SocketException - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 9001 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after NetworkTimeout - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - errorCode: 89 - errorLabels: ["RetryableWriteError"] - closeConnection: false - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after WriteConcernError InterruptedAtShutdown - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 11600 - errorLabels: ["RetryableWriteError"] - errmsg: Replication is being shut down - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after WriteConcernError InterruptedDueToReplStateChange - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 11602 - errorLabels: ["RetryableWriteError"] - errmsg: Replication is being shut down - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after WriteConcernError PrimarySteppedDown - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 189 - errorLabels: ["RetryableWriteError"] - errmsg: Replication is being shut down - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: commitTransaction succeeds after WriteConcernError ShutdownInProgress - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["commitTransaction"] - writeConcernError: - code: 91 - errorLabels: ["RetryableWriteError"] - errmsg: Replication is being shut down - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - # commitTransaction applies w:majority on retries - writeConcern: { w: majority, wtimeout: 10000 } - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 diff --git a/testdata/transactions/legacy/retryable-writes.json b/testdata/transactions/legacy/retryable-writes.json deleted file mode 100644 index c932893b5b..0000000000 --- a/testdata/transactions/legacy/retryable-writes.json +++ /dev/null @@ -1,343 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "increment txnNumber", - "clientOptions": { - "retryWrites": true - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "result": { - "insertedId": 3 - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 4 - }, - { - "_id": 5 - } - ], - "session": "session0" - }, - "result": { - "insertedIds": { - "0": 4, - "1": 5 - } - } - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 3 - } - ], - "ordered": true, - "readConcern": { - "afterClusterTime": 42 - }, - "lsid": "session0", - "txnNumber": { - "$numberLong": "3" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "3" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 4 - }, - { - "_id": 5 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "4" - }, - "startTransaction": null, - "autocommit": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 4 - }, - { - "_id": 5 - } - ] - } - } - }, - { - "description": "writes are not retried", - "clientOptions": { - "retryWrites": true - }, - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/retryable-writes.yml b/testdata/transactions/legacy/retryable-writes.yml deleted file mode 100644 index 37eaaa962d..0000000000 --- a/testdata/transactions/legacy/retryable-writes.yml +++ /dev/null @@ -1,216 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: increment txnNumber - - clientOptions: - retryWrites: true - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - # Retryable write should include the next txnNumber - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 2 - result: - insertedId: 2 - # Next transaction should include the next txnNumber - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 3 - result: - insertedId: 3 - - name: abortTransaction - object: session0 - # Retryable write should include the next txnNumber - - name: insertMany - object: collection - arguments: - documents: - - _id: 4 - - _id: 5 - session: session0 - result: - insertedIds: {0: 4, 1: 5} - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 3 - ordered: true - readConcern: - afterClusterTime: 42 - lsid: session0 - txnNumber: - $numberLong: "3" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "3" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 4 - - _id: 5 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "4" - startTransaction: - autocommit: - writeConcern: - command_name: insert - database_name: *database_name - - outcome: - collection: - data: - - _id: 1 - - _id: 2 - - _id: 4 - - _id: 5 - - - description: writes are not retried - - clientOptions: - retryWrites: true - - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: ["insert"] - closeConnection: true - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - errorLabelsContain: ["TransientTransactionError"] - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: [] diff --git a/testdata/transactions/legacy/run-command.json b/testdata/transactions/legacy/run-command.json deleted file mode 100644 index 2f2a3a8815..0000000000 --- a/testdata/transactions/legacy/run-command.json +++ /dev/null @@ -1,306 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "run command with default read preference", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "runCommand", - "object": "database", - "command_name": "insert", - "arguments": { - "session": "session0", - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ] - } - }, - "result": { - "n": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ] - }, - { - "description": "run command with secondary read preference in client option and primary read preference in transaction options", - "clientOptions": { - "readPreference": "secondary" - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readPreference": { - "mode": "Primary" - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "command_name": "insert", - "arguments": { - "session": "session0", - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ] - } - }, - "result": { - "n": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ] - }, - { - "description": "run command with explicit primary read preference", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "runCommand", - "object": "database", - "command_name": "insert", - "arguments": { - "session": "session0", - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ] - }, - "readPreference": { - "mode": "Primary" - } - }, - "result": { - "n": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ] - }, - { - "description": "run command fails with explicit secondary read preference", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "runCommand", - "object": "database", - "command_name": "find", - "arguments": { - "session": "session0", - "command": { - "find": "test" - }, - "readPreference": { - "mode": "Secondary" - } - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - } - ] - }, - { - "description": "run command fails with secondary read preference from transaction options", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readPreference": { - "mode": "Secondary" - } - } - } - }, - { - "name": "runCommand", - "object": "database", - "command_name": "find", - "arguments": { - "session": "session0", - "command": { - "find": "test" - } - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - } - ] - } - ] -} diff --git a/testdata/transactions/legacy/run-command.yml b/testdata/transactions/legacy/run-command.yml deleted file mode 100644 index a62562e971..0000000000 --- a/testdata/transactions/legacy/run-command.yml +++ /dev/null @@ -1,197 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: run command with default read preference - - operations: - - name: startTransaction - object: session0 - - name: runCommand - object: database - command_name: insert - arguments: - session: session0 - command: - insert: *collection_name - documents: - - _id : 1 - result: - n: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id : 1 - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - - description: run command with secondary read preference in client option and primary read preference in transaction options - - clientOptions: - readPreference: secondary - - operations: - - name: startTransaction - object: session0 - arguments: - options: - readPreference: - mode: Primary - - name: runCommand - object: database - command_name: insert - arguments: - session: session0 - command: - insert: *collection_name - documents: - - _id : 1 - result: - n: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id : 1 - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - - description: run command with explicit primary read preference - - operations: - - name: startTransaction - object: session0 - - name: runCommand - object: database - command_name: insert - arguments: - session: session0 - command: - insert: *collection_name - documents: - - _id : 1 - readPreference: - mode: Primary - result: - n: 1 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id : 1 - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - - description: run command fails with explicit secondary read preference - - operations: - - name: startTransaction - object: session0 - - name: runCommand - object: database - command_name: find - arguments: - session: session0 - command: - find: *collection_name - readPreference: - mode: Secondary - result: - errorContains: read preference in a transaction must be primary - - - description: run command fails with secondary read preference from transaction options - - operations: - - name: startTransaction - object: session0 - arguments: - options: - readPreference: - mode: Secondary - - name: runCommand - object: database - command_name: find - arguments: - session: session0 - command: - find: *collection_name - result: - errorContains: read preference in a transaction must be primary - diff --git a/testdata/transactions/legacy/transaction-options-repl.json b/testdata/transactions/legacy/transaction-options-repl.json deleted file mode 100644 index 33324debb8..0000000000 --- a/testdata/transactions/legacy/transaction-options-repl.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "readConcern snapshot in startTransaction options", - "sessionOptions": { - "session0": { - "defaultTransactionOptions": { - "readConcern": { - "level": "majority" - } - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readConcern": { - "level": "snapshot" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readConcern": { - "level": "snapshot" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "snapshot" - }, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "snapshot", - "afterClusterTime": 42 - }, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/transaction-options-repl.yml b/testdata/transactions/legacy/transaction-options-repl.yml deleted file mode 100644 index c1191c32b3..0000000000 --- a/testdata/transactions/legacy/transaction-options-repl.yml +++ /dev/null @@ -1,117 +0,0 @@ -runOn: - - minServerVersion: "4.0" - topology: ["replicaset"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - - description: readConcern snapshot in startTransaction options - - sessionOptions: - session0: - defaultTransactionOptions: - readConcern: - level: majority # Overridden. - - operations: - - name: startTransaction - object: session0 - arguments: - options: - readConcern: - level: snapshot - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - # Now test abort. - - name: startTransaction - object: session0 - arguments: - options: - readConcern: - level: snapshot - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 2 - result: - insertedId: 2 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - level: snapshot - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - readConcern: - level: snapshot - afterClusterTime: 42 - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 diff --git a/testdata/transactions/legacy/transaction-options.json b/testdata/transactions/legacy/transaction-options.json deleted file mode 100644 index d474e3773d..0000000000 --- a/testdata/transactions/legacy/transaction-options.json +++ /dev/null @@ -1,1407 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [], - "tests": [ - { - "description": "no transaction options set", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null, - "maxTimeMS": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null, - "maxTimeMS": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "afterClusterTime": 42 - }, - "writeConcern": null, - "maxTimeMS": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null, - "maxTimeMS": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "transaction options inherited from client", - "clientOptions": { - "w": 1, - "readConcernLevel": "local" - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "local" - }, - "writeConcern": null, - "maxTimeMS": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": 1 - }, - "maxTimeMS": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "local", - "afterClusterTime": 42 - }, - "writeConcern": null, - "maxTimeMS": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": 1 - }, - "maxTimeMS": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "transaction options inherited from defaultTransactionOptions", - "skipReason": "GODRIVER-2348: maxCommitTimeMS is deprecated", - "sessionOptions": { - "session0": { - "defaultTransactionOptions": { - "readConcern": { - "level": "majority" - }, - "writeConcern": { - "w": 1 - }, - "maxCommitTimeMS": 60000 - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "majority" - }, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": 1 - }, - "maxTimeMS": 60000 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "majority", - "afterClusterTime": 42 - }, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": 1 - } - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "startTransaction options override defaults", - "skipReason": "GODRIVER-2348: maxCommitTimeMS is deprecated", - "clientOptions": { - "readConcernLevel": "local", - "w": 1 - }, - "sessionOptions": { - "session0": { - "defaultTransactionOptions": { - "readConcern": { - "level": "snapshot" - }, - "writeConcern": { - "w": 1 - }, - "maxCommitTimeMS": 30000 - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readConcern": { - "level": "majority" - }, - "writeConcern": { - "w": "majority" - }, - "maxCommitTimeMS": 60000 - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readConcern": { - "level": "majority" - }, - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "majority" - }, - "writeConcern": null, - "maxTimeMS": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": "majority" - }, - "maxTimeMS": 60000 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "majority", - "afterClusterTime": 42 - }, - "writeConcern": null, - "maxTimeMS": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": "majority" - }, - "maxTimeMS": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "defaultTransactionOptions override client options", - "skipReason": "GODRIVER-2348: maxCommitTimeMS is deprecated", - "clientOptions": { - "readConcernLevel": "local", - "w": 1 - }, - "sessionOptions": { - "session0": { - "defaultTransactionOptions": { - "readConcern": { - "level": "majority" - }, - "writeConcern": { - "w": "majority" - }, - "maxCommitTimeMS": 60000 - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "majority" - }, - "writeConcern": null, - "maxTimeMS": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": "majority" - }, - "maxTimeMS": 60000 - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "majority", - "afterClusterTime": 42 - }, - "writeConcern": null, - "maxTimeMS": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": "majority" - }, - "maxTimeMS": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "readConcern local in defaultTransactionOptions", - "clientOptions": { - "w": 1 - }, - "sessionOptions": { - "session0": { - "defaultTransactionOptions": { - "readConcern": { - "level": "local" - } - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "result": { - "insertedId": 2 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "local" - }, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": 1 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - }, - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "local", - "afterClusterTime": 42 - }, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "2" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": { - "w": 1 - } - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "client writeConcern ignored for bulk", - "clientOptions": { - "w": "majority" - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": 1 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1 - } - } - } - ], - "session": "session0" - }, - "result": { - "deletedCount": 0, - "insertedCount": 1, - "insertedIds": { - "0": 1 - }, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": 1 - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "readPreference inherited from client", - "clientOptions": { - "readPreference": "secondary" - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "readPreference inherited from defaultTransactionOptions", - "clientOptions": { - "readPreference": "primary" - }, - "sessionOptions": { - "session0": { - "defaultTransactionOptions": { - "readPreference": { - "mode": "Secondary" - } - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - }, - { - "description": "startTransaction overrides readPreference", - "clientOptions": { - "readPreference": "primary" - }, - "sessionOptions": { - "session0": { - "defaultTransactionOptions": { - "readPreference": { - "mode": "Primary" - } - } - } - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "readPreference": { - "mode": "Secondary" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "find", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "result": { - "errorContains": "read preference in a transaction must be primary" - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/transaction-options.yml b/testdata/transactions/legacy/transaction-options.yml deleted file mode 100644 index 314e0284a6..0000000000 --- a/testdata/transactions/legacy/transaction-options.yml +++ /dev/null @@ -1,806 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: [] - -tests: - - description: no transaction options set - - operations: &commitAbortOperations - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - # Now test abort. - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 2 - result: - insertedId: 2 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - writeConcern: - maxTimeMS: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - maxTimeMS: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - readConcern: - afterClusterTime: 42 - writeConcern: - maxTimeMS: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - readConcern: - writeConcern: - maxTimeMS: - command_name: abortTransaction - database_name: admin - - outcome: &outcome - collection: - data: - - _id: 1 - - - description: transaction options inherited from client - - clientOptions: - w: 1 - readConcernLevel: local - - operations: *commitAbortOperations - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - level: local - writeConcern: - maxTimeMS: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: 1 - maxTimeMS: - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - readConcern: - level: local - afterClusterTime: 42 - writeConcern: - maxTimeMS: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: 1 - maxTimeMS: - command_name: abortTransaction - database_name: admin - - outcome: *outcome - - - description: transaction options inherited from defaultTransactionOptions - - sessionOptions: - session0: - defaultTransactionOptions: - readConcern: - level: majority - writeConcern: - w: 1 - maxCommitTimeMS: 60000 - - operations: *commitAbortOperations - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - level: majority - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: 1 - maxTimeMS: 60000 - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - readConcern: - level: majority - afterClusterTime: 42 - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: 1 - command_name: abortTransaction - database_name: admin - - outcome: *outcome - - - description: startTransaction options override defaults - skipReason: "GODRIVER-2348: maxCommitTimeMS is deprecated" - - clientOptions: - readConcernLevel: local - w: 1 - - sessionOptions: - session0: - defaultTransactionOptions: - readConcern: - level: snapshot - writeConcern: - w: 1 - maxCommitTimeMS: 30000 - - operations: - - name: startTransaction - object: session0 - arguments: - options: - readConcern: - level: majority - writeConcern: - w: majority - maxCommitTimeMS: 60000 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: commitTransaction - object: session0 - - name: startTransaction - object: session0 - arguments: - options: - readConcern: - level: majority - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 2 - result: - insertedId: 2 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - level: majority - writeConcern: - maxTimeMS: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: majority - maxTimeMS: 60000 - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - readConcern: - level: majority - afterClusterTime: 42 - writeConcern: - maxTimeMS: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: majority - maxTimeMS: - command_name: abortTransaction - database_name: admin - - outcome: *outcome - - - description: defaultTransactionOptions override client options - skipReason: "GODRIVER-2348: maxCommitTimeMS is deprecated" - - clientOptions: - readConcernLevel: local - w: 1 - - sessionOptions: - session0: - defaultTransactionOptions: - readConcern: - level: majority - writeConcern: - w: majority - maxCommitTimeMS: 60000 - - operations: *commitAbortOperations - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - level: majority - writeConcern: - maxTimeMS: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: majority - maxTimeMS: 60000 - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - readConcern: - level: majority - afterClusterTime: 42 - writeConcern: - maxTimeMS: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: majority - maxTimeMS: - command_name: abortTransaction - database_name: admin - - outcome: *outcome - - - description: readConcern local in defaultTransactionOptions - - clientOptions: - w: 1 - - sessionOptions: - session0: - defaultTransactionOptions: - readConcern: - level: local - - operations: *commitAbortOperations - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - level: local - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: 1 - command_name: commitTransaction - database_name: admin - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 2 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: true - autocommit: false - readConcern: - level: local - afterClusterTime: 42 - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "2" - startTransaction: - autocommit: false - readConcern: - writeConcern: - w: 1 - command_name: abortTransaction - database_name: admin - - outcome: *outcome - - - description: client writeConcern ignored for bulk - - clientOptions: - w: majority - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: 1 - - name: bulkWrite - object: collection - arguments: - requests: - - name: insertOne - arguments: - document: {_id: 1} - session: session0 - result: - deletedCount: 0 - insertedCount: 1 - insertedIds: {0: 1} - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: {} - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - # No writeConcern. - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: 1 - command_name: commitTransaction - database_name: admin - - outcome: *outcome - - - description: readPreference inherited from client - - clientOptions: - readPreference: secondary - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: find - object: collection - arguments: - session: session0 - filter: - _id: 1 - result: - errorContains: read preference in a transaction must be primary - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: readPreference inherited from defaultTransactionOptions - skipReason: "GODRIVER-2348: maxCommitTimeMS is deprecated" - - clientOptions: - readPreference: primary - - sessionOptions: - session0: - defaultTransactionOptions: - readPreference: - mode: Secondary - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: find - object: collection - arguments: - session: session0 - filter: - _id: 1 - result: - errorContains: read preference in a transaction must be primary - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 - - - description: startTransaction overrides readPreference - - clientOptions: - readPreference: primary - - sessionOptions: - session0: - defaultTransactionOptions: - readPreference: - mode: Primary - - operations: - - name: startTransaction - object: session0 - arguments: - options: - readPreference: - mode: Secondary - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: find - object: collection - arguments: - session: session0 - filter: - _id: 1 - result: - errorContains: read preference in a transaction must be primary - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - readConcern: - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 1 diff --git a/testdata/transactions/legacy/update.json b/testdata/transactions/legacy/update.json deleted file mode 100644 index e33bf5b810..0000000000 --- a/testdata/transactions/legacy/update.json +++ /dev/null @@ -1,442 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ], - "tests": [ - { - "description": "update", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "updateOne", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "upsert": true - }, - "result": { - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 1, - "upsertedId": 4 - } - }, - { - "name": "replaceOne", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "x": 1 - }, - "replacement": { - "y": 1 - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "updateMany", - "object": "collection", - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$gte": 3 - } - }, - "update": { - "$set": { - "z": 1 - } - } - }, - "result": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 4 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "upsert": true - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "x": 1 - }, - "u": { - "y": 1 - } - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": { - "$gte": 3 - } - }, - "u": { - "$set": { - "z": 1 - } - }, - "multi": true - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3, - "z": 1 - }, - { - "_id": 4, - "y": 1, - "z": 1 - } - ] - } - } - }, - { - "description": "collections writeConcern ignored for update", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "updateOne", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": "majority" - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": 4 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "upsert": true - }, - "result": { - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 1, - "upsertedId": 4 - } - }, - { - "name": "replaceOne", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": "majority" - } - }, - "arguments": { - "session": "session0", - "filter": { - "x": 1 - }, - "replacement": { - "y": 1 - } - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "updateMany", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": "majority" - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$gte": 3 - } - }, - "update": { - "$set": { - "z": 1 - } - } - }, - "result": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedCount": 0 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 4 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "upsert": true - } - ], - "ordered": true, - "readConcern": null, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "x": 1 - }, - "u": { - "y": 1 - } - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": { - "$gte": 3 - } - }, - "u": { - "$set": { - "z": 1 - } - }, - "multi": true - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ] - } - ] -} diff --git a/testdata/transactions/legacy/update.yml b/testdata/transactions/legacy/update.yml deleted file mode 100644 index e4f07a6b9a..0000000000 --- a/testdata/transactions/legacy/update.yml +++ /dev/null @@ -1,246 +0,0 @@ -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: - - _id: 1 - - _id: 2 - - _id: 3 - -tests: - - description: update - - operations: - - name: startTransaction - object: session0 - - name: updateOne - object: collection - arguments: - session: session0 - filter: {_id: 4} - update: - $inc: {x: 1} - upsert: true - result: - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 1 - upsertedId: 4 - - name: replaceOne - object: collection - arguments: - session: session0 - filter: {x: 1} - replacement: {y: 1} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - name: updateMany - object: collection - arguments: - session: session0 - filter: - _id: {$gte: 3} - update: - $set: {z: 1} - result: - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - update: *collection_name - updates: - - q: {_id: 4} - u: {$inc: {x: 1}} - upsert: true - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: update - database_name: *database_name - - command_started_event: - command: - update: *collection_name - updates: - - q: {x: 1} - u: {y: 1} - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: update - database_name: *database_name - - command_started_event: - command: - update: *collection_name - updates: - - q: {_id: {$gte: 3}} - u: {$set: {z: 1}} - multi: true - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: update - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - {_id: 1} - - {_id: 2} - - {_id: 3, z: 1} - - {_id: 4, y: 1, z: 1} - - - description: collections writeConcern ignored for update - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: updateOne - object: collection - collectionOptions: - writeConcern: - w: majority - arguments: - session: session0 - filter: {_id: 4} - update: - $inc: {x: 1} - upsert: true - result: - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 1 - upsertedId: 4 - - name: replaceOne - object: collection - collectionOptions: - writeConcern: - w: majority - arguments: - session: session0 - filter: {x: 1} - replacement: {y: 1} - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - name: updateMany - object: collection - collectionOptions: - writeConcern: - w: majority - arguments: - session: session0 - filter: - _id: {$gte: 3} - update: - $set: {z: 1} - result: - matchedCount: 2 - modifiedCount: 2 - upsertedCount: 0 - - name: commitTransaction - object: session0 - - expectations: - - command_started_event: - command: - update: *collection_name - updates: - - q: {_id: 4} - u: {$inc: {x: 1}} - upsert: true - ordered: true - readConcern: - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - writeConcern: - command_name: update - database_name: *database_name - - command_started_event: - command: - update: *collection_name - updates: - - q: {x: 1} - u: {y: 1} - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: update - database_name: *database_name - - command_started_event: - command: - update: *collection_name - updates: - - q: {_id: {$gte: 3}} - u: {$set: {z: 1}} - multi: true - ordered: true - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: update - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin diff --git a/testdata/transactions/legacy/write-concern.json b/testdata/transactions/legacy/write-concern.json deleted file mode 100644 index 84b1ea3650..0000000000 --- a/testdata/transactions/legacy/write-concern.json +++ /dev/null @@ -1,1278 +0,0 @@ -{ - "runOn": [ - { - "minServerVersion": "4.0", - "topology": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topology": [ - "sharded" - ] - } - ], - "database_name": "transaction-tests", - "collection_name": "test", - "data": [ - { - "_id": 0 - } - ], - "tests": [ - { - "description": "commit with majority", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0 - }, - { - "_id": 1 - } - ] - } - } - }, - { - "description": "commit with default", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0 - }, - { - "_id": 1 - } - ] - } - } - }, - { - "description": "abort with majority", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": "majority" - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": { - "w": "majority" - } - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0 - } - ] - } - } - }, - { - "description": "abort with default", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "abortTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "abortTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0 - } - ] - } - } - }, - { - "description": "start with unacknowledged write concern", - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "arguments": { - "options": { - "writeConcern": { - "w": 0 - } - } - }, - "result": { - "errorContains": "transactions do not support unacknowledged write concern" - } - } - ] - }, - { - "description": "start with implicit unacknowledged write concern", - "clientOptions": { - "w": 0 - }, - "operations": [ - { - "name": "startTransaction", - "object": "session0", - "result": { - "errorContains": "transactions do not support unacknowledged write concern" - } - } - ] - }, - { - "description": "unacknowledged write concern coll insertOne", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - }, - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "result": { - "insertedId": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0 - }, - { - "_id": 1 - } - ] - } - } - }, - { - "description": "unacknowledged write concern coll insertMany", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertMany", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - }, - "arguments": { - "session": "session0", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - }, - "result": { - "insertedIds": { - "0": 1, - "1": 2 - } - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0 - }, - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - } - }, - { - "description": "unacknowledged write concern coll bulkWrite", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "bulkWrite", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - }, - "arguments": { - "session": "session0", - "requests": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1 - } - } - } - ] - }, - "result": { - "deletedCount": 0, - "insertedCount": 1, - "insertedIds": { - "0": 1 - }, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "insert", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0 - }, - { - "_id": 1 - } - ] - } - } - }, - { - "description": "unacknowledged write concern coll deleteOne", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "deleteOne", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": 0 - } - }, - "result": { - "deletedCount": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": 0 - }, - "limit": 1 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "delete", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "unacknowledged write concern coll deleteMany", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "deleteMany", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": 0 - } - }, - "result": { - "deletedCount": 1 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": 0 - }, - "limit": 0 - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "delete", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "unacknowledged write concern coll updateOne", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "updateOne", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": 0 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "upsert": true - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 0 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "upsert": true - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "x": 1 - } - ] - } - } - }, - { - "description": "unacknowledged write concern coll updateMany", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "updateMany", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": 0 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "upsert": true - }, - "result": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedCount": 0 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 0 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "upsert": true - } - ], - "ordered": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "update", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "x": 1 - } - ] - } - } - }, - { - "description": "unacknowledged write concern coll findOneAndDelete", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "findOneAndDelete", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": 0 - } - }, - "result": { - "_id": 0 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 0 - }, - "remove": true, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [] - } - } - }, - { - "description": "unacknowledged write concern coll findOneAndReplace", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "findOneAndReplace", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": 0 - }, - "replacement": { - "x": 1 - }, - "returnDocument": "Before" - }, - "result": { - "_id": 0 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 0 - }, - "update": { - "x": 1 - }, - "new": false, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "x": 1 - } - ] - } - } - }, - { - "description": "unacknowledged write concern coll findOneAndUpdate", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "findOneAndUpdate", - "object": "collection", - "collectionOptions": { - "writeConcern": { - "w": 0 - } - }, - "arguments": { - "session": "session0", - "filter": { - "_id": 0 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "result": { - "_id": 0 - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectations": [ - { - "command_started_event": { - "command": { - "findAndModify": "test", - "query": { - "_id": 0 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "new": false, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "readConcern": null, - "writeConcern": null - }, - "command_name": "findAndModify", - "database_name": "transaction-tests" - } - }, - { - "command_started_event": { - "command": { - "commitTransaction": 1, - "lsid": "session0", - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": null, - "autocommit": false, - "writeConcern": null - }, - "command_name": "commitTransaction", - "database_name": "admin" - } - } - ], - "outcome": { - "collection": { - "data": [ - { - "_id": 0, - "x": 1 - } - ] - } - } - } - ] -} diff --git a/testdata/transactions/legacy/write-concern.yml b/testdata/transactions/legacy/write-concern.yml deleted file mode 100644 index 16687e5019..0000000000 --- a/testdata/transactions/legacy/write-concern.yml +++ /dev/null @@ -1,554 +0,0 @@ -# Assumes the default for transactions is the same as for all ops, tests -# setting the writeConcern to "majority". -runOn: - - - minServerVersion: "4.0" - topology: ["replicaset"] - - - minServerVersion: "4.1.8" - topology: ["sharded"] - -database_name: &database_name "transaction-tests" -collection_name: &collection_name "test" - -data: &data - - _id: 0 - -tests: - - description: commit with majority - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - &commitTransaction - name: commitTransaction - object: session0 - - expectations: - - &insertOneEvent - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - <<: &transactionCommandArgs - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: true - autocommit: false - readConcern: - writeConcern: - command_name: insert - database_name: *database_name - - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 0 - - _id: 1 - - - description: commit with default - - operations: - - &startTransaction - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - *commitTransaction - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - <<: *transactionCommandArgs - command_name: insert - database_name: *database_name - - &commitWithDefaultWCEvent - command_started_event: - command: - commitTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: commitTransaction - database_name: admin - - outcome: - collection: - data: - - _id: 0 - - _id: 1 - - - description: abort with majority - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: majority - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - <<: *transactionCommandArgs - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - w: majority - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: *data - - - description: abort with default - - operations: - - name: startTransaction - object: session0 - - name: insertOne - object: collection - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - name: abortTransaction - object: session0 - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - ordered: true - <<: *transactionCommandArgs - command_name: insert - database_name: *database_name - - command_started_event: - command: - abortTransaction: 1 - lsid: session0 - txnNumber: - $numberLong: "1" - startTransaction: - autocommit: false - writeConcern: - command_name: abortTransaction - database_name: admin - - outcome: - collection: - data: *data - - - description: start with unacknowledged write concern - - operations: - - name: startTransaction - object: session0 - arguments: - options: - writeConcern: - w: 0 - result: - # Client-side error. - errorContains: transactions do not support unacknowledged write concern - - - description: start with implicit unacknowledged write concern - - clientOptions: - w: 0 - - operations: - - name: startTransaction - object: session0 - result: - # Client-side error. - errorContains: transactions do not support unacknowledged write concern - - - description: unacknowledged write concern coll insertOne - - operations: - - *startTransaction - - name: insertOne - <<: &collection_w0 - object: collection - collectionOptions: - writeConcern: { w: 0 } - arguments: - session: session0 - document: - _id: 1 - result: - insertedId: 1 - - *commitTransaction - - expectations: - - *insertOneEvent - - *commitWithDefaultWCEvent - - outcome: - collection: - data: - - _id: 0 - - _id: 1 - - - description: unacknowledged write concern coll insertMany - - operations: - - *startTransaction - - name: insertMany - <<: *collection_w0 - arguments: - session: session0 - documents: - - _id: 1 - - _id: 2 - result: - insertedIds: {0: 1, 1: 2} - - *commitTransaction - - expectations: - - command_started_event: - command: - insert: *collection_name - documents: - - _id: 1 - - _id: 2 - ordered: true - <<: *transactionCommandArgs - command_name: insert - database_name: *database_name - - *commitWithDefaultWCEvent - - outcome: - collection: - data: - - _id: 0 - - _id: 1 - - _id: 2 - - - description: unacknowledged write concern coll bulkWrite - - operations: - - *startTransaction - - name: bulkWrite - <<: *collection_w0 - arguments: - session: session0 - requests: - - name: insertOne - arguments: - document: {_id: 1} - result: - deletedCount: 0 - insertedCount: 1 - insertedIds: {0: 1} - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: {} - - *commitTransaction - - expectations: - - *insertOneEvent - - *commitWithDefaultWCEvent - - outcome: - collection: - data: - - _id: 0 - - _id: 1 - - - - description: unacknowledged write concern coll deleteOne - - operations: - - *startTransaction - - name: deleteOne - <<: *collection_w0 - arguments: - session: session0 - filter: - _id: 0 - result: - deletedCount: 1 - - *commitTransaction - - expectations: - - command_started_event: - command: - delete: *collection_name - deletes: - - q: {_id: 0} - limit: 1 - ordered: true - <<: *transactionCommandArgs - command_name: delete - database_name: *database_name - - *commitWithDefaultWCEvent - - outcome: - collection: - data: [] - - - description: unacknowledged write concern coll deleteMany - - operations: - - *startTransaction - - name: deleteMany - <<: *collection_w0 - arguments: - session: session0 - filter: - _id: 0 - result: - deletedCount: 1 - - *commitTransaction - - expectations: - - command_started_event: - command: - delete: *collection_name - deletes: - - q: {_id: 0} - limit: 0 - ordered: true - <<: *transactionCommandArgs - command_name: delete - database_name: *database_name - - *commitWithDefaultWCEvent - - outcome: - collection: - data: [] - - - description: unacknowledged write concern coll updateOne - - operations: - - *startTransaction - - name: updateOne - <<: *collection_w0 - arguments: - session: session0 - filter: {_id: 0} - update: - $inc: {x: 1} - upsert: true - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - *commitTransaction - - expectations: - - command_started_event: - command: - update: *collection_name - updates: - - q: {_id: 0} - u: {$inc: {x: 1}} - upsert: true - ordered: true - <<: *transactionCommandArgs - command_name: update - database_name: *database_name - - *commitWithDefaultWCEvent - - outcome: - collection: - data: - - {_id: 0, x: 1} - - - description: unacknowledged write concern coll updateMany - - operations: - - *startTransaction - - name: updateMany - <<: *collection_w0 - arguments: - session: session0 - filter: {_id: 0} - update: - $inc: {x: 1} - upsert: true - result: - matchedCount: 1 - modifiedCount: 1 - upsertedCount: 0 - - *commitTransaction - - expectations: - - command_started_event: - command: - update: *collection_name - updates: - - q: {_id: 0} - u: {$inc: {x: 1}} - multi: true - upsert: true - ordered: true - <<: *transactionCommandArgs - command_name: update - database_name: *database_name - - *commitWithDefaultWCEvent - - outcome: - collection: - data: - - {_id: 0, x: 1} - - - description: unacknowledged write concern coll findOneAndDelete - - operations: - - *startTransaction - - name: findOneAndDelete - <<: *collection_w0 - arguments: - session: session0 - filter: {_id: 0} - result: {_id: 0} - - *commitTransaction - - expectations: - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 0} - remove: True - <<: *transactionCommandArgs - command_name: findAndModify - database_name: *database_name - - *commitWithDefaultWCEvent - - outcome: - collection: - data: [] - - - description: unacknowledged write concern coll findOneAndReplace - - operations: - - *startTransaction - - name: findOneAndReplace - <<: *collection_w0 - arguments: - session: session0 - filter: {_id: 0} - replacement: {x: 1} - returnDocument: Before - result: {_id: 0} - - *commitTransaction - - expectations: - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 0} - update: {x: 1} - new: false - <<: *transactionCommandArgs - command_name: findAndModify - database_name: *database_name - - *commitWithDefaultWCEvent - - outcome: - collection: - data: - - {_id: 0, x: 1} - - - description: unacknowledged write concern coll findOneAndUpdate - - operations: - - *startTransaction - - name: findOneAndUpdate - <<: *collection_w0 - arguments: - session: session0 - filter: {_id: 0} - update: - $inc: {x: 1} - returnDocument: Before - result: {_id: 0} - - *commitTransaction - - expectations: - - command_started_event: - command: - findAndModify: *collection_name - query: {_id: 0} - update: {$inc: {x: 1}} - new: false - <<: *transactionCommandArgs - command_name: findAndModify - database_name: *database_name - - *commitWithDefaultWCEvent - - outcome: - collection: - data: - - {_id: 0, x: 1} diff --git a/testdata/transactions/unified/client-bulkWrite.json b/testdata/transactions/unified/client-bulkWrite.json deleted file mode 100644 index 4a8d013f8d..0000000000 --- a/testdata/transactions/unified/client-bulkWrite.json +++ /dev/null @@ -1,593 +0,0 @@ -{ - "description": "client bulkWrite transactions", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ], - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "transaction-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - }, - { - "client": { - "id": "client_with_wmajority", - "uriOptions": { - "w": "majority" - }, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "session": { - "id": "session_with_wmajority", - "client": "client_with_wmajority" - } - } - ], - "_yamlAnchors": { - "namespace": "transaction-tests.coll0" - }, - "initialData": [ - { - "databaseName": "transaction-tests", - "collectionName": "coll0", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 5, - "x": 55 - }, - { - "_id": 6, - "x": 66 - }, - { - "_id": 7, - "x": 77 - } - ] - } - ], - "tests": [ - { - "description": "client bulkWrite in a transaction", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "session": "session0", - "models": [ - { - "insertOne": { - "namespace": "transaction-tests.coll0", - "document": { - "_id": 8, - "x": 88 - } - } - }, - { - "updateOne": { - "namespace": "transaction-tests.coll0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "updateMany": { - "namespace": "transaction-tests.coll0", - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "update": { - "$inc": { - "x": 2 - } - } - } - }, - { - "replaceOne": { - "namespace": "transaction-tests.coll0", - "filter": { - "_id": 4 - }, - "replacement": { - "x": 44 - }, - "upsert": true - } - }, - { - "deleteOne": { - "namespace": "transaction-tests.coll0", - "filter": { - "_id": 5 - } - } - }, - { - "deleteMany": { - "namespace": "transaction-tests.coll0", - "filter": { - "$and": [ - { - "_id": { - "$gt": 5 - } - }, - { - "_id": { - "$lte": 7 - } - } - ] - } - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 1, - "matchedCount": 3, - "modifiedCount": 3, - "deletedCount": 3, - "insertResults": { - "0": { - "insertedId": 8 - } - }, - "updateResults": { - "1": { - "matchedCount": 1, - "modifiedCount": 1, - "upsertedId": { - "$$exists": false - } - }, - "2": { - "matchedCount": 2, - "modifiedCount": 2, - "upsertedId": { - "$$exists": false - } - }, - "3": { - "matchedCount": 1, - "modifiedCount": 0, - "upsertedId": 4 - } - }, - "deleteResults": { - "4": { - "deletedCount": 1 - }, - "5": { - "deletedCount": 2 - } - } - } - }, - { - "object": "session0", - "name": "commitTransaction" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - }, - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 8, - "x": 88 - } - }, - { - "update": 0, - "filter": { - "_id": 1 - }, - "updateMods": { - "$inc": { - "x": 1 - } - }, - "multi": false - }, - { - "update": 0, - "filter": { - "$and": [ - { - "_id": { - "$gt": 1 - } - }, - { - "_id": { - "$lte": 3 - } - } - ] - }, - "updateMods": { - "$inc": { - "x": 2 - } - }, - "multi": true - }, - { - "update": 0, - "filter": { - "_id": 4 - }, - "updateMods": { - "x": 44 - }, - "upsert": true, - "multi": false - }, - { - "delete": 0, - "filter": { - "_id": 5 - }, - "multi": false - }, - { - "delete": 0, - "filter": { - "$and": [ - { - "_id": { - "$gt": 5 - } - }, - { - "_id": { - "$lte": 7 - } - } - ] - }, - "multi": true - } - ], - "nsInfo": [ - { - "ns": "transaction-tests.coll0" - } - ] - } - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction", - "databaseName": "admin", - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - } - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 24 - }, - { - "_id": 3, - "x": 35 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 8, - "x": 88 - } - ] - } - ] - }, - { - "description": "client writeConcern ignored for client bulkWrite in transaction", - "operations": [ - { - "object": "session_with_wmajority", - "name": "startTransaction", - "arguments": { - "writeConcern": { - "w": 1 - } - } - }, - { - "object": "client_with_wmajority", - "name": "clientBulkWrite", - "arguments": { - "session": "session_with_wmajority", - "models": [ - { - "insertOne": { - "namespace": "transaction-tests.coll0", - "document": { - "_id": 8, - "x": 88 - } - } - } - ] - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "$$unsetOrMatches": {} - }, - "updateResults": { - "$$unsetOrMatches": {} - }, - "deleteResults": { - "$$unsetOrMatches": {} - } - } - }, - { - "object": "session_with_wmajority", - "name": "commitTransaction" - } - ], - "expectEvents": [ - { - "client": "client_with_wmajority", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "lsid": { - "$$sessionLsid": "session_with_wmajority" - }, - "txnNumber": 1, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - }, - "bulkWrite": 1, - "errorsOnly": true, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 8, - "x": 88 - } - } - ], - "nsInfo": [ - { - "ns": "transaction-tests.coll0" - } - ] - } - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session_with_wmajority" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "w": 1 - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 5, - "x": 55 - }, - { - "_id": 6, - "x": 66 - }, - { - "_id": 7, - "x": 77 - }, - { - "_id": 8, - "x": 88 - } - ] - } - ] - }, - { - "description": "client bulkWrite with writeConcern in a transaction causes a transaction error", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "client0", - "name": "clientBulkWrite", - "arguments": { - "session": "session0", - "writeConcern": { - "w": 1 - }, - "models": [ - { - "insertOne": { - "namespace": "transaction-tests.coll0", - "document": { - "_id": 8, - "x": 88 - } - } - } - ] - }, - "expectError": { - "isClientError": true, - "errorContains": "Cannot set write concern after starting a transaction" - } - } - ] - } - ] -} diff --git a/testdata/transactions/unified/client-bulkWrite.yml b/testdata/transactions/unified/client-bulkWrite.yml deleted file mode 100644 index d80e618728..0000000000 --- a/testdata/transactions/unified/client-bulkWrite.yml +++ /dev/null @@ -1,263 +0,0 @@ -description: "client bulkWrite transactions" -schemaVersion: "1.4" # To support `serverless: forbid` -runOnRequirements: - - minServerVersion: "8.0" - topologies: - - replicaset - - sharded - - load-balanced - serverless: forbid - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name transaction-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - - session: - id: &session0 session0 - client: *client0 - - client: - id: &client_with_wmajority client_with_wmajority - uriOptions: - w: majority - observeEvents: - - commandStartedEvent - - session: - id: &session_with_wmajority session_with_wmajority - client: *client_with_wmajority - -_yamlAnchors: - namespace: &namespace "transaction-tests.coll0" - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 5, x: 55 } - - { _id: 6, x: 66 } - - { _id: 7, x: 77 } - -tests: - - description: "client bulkWrite in a transaction" - operations: - - object: *session0 - name: startTransaction - - object: *client0 - name: clientBulkWrite - arguments: - session: *session0 - models: - - insertOne: - namespace: *namespace - document: { _id: 8, x: 88 } - - updateOne: - namespace: *namespace - filter: { _id: 1 } - update: { $inc: { x: 1 } } - - updateMany: - namespace: *namespace - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - update: { $inc: { x: 2 } } - - replaceOne: - namespace: *namespace - filter: { _id: 4 } - replacement: { x: 44 } - upsert: true - - deleteOne: - namespace: *namespace - filter: { _id: 5 } - - deleteMany: - namespace: *namespace - filter: - $and: [ { _id: { $gt: 5 } }, { _id: { $lte: 7 } } ] - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 1 - matchedCount: 3 - modifiedCount: 3 - deletedCount: 3 - insertResults: - 0: - insertedId: 8 - updateResults: - 1: - matchedCount: 1 - modifiedCount: 1 - upsertedId: { $$exists: false } - 2: - matchedCount: 2 - modifiedCount: 2 - upsertedId: { $$exists: false } - 3: - matchedCount: 1 - modifiedCount: 0 - upsertedId: 4 - deleteResults: - 4: - deletedCount: 1 - 5: - deletedCount: 2 - - object: *session0 - name: commitTransaction - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - startTransaction: true - autocommit: false - writeConcern: { $$exists: false } - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 8, x: 88 } - - update: 0 - filter: { _id: 1 } - updateMods: { $inc: { x: 1 } } - multi: false - - update: 0 - filter: - $and: [ { _id: { $gt: 1 } }, { _id: { $lte: 3 } } ] - updateMods: { $inc: { x: 2 } } - multi: true - - update: 0 - filter: { _id: 4 } - updateMods: { x: 44 } - upsert: true - multi: false - - delete: 0 - filter: { _id: 5 } - multi: false - - delete: 0 - filter: - $and: [ { _id: { $gt: 5 } }, { _id: { $lte: 7 } } ] - multi: true - nsInfo: - - ns: *namespace - - commandStartedEvent: - commandName: commitTransaction - databaseName: admin - command: - commitTransaction: 1 - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - startTransaction: { $$exists: false } - autocommit: false - writeConcern: { $$exists: false } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 12 } - - { _id: 2, x: 24 } - - { _id: 3, x: 35 } - - { _id: 4, x: 44 } - - { _id: 8, x: 88 } - - description: 'client writeConcern ignored for client bulkWrite in transaction' - operations: - - object: *session_with_wmajority - name: startTransaction - arguments: - writeConcern: - w: 1 - - object: *client_with_wmajority - name: clientBulkWrite - arguments: - session: *session_with_wmajority - models: - - insertOne: - namespace: *namespace - document: { _id: 8, x: 88 } - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - $$unsetOrMatches: {} - updateResults: - $$unsetOrMatches: {} - deleteResults: - $$unsetOrMatches: {} - - object: *session_with_wmajority - name: commitTransaction - expectEvents: - - - client: *client_with_wmajority - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - lsid: { $$sessionLsid: *session_with_wmajority } - txnNumber: 1 - startTransaction: true - autocommit: false - writeConcern: { $$exists: false } - bulkWrite: 1 - errorsOnly: true - ordered: true - ops: - - insert: 0 - document: { _id: 8, x: 88 } - nsInfo: - - ns: *namespace - - - commandStartedEvent: - command: - commitTransaction: 1 - lsid: { $$sessionLsid: *session_with_wmajority } - txnNumber: { $numberLong: '1' } - startTransaction: { $$exists: false } - autocommit: false - writeConcern: - w: 1 - commandName: commitTransaction - databaseName: admin - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 5, x: 55 } - - { _id: 6, x: 66 } - - { _id: 7, x: 77 } - - { _id: 8, x: 88 } - - description: "client bulkWrite with writeConcern in a transaction causes a transaction error" - operations: - - object: *session0 - name: startTransaction - - object: *client0 - name: clientBulkWrite - arguments: - session: *session0 - writeConcern: - w: 1 - models: - - insertOne: - namespace: *namespace - document: { _id: 8, x: 88 } - expectError: - isClientError: true - errorContains: "Cannot set write concern after starting a transaction" diff --git a/testdata/transactions/unified/do-not-retry-read-in-transaction.json b/testdata/transactions/unified/do-not-retry-read-in-transaction.json deleted file mode 100644 index 6d9dc704b8..0000000000 --- a/testdata/transactions/unified/do-not-retry-read-in-transaction.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "description": "do not retry read in a transaction", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.0.0", - "topologies": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.2.0", - "topologies": [ - "sharded", - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "uriOptions": { - "retryReads": true - } - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "retryable-read-in-transaction-test" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - } - ], - "tests": [ - { - "description": "find does not retry in a transaction", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {}, - "session": "session0" - }, - "expectError": { - "isError": true, - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll", - "filter": {}, - "startTransaction": true - }, - "commandName": "find", - "databaseName": "retryable-read-in-transaction-test" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/transactions/unified/do-not-retry-read-in-transaction.yml b/testdata/transactions/unified/do-not-retry-read-in-transaction.yml deleted file mode 100644 index e30df0b290..0000000000 --- a/testdata/transactions/unified/do-not-retry-read-in-transaction.yml +++ /dev/null @@ -1,64 +0,0 @@ -description: "do not retry read in a transaction" - -schemaVersion: "1.4" - -runOnRequirements: - - minServerVersion: "4.0.0" - topologies: [ replicaset ] - - minServerVersion: "4.2.0" - topologies: [ sharded, load-balanced ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: [commandStartedEvent] - uriOptions: { retryReads: true } - - database: - id: &database0 database0 - client: *client0 - databaseName: &databaseName retryable-read-in-transaction-test - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collectionName coll - - session: - id: &session0 session0 - client: *client0 - -tests: - - description: "find does not retry in a transaction" - operations: - - - name: startTransaction - object: *session0 - - - name: failPoint # fail the following find command - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [find] - closeConnection: true - - - name: find - object: *collection0 - arguments: - filter: {} - session: *session0 - expectError: - isError: true - errorLabelsContain: ["TransientTransactionError"] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collectionName - filter: {} - startTransaction: true - commandName: find - databaseName: *databaseName diff --git a/testdata/transactions/unified/mongos-pin-auto.json b/testdata/transactions/unified/mongos-pin-auto.json deleted file mode 100644 index 27db520401..0000000000 --- a/testdata/transactions/unified/mongos-pin-auto.json +++ /dev/null @@ -1,5474 +0,0 @@ -{ - "description": "mongos-pin-auto", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.1.8", - "topologies": [ - "sharded" - ], - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "transaction-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "remain pinned after non-transient Interrupted error on insertOne", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "object": "testRunner", - "name": "targetedFailPoint", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11601 - } - } - } - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 4 - } - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError", - "UnknownTransactionCommitResult" - ], - "errorCodeName": "Interrupted" - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "commitTransaction" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 3 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 4 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - }, - "recoveryToken": { - "$$exists": true - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - ] - }, - { - "description": "unpin after transient error within a transaction", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "object": "testRunner", - "name": "targetedFailPoint", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 4 - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "UnknownTransactionCommitResult" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 3 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 4 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "abortTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - }, - "recoveryToken": { - "$$exists": true - } - }, - "commandName": "abortTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on insertOne insert", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 4 - } - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on insertMany insert", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "session": "session0", - "documents": [ - { - "_id": 4 - }, - { - "_id": 5 - } - ] - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on updateOne update", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on replaceOne update", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "replacement": { - "y": 1 - } - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on updateMany update", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$gte": 1 - } - }, - "update": { - "$set": { - "z": 1 - } - } - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on deleteOne delete", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "deleteOne", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on deleteMany delete", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "deleteMany", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$gte": 1 - } - } - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on findOneAndDelete findAndModify", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on findOneAndUpdate findAndModify", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on findOneAndReplace findAndModify", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "replacement": { - "y": 1 - }, - "returnDocument": "Before" - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on bulkWrite insert", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "session": "session0", - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on bulkWrite update", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "session": "session0", - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - } - ] - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on bulkWrite delete", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "session": "session0", - "requests": [ - { - "deleteOne": { - "filter": { - "_id": 1 - } - } - } - ] - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on find find", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on countDocuments aggregate", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "countDocuments", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": {} - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on aggregate aggregate", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "session": "session0", - "pipeline": [] - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on distinct distinct", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "distinct", - "object": "collection0", - "arguments": { - "session": "session0", - "fieldName": "_id", - "filter": {} - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on runCommand insert", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "runCommand", - "object": "database0", - "arguments": { - "session": "session0", - "commandName": "insert", - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ] - } - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "remain pinned after non-transient Interrupted error on clientBulkWrite bulkWrite", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "clientBulkWrite", - "object": "client0", - "arguments": { - "session": "session0", - "models": [ - { - "insertOne": { - "namespace": "database0.collection0", - "document": { - "_id": 8, - "x": 88 - } - } - } - ] - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionPinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "runOnRequirements": [ - { - "minServerVersion": "8.0" - } - ] - }, - { - "description": "unpin after transient connection error on insertOne insert", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 4 - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on insertOne insert", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 4 - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on insertMany insert", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "session": "session0", - "documents": [ - { - "_id": 4 - }, - { - "_id": 5 - } - ] - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on insertMany insert", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "session": "session0", - "documents": [ - { - "_id": 4 - }, - { - "_id": 5 - } - ] - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on updateOne update", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "closeConnection": true - } - } - } - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on updateOne update", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on replaceOne update", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "closeConnection": true - } - } - } - }, - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "replacement": { - "y": 1 - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on replaceOne update", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "replaceOne", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "replacement": { - "y": 1 - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on updateMany update", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "closeConnection": true - } - } - } - }, - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$gte": 1 - } - }, - "update": { - "$set": { - "z": 1 - } - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on updateMany update", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "updateMany", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$gte": 1 - } - }, - "update": { - "$set": { - "z": 1 - } - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on deleteOne delete", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "closeConnection": true - } - } - } - }, - { - "name": "deleteOne", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on deleteOne delete", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "deleteOne", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on deleteMany delete", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "closeConnection": true - } - } - } - }, - { - "name": "deleteMany", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$gte": 1 - } - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on deleteMany delete", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "deleteMany", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": { - "$gte": 1 - } - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on findOneAndDelete findAndModify", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "closeConnection": true - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on findOneAndDelete findAndModify", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "findOneAndDelete", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on findOneAndUpdate findAndModify", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "closeConnection": true - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on findOneAndUpdate findAndModify", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on findOneAndReplace findAndModify", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "closeConnection": true - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "replacement": { - "y": 1 - }, - "returnDocument": "Before" - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on findOneAndReplace findAndModify", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "findAndModify" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "replacement": { - "y": 1 - }, - "returnDocument": "Before" - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on bulkWrite insert", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "session": "session0", - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on bulkWrite insert", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "session": "session0", - "requests": [ - { - "insertOne": { - "document": { - "_id": 1 - } - } - } - ] - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on bulkWrite update", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "closeConnection": true - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "session": "session0", - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - } - ] - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on bulkWrite update", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "update" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "session": "session0", - "requests": [ - { - "updateOne": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "x": 1 - } - } - } - } - ] - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on bulkWrite delete", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "closeConnection": true - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "session": "session0", - "requests": [ - { - "deleteOne": { - "filter": { - "_id": 1 - } - } - } - ] - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on bulkWrite delete", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "delete" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "session": "session0", - "requests": [ - { - "deleteOne": { - "filter": { - "_id": 1 - } - } - } - ] - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on find find", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on find find", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on countDocuments aggregate", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - } - } - }, - { - "name": "countDocuments", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": {} - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on countDocuments aggregate", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "countDocuments", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": {} - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on aggregate aggregate", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "closeConnection": true - } - } - } - }, - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "session": "session0", - "pipeline": [] - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on aggregate aggregate", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "session": "session0", - "pipeline": [] - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on distinct distinct", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "closeConnection": true - } - } - } - }, - { - "name": "distinct", - "object": "collection0", - "arguments": { - "session": "session0", - "fieldName": "_id", - "filter": {} - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on distinct distinct", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "distinct" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "distinct", - "object": "collection0", - "arguments": { - "session": "session0", - "fieldName": "_id", - "filter": {} - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on runCommand insert", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "name": "runCommand", - "object": "database0", - "arguments": { - "session": "session0", - "commandName": "insert", - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ] - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on runCommand insert", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "runCommand", - "object": "database0", - "arguments": { - "session": "session0", - "commandName": "insert", - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ] - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "unpin after transient connection error on clientBulkWrite bulkWrite", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "closeConnection": true - } - } - } - }, - { - "name": "clientBulkWrite", - "object": "client0", - "arguments": { - "session": "session0", - "models": [ - { - "insertOne": { - "namespace": "database0.collection0", - "document": { - "_id": 8, - "x": 88 - } - } - } - ] - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "runOnRequirements": [ - { - "minServerVersion": "8.0" - } - ] - }, - { - "description": "unpin after transient ShutdownInProgress error on clientBulkWrite bulkWrite", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "bulkWrite" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "clientBulkWrite", - "object": "client0", - "arguments": { - "session": "session0", - "models": [ - { - "insertOne": { - "namespace": "database0.collection0", - "document": { - "_id": 8, - "x": 88 - } - } - } - ] - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ] - } - }, - { - "object": "testRunner", - "name": "assertSessionUnpinned", - "arguments": { - "session": "session0" - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "runOnRequirements": [ - { - "minServerVersion": "8.0" - } - ] - } - ] -} diff --git a/testdata/transactions/unified/mongos-pin-auto.yml b/testdata/transactions/unified/mongos-pin-auto.yml deleted file mode 100644 index db620c371b..0000000000 --- a/testdata/transactions/unified/mongos-pin-auto.yml +++ /dev/null @@ -1,1705 +0,0 @@ -# Autogenerated tests that transient errors in a transaction unpin the session. -# See mongos-pin-auto-tests.py - -description: mongos-pin-auto - -schemaVersion: '1.4' - -runOnRequirements: - - minServerVersion: "4.1.8" - # Note: tests utilize targetedFailPoint, which is incompatible with - # load-balanced and useMultipleMongoses:true - topologies: [ sharded ] - # serverless proxy doesn't append error labels to errors in transactions - # caused by failpoints (CLOUDP-88216) - serverless: "forbid" - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database_name transaction-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection_name test - - session: - id: &session0 session0 - client: *client0 - -initialData: - - collectionName: *collection_name - databaseName: *database_name - documents: &data - - { _id: 1 } - - { _id: 2 } - -tests: - - description: remain pinned after non-transient Interrupted error on insertOne - operations: - - &startTransaction - object: session0 - name: startTransaction - - &initialCommand - object: *collection0 - name: insertOne - arguments: - session: *session0 - document: { _id: 3 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 3 } } } - - object: testRunner - name: targetedFailPoint - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ "insert" ] - errorCode: 11601 - - object: *collection0 - name: insertOne - arguments: - session: *session0 - document: { _id: 4 } - expectError: - errorLabelsOmit: ["TransientTransactionError", "UnknownTransactionCommitResult"] - errorCodeName: Interrupted - - &assertSessionPinned - object: testRunner - name: assertSessionPinned - arguments: - session: *session0 - - &commitTransaction - object: *session0 - name: commitTransaction - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection_name - documents: - - { _id: 3 } - ordered: true - readConcern: { $$exists: false } - lsid: { $$sessionLsid: *session0 } - txnNumber: { $numberLong: '1' } - startTransaction: true - autocommit: false - writeConcern: { $$exists: false } - commandName: insert - databaseName: *database_name - - commandStartedEvent: - command: - insert: *collection_name - documents: - - { _id: 4 } - ordered: true - readConcern: { $$exists: false } - lsid: { $$sessionLsid: *session0 } - txnNumber: { $numberLong: '1' } - startTransaction: { $$exists: false } - autocommit: false - writeConcern: { $$exists: false } - commandName: insert - databaseName: *database_name - - commandStartedEvent: - command: - commitTransaction: 1 - lsid: { $$sessionLsid: *session0 } - txnNumber: { $numberLong: '1' } - startTransaction: { $$exists: false } - autocommit: false - writeConcern: { $$exists: false } - recoveryToken: { $$exists: true } - commandName: commitTransaction - databaseName: admin - outcome: - - collectionName: *collection_name - databaseName: *database_name - documents: - - { _id: 1 } - - { _id: 2 } - - { _id: 3 } - - - description: 'unpin after transient error within a transaction' - operations: - - *startTransaction - - *initialCommand - - object: testRunner - name: targetedFailPoint - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ "insert" ] - closeConnection: true - - object: *collection0 - name: insertOne - arguments: - session: *session0 - document: { _id: 4 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - errorLabelsOmit: ["UnknownTransactionCommitResult"] - - &assertSessionUnpinned - object: testRunner - name: assertSessionUnpinned - arguments: - session: *session0 - - &abortTransaction - object: *session0 - name: abortTransaction - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection_name - documents: - - { _id: 3 } - ordered: true - readConcern: { $$exists: false } - lsid: { $$sessionLsid: *session0 } - txnNumber: { $numberLong: '1' } - startTransaction: true - autocommit: false - writeConcern: { $$exists: false } - commandName: insert - databaseName: *database_name - - commandStartedEvent: - command: - insert: *collection_name - documents: - - { _id: 4 } - ordered: true - readConcern: { $$exists: false } - lsid: { $$sessionLsid: *session0 } - txnNumber: { $numberLong: '1' } - startTransaction: { $$exists: false } - autocommit: false - writeConcern: { $$exists: false } - commandName: insert - databaseName: *database_name - - commandStartedEvent: - command: - abortTransaction: 1 - lsid: { $$sessionLsid: *session0 } - txnNumber: { $numberLong: '1' } - startTransaction: { $$exists: false } - autocommit: false - writeConcern: { $$exists: false } - recoveryToken: { $$exists: true } - commandName: abortTransaction - databaseName: admin - outcome: &outcome - - collectionName: *collection_name - databaseName: *database_name - documents: *data - - # The rest of the tests in this file test every operation type against - # multiple types of transient errors (connection and error code). - - - description: remain pinned after non-transient Interrupted error on insertOne insert - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["insert"] - errorCode: 11601 - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 4 } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on insertMany insert - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["insert"] - errorCode: 11601 - - name: insertMany - object: *collection0 - arguments: - session: *session0 - documents: [ { _id: 4 }, { _id: 5 } ] - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on updateOne update - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["update"] - errorCode: 11601 - - name: updateOne - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - update: { $inc: { x: 1 } } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on replaceOne update - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["update"] - errorCode: 11601 - - name: replaceOne - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - replacement: { y: 1 } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on updateMany update - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["update"] - errorCode: 11601 - - name: updateMany - object: *collection0 - arguments: - session: *session0 - filter: { _id: { $gte: 1 } } - update: {$set: { z: 1 } } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on deleteOne delete - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["delete"] - errorCode: 11601 - - name: deleteOne - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on deleteMany delete - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["delete"] - errorCode: 11601 - - name: deleteMany - object: *collection0 - arguments: - session: *session0 - filter: { _id: { $gte: 1 } } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on findOneAndDelete findAndModify - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["findAndModify"] - errorCode: 11601 - - name: findOneAndDelete - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on findOneAndUpdate findAndModify - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["findAndModify"] - errorCode: 11601 - - name: findOneAndUpdate - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: Before - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on findOneAndReplace findAndModify - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["findAndModify"] - errorCode: 11601 - - name: findOneAndReplace - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - replacement: { y: 1 } - returnDocument: Before - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on bulkWrite insert - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["insert"] - errorCode: 11601 - - name: bulkWrite - object: *collection0 - arguments: - session: *session0 - requests: - - insertOne: - document: { _id: 1 } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on bulkWrite update - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["update"] - errorCode: 11601 - - name: bulkWrite - object: *collection0 - arguments: - session: *session0 - requests: - - updateOne: - filter: { _id: 1 } - update: { $set: { x: 1 } } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on bulkWrite delete - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["delete"] - errorCode: 11601 - - name: bulkWrite - object: *collection0 - arguments: - session: *session0 - requests: - - deleteOne: - filter: { _id: 1 } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on find find - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["find"] - errorCode: 11601 - - name: find - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on countDocuments aggregate - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["aggregate"] - errorCode: 11601 - - name: countDocuments - object: *collection0 - arguments: - session: *session0 - filter: {} - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on aggregate aggregate - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["aggregate"] - errorCode: 11601 - - name: aggregate - object: *collection0 - arguments: - session: *session0 - pipeline: [] - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on distinct distinct - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["distinct"] - errorCode: 11601 - - name: distinct - object: *collection0 - arguments: - session: *session0 - fieldName: _id - filter: {} - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on runCommand insert - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["insert"] - errorCode: 11601 - - name: runCommand - object: *database0 - arguments: - session: *session0 - commandName: insert - command: - insert: *collection_name - documents: - - { _id : 1 } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - - - description: remain pinned after non-transient Interrupted error on clientBulkWrite bulkWrite - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["bulkWrite"] - errorCode: 11601 - - name: clientBulkWrite - object: *client0 - arguments: - session: *session0 - models: - - insertOne: - namespace: database0.collection0 - document: { _id: 8, x: 88 } - expectError: - errorLabelsOmit: ["TransientTransactionError"] - - *assertSessionPinned - - *abortTransaction - outcome: *outcome - runOnRequirements: - - minServerVersion: "8.0" # `bulkWrite` added to server 8.0" - - - description: unpin after transient connection error on insertOne insert - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["insert"] - closeConnection: true - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 4 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on insertOne insert - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["insert"] - errorCode: 91 - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 4 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on insertMany insert - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["insert"] - closeConnection: true - - name: insertMany - object: *collection0 - arguments: - session: *session0 - documents: [ { _id: 4 }, { _id: 5 } ] - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on insertMany insert - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["insert"] - errorCode: 91 - - name: insertMany - object: *collection0 - arguments: - session: *session0 - documents: [ { _id: 4 }, { _id: 5 } ] - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on updateOne update - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["update"] - closeConnection: true - - name: updateOne - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - update: { $inc: { x: 1 } } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on updateOne update - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["update"] - errorCode: 91 - - name: updateOne - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - update: { $inc: { x: 1 } } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on replaceOne update - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["update"] - closeConnection: true - - name: replaceOne - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - replacement: { y: 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on replaceOne update - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["update"] - errorCode: 91 - - name: replaceOne - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - replacement: { y: 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on updateMany update - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["update"] - closeConnection: true - - name: updateMany - object: *collection0 - arguments: - session: *session0 - filter: { _id: { $gte: 1 } } - update: {$set: { z: 1 } } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on updateMany update - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["update"] - errorCode: 91 - - name: updateMany - object: *collection0 - arguments: - session: *session0 - filter: { _id: { $gte: 1 } } - update: {$set: { z: 1 } } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on deleteOne delete - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["delete"] - closeConnection: true - - name: deleteOne - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on deleteOne delete - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["delete"] - errorCode: 91 - - name: deleteOne - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on deleteMany delete - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["delete"] - closeConnection: true - - name: deleteMany - object: *collection0 - arguments: - session: *session0 - filter: { _id: { $gte: 1 } } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on deleteMany delete - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["delete"] - errorCode: 91 - - name: deleteMany - object: *collection0 - arguments: - session: *session0 - filter: { _id: { $gte: 1 } } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on findOneAndDelete findAndModify - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["findAndModify"] - closeConnection: true - - name: findOneAndDelete - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on findOneAndDelete findAndModify - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["findAndModify"] - errorCode: 91 - - name: findOneAndDelete - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on findOneAndUpdate findAndModify - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["findAndModify"] - closeConnection: true - - name: findOneAndUpdate - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: Before - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on findOneAndUpdate findAndModify - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["findAndModify"] - errorCode: 91 - - name: findOneAndUpdate - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - update: { $inc: { x: 1 } } - returnDocument: Before - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on findOneAndReplace findAndModify - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["findAndModify"] - closeConnection: true - - name: findOneAndReplace - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - replacement: { y: 1 } - returnDocument: Before - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on findOneAndReplace findAndModify - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["findAndModify"] - errorCode: 91 - - name: findOneAndReplace - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - replacement: { y: 1 } - returnDocument: Before - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on bulkWrite insert - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["insert"] - closeConnection: true - - name: bulkWrite - object: *collection0 - arguments: - session: *session0 - requests: - - insertOne: - document: { _id: 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on bulkWrite insert - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["insert"] - errorCode: 91 - - name: bulkWrite - object: *collection0 - arguments: - session: *session0 - requests: - - insertOne: - document: { _id: 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on bulkWrite update - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["update"] - closeConnection: true - - name: bulkWrite - object: *collection0 - arguments: - session: *session0 - requests: - - updateOne: - filter: { _id: 1 } - update: { $set: { x: 1 } } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on bulkWrite update - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["update"] - errorCode: 91 - - name: bulkWrite - object: *collection0 - arguments: - session: *session0 - requests: - - updateOne: - filter: { _id: 1 } - update: { $set: { x: 1 } } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on bulkWrite delete - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["delete"] - closeConnection: true - - name: bulkWrite - object: *collection0 - arguments: - session: *session0 - requests: - - deleteOne: - filter: { _id: 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on bulkWrite delete - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["delete"] - errorCode: 91 - - name: bulkWrite - object: *collection0 - arguments: - session: *session0 - requests: - - deleteOne: - filter: { _id: 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on find find - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["find"] - closeConnection: true - - name: find - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on find find - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["find"] - errorCode: 91 - - name: find - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on countDocuments aggregate - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["aggregate"] - closeConnection: true - - name: countDocuments - object: *collection0 - arguments: - session: *session0 - filter: {} - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on countDocuments aggregate - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["aggregate"] - errorCode: 91 - - name: countDocuments - object: *collection0 - arguments: - session: *session0 - filter: {} - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on aggregate aggregate - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["aggregate"] - closeConnection: true - - name: aggregate - object: *collection0 - arguments: - session: *session0 - pipeline: [] - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on aggregate aggregate - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["aggregate"] - errorCode: 91 - - name: aggregate - object: *collection0 - arguments: - session: *session0 - pipeline: [] - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on distinct distinct - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["distinct"] - closeConnection: true - - name: distinct - object: *collection0 - arguments: - session: *session0 - fieldName: _id - filter: {} - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on distinct distinct - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["distinct"] - errorCode: 91 - - name: distinct - object: *collection0 - arguments: - session: *session0 - fieldName: _id - filter: {} - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on runCommand insert - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["insert"] - closeConnection: true - - name: runCommand - object: *database0 - arguments: - session: *session0 - commandName: insert - command: - insert: *collection_name - documents: - - { _id : 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient ShutdownInProgress error on runCommand insert - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["insert"] - errorCode: 91 - - name: runCommand - object: *database0 - arguments: - session: *session0 - commandName: insert - command: - insert: *collection_name - documents: - - { _id : 1 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - - - description: unpin after transient connection error on clientBulkWrite bulkWrite - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["bulkWrite"] - closeConnection: true - - name: clientBulkWrite - object: *client0 - arguments: - session: *session0 - models: - - insertOne: - namespace: database0.collection0 - document: { _id: 8, x: 88 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - runOnRequirements: - - minServerVersion: "8.0" # `bulkWrite` added to server 8.0" - - - description: unpin after transient ShutdownInProgress error on clientBulkWrite bulkWrite - operations: - - *startTransaction - - *initialCommand - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: {times: 1} - data: - failCommands: ["bulkWrite"] - errorCode: 91 - - name: clientBulkWrite - object: *client0 - arguments: - session: *session0 - models: - - insertOne: - namespace: database0.collection0 - document: { _id: 8, x: 88 } - expectError: - errorLabelsContain: ["TransientTransactionError"] - - *assertSessionUnpinned - - *abortTransaction - outcome: *outcome - runOnRequirements: - - minServerVersion: "8.0" # `bulkWrite` added to server 8.0" diff --git a/testdata/transactions/unified/mongos-unpin.json b/testdata/transactions/unified/mongos-unpin.json deleted file mode 100644 index 4d1ebc87bc..0000000000 --- a/testdata/transactions/unified/mongos-unpin.json +++ /dev/null @@ -1,450 +0,0 @@ -{ - "description": "mongos-unpin", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.2", - "topologies": [ - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "mongos-unpin-db" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "mongos-unpin-db", - "documents": [] - } - ], - "_yamlAnchors": { - "anchors": 24 - }, - "tests": [ - { - "description": "unpin after TransientTransactionError error on commit", - "runOnRequirements": [ - { - "serverless": "forbid", - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorCode": 24 - } - } - } - }, - { - "name": "commitTransaction", - "object": "session0", - "expectError": { - "errorCode": 24, - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "assertSessionUnpinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ] - }, - { - "description": "unpin on successful abort", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "assertSessionUnpinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - } - ] - }, - { - "description": "unpin after non-transient error on abort", - "runOnRequirements": [ - { - "serverless": "forbid", - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 24 - } - } - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "assertSessionUnpinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ] - }, - { - "description": "unpin after TransientTransactionError error on abort", - "runOnRequirements": [ - { - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorCode": 91 - } - } - } - }, - { - "name": "abortTransaction", - "object": "session0" - }, - { - "name": "assertSessionUnpinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ] - }, - { - "description": "unpin when a new transaction is started", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertSessionPinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "assertSessionUnpinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - } - ] - }, - { - "description": "unpin when a non-transaction write operation uses a session", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertSessionPinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "assertSessionUnpinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - } - ] - }, - { - "description": "unpin when a non-transaction read operation uses a session", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertSessionPinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "x": 1 - }, - "session": "session0" - } - }, - { - "name": "assertSessionUnpinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - } - ] - } - ] -} diff --git a/testdata/transactions/unified/mongos-unpin.yml b/testdata/transactions/unified/mongos-unpin.yml deleted file mode 100644 index 44844a1858..0000000000 --- a/testdata/transactions/unified/mongos-unpin.yml +++ /dev/null @@ -1,185 +0,0 @@ -description: mongos-unpin - -schemaVersion: '1.4' - -runOnRequirements: - - minServerVersion: '4.2' - topologies: [ sharded ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name mongos-unpin-db - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - - session: - id: &session0 session0 - client: *client0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -_yamlAnchors: - anchors: - # LockTimeout will cause the server to add a TransientTransactionError label. It is not retryable. - &lockTimeoutErrorCode 24 - -tests: - - description: unpin after TransientTransactionError error on commit - runOnRequirements: - - - # serverless proxy doesn't append error labels to errors in transactions - # caused by failpoints (CLOUDP-88216) - serverless: "forbid" - # Note: test utilizes targetedFailPoint, which is incompatible with - # load-balanced and useMultipleMongoses:true - topologies: [ sharded ] - operations: - - &startTransaction - name: startTransaction - object: *session0 - - &insertOne - name: insertOne - object: *collection0 - arguments: - document: { x: 1 } - session: *session0 - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ commitTransaction ] - errorCode: *lockTimeoutErrorCode - - name: commitTransaction - object: *session0 - expectError: - # LockTimeout is not retryable, so the commit fails. - errorCode: *lockTimeoutErrorCode - errorLabelsContain: [ TransientTransactionError ] - errorLabelsOmit: [ UnknownTransactionCommitResult ] - - &assertNoPinnedServer - name: assertSessionUnpinned - object: testRunner - arguments: - session: *session0 - # Cleanup the potentionally open server transaction by starting and - # aborting a new transaction on the same session. - - *startTransaction - - *insertOne - - &abortTransaction - name: abortTransaction - object: *session0 - - - description: unpin on successful abort - operations: - - *startTransaction - - *insertOne - - *abortTransaction - - *assertNoPinnedServer - - - description: unpin after non-transient error on abort - runOnRequirements: - - - # serverless proxy doesn't append error labels to errors in transactions - # caused by failpoints (CLOUDP-88216) - serverless: "forbid" - # Note: test utilizes targetedFailPoint, which is incompatible with - # load-balanced and useMultipleMongoses:true - topologies: [ sharded ] - operations: - - *startTransaction - - *insertOne - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ abortTransaction ] - errorCode: *lockTimeoutErrorCode - - *abortTransaction - - *assertNoPinnedServer - # Cleanup the potentionally open server transaction by starting and - # aborting a new transaction on the same session. - - *startTransaction - - *insertOne - - *abortTransaction - - - description: unpin after TransientTransactionError error on abort - runOnRequirements: - - - # Note: test utilizes targetedFailPoint, which is incompatible with - # load-balanced and useMultipleMongoses:true - topologies: [ sharded ] - operations: - - *startTransaction - - *insertOne - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ abortTransaction ] - errorCode: 91 # ShutdownInProgress - - *abortTransaction - - *assertNoPinnedServer - # Cleanup the potentionally open server transaction by starting and - # aborting a new transaction on the same session. - - *startTransaction - - *insertOne - - *abortTransaction - - - description: unpin when a new transaction is started - operations: - - *startTransaction - - *insertOne - - name: commitTransaction - object: *session0 - - &assertPinnedServer - name: assertSessionPinned - object: testRunner - arguments: - session: *session0 - - *startTransaction - - *assertNoPinnedServer - - - description: unpin when a non-transaction write operation uses a session - operations: - - *startTransaction - - *insertOne - - name: commitTransaction - object: *session0 - - *assertPinnedServer - - *insertOne - - *assertNoPinnedServer - - - description: unpin when a non-transaction read operation uses a session - operations: - - *startTransaction - - *insertOne - - name: commitTransaction - object: *session0 - - *assertPinnedServer - - name: find - object: *collection0 - arguments: - filter: { x: 1 } - session: *session0 - - *assertNoPinnedServer diff --git a/testdata/unified-test-format/valid-fail/assertNumberConnectionsCheckedOut.json b/testdata/unified-test-format/valid-fail/assertNumberConnectionsCheckedOut.json deleted file mode 100644 index 9799bb2f65..0000000000 --- a/testdata/unified-test-format/valid-fail/assertNumberConnectionsCheckedOut.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "description": "assertNumberConnectionsCheckedOut", - "schemaVersion": "1.3", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true - } - } - ], - "tests": [ - { - "description": "operation fails if client field is not specified", - "operations": [ - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "connections": 1 - } - } - ] - }, - { - "description": "operation fails if connections field is not specified", - "operations": [ - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ] - }, - { - "description": "operation fails if client entity does not exist", - "operations": [ - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client1" - } - } - ] - }, - { - "description": "operation fails if number of connections is incorrect", - "operations": [ - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 1 - } - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/assertNumberConnectionsCheckedOut.yml b/testdata/unified-test-format/valid-fail/assertNumberConnectionsCheckedOut.yml deleted file mode 100644 index 8a8aa63667..0000000000 --- a/testdata/unified-test-format/valid-fail/assertNumberConnectionsCheckedOut.yml +++ /dev/null @@ -1,38 +0,0 @@ -description: assertNumberConnectionsCheckedOut - -schemaVersion: '1.3' - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - -tests: - - description: operation fails if client field is not specified - operations: - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - connections: 1 - - - description: operation fails if connections field is not specified - operations: - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client0 - - - description: operation fails if client entity does not exist - operations: - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: client1 - - - description: operation fails if number of connections is incorrect - operations: - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client0 - connections: 1 diff --git a/testdata/unified-test-format/valid-fail/clientEncryptionOpts-missing-kms-credentials.json b/testdata/unified-test-format/valid-fail/clientEncryptionOpts-missing-kms-credentials.json deleted file mode 100644 index 351960cc66..0000000000 --- a/testdata/unified-test-format/valid-fail/clientEncryptionOpts-missing-kms-credentials.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "description": "clientEncryptionOpts-missing-kms-credentials", - "schemaVersion": "1.8", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "encryptedClient": { - "id": "encryptedClient0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "aws": { - "accessKeyId": "accessKeyId" - }, - "azure": { - "tenantId": "tenantId" - }, - "gcp": { - "email": "email" - } - } - } - } - } - ], - "tests": [ - { - "description": "", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/clientEncryptionOpts-missing-kms-credentials.yml b/testdata/unified-test-format/valid-fail/clientEncryptionOpts-missing-kms-credentials.yml deleted file mode 100644 index 777a79460f..0000000000 --- a/testdata/unified-test-format/valid-fail/clientEncryptionOpts-missing-kms-credentials.yml +++ /dev/null @@ -1,20 +0,0 @@ -description: clientEncryptionOpts-missing-kms-credentials - -schemaVersion: "1.8" - -createEntities: - - client: - id: &client0 client0 - - encryptedClient: - id: &encryptedClient0 encryptedClient0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - aws: { accessKeyId: "accessKeyId" } - azure: { tenantId: "tenantId" } - gcp: { email: "email" } - -tests: - - description: "" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/clientEncryptionOpts-no-kms.json b/testdata/unified-test-format/valid-fail/clientEncryptionOpts-no-kms.json deleted file mode 100644 index 8b4a25fe80..0000000000 --- a/testdata/unified-test-format/valid-fail/clientEncryptionOpts-no-kms.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "description": "clientEncryptionOpts-no-kms", - "schemaVersion": "1.8", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "encryptedClient": { - "id": "encryptedClient0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": {} - } - } - } - ], - "tests": [ - { - "description": "", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/clientEncryptionOpts-no-kms.yml b/testdata/unified-test-format/valid-fail/clientEncryptionOpts-no-kms.yml deleted file mode 100644 index dbabfcb78b..0000000000 --- a/testdata/unified-test-format/valid-fail/clientEncryptionOpts-no-kms.yml +++ /dev/null @@ -1,17 +0,0 @@ -description: clientEncryptionOpts-no-kms - -schemaVersion: "1.8" - -createEntities: - - client: - id: &client0 client0 - - encryptedClient: - id: &encryptedClient0 encryptedClient0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: {} - -tests: - - description: "" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/entity-bucket-database-undefined.json b/testdata/unified-test-format/valid-fail/entity-bucket-database-undefined.json deleted file mode 100644 index 7f7f1978c3..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-bucket-database-undefined.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "description": "entity-bucket-database-undefined", - "schemaVersion": "1.0", - "createEntities": [ - { - "bucket": { - "id": "bucket0", - "database": "foo" - } - } - ], - "tests": [ - { - "description": "foo", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/entity-bucket-database-undefined.yml b/testdata/unified-test-format/valid-fail/entity-bucket-database-undefined.yml deleted file mode 100644 index 7aeda8e1ac..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-bucket-database-undefined.yml +++ /dev/null @@ -1,12 +0,0 @@ -description: "entity-bucket-database-undefined" - -schemaVersion: "1.0" - -createEntities: - - bucket: - id: &bucket0 "bucket0" - database: "foo" - -tests: - - description: "foo" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/entity-client-apiVersion-unsupported.json b/testdata/unified-test-format/valid-fail/entity-client-apiVersion-unsupported.json deleted file mode 100644 index d92d23dcaf..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-client-apiVersion-unsupported.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description": "entity-client-apiVersion-unsupported", - "schemaVersion": "1.1", - "createEntities": [ - { - "client": { - "id": "client0", - "serverApi": { - "version": "server_will_never_support_this_api_version" - } - } - } - ], - "tests": [ - { - "description": "foo", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/entity-client-apiVersion-unsupported.yml b/testdata/unified-test-format/valid-fail/entity-client-apiVersion-unsupported.yml deleted file mode 100644 index 7c626a308b..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-client-apiVersion-unsupported.yml +++ /dev/null @@ -1,13 +0,0 @@ -description: "entity-client-apiVersion-unsupported" - -schemaVersion: "1.1" - -createEntities: - - client: - id: &client0 client0 - serverApi: - version: "server_will_never_support_this_api_version" - -tests: - - description: "foo" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_with_client_id.json b/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_with_client_id.json deleted file mode 100644 index 8c0c4d2041..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_with_client_id.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "description": "entity-client-storeEventsAsEntities-conflict_with_client_id", - "schemaVersion": "1.2", - "createEntities": [ - { - "client": { - "id": "client0", - "storeEventsAsEntities": [ - { - "id": "client0", - "events": [ - "PoolCreatedEvent", - "PoolReadyEvent", - "PoolClearedEvent", - "PoolClosedEvent" - ] - } - ] - } - } - ], - "tests": [ - { - "description": "foo", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_with_client_id.yml b/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_with_client_id.yml deleted file mode 100644 index b7055c9db3..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_with_client_id.yml +++ /dev/null @@ -1,16 +0,0 @@ -description: "entity-client-storeEventsAsEntities-conflict_with_client_id" - -schemaVersion: "1.2" - -createEntities: - - client: - id: &client0 client0 - storeEventsAsEntities: - # Using the client ID here will ensure that test runners also detect - # conflicts with the same entity being defined - - id: *client0 - events: ["PoolCreatedEvent", "PoolReadyEvent", "PoolClearedEvent", "PoolClosedEvent"] - -tests: - - description: "foo" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_different_array.json b/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_different_array.json deleted file mode 100644 index 77bc4abf2e..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_different_array.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "description": "entity-client-storeEventsAsEntities-conflict_within_different_array", - "schemaVersion": "1.2", - "createEntities": [ - { - "client": { - "id": "client0", - "storeEventsAsEntities": [ - { - "id": "events", - "events": [ - "PoolCreatedEvent", - "PoolReadyEvent", - "PoolClearedEvent", - "PoolClosedEvent" - ] - } - ] - } - }, - { - "client": { - "id": "client1", - "storeEventsAsEntities": [ - { - "id": "events", - "events": [ - "CommandStartedEvent", - "CommandSucceededEvent", - "CommandFailedEvent" - ] - } - ] - } - } - ], - "tests": [ - { - "description": "foo", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_different_array.yml b/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_different_array.yml deleted file mode 100644 index 8836445c9d..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_different_array.yml +++ /dev/null @@ -1,19 +0,0 @@ -description: "entity-client-storeEventsAsEntities-conflict_within_different_array" - -schemaVersion: "1.2" - -createEntities: - - client: - id: &client0 client0 - storeEventsAsEntities: - - id: &events events - events: ["PoolCreatedEvent", "PoolReadyEvent", "PoolClearedEvent", "PoolClosedEvent"] - - client: - id: &client1 client1 - storeEventsAsEntities: - - id: *events - events: ["CommandStartedEvent", "CommandSucceededEvent", "CommandFailedEvent"] - -tests: - - description: "foo" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_same_array.json b/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_same_array.json deleted file mode 100644 index e1a9499883..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_same_array.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "description": "entity-client-storeEventsAsEntities-conflict_within_same_array", - "schemaVersion": "1.2", - "createEntities": [ - { - "client": { - "id": "client0", - "storeEventsAsEntities": [ - { - "id": "events", - "events": [ - "PoolCreatedEvent", - "PoolReadyEvent", - "PoolClearedEvent", - "PoolClosedEvent" - ] - }, - { - "id": "events", - "events": [ - "CommandStartedEvent", - "CommandSucceededEvent", - "CommandFailedEvent" - ] - } - ] - } - } - ], - "tests": [ - { - "description": "foo", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_same_array.yml b/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_same_array.yml deleted file mode 100644 index 25ee7400d3..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_same_array.yml +++ /dev/null @@ -1,16 +0,0 @@ -description: "entity-client-storeEventsAsEntities-conflict_within_same_array" - -schemaVersion: "1.2" - -createEntities: - - client: - id: &client0 client0 - storeEventsAsEntities: - - id: &events events - events: ["PoolCreatedEvent", "PoolReadyEvent", "PoolClearedEvent", "PoolClosedEvent"] - - id: *events - events: ["CommandStartedEvent", "CommandSucceededEvent", "CommandFailedEvent"] - -tests: - - description: "foo" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/entity-collection-database-undefined.json b/testdata/unified-test-format/valid-fail/entity-collection-database-undefined.json deleted file mode 100644 index 20b0733e34..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-collection-database-undefined.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "description": "entity-collection-database-undefined", - "schemaVersion": "1.0", - "createEntities": [ - { - "collection": { - "id": "collection0", - "database": "foo", - "collectionName": "foo" - } - } - ], - "tests": [ - { - "description": "foo", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/entity-collection-database-undefined.yml b/testdata/unified-test-format/valid-fail/entity-collection-database-undefined.yml deleted file mode 100644 index a66b6ed292..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-collection-database-undefined.yml +++ /dev/null @@ -1,13 +0,0 @@ -description: "entity-collection-database-undefined" - -schemaVersion: "1.0" - -createEntities: - - collection: - id: &collection0 "collection0" - database: "foo" - collectionName: "foo" - -tests: - - description: "foo" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/entity-database-client-undefined.json b/testdata/unified-test-format/valid-fail/entity-database-client-undefined.json deleted file mode 100644 index 0f8110e6d3..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-database-client-undefined.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "description": "entity-database-client-undefined", - "schemaVersion": "1.0", - "createEntities": [ - { - "database": { - "id": "database0", - "client": "foo", - "databaseName": "foo" - } - } - ], - "tests": [ - { - "description": "foo", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/entity-database-client-undefined.yml b/testdata/unified-test-format/valid-fail/entity-database-client-undefined.yml deleted file mode 100644 index 34b58cece5..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-database-client-undefined.yml +++ /dev/null @@ -1,13 +0,0 @@ -description: "entity-database-client-undefined" - -schemaVersion: "1.0" - -createEntities: - - database: - id: &database0 "database0" - client: "foo" - databaseName: "foo" - -tests: - - description: "foo" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/entity-find-cursor.json b/testdata/unified-test-format/valid-fail/entity-find-cursor.json deleted file mode 100644 index f4c5bcdf48..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-find-cursor.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "description": "entity-find-cursor", - "schemaVersion": "1.3", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0Name" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "databaseName": "database0Name", - "collectionName": "coll0", - "documents": [] - } - ], - "tests": [ - { - "description": "createFindCursor fails if filter is not specified", - "operations": [ - { - "name": "createFindCursor", - "object": "collection0", - "saveResultAsEntity": "cursor0" - } - ] - }, - { - "description": "iterateUntilDocumentOrError fails if it references a nonexistent entity", - "operations": [ - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0" - } - ] - }, - { - "description": "close fails if it references a nonexistent entity", - "operations": [ - { - "name": "close", - "object": "cursor0" - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/entity-find-cursor.yml b/testdata/unified-test-format/valid-fail/entity-find-cursor.yml deleted file mode 100644 index ac35615fee..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-find-cursor.yml +++ /dev/null @@ -1,37 +0,0 @@ -description: entity-find-cursor - -schemaVersion: '1.3' - -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0Name - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: [] - -tests: - - description: createFindCursor fails if filter is not specified - operations: - - name: createFindCursor - object: *collection0 - saveResultAsEntity: &cursor0 cursor0 - - - description: iterateUntilDocumentOrError fails if it references a nonexistent entity - operations: - - name: iterateUntilDocumentOrError - object: cursor0 - - - description: close fails if it references a nonexistent entity - operations: - - name: close - object: cursor0 diff --git a/testdata/unified-test-format/valid-fail/entity-session-client-undefined.json b/testdata/unified-test-format/valid-fail/entity-session-client-undefined.json deleted file mode 100644 index 260356436a..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-session-client-undefined.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "description": "entity-session-client-undefined", - "schemaVersion": "1.0", - "createEntities": [ - { - "session": { - "id": "session0", - "client": "foo" - } - } - ], - "tests": [ - { - "description": "foo", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/entity-session-client-undefined.yml b/testdata/unified-test-format/valid-fail/entity-session-client-undefined.yml deleted file mode 100644 index 16eaea46b7..0000000000 --- a/testdata/unified-test-format/valid-fail/entity-session-client-undefined.yml +++ /dev/null @@ -1,12 +0,0 @@ -description: "entity-session-client-undefined" - -schemaVersion: "1.0" - -createEntities: - - session: - id: &session0 "session0" - client: "foo" - -tests: - - description: "foo" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreExtraMessages-type.json b/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreExtraMessages-type.json deleted file mode 100644 index a9f2da9bce..0000000000 --- a/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreExtraMessages-type.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "description": "expectedLogMessagesForClient-ignoreExtraMessages-type", - "schemaVersion": "1.16", - "createEntities": [ - { - "client": { - "id": "client0" - } - } - ], - "tests": [ - { - "description": "foo", - "operations": [], - "expectLogMessages": [ - { - "client": "client0", - "ignoreExtraMessages": "true", - "messages": [] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreExtraMessages-type.yml b/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreExtraMessages-type.yml deleted file mode 100644 index 3e11d35d82..0000000000 --- a/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreExtraMessages-type.yml +++ /dev/null @@ -1,15 +0,0 @@ -description: "expectedLogMessagesForClient-ignoreExtraMessages-type" - -schemaVersion: "1.16" - -createEntities: - - client: - id: &client0 "client0" - -tests: - - description: "foo" - operations: [] - expectLogMessages: - - client: *client0 - ignoreExtraMessages: "true" - messages: [] diff --git a/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreMessages-items.json b/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreMessages-items.json deleted file mode 100644 index 345faf41f5..0000000000 --- a/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreMessages-items.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "description": "expectedLogMessagesForClient-ignoreMessages-items", - "schemaVersion": "1.16", - "createEntities": [ - { - "client": { - "id": "client0" - } - } - ], - "tests": [ - { - "description": "foo", - "operations": [], - "expectLogMessages": [ - { - "client": "client0", - "messages": [], - "ignoreMessages": [ - 0 - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreMessages-items.yml b/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreMessages-items.yml deleted file mode 100644 index f429c3e5bf..0000000000 --- a/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreMessages-items.yml +++ /dev/null @@ -1,15 +0,0 @@ -description: "expectedLogMessagesForClient-ignoreMessages-items" - -schemaVersion: "1.16" - -createEntities: - - client: - id: &client0 "client0" - -tests: - - description: "foo" - operations: [] - expectLogMessages: - - client: *client0 - messages: [] - ignoreMessages: [0] diff --git a/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreMessages-type.json b/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreMessages-type.json deleted file mode 100644 index 4bc2d41dbf..0000000000 --- a/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreMessages-type.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "description": "expectedLogMessagesForClient-ignoreMessages-type", - "schemaVersion": "1.16", - "createEntities": [ - { - "client": { - "id": "client0" - } - } - ], - "tests": [ - { - "description": "foo", - "operations": [], - "expectLogMessages": [ - { - "client": "client0", - "messages": [], - "ignoreMessages": 0 - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreMessages-type.yml b/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreMessages-type.yml deleted file mode 100644 index 9512f3358e..0000000000 --- a/testdata/unified-test-format/valid-fail/expectedLogMessagesForClient-ignoreMessages-type.yml +++ /dev/null @@ -1,15 +0,0 @@ -description: "expectedLogMessagesForClient-ignoreMessages-type" - -schemaVersion: "1.16" - -createEntities: - - client: - id: &client0 "client0" - -tests: - - description: "foo" - operations: [] - expectLogMessages: - - client: *client0 - messages: [] - ignoreMessages: 0 diff --git a/testdata/unified-test-format/valid-fail/expectedSdamEvent-topologyDescriptionChangedEvent-additionalProperties.json b/testdata/unified-test-format/valid-fail/expectedSdamEvent-topologyDescriptionChangedEvent-additionalProperties.json deleted file mode 100644 index ef2686e93f..0000000000 --- a/testdata/unified-test-format/valid-fail/expectedSdamEvent-topologyDescriptionChangedEvent-additionalProperties.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "description": "expectedSdamEvent-topologyDescriptionChangedEvent-additionalProperties", - "schemaVersion": "1.14", - "tests": [ - { - "description": "foo", - "operations": [], - "expectEvents": [ - { - "client": "client0", - "eventType": "sdam", - "events": [ - { - "topologyDescriptionChangedEvent": { - "foo": "bar" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/expectedSdamEvent-topologyDescriptionChangedEvent-additionalProperties.yml b/testdata/unified-test-format/valid-fail/expectedSdamEvent-topologyDescriptionChangedEvent-additionalProperties.yml deleted file mode 100644 index 9599d8c85e..0000000000 --- a/testdata/unified-test-format/valid-fail/expectedSdamEvent-topologyDescriptionChangedEvent-additionalProperties.yml +++ /dev/null @@ -1,13 +0,0 @@ -description: expectedSdamEvent-topologyDescriptionChangedEvent-additionalProperties - -schemaVersion: '1.14' - -tests: - - description: foo - operations: [] - expectEvents: - - client: client0 - eventType: sdam - events: - - topologyDescriptionChangedEvent: - foo: bar diff --git a/testdata/unified-test-format/valid-fail/ignoreResultAndError.json b/testdata/unified-test-format/valid-fail/ignoreResultAndError.json deleted file mode 100644 index 4457040b4f..0000000000 --- a/testdata/unified-test-format/valid-fail/ignoreResultAndError.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "description": "ignoreResultAndError", - "schemaVersion": "1.3", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0Name" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "database0Name", - "documents": [] - } - ], - "tests": [ - { - "description": "operation errors are not ignored if ignoreResultAndError is false", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1 - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1 - } - }, - "ignoreResultAndError": false - } - ] - }, - { - "description": "malformed operation fails if ignoreResultAndError is true", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "foo": "bar" - }, - "ignoreResultAndError": true - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/ignoreResultAndError.yml b/testdata/unified-test-format/valid-fail/ignoreResultAndError.yml deleted file mode 100644 index 52498627a5..0000000000 --- a/testdata/unified-test-format/valid-fail/ignoreResultAndError.yml +++ /dev/null @@ -1,43 +0,0 @@ -description: ignoreResultAndError - -schemaVersion: '1.3' - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0Name - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: operation errors are not ignored if ignoreResultAndError is false - operations: - - name: insertOne - object: *collection0 - arguments: - document: &insertDocument { _id: 1 } - - name: insertOne - object: *collection0 - arguments: - # Insert the same document to force a DuplicateKey error. - document: *insertDocument - ignoreResultAndError: false - - - description: malformed operation fails if ignoreResultAndError is true - operations: - - name: insertOne - object: *collection0 - arguments: - foo: bar - ignoreResultAndError: true diff --git a/testdata/unified-test-format/valid-fail/kmsProviders-missing_aws_kms_credentials.json b/testdata/unified-test-format/valid-fail/kmsProviders-missing_aws_kms_credentials.json deleted file mode 100644 index e62de80033..0000000000 --- a/testdata/unified-test-format/valid-fail/kmsProviders-missing_aws_kms_credentials.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "description": "kmsProviders-missing_aws_kms_credentials", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "aws": { - "accessKeyId": "accessKeyId" - } - } - } - } - } - ], - "tests": [ - { - "description": "", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/kmsProviders-missing_aws_kms_credentials.yml b/testdata/unified-test-format/valid-fail/kmsProviders-missing_aws_kms_credentials.yml deleted file mode 100644 index 6418679bbf..0000000000 --- a/testdata/unified-test-format/valid-fail/kmsProviders-missing_aws_kms_credentials.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Missing required KMS credentials should lead to clientEncryption initialization failure. -description: kmsProviders-missing_aws_kms_credentials - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - aws: { accessKeyId: "accessKeyId" } - -tests: - - description: "" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/kmsProviders-missing_azure_kms_credentials.json b/testdata/unified-test-format/valid-fail/kmsProviders-missing_azure_kms_credentials.json deleted file mode 100644 index 8ef805d0fa..0000000000 --- a/testdata/unified-test-format/valid-fail/kmsProviders-missing_azure_kms_credentials.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "description": "kmsProviders-missing_azure_kms_credentials", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "azure": { - "tenantId": "tenantId" - } - } - } - } - } - ], - "tests": [ - { - "description": "", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/kmsProviders-missing_azure_kms_credentials.yml b/testdata/unified-test-format/valid-fail/kmsProviders-missing_azure_kms_credentials.yml deleted file mode 100644 index 4a8afaf10a..0000000000 --- a/testdata/unified-test-format/valid-fail/kmsProviders-missing_azure_kms_credentials.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Missing required KMS credentials should lead to clientEncryption initialization failure. -description: kmsProviders-missing_azure_kms_credentials - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - azure: { tenantId: "tenantId" } - -tests: - - description: "" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/kmsProviders-missing_gcp_kms_credentials.json b/testdata/unified-test-format/valid-fail/kmsProviders-missing_gcp_kms_credentials.json deleted file mode 100644 index c6da1ce58c..0000000000 --- a/testdata/unified-test-format/valid-fail/kmsProviders-missing_gcp_kms_credentials.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "description": "kmsProviders-missing_gcp_kms_credentials", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "gcp": { - "email": "email" - } - } - } - } - } - ], - "tests": [ - { - "description": "", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/kmsProviders-missing_gcp_kms_credentials.yml b/testdata/unified-test-format/valid-fail/kmsProviders-missing_gcp_kms_credentials.yml deleted file mode 100644 index f722b6b058..0000000000 --- a/testdata/unified-test-format/valid-fail/kmsProviders-missing_gcp_kms_credentials.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Missing required KMS credentials should lead to clientEncryption initialization failure. -description: kmsProviders-missing_gcp_kms_credentials - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - gcp: { email: "email" } - -tests: - - description: "" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/kmsProviders-no_kms.json b/testdata/unified-test-format/valid-fail/kmsProviders-no_kms.json deleted file mode 100644 index 57499b4eaf..0000000000 --- a/testdata/unified-test-format/valid-fail/kmsProviders-no_kms.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "description": "clientEncryptionOpts-no_kms", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": {} - } - } - } - ], - "tests": [ - { - "description": "", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/kmsProviders-no_kms.yml b/testdata/unified-test-format/valid-fail/kmsProviders-no_kms.yml deleted file mode 100644 index d9e196c0c2..0000000000 --- a/testdata/unified-test-format/valid-fail/kmsProviders-no_kms.yml +++ /dev/null @@ -1,21 +0,0 @@ -# No configured KMS providers should lead to clientEncryption initialization failure. -description: clientEncryptionOpts-no_kms - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: {} - -tests: - - description: "" - operations: [] diff --git a/testdata/unified-test-format/valid-fail/operation-failure.json b/testdata/unified-test-format/valid-fail/operation-failure.json deleted file mode 100644 index 8f6cae1521..0000000000 --- a/testdata/unified-test-format/valid-fail/operation-failure.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "description": "operation-failure", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "operation-failure" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "tests": [ - { - "description": "Unsupported command", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "unsupportedCommand", - "command": { - "unsupportedCommand": 1 - } - } - } - ] - }, - { - "description": "Unsupported query operator", - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "$unsupportedQueryOperator": 1 - } - } - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/operation-failure.yml b/testdata/unified-test-format/valid-fail/operation-failure.yml deleted file mode 100644 index b80f7794df..0000000000 --- a/testdata/unified-test-format/valid-fail/operation-failure.yml +++ /dev/null @@ -1,31 +0,0 @@ -description: "operation-failure" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: operation-failure - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: coll0 - -tests: - - description: "Unsupported command" - operations: - - name: runCommand - object: *database0 - arguments: - commandName: unsupportedCommand - command: { unsupportedCommand: 1 } - - - description: "Unsupported query operator" - operations: - - name: find - object: *collection0 - arguments: - filter: { $unsupportedQueryOperator: 1 } diff --git a/testdata/unified-test-format/valid-fail/operation-unsupported.json b/testdata/unified-test-format/valid-fail/operation-unsupported.json deleted file mode 100644 index d8ef5ab1c8..0000000000 --- a/testdata/unified-test-format/valid-fail/operation-unsupported.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "description": "operation-unsupported", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0" - } - } - ], - "tests": [ - { - "description": "Unsupported operation", - "operations": [ - { - "name": "unsupportedOperation", - "object": "client0" - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/operation-unsupported.yml b/testdata/unified-test-format/valid-fail/operation-unsupported.yml deleted file mode 100644 index ba311637c0..0000000000 --- a/testdata/unified-test-format/valid-fail/operation-unsupported.yml +++ /dev/null @@ -1,13 +0,0 @@ -description: "operation-unsupported" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - -tests: - - description: "Unsupported operation" - operations: - - name: unsupportedOperation - object: *client0 diff --git a/testdata/unified-test-format/valid-fail/returnDocument-enum-invalid.json b/testdata/unified-test-format/valid-fail/returnDocument-enum-invalid.json deleted file mode 100644 index ea425fb568..0000000000 --- a/testdata/unified-test-format/valid-fail/returnDocument-enum-invalid.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "description": "returnDocument-enum-invalid", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll" - } - } - ], - "tests": [ - { - "description": "FindOneAndReplace returnDocument invalid enum value", - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "_id": 1, - "x": 111 - }, - "returnDocument": "invalid" - } - } - ] - }, - { - "description": "FindOneAndUpdate returnDocument invalid enum value", - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "invalid" - } - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/returnDocument-enum-invalid.yml b/testdata/unified-test-format/valid-fail/returnDocument-enum-invalid.yml deleted file mode 100644 index b877f5e965..0000000000 --- a/testdata/unified-test-format/valid-fail/returnDocument-enum-invalid.yml +++ /dev/null @@ -1,34 +0,0 @@ -description: "returnDocument-enum-invalid" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &databaseName test - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collectionName coll - -tests: - - description: "FindOneAndReplace returnDocument invalid enum value" - operations: - - name: findOneAndReplace - object: *collection0 - arguments: - filter: { _id: 1 } - replacement: { _id: 1, x: 111 } - returnDocument: invalid - - - description: "FindOneAndUpdate returnDocument invalid enum value" - operations: - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 }} - returnDocument: invalid diff --git a/testdata/unified-test-format/valid-fail/schemaVersion-unsupported.json b/testdata/unified-test-format/valid-fail/schemaVersion-unsupported.json deleted file mode 100644 index ceb5532917..0000000000 --- a/testdata/unified-test-format/valid-fail/schemaVersion-unsupported.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "schemaVersion-unsupported", - "schemaVersion": "0.1", - "tests": [ - { - "description": "foo", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-fail/schemaVersion-unsupported.yml b/testdata/unified-test-format/valid-fail/schemaVersion-unsupported.yml deleted file mode 100644 index 0cb6994d24..0000000000 --- a/testdata/unified-test-format/valid-fail/schemaVersion-unsupported.yml +++ /dev/null @@ -1,7 +0,0 @@ -description: "schemaVersion-unsupported" - -schemaVersion: "0.1" - -tests: - - description: "foo" - operations: [] diff --git a/testdata/unified-test-format/valid-pass/assertNumberConnectionsCheckedOut.json b/testdata/unified-test-format/valid-pass/assertNumberConnectionsCheckedOut.json deleted file mode 100644 index a9fc063f33..0000000000 --- a/testdata/unified-test-format/valid-pass/assertNumberConnectionsCheckedOut.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "description": "assertNumberConnectionsCheckedOut", - "schemaVersion": "1.3", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true - } - } - ], - "tests": [ - { - "description": "basic assertion succeeds", - "operations": [ - { - "name": "assertNumberConnectionsCheckedOut", - "object": "testRunner", - "arguments": { - "client": "client0", - "connections": 0 - } - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/assertNumberConnectionsCheckedOut.yml b/testdata/unified-test-format/valid-pass/assertNumberConnectionsCheckedOut.yml deleted file mode 100644 index 603552fc20..0000000000 --- a/testdata/unified-test-format/valid-pass/assertNumberConnectionsCheckedOut.yml +++ /dev/null @@ -1,17 +0,0 @@ -description: assertNumberConnectionsCheckedOut - -schemaVersion: '1.3' - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - -tests: - - description: basic assertion succeeds - operations: - - name: assertNumberConnectionsCheckedOut - object: testRunner - arguments: - client: *client0 - connections: 0 diff --git a/testdata/unified-test-format/valid-pass/collectionData-createOptions.json b/testdata/unified-test-format/valid-pass/collectionData-createOptions.json deleted file mode 100644 index 19edc2247b..0000000000 --- a/testdata/unified-test-format/valid-pass/collectionData-createOptions.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "description": "collectionData-createOptions", - "schemaVersion": "1.9", - "runOnRequirements": [ - { - "minServerVersion": "3.6", - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "database0", - "createOptions": { - "capped": true, - "size": 4096 - }, - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "collection is created with the correct options", - "operations": [ - { - "object": "collection0", - "name": "aggregate", - "arguments": { - "pipeline": [ - { - "$collStats": { - "storageStats": {} - } - }, - { - "$project": { - "capped": "$storageStats.capped", - "maxSize": "$storageStats.maxSize" - } - } - ] - }, - "expectResult": [ - { - "capped": true, - "maxSize": 4096 - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/collectionData-createOptions.yml b/testdata/unified-test-format/valid-pass/collectionData-createOptions.yml deleted file mode 100644 index e778c4f5f9..0000000000 --- a/testdata/unified-test-format/valid-pass/collectionData-createOptions.yml +++ /dev/null @@ -1,37 +0,0 @@ -description: collectionData-createOptions -schemaVersion: "1.9" -runOnRequirements: - - minServerVersion: "3.6" - # Capped collections cannot be created on serverless instances. - serverless: forbid -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - createOptions: - capped: true - # With MMAPv1, the size field cannot be less than 4096. - size: &cappedSize 4096 - documents: - - { _id: 1, x: 11 } -tests: - - description: collection is created with the correct options - operations: - - object: *collection0 - name: aggregate - arguments: - pipeline: - - $collStats: { storageStats: {} } - - $project: { capped: '$storageStats.capped', maxSize: '$storageStats.maxSize'} - expectResult: - - { capped: true, maxSize: *cappedSize } diff --git a/testdata/unified-test-format/valid-pass/entity-client-cmap-events.json b/testdata/unified-test-format/valid-pass/entity-client-cmap-events.json deleted file mode 100644 index 3209033def..0000000000 --- a/testdata/unified-test-format/valid-pass/entity-client-cmap-events.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "description": "entity-client-cmap-events", - "schemaVersion": "1.3", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "observeEvents": [ - "connectionReadyEvent", - "connectionCheckedOutEvent", - "connectionCheckedInEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0Name" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "database0Name", - "documents": [] - } - ], - "tests": [ - { - "description": "events are captured during an operation", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "x": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - }, - { - "connectionCheckedOutEvent": {} - }, - { - "connectionCheckedInEvent": {} - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/entity-client-cmap-events.yml b/testdata/unified-test-format/valid-pass/entity-client-cmap-events.yml deleted file mode 100644 index 277134551c..0000000000 --- a/testdata/unified-test-format/valid-pass/entity-client-cmap-events.yml +++ /dev/null @@ -1,40 +0,0 @@ -description: entity-client-cmap-events - -schemaVersion: '1.3' - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - observeEvents: - - connectionReadyEvent - - connectionCheckedOutEvent - - connectionCheckedInEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0Name - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: events are captured during an operation - operations: - - name: insertOne - object: *collection0 - arguments: - document: { x: 1 } - expectEvents: - - client: *client0 - eventType: cmap - events: - - connectionReadyEvent: {} - - connectionCheckedOutEvent: {} - - connectionCheckedInEvent: {} diff --git a/testdata/unified-test-format/valid-pass/entity-client-storeEventsAsEntities.json b/testdata/unified-test-format/valid-pass/entity-client-storeEventsAsEntities.json deleted file mode 100644 index e37e5a1acd..0000000000 --- a/testdata/unified-test-format/valid-pass/entity-client-storeEventsAsEntities.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "description": "entity-client-storeEventsAsEntities", - "schemaVersion": "1.2", - "createEntities": [ - { - "client": { - "id": "client0", - "storeEventsAsEntities": [ - { - "id": "client0_events", - "events": [ - "CommandStartedEvent", - "CommandSucceededEvent", - "CommandFailedEvent" - ] - } - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "test" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "test", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ], - "tests": [ - { - "description": "storeEventsAsEntities captures events", - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {} - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/entity-client-storeEventsAsEntities.yml b/testdata/unified-test-format/valid-pass/entity-client-storeEventsAsEntities.yml deleted file mode 100644 index 52a9e0ddc7..0000000000 --- a/testdata/unified-test-format/valid-pass/entity-client-storeEventsAsEntities.yml +++ /dev/null @@ -1,37 +0,0 @@ -description: "entity-client-storeEventsAsEntities" - -schemaVersion: "1.2" - -createEntities: - - client: - id: &client0 client0 - storeEventsAsEntities: - - id: client0_events - events: ["CommandStartedEvent", "CommandSucceededEvent", "CommandFailedEvent"] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name test - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - -tests: - # Note: this test does not assert that the events are actually saved to the - # entity since there is presently no assertion syntax to do so. We are only - # asserting that the test executes successfully. - - description: "storeEventsAsEntities captures events" - operations: - - name: find - object: *collection0 - arguments: - filter: {} - expectResult: - - { _id: 1, x: 11 } diff --git a/testdata/unified-test-format/valid-pass/entity-commandCursor.json b/testdata/unified-test-format/valid-pass/entity-commandCursor.json deleted file mode 100644 index 72b74b4a9a..0000000000 --- a/testdata/unified-test-format/valid-pass/entity-commandCursor.json +++ /dev/null @@ -1,278 +0,0 @@ -{ - "description": "entity-commandCursor", - "schemaVersion": "1.3", - "createEntities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "db", - "client": "client", - "databaseName": "db" - } - }, - { - "collection": { - "id": "collection", - "database": "db", - "collectionName": "collection" - } - } - ], - "initialData": [ - { - "collectionName": "collection", - "databaseName": "db", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "tests": [ - { - "description": "runCursorCommand creates and exhausts cursor by running getMores", - "operations": [ - { - "name": "runCursorCommand", - "object": "db", - "arguments": { - "commandName": "find", - "batchSize": 2, - "command": { - "find": "collection", - "filter": {}, - "batchSize": 2 - } - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection", - "filter": {}, - "batchSize": 2, - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection", - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "getMore" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "collection", - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "getMore" - } - } - ] - } - ] - }, - { - "description": "createCommandCursor creates a cursor and stores it as an entity that can be iterated one document at a time", - "operations": [ - { - "name": "createCommandCursor", - "object": "db", - "arguments": { - "commandName": "find", - "batchSize": 2, - "command": { - "find": "collection", - "filter": {}, - "batchSize": 2 - } - }, - "saveResultAsEntity": "myRunCommandCursor" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "myRunCommandCursor", - "expectResult": { - "_id": 1, - "x": 11 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "myRunCommandCursor", - "expectResult": { - "_id": 2, - "x": 22 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "myRunCommandCursor", - "expectResult": { - "_id": 3, - "x": 33 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "myRunCommandCursor", - "expectResult": { - "_id": 4, - "x": 44 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "myRunCommandCursor", - "expectResult": { - "_id": 5, - "x": 55 - } - } - ] - }, - { - "description": "createCommandCursor's cursor can be closed and will perform a killCursors operation", - "operations": [ - { - "name": "createCommandCursor", - "object": "db", - "arguments": { - "commandName": "find", - "batchSize": 2, - "command": { - "find": "collection", - "filter": {}, - "batchSize": 2 - } - }, - "saveResultAsEntity": "myRunCommandCursor" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "myRunCommandCursor", - "expectResult": { - "_id": 1, - "x": 11 - } - }, - { - "name": "close", - "object": "myRunCommandCursor" - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "collection", - "filter": {}, - "batchSize": 2, - "$db": "db", - "lsid": { - "$$exists": true - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "killCursors": "collection", - "cursors": { - "$$type": "array" - } - }, - "commandName": "killCursors" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/entity-commandCursor.yml b/testdata/unified-test-format/valid-pass/entity-commandCursor.yml deleted file mode 100644 index 3becf2095a..0000000000 --- a/testdata/unified-test-format/valid-pass/entity-commandCursor.yml +++ /dev/null @@ -1,115 +0,0 @@ -description: entity-commandCursor -schemaVersion: '1.3' -createEntities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: [commandStartedEvent] - - database: - id: &db db - client: *client - databaseName: *db - - collection: - id: &collection collection - database: *db - collectionName: *collection -initialData: - - collectionName: collection - databaseName: *db - documents: &documents - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } -tests: - - description: runCursorCommand creates and exhausts cursor by running getMores - operations: - - name: runCursorCommand - object: *db - arguments: - commandName: find - batchSize: 2 - command: { find: *collection, filter: {}, batchSize: 2 } - expectResult: *documents - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - find: *collection - filter: {} - batchSize: 2 - $db: *db - lsid: { $$exists: true } - commandName: find - - commandStartedEvent: - command: - getMore: { $$type: [int, long] } - collection: *collection - $db: *db - lsid: { $$exists: true } - commandName: getMore - - commandStartedEvent: - command: - getMore: { $$type: [int, long] } - collection: *collection - $db: *db - lsid: { $$exists: true } - commandName: getMore - - - description: createCommandCursor creates a cursor and stores it as an entity that can be iterated one document at a time - operations: - - name: createCommandCursor - object: *db - arguments: - commandName: find - batchSize: 2 - command: { find: *collection, filter: {}, batchSize: 2 } - saveResultAsEntity: &myRunCommandCursor myRunCommandCursor - - name: iterateUntilDocumentOrError - object: *myRunCommandCursor - expectResult: { _id: 1, x: 11 } - - name: iterateUntilDocumentOrError - object: *myRunCommandCursor - expectResult: { _id: 2, x: 22 } - - name: iterateUntilDocumentOrError - object: *myRunCommandCursor - expectResult: { _id: 3, x: 33 } - - name: iterateUntilDocumentOrError - object: *myRunCommandCursor - expectResult: { _id: 4, x: 44 } - - name: iterateUntilDocumentOrError - object: *myRunCommandCursor - expectResult: { _id: 5, x: 55 } - - - description: createCommandCursor's cursor can be closed and will perform a killCursors operation - operations: - - name: createCommandCursor - object: *db - arguments: - commandName: find - batchSize: 2 - command: { find: *collection, filter: {}, batchSize: 2 } - saveResultAsEntity: myRunCommandCursor - - name: iterateUntilDocumentOrError - object: *myRunCommandCursor - expectResult: { _id: 1, x: 11 } - - name: close - object: *myRunCommandCursor - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - find: *collection - filter: {} - batchSize: 2 - $db: *db - lsid: { $$exists: true } - commandName: find - - commandStartedEvent: - command: - killCursors: *collection - cursors: { $$type: array } - commandName: killCursors diff --git a/testdata/unified-test-format/valid-pass/entity-cursor-iterateOnce.json b/testdata/unified-test-format/valid-pass/entity-cursor-iterateOnce.json deleted file mode 100644 index dd9db29799..0000000000 --- a/testdata/unified-test-format/valid-pass/entity-cursor-iterateOnce.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "description": "entity-cursor-iterateOnce", - "schemaVersion": "1.5", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "databaseName": "database0", - "collectionName": "coll0", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - ], - "tests": [ - { - "description": "iterateOnce", - "operations": [ - { - "name": "createFindCursor", - "object": "collection0", - "arguments": { - "filter": {}, - "batchSize": 2 - }, - "saveResultAsEntity": "cursor0" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectResult": { - "_id": 1 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectResult": { - "_id": 2 - } - }, - { - "name": "iterateOnce", - "object": "cursor0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": {}, - "batchSize": 2 - }, - "commandName": "find", - "databaseName": "database0" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": "long" - }, - "collection": "coll0" - }, - "commandName": "getMore" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/entity-cursor-iterateOnce.yml b/testdata/unified-test-format/valid-pass/entity-cursor-iterateOnce.yml deleted file mode 100644 index bc8b9240a5..0000000000 --- a/testdata/unified-test-format/valid-pass/entity-cursor-iterateOnce.yml +++ /dev/null @@ -1,58 +0,0 @@ -description: entity-cursor-iterateOnce - -schemaVersion: '1.5' - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0 - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - _id: 1 - - _id: 2 - - _id: 3 - -tests: - - description: iterateOnce - operations: - - name: createFindCursor - object: *collection0 - arguments: - filter: {} - batchSize: 2 - saveResultAsEntity: &cursor0 cursor0 - - name: iterateUntilDocumentOrError - object: *cursor0 - expectResult: { _id: 1 } - - name: iterateUntilDocumentOrError - object: *cursor0 - expectResult: { _id: 2 } - # This operation could be iterateUntilDocumentOrError, but we use iterateOne to ensure that drivers support it. - - name: iterateOnce - object: *cursor0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: {} - batchSize: 2 - commandName: find - databaseName: *database0Name - - commandStartedEvent: - command: - getMore: { $$type: long } - collection: *collection0Name - commandName: getMore diff --git a/testdata/unified-test-format/valid-pass/entity-find-cursor.json b/testdata/unified-test-format/valid-pass/entity-find-cursor.json deleted file mode 100644 index 85b8f69d7f..0000000000 --- a/testdata/unified-test-format/valid-pass/entity-find-cursor.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "description": "entity-find-cursor", - "schemaVersion": "1.3", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0Name" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "databaseName": "database0Name", - "collectionName": "coll0", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - }, - { - "_id": 4 - }, - { - "_id": 5 - } - ] - } - ], - "tests": [ - { - "description": "cursors can be created, iterated, and closed", - "operations": [ - { - "name": "createFindCursor", - "object": "collection0", - "arguments": { - "filter": {}, - "batchSize": 2 - }, - "saveResultAsEntity": "cursor0" - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectResult": { - "_id": 1 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectResult": { - "_id": 2 - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "cursor0", - "expectResult": { - "_id": 3 - } - }, - { - "name": "close", - "object": "cursor0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll0", - "filter": {}, - "batchSize": 2 - }, - "commandName": "find", - "databaseName": "database0Name" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursor": { - "id": { - "$$type": "long" - }, - "ns": { - "$$type": "string" - }, - "firstBatch": { - "$$type": "array" - } - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": "long" - }, - "collection": "coll0" - }, - "commandName": "getMore" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursor": { - "id": { - "$$type": "long" - }, - "ns": { - "$$type": "string" - }, - "nextBatch": { - "$$type": "array" - } - } - }, - "commandName": "getMore" - } - }, - { - "commandStartedEvent": { - "command": { - "killCursors": "coll0", - "cursors": { - "$$type": "array" - } - }, - "commandName": "killCursors" - } - }, - { - "commandSucceededEvent": { - "reply": { - "cursorsKilled": { - "$$unsetOrMatches": { - "$$type": "array" - } - } - }, - "commandName": "killCursors" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/entity-find-cursor.yml b/testdata/unified-test-format/valid-pass/entity-find-cursor.yml deleted file mode 100644 index 61c9f8835a..0000000000 --- a/testdata/unified-test-format/valid-pass/entity-find-cursor.yml +++ /dev/null @@ -1,89 +0,0 @@ -description: entity-find-cursor - -schemaVersion: '1.3' - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0Name - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - databaseName: *database0Name - collectionName: *collection0Name - documents: - - _id: 1 - - _id: 2 - - _id: 3 - - _id: 4 - - _id: 5 - -tests: - - description: cursors can be created, iterated, and closed - operations: - - name: createFindCursor - object: *collection0 - arguments: - filter: {} - batchSize: 2 - saveResultAsEntity: &cursor0 cursor0 - - name: iterateUntilDocumentOrError - object: *cursor0 - expectResult: { _id: 1 } - - name: iterateUntilDocumentOrError - object: *cursor0 - expectResult: { _id: 2 } - - name: iterateUntilDocumentOrError - object: *cursor0 - expectResult: { _id: 3 } - - name: close - object: *cursor0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: {} - batchSize: 2 - commandName: find - databaseName: *database0Name - - commandSucceededEvent: - reply: - cursor: - id: { $$type: long } - ns: { $$type: string } - firstBatch: { $$type: array } - commandName: find - - commandStartedEvent: - command: - getMore: { $$type: long } - collection: *collection0Name - commandName: getMore - - commandSucceededEvent: - reply: - cursor: - id: { $$type: long } - ns: { $$type: string } - nextBatch: { $$type: array } - commandName: getMore - - commandStartedEvent: - command: - killCursors: *collection0Name - cursors: { $$type: array } - commandName: killCursors - - commandSucceededEvent: - reply: - # No cursorsKilled field expected on pre-3.2 servers - cursorsKilled: { $$unsetOrMatches: { $$type: array } } - commandName: killCursors diff --git a/testdata/unified-test-format/valid-pass/expectedEventsForClient-eventType.json b/testdata/unified-test-format/valid-pass/expectedEventsForClient-eventType.json deleted file mode 100644 index fe308df965..0000000000 --- a/testdata/unified-test-format/valid-pass/expectedEventsForClient-eventType.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "description": "expectedEventsForClient-eventType", - "schemaVersion": "1.3", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "observeEvents": [ - "commandStartedEvent", - "connectionReadyEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0Name" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "database0Name", - "documents": [] - } - ], - "tests": [ - { - "description": "eventType can be set to command and cmap", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "eventType": "command", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1 - } - ] - }, - "commandName": "insert" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - } - ] - } - ] - }, - { - "description": "eventType defaults to command if unset", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1 - } - ] - }, - "commandName": "insert" - } - } - ] - }, - { - "client": "client0", - "eventType": "cmap", - "events": [ - { - "connectionReadyEvent": {} - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/expectedEventsForClient-eventType.yml b/testdata/unified-test-format/valid-pass/expectedEventsForClient-eventType.yml deleted file mode 100644 index e437c80489..0000000000 --- a/testdata/unified-test-format/valid-pass/expectedEventsForClient-eventType.yml +++ /dev/null @@ -1,66 +0,0 @@ -description: expectedEventsForClient-eventType - -schemaVersion: '1.3' - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - observeEvents: - - commandStartedEvent - - connectionReadyEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0Name - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: eventType can be set to command and cmap - operations: - - name: insertOne - object: *collection0 - arguments: - document: &insertDocument { _id: 1 } - expectEvents: - - client: *client0 - eventType: command - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *insertDocument - commandName: insert - - client: *client0 - eventType: cmap - events: - - connectionReadyEvent: {} - - - description: eventType defaults to command if unset - operations: - - name: insertOne - object: *collection0 - arguments: - document: *insertDocument - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *insertDocument - commandName: insert - - client: *client0 - eventType: cmap - events: - - connectionReadyEvent: {} diff --git a/testdata/unified-test-format/valid-pass/expectedEventsForClient-ignoreExtraEvents.json b/testdata/unified-test-format/valid-pass/expectedEventsForClient-ignoreExtraEvents.json deleted file mode 100644 index 178b756c2c..0000000000 --- a/testdata/unified-test-format/valid-pass/expectedEventsForClient-ignoreExtraEvents.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "description": "expectedEventsForClient-ignoreExtraEvents", - "schemaVersion": "1.7", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0Name" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "database0Name", - "documents": [] - } - ], - "tests": [ - { - "description": "ignoreExtraEvents can be set to false", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": false, - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 1 - } - ] - }, - "commandName": "insert" - } - } - ] - } - ] - }, - { - "description": "ignoreExtraEvents can be set to true", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 2 - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 3 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "ignoreExtraEvents": true, - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 2 - } - ] - }, - "commandName": "insert" - } - } - ] - } - ] - }, - { - "description": "ignoreExtraEvents defaults to false if unset", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 4 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": 4 - } - ] - }, - "commandName": "insert" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/expectedEventsForClient-ignoreExtraEvents.yml b/testdata/unified-test-format/valid-pass/expectedEventsForClient-ignoreExtraEvents.yml deleted file mode 100644 index 162d0e3c04..0000000000 --- a/testdata/unified-test-format/valid-pass/expectedEventsForClient-ignoreExtraEvents.yml +++ /dev/null @@ -1,78 +0,0 @@ -description: expectedEventsForClient-ignoreExtraEvents - -schemaVersion: '1.7' - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - observeEvents: - - commandStartedEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0Name - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: ignoreExtraEvents can be set to false - operations: - - name: insertOne - object: *collection0 - arguments: - document: &insertDocument1 { _id: 1 } - expectEvents: - - client: *client0 - ignoreExtraEvents: false - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *insertDocument1 - commandName: insert - - - description: ignoreExtraEvents can be set to true - operations: - - name: insertOne - object: *collection0 - arguments: - document: &insertDocument2 { _id: 2 } - - name: insertOne - object: *collection0 - arguments: - document: { _id: 3 } - expectEvents: - - client: *client0 - ignoreExtraEvents: true - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *insertDocument2 - commandName: insert - - - description: ignoreExtraEvents defaults to false if unset - operations: - - name: insertOne - object: *collection0 - arguments: - document: &insertDocument4 { _id: 4 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - *insertDocument4 - commandName: insert diff --git a/testdata/unified-test-format/valid-pass/ignoreResultAndError.json b/testdata/unified-test-format/valid-pass/ignoreResultAndError.json deleted file mode 100644 index 2e9b1c58ab..0000000000 --- a/testdata/unified-test-format/valid-pass/ignoreResultAndError.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "description": "ignoreResultAndError", - "schemaVersion": "1.3", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0Name" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "database0Name", - "documents": [] - } - ], - "tests": [ - { - "description": "operation errors are ignored if ignoreResultAndError is true", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1 - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1 - } - }, - "ignoreResultAndError": true - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/ignoreResultAndError.yml b/testdata/unified-test-format/valid-pass/ignoreResultAndError.yml deleted file mode 100644 index 847e296e72..0000000000 --- a/testdata/unified-test-format/valid-pass/ignoreResultAndError.yml +++ /dev/null @@ -1,34 +0,0 @@ -description: ignoreResultAndError - -schemaVersion: '1.3' - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0Name - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: operation errors are ignored if ignoreResultAndError is true - operations: - - name: insertOne - object: *collection0 - arguments: - document: &insertDocument { _id: 1 } - - name: insertOne - object: *collection0 - arguments: - document: *insertDocument - ignoreResultAndError: true diff --git a/testdata/unified-test-format/valid-pass/kmsProviders-explicit_kms_credentials.json b/testdata/unified-test-format/valid-pass/kmsProviders-explicit_kms_credentials.json deleted file mode 100644 index 7cc74939eb..0000000000 --- a/testdata/unified-test-format/valid-pass/kmsProviders-explicit_kms_credentials.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "description": "kmsProviders-explicit_kms_credentials", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "aws": { - "accessKeyId": "accessKeyId", - "secretAccessKey": "secretAccessKey" - }, - "azure": { - "tenantId": "tenantId", - "clientId": "clientId", - "clientSecret": "clientSecret" - }, - "gcp": { - "email": "email", - "privateKey": "cHJpdmF0ZUtleQo=" - }, - "kmip": { - "endpoint": "endpoint" - }, - "local": { - "key": "a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5" - } - } - } - } - } - ], - "tests": [ - { - "description": "", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/kmsProviders-explicit_kms_credentials.yml b/testdata/unified-test-format/valid-pass/kmsProviders-explicit_kms_credentials.yml deleted file mode 100644 index b5f87b53a0..0000000000 --- a/testdata/unified-test-format/valid-pass/kmsProviders-explicit_kms_credentials.yml +++ /dev/null @@ -1,26 +0,0 @@ -# kmsProviders should support explicit credentials. -description: kmsProviders-explicit_kms_credentials - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - aws: { accessKeyId: "accessKeyId", secretAccessKey: "secretAccessKey" } - azure: { tenantId: "tenantId", clientId: "clientId", clientSecret: "clientSecret" } - gcp: { email: "email", privateKey: "cHJpdmF0ZUtleQo=" } - kmip: { endpoint: "endpoint" } - local: { key: "a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5a2V5" } - -tests: - - description: "" - operations: [] diff --git a/testdata/unified-test-format/valid-pass/kmsProviders-mixed_kms_credential_fields.json b/testdata/unified-test-format/valid-pass/kmsProviders-mixed_kms_credential_fields.json deleted file mode 100644 index 363f2a4576..0000000000 --- a/testdata/unified-test-format/valid-pass/kmsProviders-mixed_kms_credential_fields.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "description": "kmsProviders-mixed_kms_credential_fields", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "aws": { - "accessKeyId": "accessKeyId", - "secretAccessKey": { - "$$placeholder": 1 - } - }, - "azure": { - "tenantId": "tenantId", - "clientId": { - "$$placeholder": 1 - }, - "clientSecret": { - "$$placeholder": 1 - } - }, - "gcp": { - "email": "email", - "privateKey": { - "$$placeholder": 1 - } - } - } - } - } - } - ], - "tests": [ - { - "description": "", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/kmsProviders-mixed_kms_credential_fields.yml b/testdata/unified-test-format/valid-pass/kmsProviders-mixed_kms_credential_fields.yml deleted file mode 100644 index cf6753b5b9..0000000000 --- a/testdata/unified-test-format/valid-pass/kmsProviders-mixed_kms_credential_fields.yml +++ /dev/null @@ -1,24 +0,0 @@ -# kmsProviders should support both explicit and placeholder credential fields. -description: kmsProviders-mixed_kms_credential_fields - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - aws: { accessKeyId: "accessKeyId", secretAccessKey: { $$placeholder: 1 } } - azure: { tenantId: "tenantId", clientId: { $$placeholder: 1 }, clientSecret: { $$placeholder: 1 } } - gcp: { email: "email", privateKey: { $$placeholder: 1 } } - -tests: - - description: "" - operations: [] diff --git a/testdata/unified-test-format/valid-pass/kmsProviders-placeholder_kms_credentials.json b/testdata/unified-test-format/valid-pass/kmsProviders-placeholder_kms_credentials.json deleted file mode 100644 index 3f7721f01d..0000000000 --- a/testdata/unified-test-format/valid-pass/kmsProviders-placeholder_kms_credentials.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "kmsProviders-placeholder_kms_credentials", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "aws": { - "accessKeyId": { - "$$placeholder": 1 - }, - "secretAccessKey": { - "$$placeholder": 1 - } - }, - "azure": { - "tenantId": { - "$$placeholder": 1 - }, - "clientId": { - "$$placeholder": 1 - }, - "clientSecret": { - "$$placeholder": 1 - } - }, - "gcp": { - "email": { - "$$placeholder": 1 - }, - "privateKey": { - "$$placeholder": 1 - } - }, - "kmip": { - "endpoint": { - "$$placeholder": 1 - } - }, - "local": { - "key": { - "$$placeholder": 1 - } - } - } - } - } - } - ], - "tests": [ - { - "description": "", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/kmsProviders-placeholder_kms_credentials.yml b/testdata/unified-test-format/valid-pass/kmsProviders-placeholder_kms_credentials.yml deleted file mode 100644 index 642187971d..0000000000 --- a/testdata/unified-test-format/valid-pass/kmsProviders-placeholder_kms_credentials.yml +++ /dev/null @@ -1,26 +0,0 @@ -# kmsProviders should support loading credentials at runtime. -description: kmsProviders-placeholder_kms_credentials - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - aws: { accessKeyId: { $$placeholder: 1 }, secretAccessKey: { $$placeholder: 1 } } - azure: { tenantId: { $$placeholder: 1 }, clientId: { $$placeholder: 1 }, clientSecret: { $$placeholder: 1 } } - gcp: { email: { $$placeholder: 1 }, privateKey: { $$placeholder: 1 } } - kmip: { endpoint: { $$placeholder: 1 } } - local: { key: { $$placeholder: 1 } } - -tests: - - description: "" - operations: [] diff --git a/testdata/unified-test-format/valid-pass/kmsProviders-unconfigured_kms.json b/testdata/unified-test-format/valid-pass/kmsProviders-unconfigured_kms.json deleted file mode 100644 index 12ca580941..0000000000 --- a/testdata/unified-test-format/valid-pass/kmsProviders-unconfigured_kms.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "description": "kmsProviders-unconfigured_kms", - "schemaVersion": "1.8", - "runOnRequirements": [ - { - "csfle": true - } - ], - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "aws": {}, - "azure": {}, - "gcp": {}, - "kmip": {}, - "local": {} - } - } - } - } - ], - "tests": [ - { - "description": "", - "skipReason": "DRIVERS-2280: waiting on driver support for on-demand credentials", - "operations": [] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/kmsProviders-unconfigured_kms.yml b/testdata/unified-test-format/valid-pass/kmsProviders-unconfigured_kms.yml deleted file mode 100644 index 3e6c878186..0000000000 --- a/testdata/unified-test-format/valid-pass/kmsProviders-unconfigured_kms.yml +++ /dev/null @@ -1,27 +0,0 @@ -# kmsProviders should support request for on-demand KMS credentials. -description: kmsProviders-unconfigured_kms - -schemaVersion: "1.8" - -runOnRequirements: - - csfle: true - -createEntities: - - client: - id: &client0 client0 - - clientEncryption: - id: &clientEncryption0 clientEncryption0 - clientEncryptionOpts: - keyVaultClient: *client0 - keyVaultNamespace: keyvault.datakeys - kmsProviders: - aws: {} - azure: {} - gcp: {} - kmip: {} - local: {} - -tests: - - description: "" - skipReason: "DRIVERS-2280: waiting on driver support for on-demand credentials" - operations: [] diff --git a/testdata/unified-test-format/valid-pass/matches-lte-operator.json b/testdata/unified-test-format/valid-pass/matches-lte-operator.json deleted file mode 100644 index 04136c17e0..0000000000 --- a/testdata/unified-test-format/valid-pass/matches-lte-operator.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "description": "matches-lte-operator", - "schemaVersion": "1.5", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0Name" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "database0Name", - "documents": [] - } - ], - "tests": [ - { - "description": "special lte matching operator", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "y": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "coll0", - "documents": [ - { - "_id": { - "$$lte": 1 - }, - "y": { - "$$lte": 2 - } - } - ] - }, - "commandName": "insert", - "databaseName": "database0Name" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/matches-lte-operator.yml b/testdata/unified-test-format/valid-pass/matches-lte-operator.yml deleted file mode 100644 index 598f1056cc..0000000000 --- a/testdata/unified-test-format/valid-pass/matches-lte-operator.yml +++ /dev/null @@ -1,40 +0,0 @@ -description: matches-lte-operator - -schemaVersion: '1.5' - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name database0Name - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: special lte matching operator - operations: - - name: insertOne - object: *collection0 - arguments: - document: { _id : 1, y: 1 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - # We can make exact assertions here but we use the $$lte operator to ensure drivers support it. - - { _id: { $$lte: 1 }, y: { $$lte: 2 } } - commandName: insert - databaseName: *database0Name diff --git a/testdata/unified-test-format/valid-pass/observeSensitiveCommands.json b/testdata/unified-test-format/valid-pass/observeSensitiveCommands.json deleted file mode 100644 index d3ae5665be..0000000000 --- a/testdata/unified-test-format/valid-pass/observeSensitiveCommands.json +++ /dev/null @@ -1,706 +0,0 @@ -{ - "description": "observeSensitiveCommands", - "schemaVersion": "1.5", - "runOnRequirements": [ - { - "auth": false - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent" - ], - "observeSensitiveCommands": true - } - }, - { - "client": { - "id": "client1", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent" - ], - "observeSensitiveCommands": false - } - }, - { - "client": { - "id": "client2", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "observeSensitiveCommands" - } - }, - { - "database": { - "id": "database1", - "client": "client1", - "databaseName": "observeSensitiveCommands" - } - }, - { - "database": { - "id": "database2", - "client": "client2", - "databaseName": "observeSensitiveCommands" - } - } - ], - "tests": [ - { - "description": "getnonce is observed with observeSensitiveCommands=true", - "runOnRequirements": [ - { - "maxServerVersion": "6.1.99" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "getnonce", - "command": { - "getnonce": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "getnonce", - "command": { - "getnonce": { - "$$exists": false - } - } - } - }, - { - "commandSucceededEvent": { - "commandName": "getnonce", - "reply": { - "ok": { - "$$exists": false - }, - "nonce": { - "$$exists": false - } - } - } - } - ] - } - ] - }, - { - "description": "getnonce is not observed with observeSensitiveCommands=false", - "runOnRequirements": [ - { - "maxServerVersion": "6.1.99" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database1", - "arguments": { - "commandName": "getnonce", - "command": { - "getnonce": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client1", - "events": [] - } - ] - }, - { - "description": "getnonce is not observed by default", - "runOnRequirements": [ - { - "maxServerVersion": "6.1.99" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database2", - "arguments": { - "commandName": "getnonce", - "command": { - "getnonce": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client2", - "events": [] - } - ] - }, - { - "description": "hello with speculativeAuthenticate", - "runOnRequirements": [ - { - "minServerVersion": "4.9" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "hello", - "command": { - "hello": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - }, - { - "name": "runCommand", - "object": "database1", - "arguments": { - "commandName": "hello", - "command": { - "hello": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - }, - { - "name": "runCommand", - "object": "database2", - "arguments": { - "commandName": "hello", - "command": { - "hello": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "hello", - "command": { - "hello": { - "$$exists": false - }, - "speculativeAuthenticate": { - "$$exists": false - } - } - } - }, - { - "commandSucceededEvent": { - "commandName": "hello", - "reply": { - "isWritablePrimary": { - "$$exists": false - }, - "speculativeAuthenticate": { - "$$exists": false - } - } - } - } - ] - }, - { - "client": "client1", - "events": [] - }, - { - "client": "client2", - "events": [] - } - ] - }, - { - "description": "hello without speculativeAuthenticate is always observed", - "runOnRequirements": [ - { - "minServerVersion": "4.9" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "hello", - "command": { - "hello": 1 - } - } - }, - { - "name": "runCommand", - "object": "database1", - "arguments": { - "commandName": "hello", - "command": { - "hello": 1 - } - } - }, - { - "name": "runCommand", - "object": "database2", - "arguments": { - "commandName": "hello", - "command": { - "hello": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "hello", - "command": { - "hello": 1 - } - } - }, - { - "commandSucceededEvent": { - "commandName": "hello", - "reply": { - "isWritablePrimary": { - "$$exists": true - } - } - } - } - ] - }, - { - "client": "client1", - "events": [ - { - "commandStartedEvent": { - "commandName": "hello", - "command": { - "hello": 1 - } - } - }, - { - "commandSucceededEvent": { - "commandName": "hello", - "reply": { - "isWritablePrimary": { - "$$exists": true - } - } - } - } - ] - }, - { - "client": "client2", - "events": [ - { - "commandStartedEvent": { - "commandName": "hello", - "command": { - "hello": 1 - } - } - }, - { - "commandSucceededEvent": { - "commandName": "hello", - "reply": { - "isWritablePrimary": { - "$$exists": true - } - } - } - } - ] - } - ] - }, - { - "description": "legacy hello with speculativeAuthenticate", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "ismaster", - "command": { - "ismaster": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - }, - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "isMaster", - "command": { - "isMaster": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - }, - { - "name": "runCommand", - "object": "database1", - "arguments": { - "commandName": "ismaster", - "command": { - "ismaster": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - }, - { - "name": "runCommand", - "object": "database1", - "arguments": { - "commandName": "isMaster", - "command": { - "isMaster": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - }, - { - "name": "runCommand", - "object": "database2", - "arguments": { - "commandName": "ismaster", - "command": { - "ismaster": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - }, - { - "name": "runCommand", - "object": "database2", - "arguments": { - "commandName": "isMaster", - "command": { - "isMaster": 1, - "speculativeAuthenticate": { - "saslStart": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "ismaster", - "command": { - "ismaster": { - "$$exists": false - }, - "speculativeAuthenticate": { - "$$exists": false - } - } - } - }, - { - "commandSucceededEvent": { - "commandName": "ismaster", - "reply": { - "ismaster": { - "$$exists": false - }, - "speculativeAuthenticate": { - "$$exists": false - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "isMaster", - "command": { - "isMaster": { - "$$exists": false - }, - "speculativeAuthenticate": { - "$$exists": false - } - } - } - }, - { - "commandSucceededEvent": { - "commandName": "isMaster", - "reply": { - "ismaster": { - "$$exists": false - }, - "speculativeAuthenticate": { - "$$exists": false - } - } - } - } - ] - }, - { - "client": "client1", - "events": [] - }, - { - "client": "client2", - "events": [] - } - ] - }, - { - "description": "legacy hello without speculativeAuthenticate is always observed", - "operations": [ - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "ismaster", - "command": { - "ismaster": 1 - } - } - }, - { - "name": "runCommand", - "object": "database0", - "arguments": { - "commandName": "isMaster", - "command": { - "isMaster": 1 - } - } - }, - { - "name": "runCommand", - "object": "database1", - "arguments": { - "commandName": "ismaster", - "command": { - "ismaster": 1 - } - } - }, - { - "name": "runCommand", - "object": "database1", - "arguments": { - "commandName": "isMaster", - "command": { - "isMaster": 1 - } - } - }, - { - "name": "runCommand", - "object": "database2", - "arguments": { - "commandName": "ismaster", - "command": { - "ismaster": 1 - } - } - }, - { - "name": "runCommand", - "object": "database2", - "arguments": { - "commandName": "isMaster", - "command": { - "isMaster": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "ismaster", - "command": { - "ismaster": 1 - } - } - }, - { - "commandSucceededEvent": { - "commandName": "ismaster", - "reply": { - "ismaster": { - "$$exists": true - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "isMaster", - "command": { - "isMaster": 1 - } - } - }, - { - "commandSucceededEvent": { - "commandName": "isMaster", - "reply": { - "ismaster": { - "$$exists": true - } - } - } - } - ] - }, - { - "client": "client1", - "events": [ - { - "commandStartedEvent": { - "commandName": "ismaster", - "command": { - "ismaster": 1 - } - } - }, - { - "commandSucceededEvent": { - "commandName": "ismaster", - "reply": { - "ismaster": { - "$$exists": true - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "isMaster", - "command": { - "isMaster": 1 - } - } - }, - { - "commandSucceededEvent": { - "commandName": "isMaster", - "reply": { - "ismaster": { - "$$exists": true - } - } - } - } - ] - }, - { - "client": "client2", - "events": [ - { - "commandStartedEvent": { - "commandName": "ismaster", - "command": { - "ismaster": 1 - } - } - }, - { - "commandSucceededEvent": { - "commandName": "ismaster", - "reply": { - "ismaster": { - "$$exists": true - } - } - } - }, - { - "commandStartedEvent": { - "commandName": "isMaster", - "command": { - "isMaster": 1 - } - } - }, - { - "commandSucceededEvent": { - "commandName": "isMaster", - "reply": { - "ismaster": { - "$$exists": true - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/observeSensitiveCommands.yml b/testdata/unified-test-format/valid-pass/observeSensitiveCommands.yml deleted file mode 100644 index cd4d27a165..0000000000 --- a/testdata/unified-test-format/valid-pass/observeSensitiveCommands.yml +++ /dev/null @@ -1,255 +0,0 @@ -description: "observeSensitiveCommands" - -schemaVersion: "1.5" - -runOnRequirements: - - auth: false - -createEntities: - - client: - id: &clientObserveSensitiveCommands client0 - observeEvents: - - commandStartedEvent - - commandSucceededEvent - observeSensitiveCommands: true - - client: - id: &clientDoNotObserveSensitiveCommands client1 - observeEvents: - - commandStartedEvent - - commandSucceededEvent - observeSensitiveCommands: false - - client: - id: &clientDoNotObserveSensitiveCommandsByDefault client2 - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - database: - id: &databaseObserveSensitiveCommands database0 - client: *clientObserveSensitiveCommands - databaseName: &databaseName observeSensitiveCommands - - database: - id: &databaseDoNotObserveSensitiveCommands database1 - client: *clientDoNotObserveSensitiveCommands - databaseName: *databaseName - - database: - id: &databaseDoNotObserveSensitiveCommandsByDefault database2 - client: *clientDoNotObserveSensitiveCommandsByDefault - databaseName: *databaseName - -tests: - - description: "getnonce is observed with observeSensitiveCommands=true" - runOnRequirements: - - maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007 - operations: - - name: runCommand - object: *databaseObserveSensitiveCommands - arguments: - commandName: getnonce - command: { getnonce: 1 } - expectEvents: - - client: *clientObserveSensitiveCommands - events: - - commandStartedEvent: - commandName: getnonce - command: { getnonce: { $$exists: false } } - - commandSucceededEvent: - commandName: getnonce - reply: - ok: { $$exists: false } - nonce: { $$exists: false } - - - description: "getnonce is not observed with observeSensitiveCommands=false" - runOnRequirements: - - maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007 - operations: - - name: runCommand - object: *databaseDoNotObserveSensitiveCommands - arguments: - commandName: getnonce - command: { getnonce: 1 } - expectEvents: - - client: *clientDoNotObserveSensitiveCommands - events: [] - - - description: "getnonce is not observed by default" - runOnRequirements: - - maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007 - operations: - - name: runCommand - object: *databaseDoNotObserveSensitiveCommandsByDefault - arguments: - commandName: getnonce - command: { getnonce: 1 } - expectEvents: - - client: *clientDoNotObserveSensitiveCommandsByDefault - events: [] - - - description: "hello with speculativeAuthenticate" - runOnRequirements: - - minServerVersion: "4.9" - operations: - - name: runCommand - object: *databaseObserveSensitiveCommands - arguments: &helloArgs - commandName: hello - command: - hello: 1 - speculativeAuthenticate: { saslStart: 1 } - - name: runCommand - object: *databaseDoNotObserveSensitiveCommands - arguments: *helloArgs - - name: runCommand - object: *databaseDoNotObserveSensitiveCommandsByDefault - arguments: *helloArgs - expectEvents: - - client: *clientObserveSensitiveCommands - events: - - commandStartedEvent: - commandName: hello - command: - # Assert that all fields in command are redacted - hello: { $$exists: false } - speculativeAuthenticate: { $$exists: false } - - commandSucceededEvent: - commandName: hello - reply: - # Assert that all fields in reply are redacted - isWritablePrimary: { $$exists: false } - speculativeAuthenticate: { $$exists: false } - - client: *clientDoNotObserveSensitiveCommands - events: [] - - client: *clientDoNotObserveSensitiveCommandsByDefault - events: [] - - - description: "hello without speculativeAuthenticate is always observed" - runOnRequirements: - - minServerVersion: "4.9" - operations: - - name: runCommand - object: *databaseObserveSensitiveCommands - arguments: &helloArgs - commandName: hello - command: { hello: 1 } - - name: runCommand - object: *databaseDoNotObserveSensitiveCommands - arguments: *helloArgs - - name: runCommand - object: *databaseDoNotObserveSensitiveCommandsByDefault - arguments: *helloArgs - expectEvents: - - client: *clientObserveSensitiveCommands - events: &helloEvents - - commandStartedEvent: - commandName: hello - command: { hello: 1 } - - commandSucceededEvent: - commandName: hello - reply: { isWritablePrimary: { $$exists: true } } - - client: *clientDoNotObserveSensitiveCommands - events: *helloEvents - - client: *clientDoNotObserveSensitiveCommandsByDefault - events: *helloEvents - - - description: "legacy hello with speculativeAuthenticate" - operations: - - name: runCommand - object: *databaseObserveSensitiveCommands - arguments: &ismasterArgs - commandName: ismaster - command: - ismaster: 1 - speculativeAuthenticate: { saslStart: 1 } - - name: runCommand - object: *databaseObserveSensitiveCommands - arguments: &isMasterArgs - commandName: isMaster - command: - isMaster: 1 - speculativeAuthenticate: { saslStart: 1 } - - name: runCommand - object: *databaseDoNotObserveSensitiveCommands - arguments: *ismasterArgs - - name: runCommand - object: *databaseDoNotObserveSensitiveCommands - arguments: *isMasterArgs - - name: runCommand - object: *databaseDoNotObserveSensitiveCommandsByDefault - arguments: *ismasterArgs - - name: runCommand - object: *databaseDoNotObserveSensitiveCommandsByDefault - arguments: *isMasterArgs - expectEvents: - - client: *clientObserveSensitiveCommands - events: - - commandStartedEvent: - commandName: ismaster - command: - # Assert that all fields in command are redacted - ismaster: { $$exists: false } - speculativeAuthenticate: { $$exists: false } - - commandSucceededEvent: - commandName: ismaster - reply: - # Assert that all fields in reply are redacted - ismaster: { $$exists: false } - speculativeAuthenticate: { $$exists: false } - - commandStartedEvent: - commandName: isMaster - command: - # Assert that all fields in command are redacted - isMaster: { $$exists: false } - speculativeAuthenticate: { $$exists: false } - - commandSucceededEvent: - commandName: isMaster - reply: - # Assert that all fields in reply are redacted - ismaster: { $$exists: false } - speculativeAuthenticate: { $$exists: false } - - client: *clientDoNotObserveSensitiveCommands - events: [] - - client: *clientDoNotObserveSensitiveCommandsByDefault - events: [] - - - description: "legacy hello without speculativeAuthenticate is always observed" - operations: - - name: runCommand - object: *databaseObserveSensitiveCommands - arguments: &ismasterArgs - commandName: ismaster - command: { ismaster: 1 } - - name: runCommand - object: *databaseObserveSensitiveCommands - arguments: &isMasterArgs - commandName: isMaster - command: { isMaster: 1 } - - name: runCommand - object: *databaseDoNotObserveSensitiveCommands - arguments: *ismasterArgs - - name: runCommand - object: *databaseDoNotObserveSensitiveCommands - arguments: *isMasterArgs - - name: runCommand - object: *databaseDoNotObserveSensitiveCommandsByDefault - arguments: *ismasterArgs - - name: runCommand - object: *databaseDoNotObserveSensitiveCommandsByDefault - arguments: *isMasterArgs - expectEvents: - - client: *clientObserveSensitiveCommands - events: &ismasterAndisMasterEvents - - commandStartedEvent: - commandName: ismaster - command: { ismaster: 1 } - - commandSucceededEvent: - commandName: ismaster - reply: { ismaster: { $$exists: true } } - - commandStartedEvent: - commandName: isMaster - command: { isMaster: 1 } - - commandSucceededEvent: - commandName: isMaster - reply: { ismaster: { $$exists: true } } - - client: *clientDoNotObserveSensitiveCommands - events: *ismasterAndisMasterEvents - - client: *clientDoNotObserveSensitiveCommandsByDefault - events: *ismasterAndisMasterEvents diff --git a/testdata/unified-test-format/valid-pass/poc-change-streams.json b/testdata/unified-test-format/valid-pass/poc-change-streams.json deleted file mode 100644 index 50f0d06f08..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-change-streams.json +++ /dev/null @@ -1,455 +0,0 @@ -{ - "description": "poc-change-streams", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ], - "ignoreCommandMonitoringEvents": [ - "getMore", - "killCursors" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "change-stream-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "client": { - "id": "client1", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database1", - "client": "client1", - "databaseName": "change-stream-tests" - } - }, - { - "database": { - "id": "database2", - "client": "client1", - "databaseName": "change-stream-tests-2" - } - }, - { - "collection": { - "id": "collection1", - "database": "database1", - "collectionName": "test" - } - }, - { - "collection": { - "id": "collection2", - "database": "database1", - "collectionName": "test2" - } - }, - { - "collection": { - "id": "collection3", - "database": "database2", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "change-stream-tests", - "documents": [] - }, - { - "collectionName": "test2", - "databaseName": "change-stream-tests", - "documents": [] - }, - { - "collectionName": "test", - "databaseName": "change-stream-tests-2", - "documents": [] - } - ], - "tests": [ - { - "description": "saveResultAsEntity is optional for createChangeStream", - "runOnRequirements": [ - { - "minServerVersion": "3.8.0", - "topologies": [ - "replicaset" - ] - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "client0", - "arguments": { - "pipeline": [] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": 1 - }, - "commandName": "aggregate", - "databaseName": "admin" - } - } - ] - } - ] - }, - { - "description": "Executing a watch helper on a MongoClient results in notifications for changes to all collections in all databases in the cluster.", - "runOnRequirements": [ - { - "minServerVersion": "3.8.0", - "topologies": [ - "replicaset" - ] - } - ], - "operations": [ - { - "name": "createChangeStream", - "object": "client0", - "arguments": { - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection2", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "insertOne", - "object": "collection3", - "arguments": { - "document": { - "y": 1 - } - } - }, - { - "name": "insertOne", - "object": "collection1", - "arguments": { - "document": { - "z": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "change-stream-tests", - "coll": "test2" - }, - "fullDocument": { - "_id": { - "$$type": "objectId" - }, - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "change-stream-tests-2", - "coll": "test" - }, - "fullDocument": { - "_id": { - "$$type": "objectId" - }, - "y": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "change-stream-tests", - "coll": "test" - }, - "fullDocument": { - "_id": { - "$$type": "objectId" - }, - "z": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": 1, - "cursor": {}, - "pipeline": [ - { - "$changeStream": { - "allChangesForCluster": true, - "fullDocument": { - "$$unsetOrMatches": "default" - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "admin" - } - } - ] - } - ] - }, - { - "description": "Test consecutive resume", - "runOnRequirements": [ - { - "minServerVersion": "4.1.7", - "topologies": [ - "replicaset" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "getMore" - ], - "closeConnection": true - } - } - } - }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "batchSize": 1, - "pipeline": [] - }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "insertOne", - "object": "collection1", - "arguments": { - "document": { - "x": 1 - } - } - }, - { - "name": "insertOne", - "object": "collection1", - "arguments": { - "document": { - "x": 2 - } - } - }, - { - "name": "insertOne", - "object": "collection1", - "arguments": { - "document": { - "x": 3 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "change-stream-tests", - "coll": "test" - }, - "fullDocument": { - "_id": { - "$$type": "objectId" - }, - "x": 1 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "change-stream-tests", - "coll": "test" - }, - "fullDocument": { - "_id": { - "$$type": "objectId" - }, - "x": 2 - } - } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "insert", - "ns": { - "db": "change-stream-tests", - "coll": "test" - }, - "fullDocument": { - "_id": { - "$$type": "objectId" - }, - "x": 3 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "cursor": { - "batchSize": 1 - }, - "pipeline": [ - { - "$changeStream": { - "fullDocument": { - "$$unsetOrMatches": "default" - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "change-stream-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "cursor": { - "batchSize": 1 - }, - "pipeline": [ - { - "$changeStream": { - "fullDocument": { - "$$unsetOrMatches": "default" - }, - "resumeAfter": { - "$$exists": true - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "change-stream-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "cursor": { - "batchSize": 1 - }, - "pipeline": [ - { - "$changeStream": { - "fullDocument": { - "$$unsetOrMatches": "default" - }, - "resumeAfter": { - "$$exists": true - } - } - } - ] - }, - "commandName": "aggregate", - "databaseName": "change-stream-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/poc-change-streams.yml b/testdata/unified-test-format/valid-pass/poc-change-streams.yml deleted file mode 100644 index a7daafceb7..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-change-streams.yml +++ /dev/null @@ -1,241 +0,0 @@ -description: "poc-change-streams" - -schemaVersion: "1.4" - -runOnRequirements: - - serverless: forbid - -createEntities: - # Entities for creating changeStreams - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: [ commandStartedEvent ] - # Original tests do not observe getMore commands but only because event - # assertions ignore extra events. killCursors is explicitly ignored. - ignoreCommandMonitoringEvents: [ getMore, killCursors ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name change-stream-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - # Entities for executing insert operations - - client: - id: &client1 client1 - useMultipleMongoses: false - - database: - id: &database1 database1 - client: *client1 - databaseName: &database1Name change-stream-tests - - database: - id: &database2 database2 - client: *client1 - databaseName: &database2Name change-stream-tests-2 - - collection: - id: &collection1 collection1 - database: *database1 - collectionName: &collection1Name test - - collection: - id: &collection2 collection2 - database: *database1 - collectionName: &collection2Name test2 - - collection: - id: &collection3 collection3 - database: *database2 - collectionName: &collection3Name test - -initialData: - - collectionName: *collection1Name - databaseName: *database1Name - documents: [] - - collectionName: *collection2Name - databaseName: *database1Name - documents: [] - - collectionName: *collection3Name - databaseName: *database2Name - documents: [] - -tests: - - description: "saveResultAsEntity is optional for createChangeStream" - runOnRequirements: - - minServerVersion: "3.8.0" - topologies: [ replicaset ] - operations: - - name: createChangeStream - object: *client0 - arguments: - pipeline: [] - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: 1 - commandName: aggregate - databaseName: admin - - - description: "Executing a watch helper on a MongoClient results in notifications for changes to all collections in all databases in the cluster." - runOnRequirements: - - minServerVersion: "3.8.0" - topologies: [ replicaset ] - operations: - - name: createChangeStream - object: *client0 - arguments: - pipeline: [] - saveResultAsEntity: &changeStream0 changeStream0 - - name: insertOne - object: *collection2 - arguments: - document: { x: 1 } - - name: insertOne - object: *collection3 - arguments: - document: { y: 1 } - - name: insertOne - object: *collection1 - arguments: - document: { z: 1 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database1Name - coll: *collection2Name - fullDocument: - _id: { $$type: objectId } - x: 1 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database2Name - coll: *collection3Name - fullDocument: - # Original tests did not include _id, but matching now only permits - # extra keys for root-level documents. - _id: { $$type: objectId } - y: 1 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database1Name - coll: *collection1Name - fullDocument: - _id: { $$type: objectId } - z: 1 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: 1 - cursor: {} - pipeline: - - $changeStream: - allChangesForCluster: true - # Some drivers may send a default value for fullDocument - # or omit it entirely (see: SPEC-1350). - fullDocument: { $$unsetOrMatches: default } - commandName: aggregate - databaseName: admin - - - description: "Test consecutive resume" - runOnRequirements: - - minServerVersion: "4.1.7" - topologies: [ replicaset ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: [ getMore ] - closeConnection: true - - name: createChangeStream - object: *collection0 - arguments: - batchSize: 1 - pipeline: [] - saveResultAsEntity: *changeStream0 - - name: insertOne - object: *collection1 - arguments: - document: { x: 1 } - - name: insertOne - object: *collection1 - arguments: - document: { x: 2 } - - name: insertOne - object: *collection1 - arguments: - document: { x: 3 } - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database1Name - coll: *collection1Name - fullDocument: - _id: { $$type: objectId } - x: 1 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database1Name - coll: *collection1Name - fullDocument: - _id: { $$type: objectId } - x: 2 - - name: iterateUntilDocumentOrError - object: *changeStream0 - expectResult: - operationType: insert - ns: - db: *database1Name - coll: *collection1Name - fullDocument: - _id: { $$type: objectId } - x: 3 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection1Name - cursor: { batchSize: 1 } - pipeline: - - $changeStream: - fullDocument: { $$unsetOrMatches: default } - commandName: aggregate - databaseName: *database1Name - # The original test only asserted the first command, since expected - # events were only an ordered subset. This file does ignore getMore - # commands but we must expect the subsequent aggregate commands, since - # each failed getMore will resume. While doing so we can also assert - # that those commands include a resume token. - - &resumingAggregate - commandStartedEvent: - command: - aggregate: *collection1Name - cursor: { batchSize: 1 } - pipeline: - - $changeStream: - fullDocument: { $$unsetOrMatches: default } - resumeAfter: { $$exists: true } - commandName: aggregate - databaseName: *database0Name - - *resumingAggregate diff --git a/testdata/unified-test-format/valid-pass/poc-command-monitoring.json b/testdata/unified-test-format/valid-pass/poc-command-monitoring.json deleted file mode 100644 index fe0a5ae991..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-command-monitoring.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "description": "poc-command-monitoring", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent", - "commandSucceededEvent", - "commandFailedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "command-monitoring-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "command-monitoring-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "tests": [ - { - "description": "A successful find event with a getmore and the server kills the cursor (<= 4.4)", - "runOnRequirements": [ - { - "minServerVersion": "3.1", - "maxServerVersion": "4.4.99", - "topologies": [ - "single", - "replicaset" - ] - } - ], - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": { - "$gte": 1 - } - }, - "sort": { - "_id": 1 - }, - "batchSize": 3, - "limit": 4 - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": { - "$gte": 1 - } - }, - "sort": { - "_id": 1 - }, - "batchSize": 3, - "limit": 4 - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "cursor": { - "id": { - "$$type": [ - "int", - "long" - ] - }, - "ns": "command-monitoring-tests.test", - "firstBatch": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - }, - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "collection": "test", - "batchSize": 1 - }, - "commandName": "getMore", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandSucceededEvent": { - "reply": { - "ok": 1, - "cursor": { - "id": 0, - "ns": "command-monitoring-tests.test", - "nextBatch": [ - { - "_id": 4, - "x": 44 - } - ] - } - }, - "commandName": "getMore" - } - } - ] - } - ] - }, - { - "description": "A failed find event", - "operations": [ - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "$or": true - } - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "$or": true - } - }, - "commandName": "find", - "databaseName": "command-monitoring-tests" - } - }, - { - "commandFailedEvent": { - "commandName": "find" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/poc-command-monitoring.yml b/testdata/unified-test-format/valid-pass/poc-command-monitoring.yml deleted file mode 100644 index 6d5e437349..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-command-monitoring.yml +++ /dev/null @@ -1,102 +0,0 @@ -description: "poc-command-monitoring" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - observeEvents: - - commandStartedEvent - - commandSucceededEvent - - commandFailedEvent - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name command-monitoring-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - -tests: - - description: "A successful find event with a getmore and the server kills the cursor (<= 4.4)" - runOnRequirements: - - minServerVersion: "3.1" - maxServerVersion: "4.4.99" - topologies: [ single, replicaset ] - operations: - - name: find - object: *collection0 - arguments: - filter: { _id: { $gte: 1 }} - sort: { _id: 1 } - batchSize: 3 - limit: 4 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: { _id: { $gte : 1 } } - sort: { _id: 1 } - batchSize: 3 - limit: 4 - commandName: find - databaseName: *database0Name - - commandSucceededEvent: - reply: - ok: 1 - cursor: - id: { $$type: [ int, long ] } - ns: &namespace command-monitoring-tests.test - firstBatch: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - commandName: find - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - collection: *collection0Name - batchSize: 1 - commandName: getMore - databaseName: *database0Name - - commandSucceededEvent: - reply: - ok: 1 - cursor: - id: 0 - ns: *namespace - nextBatch: - - { _id: 4, x: 44 } - commandName: getMore - - - description: "A failed find event" - operations: - - name: find - object: *collection0 - arguments: - filter: { $or: true } - expectError: { isError: true } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - find: *collection0Name - filter: { $or: true } - commandName: find - databaseName: *database0Name - - commandFailedEvent: - commandName: find diff --git a/testdata/unified-test-format/valid-pass/poc-crud.json b/testdata/unified-test-format/valid-pass/poc-crud.json deleted file mode 100644 index 94e4ec5682..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-crud.json +++ /dev/null @@ -1,450 +0,0 @@ -{ - "description": "poc-crud", - "schemaVersion": "1.4", - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "crud-tests" - } - }, - { - "database": { - "id": "database1", - "client": "client0", - "databaseName": "admin" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll0" - } - }, - { - "collection": { - "id": "collection1", - "database": "database0", - "collectionName": "coll1" - } - }, - { - "collection": { - "id": "collection2", - "database": "database0", - "collectionName": "coll2", - "collectionOptions": { - "readConcern": { - "level": "majority" - } - } - } - } - ], - "initialData": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - }, - { - "collectionName": "coll1", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - }, - { - "collectionName": "coll2", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - }, - { - "collectionName": "aggregate_out", - "databaseName": "crud-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "BulkWrite with mixed ordered operations", - "operations": [ - { - "name": "bulkWrite", - "object": "collection0", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 3, - "x": 33 - } - } - }, - { - "updateOne": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "updateMany": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "insertOne": { - "document": { - "_id": 4, - "x": 44 - } - } - }, - { - "deleteMany": { - "filter": { - "x": { - "$nin": [ - 24, - 34 - ] - } - } - } - }, - { - "replaceOne": { - "filter": { - "_id": 4 - }, - "replacement": { - "_id": 4, - "x": 44 - }, - "upsert": true - } - } - ], - "ordered": true - }, - "expectResult": { - "deletedCount": 2, - "insertedCount": 2, - "insertedIds": { - "$$unsetOrMatches": { - "0": 3, - "3": 4 - } - }, - "matchedCount": 3, - "modifiedCount": 3, - "upsertedCount": 1, - "upsertedIds": { - "5": 4 - } - } - } - ], - "outcome": [ - { - "collectionName": "coll0", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 2, - "x": 24 - }, - { - "_id": 3, - "x": 34 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "InsertMany continue-on-error behavior with unordered (duplicate key in requests)", - "operations": [ - { - "name": "insertMany", - "object": "collection1", - "arguments": { - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ], - "ordered": false - }, - "expectError": { - "expectResult": { - "$$unsetOrMatches": { - "deletedCount": 0, - "insertedCount": 2, - "matchedCount": 0, - "modifiedCount": 0, - "upsertedCount": 0, - "upsertedIds": {} - } - } - } - } - ], - "outcome": [ - { - "collectionName": "coll1", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "ReplaceOne prohibits atomic modifiers", - "operations": [ - { - "name": "replaceOne", - "object": "collection1", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "$set": { - "x": 22 - } - } - }, - "expectError": { - "isClientError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [] - } - ], - "outcome": [ - { - "collectionName": "coll1", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 1, - "x": 11 - } - ] - } - ] - }, - { - "description": "readConcern majority with out stage", - "runOnRequirements": [ - { - "minServerVersion": "4.1.0", - "topologies": [ - "replicaset", - "sharded" - ], - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "aggregate", - "object": "collection2", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "aggregate_out" - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll2", - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$out": "aggregate_out" - } - ], - "readConcern": { - "level": "majority" - } - }, - "commandName": "aggregate", - "databaseName": "crud-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "aggregate_out", - "databaseName": "crud-tests", - "documents": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - }, - { - "description": "Aggregate with $listLocalSessions", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0", - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "aggregate", - "object": "database1", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - }, - { - "$addFields": { - "dummy": "dummy field" - } - }, - { - "$project": { - "_id": 0, - "dummy": 1 - } - } - ] - }, - "expectResult": [ - { - "dummy": "dummy field" - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/poc-crud.yml b/testdata/unified-test-format/valid-pass/poc-crud.yml deleted file mode 100644 index 5748c0779f..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-crud.yml +++ /dev/null @@ -1,190 +0,0 @@ -description: "poc-crud" - -schemaVersion: "1.4" - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name crud-tests - - database: - id: &database1 database1 - client: *client0 - databaseName: &database1Name admin - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name coll0 - - collection: - id: &collection1 collection1 - database: *database0 - collectionName: &collection1Name coll1 - - collection: - id: &collection2 collection2 - database: *database0 - collectionName: &collection2Name coll2 - collectionOptions: - readConcern: { level: majority } - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - collectionName: *collection1Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - collectionName: *collection2Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - collectionName: &out aggregate_out - databaseName: *database0Name - documents: [] - -tests: - - description: "BulkWrite with mixed ordered operations" - operations: - - name: bulkWrite - object: *collection0 - arguments: - requests: - - insertOne: - document: { _id: 3, x: 33 } - - updateOne: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - - updateMany: - filter: { _id: { $gt: 1 } } - update: { $inc: { x: 1 } } - - insertOne: - document: { _id: 4, x: 44 } - - deleteMany: - filter: { x: { $nin: [ 24, 34 ] } } - - replaceOne: - filter: { _id: 4 } - replacement: { _id: 4, x: 44 } - upsert: true - ordered: true - expectResult: - deletedCount: 2 - insertedCount: 2 - insertedIds: { $$unsetOrMatches: { 0: 3, 3: 4 } } - matchedCount: 3 - modifiedCount: 3 - upsertedCount: 1 - upsertedIds: { 5: 4 } - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - {_id: 2, x: 24 } - - {_id: 3, x: 34 } - - {_id: 4, x: 44 } - - - description: "InsertMany continue-on-error behavior with unordered (duplicate key in requests)" - operations: - - name: insertMany - object: *collection1 - arguments: - documents: - - { _id: 2, x: 22 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - ordered: false - expectError: - expectResult: - # insertMany throws BulkWriteException, which may optionally include - # an intermediary BulkWriteResult - $$unsetOrMatches: - deletedCount: 0 - insertedCount: 2 - # Since the map of insertedIds is generated before execution it - # could indicate inserts that did not actually succeed. We omit - # this field rather than expect drivers to provide an accurate - # map filtered by write errors. - matchedCount: 0 - modifiedCount: 0 - upsertedCount: 0 - upsertedIds: { } - outcome: - - collectionName: *collection1Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "ReplaceOne prohibits atomic modifiers" - operations: - - name: replaceOne - object: *collection1 - arguments: - filter: { _id: 1 } - replacement: { $set: { x: 22 }} - expectError: - isClientError: true - expectEvents: - - client: *client0 - events: [] - outcome: - - collectionName: *collection1Name - databaseName: *database0Name - documents: - - { _id: 1, x: 11 } - - - description: "readConcern majority with out stage" - runOnRequirements: - - minServerVersion: "4.1.0" - topologies: [ replicaset, sharded ] - serverless: "forbid" - operations: - - name: aggregate - object: *collection2 - arguments: - pipeline: &pipeline - - $sort: { x : 1 } - - $match: { _id: { $gt: 1 } } - - $out: *out - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collection2Name - pipeline: *pipeline - readConcern: { level: majority } - # The following two assertions were not in the original test - commandName: aggregate - databaseName: *database0Name - outcome: - - collectionName: *out - databaseName: *database0Name - documents: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - - description: "Aggregate with $listLocalSessions" - runOnRequirements: - - minServerVersion: "3.6.0" - # serverless does not support either of the current database-level aggregation stages ($listLocalSessions and - # $currentOp) - serverless: forbid - operations: - - name: aggregate - object: *database1 - arguments: - pipeline: - - $listLocalSessions: { } - - $limit: 1 - - $addFields: { dummy: "dummy field"} - - $project: { _id: 0, dummy: 1} - expectResult: - - { dummy: "dummy field" } diff --git a/testdata/unified-test-format/valid-pass/poc-gridfs.json b/testdata/unified-test-format/valid-pass/poc-gridfs.json deleted file mode 100644 index 1f07a19bf6..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-gridfs.json +++ /dev/null @@ -1,301 +0,0 @@ -{ - "description": "poc-gridfs", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "gridfs-tests" - } - }, - { - "bucket": { - "id": "bucket0", - "database": "database0" - } - }, - { - "collection": { - "id": "bucket0_files_collection", - "database": "database0", - "collectionName": "fs.files" - } - }, - { - "collection": { - "id": "bucket0_chunks_collection", - "database": "database0", - "collectionName": "fs.chunks" - } - } - ], - "initialData": [ - { - "collectionName": "fs.files", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000005" - }, - "length": 10, - "chunkSize": 4, - "uploadDate": { - "$date": "1970-01-01T00:00:00.000Z" - }, - "md5": "57d83cd477bfb1ccd975ab33d827a92b", - "filename": "length-10", - "contentType": "application/octet-stream", - "aliases": [], - "metadata": {} - } - ] - }, - { - "collectionName": "fs.chunks", - "databaseName": "gridfs-tests", - "documents": [ - { - "_id": { - "$oid": "000000000000000000000005" - }, - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000006" - }, - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 1, - "data": { - "$binary": { - "base64": "VWZ3iA==", - "subType": "00" - } - } - }, - { - "_id": { - "$oid": "000000000000000000000007" - }, - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 2, - "data": { - "$binary": { - "base64": "mao=", - "subType": "00" - } - } - } - ] - } - ], - "tests": [ - { - "description": "Delete when length is 10", - "operations": [ - { - "name": "delete", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - } - } - } - ], - "outcome": [ - { - "collectionName": "fs.files", - "databaseName": "gridfs-tests", - "documents": [] - }, - { - "collectionName": "fs.chunks", - "databaseName": "gridfs-tests", - "documents": [] - } - ] - }, - { - "description": "Download when there are three chunks", - "operations": [ - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - } - }, - "expectResult": { - "$$matchesHexBytes": "112233445566778899aa" - } - } - ] - }, - { - "description": "Download when files entry does not exist", - "operations": [ - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000000" - } - }, - "expectError": { - "isError": true - } - } - ] - }, - { - "description": "Download when an intermediate chunk is missing", - "operations": [ - { - "name": "deleteOne", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": { - "files_id": { - "$oid": "000000000000000000000005" - }, - "n": 1 - } - }, - "expectResult": { - "deletedCount": 1 - } - }, - { - "name": "download", - "object": "bucket0", - "arguments": { - "id": { - "$oid": "000000000000000000000005" - } - }, - "expectError": { - "isError": true - } - } - ] - }, - { - "description": "Upload when length is 5", - "operations": [ - { - "name": "upload", - "object": "bucket0", - "arguments": { - "filename": "filename", - "source": { - "$$hexBytes": "1122334455" - }, - "chunkSizeBytes": 4 - }, - "expectResult": { - "$$type": "objectId" - }, - "saveResultAsEntity": "oid0" - }, - { - "name": "find", - "object": "bucket0_files_collection", - "arguments": { - "filter": {}, - "sort": { - "uploadDate": -1 - }, - "limit": 1 - }, - "expectResult": [ - { - "_id": { - "$$matchesEntity": "oid0" - }, - "length": 5, - "chunkSize": 4, - "uploadDate": { - "$$type": "date" - }, - "md5": { - "$$unsetOrMatches": "283d4fea5dded59cf837d3047328f5af" - }, - "filename": "filename" - } - ] - }, - { - "name": "find", - "object": "bucket0_chunks_collection", - "arguments": { - "filter": { - "_id": { - "$gt": { - "$oid": "000000000000000000000007" - } - } - }, - "sort": { - "n": 1 - } - }, - "expectResult": [ - { - "_id": { - "$$type": "objectId" - }, - "files_id": { - "$$matchesEntity": "oid0" - }, - "n": 0, - "data": { - "$binary": { - "base64": "ESIzRA==", - "subType": "00" - } - } - }, - { - "_id": { - "$$type": "objectId" - }, - "files_id": { - "$$matchesEntity": "oid0" - }, - "n": 1, - "data": { - "$binary": { - "base64": "VQ==", - "subType": "00" - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/poc-gridfs.yml b/testdata/unified-test-format/valid-pass/poc-gridfs.yml deleted file mode 100644 index 9f60537420..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-gridfs.yml +++ /dev/null @@ -1,155 +0,0 @@ -description: "poc-gridfs" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name gridfs-tests - - bucket: - id: &bucket0 bucket0 - database: *database0 - - collection: - id: &bucket0_files_collection bucket0_files_collection - database: *database0 - collectionName: &bucket0_files_collectionName fs.files - - collection: - id: &bucket0_chunks_collection bucket0_chunks_collection - database: *database0 - collectionName: &bucket0_chunks_collectionName fs.chunks - -initialData: - - collectionName: *bucket0_files_collectionName - databaseName: *database0Name - documents: - - _id: { $oid: "000000000000000000000005" } - length: 10 - chunkSize: 4 - uploadDate: { $date: "1970-01-01T00:00:00.000Z" } - md5: "57d83cd477bfb1ccd975ab33d827a92b" - filename: "length-10" - contentType: "application/octet-stream" - aliases: [] - metadata: {} - - collectionName: *bucket0_chunks_collectionName - databaseName: *database0Name - documents: - - _id: { $oid: "000000000000000000000005" } - files_id: { $oid: "000000000000000000000005" } - n: 0 - data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex: 11223344 - - _id: { $oid: "000000000000000000000006" } - files_id: { $oid: "000000000000000000000005" } - n: 1 - data: { $binary: { base64: "VWZ3iA==", subType: "00" } } # hex: 55667788 - - _id: { $oid: "000000000000000000000007" } - files_id: { $oid: "000000000000000000000005" } - n: 2 - data: { $binary: { base64: "mao=", subType: "00" } } # hex: 99aa - -tests: - # Changed from original test ("length is 8") to operate on same initialData - - description: "Delete when length is 10" - operations: - - name: delete - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000005" } - # Original test uses "assert.data" syntax to modify outcome collection for - # comparison. This can be accomplished using "outcome" directly. - outcome: - - collectionName: *bucket0_files_collectionName - databaseName: *database0Name - documents: [] - - collectionName: *bucket0_chunks_collectionName - databaseName: *database0Name - documents: [] - - - description: "Download when there are three chunks" - operations: - # Original test uses "download" operation. We use an explicit operation - # that returns a stream and then assert the contents of that stream. - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000005" } - expectResult: { $$matchesHexBytes: "112233445566778899aa" } - - - description: "Download when files entry does not exist" - operations: - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000000" } - # Original test expects "FileNotFound" error, which isn't specified - expectError: { isError: true } - - - description: "Download when an intermediate chunk is missing" - operations: - # Original test uses "arrange" syntax to modify initialData. This can be - # accomplished as a delete operation on the chunks collection. - - name: deleteOne - object: *bucket0_chunks_collection - arguments: - filter: - files_id: { $oid: "000000000000000000000005" } - n: 1 - expectResult: - deletedCount: 1 - - name: download - object: *bucket0 - arguments: - id: { $oid: "000000000000000000000005" } - # Original test expects "ChunkIsMissing" error, which isn't specified - expectError: { isError: true } - - - description: "Upload when length is 5" - operations: - # Original test uses "upload" operation. We use an explicit operation - # that takes a stream, which has been created from the expected hex bytes. - - name: upload - object: *bucket0 - arguments: - filename: filename - source: { $$hexBytes: "1122334455" } - chunkSizeBytes: 4 - # Original test references the result directly in "assert.data". Here, - # we need to save the result as an entity, which we can later reference. - expectResult: { $$type: objectId } - saveResultAsEntity: &oid0 oid0 - # "outcome" does not allow operators, but we can perform the assertions - # with separate find operations. - - name: find - object: *bucket0_files_collection - arguments: - filter: {} - sort: { uploadDate: -1 } - limit: 1 - expectResult: - - _id: { $$matchesEntity: *oid0 } - length: 5 - chunkSize: 4 - uploadDate: { $$type: date } - # The md5 field is deprecated so some drivers do not calculate it when uploading files. - md5: { $$unsetOrMatches: "283d4fea5dded59cf837d3047328f5af" } - filename: filename - - name: find - object: *bucket0_chunks_collection - arguments: - # We cannot use the saved ObjectId when querying, but filtering by a - # non-zero timestamp will exclude initialData and sort can return the - # expected chunks in order. - filter: { _id: { $gt: { $oid: "000000000000000000000007" } } } - sort: { n: 1 } - expectResult: - - _id: { $$type: objectId } - files_id: { $$matchesEntity: *oid0 } - n: 0 - data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex 11223344 - - _id: { $$type: objectId } - files_id: { $$matchesEntity: *oid0 } - n: 1 - data: { $binary: { base64: "VQ==", subType: "00" } } # hex 55 diff --git a/testdata/unified-test-format/valid-pass/poc-retryable-reads.json b/testdata/unified-test-format/valid-pass/poc-retryable-reads.json deleted file mode 100644 index 2b65d501a7..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-retryable-reads.json +++ /dev/null @@ -1,433 +0,0 @@ -{ - "description": "poc-retryable-reads", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "single", - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topologies": [ - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "client": { - "id": "client1", - "uriOptions": { - "retryReads": false - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "retryable-reads-tests" - } - }, - { - "database": { - "id": "database1", - "client": "client1", - "databaseName": "retryable-reads-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll" - } - }, - { - "collection": { - "id": "collection1", - "database": "database1", - "collectionName": "coll" - } - } - ], - "initialData": [ - { - "collectionName": "coll", - "databaseName": "retryable-reads-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "tests": [ - { - "description": "Aggregate succeeds after InterruptedAtShutdown", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "aggregate" - ], - "errorCode": 11600 - } - } - } - }, - { - "name": "aggregate", - "object": "collection0", - "arguments": { - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "expectResult": [ - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "databaseName": "retryable-reads-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "aggregate": "coll", - "pipeline": [ - { - "$match": { - "_id": { - "$gt": 1 - } - } - }, - { - "$sort": { - "x": 1 - } - } - ] - }, - "databaseName": "retryable-reads-tests" - } - } - ] - } - ] - }, - { - "description": "Find succeeds on second attempt", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 2 - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 2 - }, - "databaseName": "retryable-reads-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "coll", - "filter": {}, - "sort": { - "_id": 1 - }, - "limit": 2 - }, - "databaseName": "retryable-reads-tests" - } - } - ] - } - ] - }, - { - "description": "Find fails on first attempt", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - } - } - }, - { - "name": "find", - "object": "collection1", - "arguments": { - "filter": {} - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client1", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll", - "filter": {} - }, - "databaseName": "retryable-reads-tests" - } - } - ] - } - ] - }, - { - "description": "Find fails on second attempt", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "find" - ], - "closeConnection": true - } - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": {} - }, - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "coll", - "filter": {} - }, - "databaseName": "retryable-reads-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "coll", - "filter": {} - }, - "databaseName": "retryable-reads-tests" - } - } - ] - } - ] - }, - { - "description": "ListDatabases succeeds on second attempt", - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "listDatabases" - ], - "closeConnection": true - } - } - } - }, - { - "name": "listDatabases", - "object": "client0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "listDatabases": 1 - } - } - }, - { - "commandStartedEvent": { - "command": { - "listDatabases": 1 - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/poc-retryable-reads.yml b/testdata/unified-test-format/valid-pass/poc-retryable-reads.yml deleted file mode 100644 index b06b437f61..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-retryable-reads.yml +++ /dev/null @@ -1,193 +0,0 @@ -description: "poc-retryable-reads" - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "4.0" - topologies: [ single, replicaset ] - - minServerVersion: "4.1.7" - topologies: [ sharded ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: [ commandStartedEvent ] - - client: - id: &client1 client1 - uriOptions: { retryReads: false } - useMultipleMongoses: false - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &databaseName retryable-reads-tests - - database: - id: &database1 database1 - client: *client1 - databaseName: *databaseName - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collectionName coll - - collection: - id: &collection1 collection1 - database: *database1 - collectionName: *collectionName - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - {_id: 1, x: 11} - - {_id: 2, x: 22} - - {_id: 3, x: 33} - -tests: - - description: "Aggregate succeeds after InterruptedAtShutdown" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ aggregate ] - errorCode: 11600 # InterruptedAtShutdown - - name: aggregate - object: *collection0 - arguments: - pipeline: &pipeline - - $match: { _id: { $gt: 1 } } - - $sort: { x: 1 } - expectResult: - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - aggregate: *collectionName - pipeline: *pipeline - databaseName: *databaseName - - commandStartedEvent: - command: - aggregate: *collectionName - pipeline: *pipeline - databaseName: *databaseName - - - description: "Find succeeds on second attempt" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ find ] - closeConnection: true - # Find options and expected result changed to use common initialData - - name: find - object: *collection0 - arguments: - filter: {} - sort: { _id: 1 } - limit: 2 - expectResult: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - expectEvents: - - client: *client0 - events: - - &findAttempt - commandStartedEvent: - command: - find: *collectionName - filter: {} - sort: { _id: 1 } - limit: 2 - databaseName: *databaseName - - *findAttempt - - - description: "Find fails on first attempt" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ find ] - closeConnection: true - - name: find - object: *collection1 # client uses retryReads=false - arguments: - filter: {} - # Other arguments in the original test are not relevant - expectError: { isError: true } - expectEvents: - - client: *client1 - events: - - commandStartedEvent: - command: - find: *collectionName - filter: {} - databaseName: *databaseName - - - description: "Find fails on second attempt" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: [ find ] - closeConnection: true - - name: find - object: *collection0 - arguments: - filter: {} - # Other arguments in the original test are not relevant - expectError: { isError: true } - expectEvents: - - client: *client0 - events: - - &findAttempt - commandStartedEvent: - command: - find: *collectionName - filter: {} - databaseName: *databaseName - - *findAttempt - - - description: "ListDatabases succeeds on second attempt" - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ listDatabases ] - closeConnection: true - - name: listDatabases - object: *client0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: { listDatabases: 1 } - - commandStartedEvent: - command: { listDatabases: 1 } diff --git a/testdata/unified-test-format/valid-pass/poc-retryable-writes.json b/testdata/unified-test-format/valid-pass/poc-retryable-writes.json deleted file mode 100644 index f19aa3f9d8..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-retryable-writes.json +++ /dev/null @@ -1,491 +0,0 @@ -{ - "description": "poc-retryable-writes", - "schemaVersion": "1.0", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "client": { - "id": "client1", - "uriOptions": { - "retryWrites": false - }, - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "retryable-writes-tests" - } - }, - { - "database": { - "id": "database1", - "client": "client1", - "databaseName": "retryable-writes-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "coll" - } - }, - { - "collection": { - "id": "collection1", - "database": "database1", - "collectionName": "coll" - } - } - ], - "initialData": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ], - "tests": [ - { - "description": "FindOneAndUpdate is committed on first attempt", - "runOnRequirements": [ - { - "minServerVersion": "3.6", - "topologies": [ - "replicaset" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "expectResult": { - "_id": 1, - "x": 11 - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "FindOneAndUpdate is not committed on first attempt", - "runOnRequirements": [ - { - "minServerVersion": "3.6", - "topologies": [ - "replicaset" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 1 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "expectResult": { - "_id": 1, - "x": 11 - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 12 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "FindOneAndUpdate is never committed", - "runOnRequirements": [ - { - "minServerVersion": "3.6", - "topologies": [ - "replicaset" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "onPrimaryTransactionalWrite", - "mode": { - "times": 2 - }, - "data": { - "failBeforeCommitExceptionCode": 1 - } - } - } - }, - { - "name": "findOneAndUpdate", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "returnDocument": "Before" - }, - "expectError": { - "isError": true - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "InsertMany succeeds after PrimarySteppedDown", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1", - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 189, - "errorLabels": [ - "RetryableWriteError" - ] - } - } - } - }, - { - "name": "insertMany", - "object": "collection0", - "arguments": { - "documents": [ - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ], - "ordered": true - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedIds": { - "$$unsetOrMatches": { - "0": 3, - "1": 4 - } - } - } - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - } - ] - } - ] - }, - { - "description": "InsertOne fails after connection failure when retryWrites option is false", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.7", - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client1", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "name": "insertOne", - "object": "collection1", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - }, - "expectError": { - "errorLabelsOmit": [ - "RetryableWriteError" - ] - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - } - ] - } - ] - }, - { - "description": "InsertOne fails after multiple retryable writeConcernErrors", - "runOnRequirements": [ - { - "minServerVersion": "4.3.1", - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorLabels": [ - "RetryableWriteError" - ], - "writeConcernError": { - "code": 91, - "errmsg": "Replication is being shut down" - } - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 3, - "x": 33 - } - }, - "expectError": { - "errorLabelsContain": [ - "RetryableWriteError" - ] - } - } - ], - "outcome": [ - { - "collectionName": "coll", - "databaseName": "retryable-writes-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/poc-retryable-writes.yml b/testdata/unified-test-format/valid-pass/poc-retryable-writes.yml deleted file mode 100644 index c11e8b6ef7..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-retryable-writes.yml +++ /dev/null @@ -1,214 +0,0 @@ -description: "poc-retryable-writes" - -schemaVersion: "1.0" - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: [ commandStartedEvent ] - - client: - id: &client1 client1 - uriOptions: { retryWrites: false } - useMultipleMongoses: false - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &databaseName retryable-writes-tests - - database: - id: &database1 database1 - client: *client1 - databaseName: *databaseName - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collectionName coll - - collection: - id: &collection1 collection1 - database: *database1 - collectionName: *collectionName - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: - - description: "FindOneAndUpdate is committed on first attempt" - runOnRequirements: &onPrimaryTransactionalWrite_requirements - - minServerVersion: "3.6" - topologies: [ replicaset ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 } } - returnDocument: Before - expectResult: { _id: 1, x: 11 } - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - description: "FindOneAndUpdate is not committed on first attempt" - runOnRequirements: *onPrimaryTransactionalWrite_requirements - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 1 } - data: { failBeforeCommitExceptionCode: 1 } - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 } } - returnDocument: Before - expectResult: { _id: 1, x: 11 } - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 12 } - - { _id: 2, x: 22 } - - - description: "FindOneAndUpdate is never committed" - runOnRequirements: *onPrimaryTransactionalWrite_requirements - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: onPrimaryTransactionalWrite - mode: { times: 2 } - data: { failBeforeCommitExceptionCode: 1 } - - name: findOneAndUpdate - object: *collection0 - arguments: - filter: { _id: 1 } - update: { $inc: { x : 1 } } - returnDocument: Before - expectError: { isError: true } - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - - description: "InsertMany succeeds after PrimarySteppedDown" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - topologies: [ replicaset, sharded ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - errorCode: 189 # PrimarySteppedDown - errorLabels: [ RetryableWriteError ] - - name: insertMany - object: *collection0 - arguments: - documents: - # Documents are modified from original test for "initialData" - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - ordered: true - expectResult: - # InsertManyResult is optional because all of its fields are optional - $$unsetOrMatches: { insertedIds: { $$unsetOrMatches: { 0: 3, 1: 4 } } } - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - - description: "InsertOne fails after connection failure when retryWrites option is false" - runOnRequirements: # failCommand - - minServerVersion: "4.0" - topologies: [ replicaset ] - - minServerVersion: "4.1.7" - topologies: [ sharded ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client1 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - closeConnection: true - - name: insertOne - object: *collection1 - arguments: - document: { _id: 3, x: 33 } - expectError: - # If retryWrites is false, the driver should not add the - # RetryableWriteError label to the error. - errorLabelsOmit: [ RetryableWriteError ] - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - - description: "InsertOne fails after multiple retryable writeConcernErrors" - runOnRequirements: - - minServerVersion: "4.3.1" # failCommand errorLabels option - topologies: [ replicaset, sharded ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 2 } - data: - failCommands: [ insert ] - errorLabels: [ RetryableWriteError ] - writeConcernError: - code: 91 # ShutdownInProgress - errmsg: "Replication is being shut down" - - name: insertOne - object: *collection0 - arguments: - document: { _id: 3, x: 33 } - expectError: - errorLabelsContain: [ RetryableWriteError ] - outcome: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } # The write was still applied diff --git a/testdata/unified-test-format/valid-pass/poc-sessions.json b/testdata/unified-test-format/valid-pass/poc-sessions.json deleted file mode 100644 index 117c9e7d00..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-sessions.json +++ /dev/null @@ -1,466 +0,0 @@ -{ - "description": "poc-sessions", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "3.6.0" - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "session-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ], - "tests": [ - { - "description": "Server supports explicit sessions", - "operations": [ - { - "name": "assertSessionNotDirty", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 2 - } - } - } - }, - { - "name": "assertSessionNotDirty", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "endSession", - "object": "session0" - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": -1 - } - }, - "expectResult": [] - }, - { - "name": "assertSameLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session0" - } - }, - "commandName": "insert", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": -1 - }, - "lsid": { - "$$sessionLsid": "session0" - } - }, - "commandName": "find", - "databaseName": "session-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "Server supports implicit sessions", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 2 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 2 - } - } - } - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": -1 - } - }, - "expectResult": [] - }, - { - "name": "assertSameLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": { - "$$type": "object" - } - }, - "commandName": "insert", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": -1 - }, - "lsid": { - "$$type": "object" - } - }, - "commandName": "find", - "databaseName": "session-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "Dirty explicit session is discarded", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topologies": [ - "sharded" - ] - } - ], - "operations": [ - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "name": "assertSessionNotDirty", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 2 - } - } - } - }, - { - "name": "assertSessionDirty", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "assertSessionDirty", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "endSession", - "object": "session0" - }, - { - "name": "find", - "object": "collection0", - "arguments": { - "filter": { - "_id": -1 - } - }, - "expectResult": [] - }, - { - "name": "assertDifferentLsidOnLastTwoCommands", - "object": "testRunner", - "arguments": { - "client": "client0" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1 - }, - "commandName": "insert", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1 - }, - "commandName": "insert", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 3 - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 2 - }, - "commandName": "insert", - "databaseName": "session-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "filter": { - "_id": -1 - }, - "lsid": { - "$$type": "object" - } - }, - "commandName": "find", - "databaseName": "session-tests" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "session-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/poc-sessions.yml b/testdata/unified-test-format/valid-pass/poc-sessions.yml deleted file mode 100644 index ae4fb1fa92..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-sessions.yml +++ /dev/null @@ -1,213 +0,0 @@ -description: "poc-sessions" - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "3.6.0" - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: false - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name session-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - - session: - id: &session0 session0 - client: *client0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - -tests: - - description: "Server supports explicit sessions" - operations: - - name: assertSessionNotDirty - object: testRunner - arguments: - session: *session0 - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 2 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 2 } } } - - name: assertSessionNotDirty - object: testRunner - arguments: - session: *session0 - - name: endSession - object: *session0 - - &find_with_implicit_session - name: find - object: *collection0 - arguments: - filter: { _id: -1 } - expectResult: [] - - name: assertSameLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: [ { _id: 2 } ] - ordered: true - lsid: { $$sessionLsid: *session0 } - commandName: insert - databaseName: *database0Name - - commandStartedEvent: - command: - find: *collection0Name - filter: { _id: -1 } - lsid: { $$sessionLsid: *session0 } - commandName: find - databaseName: *database0Name - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - - - description: "Server supports implicit sessions" - operations: - - name: insertOne - object: *collection0 - arguments: - document: { _id: 2 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 2 } } } - - *find_with_implicit_session - - name: assertSameLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - { _id: 2 } - ordered: true - # Original test did not include any assertion, but we can use - # $$type to expect an arbitrary lsid document - lsid: { $$type: object } - commandName: insert - databaseName: *database0Name - - commandStartedEvent: - command: - find: *collection0Name - filter: { _id: -1 } - lsid: { $$type: object } - commandName: find - databaseName: *database0Name - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - - - description: "Dirty explicit session is discarded" - # Original test specified retryWrites=true, but that is now the default. - runOnRequirements: - - minServerVersion: "4.0" - topologies: [ replicaset ] - - minServerVersion: "4.1.8" - topologies: [ sharded ] - operations: - - name: failPoint - object: testRunner - arguments: - client: *client0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - closeConnection: true - - name: assertSessionNotDirty - object: testRunner - arguments: - session: *session0 - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 2 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 2 } } } - - name: assertSessionDirty - object: testRunner - arguments: - session: *session0 - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 3 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 3 } } } - - name: assertSessionDirty - object: testRunner - arguments: - session: *session0 - - name: endSession - object: *session0 - - *find_with_implicit_session - - name: assertDifferentLsidOnLastTwoCommands - object: testRunner - arguments: - client: *client0 - expectEvents: - - client: *client0 - events: - # ajv's YAML parser is unable to handle anchors on array elements, so - # we define an anchor on the commandStartedEvent object instead - - commandStartedEvent: &insert_attempt - command: - insert: *collection0Name - documents: - - { _id: 2 } - ordered: true - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - commandName: insert - databaseName: *database0Name - - commandStartedEvent: *insert_attempt - - commandStartedEvent: - command: - insert: *collection0Name - documents: - - { _id: 3 } - ordered: true - lsid: { $$sessionLsid: *session0 } - txnNumber: 2 - commandName: insert - databaseName: *database0Name - - commandStartedEvent: - command: - find: *collection0Name - filter: { _id: -1 } - lsid: { $$type: object } - commandName: find - databaseName: *database0Name - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - - { _id: 3 } diff --git a/testdata/unified-test-format/valid-pass/poc-transactions-convenient-api.json b/testdata/unified-test-format/valid-pass/poc-transactions-convenient-api.json deleted file mode 100644 index 9ab44a9c54..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-transactions-convenient-api.json +++ /dev/null @@ -1,505 +0,0 @@ -{ - "description": "poc-transactions-convenient-api", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topologies": [ - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "client": { - "id": "client1", - "uriOptions": { - "readConcernLevel": "local", - "w": 1 - }, - "useMultipleMongoses": true, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "transaction-tests" - } - }, - { - "database": { - "id": "database1", - "client": "client1", - "databaseName": "transaction-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "collection": { - "id": "collection1", - "database": "database1", - "collectionName": "test" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - }, - { - "session": { - "id": "session1", - "client": "client1" - } - }, - { - "session": { - "id": "session2", - "client": "client0", - "sessionOptions": { - "defaultTransactionOptions": { - "readConcern": { - "level": "majority" - }, - "writeConcern": { - "w": 1 - } - } - } - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "withTransaction and no transaction options set", - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "$$exists": false - }, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "autocommit": false, - "readConcern": { - "$$exists": false - }, - "startTransaction": { - "$$exists": false - }, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "withTransaction inherits transaction options from client", - "operations": [ - { - "name": "withTransaction", - "object": "session1", - "arguments": { - "callback": [ - { - "name": "insertOne", - "object": "collection1", - "arguments": { - "session": "session1", - "document": { - "_id": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client1", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session1" - }, - "txnNumber": 1, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "local" - }, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session1" - }, - "txnNumber": 1, - "autocommit": false, - "writeConcern": { - "w": 1 - }, - "readConcern": { - "$$exists": false - }, - "startTransaction": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "withTransaction inherits transaction options from defaultTransactionOptions", - "operations": [ - { - "name": "withTransaction", - "object": "session2", - "arguments": { - "callback": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session2", - "document": { - "_id": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session2" - }, - "txnNumber": 1, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "majority" - }, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session2" - }, - "txnNumber": 1, - "autocommit": false, - "writeConcern": { - "w": 1 - }, - "readConcern": { - "$$exists": false - }, - "startTransaction": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "withTransaction explicit transaction options", - "operations": [ - { - "name": "withTransaction", - "object": "session0", - "arguments": { - "callback": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - } - ], - "readConcern": { - "level": "majority" - }, - "writeConcern": { - "w": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": true, - "autocommit": false, - "readConcern": { - "level": "majority" - }, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "autocommit": false, - "writeConcern": { - "w": 1 - }, - "readConcern": { - "$$exists": false - }, - "startTransaction": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/poc-transactions-convenient-api.yml b/testdata/unified-test-format/valid-pass/poc-transactions-convenient-api.yml deleted file mode 100644 index 94fadda0aa..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-transactions-convenient-api.yml +++ /dev/null @@ -1,235 +0,0 @@ -description: "poc-transactions-convenient-api" - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "4.0" - topologies: [ replicaset ] - - minServerVersion: "4.1.8" - topologies: [ sharded ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - observeEvents: [ commandStartedEvent ] - - client: - id: &client1 client1 - uriOptions: - readConcernLevel: local - w: 1 - useMultipleMongoses: true - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &databaseName transaction-tests - - database: - id: &database1 database1 - client: *client1 - databaseName: *databaseName - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collectionName test - - collection: - id: &collection1 collection1 - database: *database1 - collectionName: *collectionName - - session: - id: &session0 session0 - client: *client0 - - session: - id: &session1 session1 - client: *client1 - - session: - id: &session2 session2 - client: *client0 - sessionOptions: - defaultTransactionOptions: - readConcern: { level: majority } - writeConcern: { w: 1 } - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: [] - -tests: - - description: "withTransaction and no transaction options set" - operations: - - name: withTransaction - object: *session0 - arguments: - callback: - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 1 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 1 } } } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: [ { _id: 1 } ] - ordered: true - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - startTransaction: true - autocommit: false - # omitted fields - readConcern: { $$exists: false } - writeConcern: { $$exists: false } - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - commitTransaction: 1 - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - autocommit: false - # omitted fields - readConcern: { $$exists: false } - startTransaction: { $$exists: false } - writeConcern: { $$exists: false } - commandName: commitTransaction - databaseName: admin - outcome: &outcome - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1 } - - - description: "withTransaction inherits transaction options from client" - operations: - - name: withTransaction - object: *session1 - arguments: - callback: - - name: insertOne - object: *collection1 - arguments: - session: *session1 - document: { _id: 1 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 1 } } } - expectEvents: - - client: *client1 - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: [ { _id: 1 } ] - ordered: true - lsid: { $$sessionLsid: *session1 } - txnNumber: 1 - startTransaction: true - autocommit: false - readConcern: { level: local } - # omitted fields - writeConcern: { $$exists: false } - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - commitTransaction: 1 - lsid: { $$sessionLsid: *session1 } - txnNumber: 1 - autocommit: false - writeConcern: { w: 1 } - # omitted fields - readConcern: { $$exists: false } - startTransaction: { $$exists: false } - commandName: commitTransaction - databaseName: admin - outcome: *outcome - - - description: "withTransaction inherits transaction options from defaultTransactionOptions" - operations: - - name: withTransaction - object: *session2 - arguments: - callback: - - name: insertOne - object: *collection0 - arguments: - session: *session2 - document: { _id: 1 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 1 } } } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: [ { _id: 1 } ] - ordered: true - lsid: { $$sessionLsid: *session2 } - txnNumber: 1 - startTransaction: true - autocommit: false - readConcern: { level: majority } - # omitted fields - writeConcern: { $$exists: false } - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - commitTransaction: 1 - lsid: { $$sessionLsid: *session2 } - txnNumber: 1 - autocommit: false - writeConcern: { w: 1 } - # omitted fields - readConcern: { $$exists: false } - startTransaction: { $$exists: false } - commandName: commitTransaction - databaseName: admin - outcome: *outcome - - - description: "withTransaction explicit transaction options" - operations: - - name: withTransaction - object: *session0 - arguments: - callback: - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 1 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 1 } } } - readConcern: { level: majority } - writeConcern: { w: 1 } - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: [ { _id: 1 } ] - ordered: true - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - startTransaction: true - autocommit: false - readConcern: { level: majority } - # omitted fields - writeConcern: { $$exists: false } - commandName: insert - databaseName: *databaseName - - commandStartedEvent: - command: - commitTransaction: 1 - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - autocommit: false - writeConcern: { w: 1 } - # omitted fields - readConcern: { $$exists: false } - startTransaction: { $$exists: false } - commandName: commitTransaction - databaseName: admin - outcome: *outcome diff --git a/testdata/unified-test-format/valid-pass/poc-transactions-mongos-pin-auto.json b/testdata/unified-test-format/valid-pass/poc-transactions-mongos-pin-auto.json deleted file mode 100644 index de08edec44..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-transactions-mongos-pin-auto.json +++ /dev/null @@ -1,409 +0,0 @@ -{ - "description": "poc-transactions-mongos-pin-auto", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.1.8", - "topologies": [ - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": true, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "transaction-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "remain pinned after non-transient Interrupted error on insertOne", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorCode": 11601 - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 4 - } - }, - "expectError": { - "errorLabelsOmit": [ - "TransientTransactionError", - "UnknownTransactionCommitResult" - ], - "errorCodeName": "Interrupted" - } - }, - { - "name": "assertSessionPinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "commitTransaction", - "object": "session0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 3 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 4 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - }, - "recoveryToken": { - "$$type": "object" - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - }, - { - "_id": 3 - } - ] - } - ] - }, - { - "description": "unpin after transient error within a transaction", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 3 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 3 - } - } - } - }, - { - "name": "targetedFailPoint", - "object": "testRunner", - "arguments": { - "session": "session0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "closeConnection": true - } - } - } - }, - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "session": "session0", - "document": { - "_id": 4 - } - }, - "expectError": { - "errorLabelsContain": [ - "TransientTransactionError" - ], - "errorLabelsOmit": [ - "UnknownTransactionCommitResult" - ] - } - }, - { - "name": "assertSessionUnpinned", - "object": "testRunner", - "arguments": { - "session": "session0" - } - }, - { - "name": "abortTransaction", - "object": "session0" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 3 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 4 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "abortTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - }, - "recoveryToken": { - "$$type": "object" - } - }, - "commandName": "abortTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/poc-transactions-mongos-pin-auto.yml b/testdata/unified-test-format/valid-pass/poc-transactions-mongos-pin-auto.yml deleted file mode 100644 index 33cd2a2521..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-transactions-mongos-pin-auto.yml +++ /dev/null @@ -1,169 +0,0 @@ -description: "poc-transactions-mongos-pin-auto" - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "4.1.8" - topologies: [ sharded ] - -createEntities: - - client: - id: &client0 client0 - useMultipleMongoses: true - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name transaction-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - - session: - id: &session0 session0 - client: *client0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - -tests: - - description: "remain pinned after non-transient Interrupted error on insertOne" - operations: - - &startTransaction - name: startTransaction - object: *session0 - - &firstInsert - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 3 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 3 } } } - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - errorCode: 11601 # Interrupted - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 4 } - expectError: - errorLabelsOmit: [ TransientTransactionError, UnknownTransactionCommitResult ] - errorCodeName: Interrupted - - name: assertSessionPinned - object: testRunner - arguments: - session: *session0 - - name: commitTransaction - object: *session0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: &firstInsertEvent - command: - insert: *collection0Name - documents: [ { _id: 3 } ] - ordered: true - readConcern: { $$exists: false } - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - startTransaction: true - autocommit: false - writeConcern: { $$exists: false } - commandName: insert - databaseName: *database0Name - - commandStartedEvent: &secondInsertEvent - command: - insert: *collection0Name - documents: [ { _id: 4 } ] - ordered: true - readConcern: { $$exists: false } - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - startTransaction: { $$exists: false } - autocommit: false - writeConcern: { $$exists: false } - commandName: insert - databaseName: *database0Name - - commandStartedEvent: - command: - commitTransaction: 1 - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - startTransaction: { $$exists: false } - autocommit: false - writeConcern: { $$exists: false } - # Original test expected any value, but we can assert an object - recoveryToken: { $$type: object } - commandName: commitTransaction - databaseName: admin - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } - - { _id: 3 } - - - description: "unpin after transient error within a transaction" - operations: - - *startTransaction - - *firstInsert - - name: targetedFailPoint - object: testRunner - arguments: - session: *session0 - failPoint: - configureFailPoint: failCommand - mode: { times: 1 } - data: - failCommands: [ insert ] - closeConnection: true - - name: insertOne - object: *collection0 - arguments: - session: *session0 - document: { _id: 4 } - expectError: - errorLabelsContain: [ TransientTransactionError ] - errorLabelsOmit: [ UnknownTransactionCommitResult ] - - name: assertSessionUnpinned - object: testRunner - arguments: - session: *session0 - - name: abortTransaction - object: *session0 - expectEvents: - - client: *client0 - events: - - commandStartedEvent: *firstInsertEvent - - commandStartedEvent: *secondInsertEvent - - commandStartedEvent: - command: - abortTransaction: 1 - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - startTransaction: { $$exists: false } - autocommit: false - writeConcern: { $$exists: false } - # Original test expected any value, but we can assert an object - recoveryToken: { $$type: object } - commandName: abortTransaction - databaseName: admin - outcome: - - collectionName: *collection0Name - databaseName: *database0Name - documents: - - { _id: 1 } - - { _id: 2 } diff --git a/testdata/unified-test-format/valid-pass/poc-transactions.json b/testdata/unified-test-format/valid-pass/poc-transactions.json deleted file mode 100644 index 2055a3b705..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-transactions.json +++ /dev/null @@ -1,323 +0,0 @@ -{ - "description": "poc-transactions", - "schemaVersion": "1.0", - "runOnRequirements": [ - { - "minServerVersion": "4.0", - "topologies": [ - "replicaset" - ] - }, - { - "minServerVersion": "4.1.8", - "topologies": [ - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "transaction-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "Client side error in command starting transaction", - "operations": [ - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "session": "session0", - "filter": { - "_id": 1 - }, - "update": { - "x": 1 - } - }, - "expectError": { - "isClientError": true - } - }, - { - "name": "assertSessionTransactionState", - "object": "testRunner", - "arguments": { - "session": "session0", - "state": "starting" - } - } - ] - }, - { - "description": "explicitly create collection using create command", - "runOnRequirements": [ - { - "minServerVersion": "4.3.4", - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "test" - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "createCollection", - "object": "database0", - "arguments": { - "session": "session0", - "collection": "test" - } - }, - { - "name": "assertCollectionNotExists", - "object": "testRunner", - "arguments": { - "databaseName": "transaction-tests", - "collectionName": "test" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertCollectionExists", - "object": "testRunner", - "arguments": { - "databaseName": "transaction-tests", - "collectionName": "test" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "drop": "test", - "writeConcern": { - "$$exists": false - } - }, - "commandName": "drop", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "create": "test", - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "create", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ] - }, - { - "description": "create index on a non-existing collection", - "runOnRequirements": [ - { - "minServerVersion": "4.3.4", - "topologies": [ - "replicaset", - "sharded" - ] - } - ], - "operations": [ - { - "name": "dropCollection", - "object": "database0", - "arguments": { - "collection": "test" - } - }, - { - "name": "startTransaction", - "object": "session0" - }, - { - "name": "createIndex", - "object": "collection0", - "arguments": { - "session": "session0", - "name": "x_1", - "keys": { - "x": 1 - } - } - }, - { - "name": "assertIndexNotExists", - "object": "testRunner", - "arguments": { - "databaseName": "transaction-tests", - "collectionName": "test", - "indexName": "x_1" - } - }, - { - "name": "commitTransaction", - "object": "session0" - }, - { - "name": "assertIndexExists", - "object": "testRunner", - "arguments": { - "databaseName": "transaction-tests", - "collectionName": "test", - "indexName": "x_1" - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "drop": "test", - "writeConcern": { - "$$exists": false - } - }, - "commandName": "drop", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "createIndexes": "test", - "indexes": [ - { - "name": "x_1", - "key": { - "x": 1 - } - } - ], - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "createIndexes", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": 1, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/unified-test-format/valid-pass/poc-transactions.yml b/testdata/unified-test-format/valid-pass/poc-transactions.yml deleted file mode 100644 index 8a12c8b39a..0000000000 --- a/testdata/unified-test-format/valid-pass/poc-transactions.yml +++ /dev/null @@ -1,171 +0,0 @@ -description: "poc-transactions" - -schemaVersion: "1.0" - -runOnRequirements: - - minServerVersion: "4.0" - topologies: [ replicaset ] - - minServerVersion: "4.1.8" - topologies: [ sharded ] - -createEntities: - - client: - id: &client0 client0 - observeEvents: [ commandStartedEvent ] - - database: - id: &database0 database0 - client: *client0 - databaseName: &database0Name transaction-tests - - collection: - id: &collection0 collection0 - database: *database0 - collectionName: &collection0Name test - - session: - id: &session0 session0 - client: *client0 - -initialData: - - collectionName: *collection0Name - databaseName: *database0Name - documents: [] - -tests: - - description: "Client side error in command starting transaction" - operations: - - name: startTransaction - object: *session0 - - name: updateOne - object: *collection0 - arguments: - session: *session0 - filter: { _id: 1 } - update: { x: 1 } - # Original test only asserted a generic error - expectError: { isClientError: true } - - name: assertSessionTransactionState - object: testRunner - arguments: - session: *session0 - state: starting - - - description: "explicitly create collection using create command" - runOnRequirements: - - minServerVersion: "4.3.4" - topologies: [ replicaset, sharded ] - operations: - - name: dropCollection - object: *database0 - arguments: - collection: *collection0Name - - name: startTransaction - object: *session0 - - name: createCollection - object: *database0 - arguments: - session: *session0 - collection: *collection0Name - - name: assertCollectionNotExists - object: testRunner - arguments: - databaseName: *database0Name - collectionName: *collection0Name - - name: commitTransaction - object: *session0 - - name: assertCollectionExists - object: testRunner - arguments: - databaseName: *database0Name - collectionName: *collection0Name - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - drop: *collection0Name - writeConcern: { $$exists: false } - commandName: drop - databaseName: *database0Name - - commandStartedEvent: - command: - create: *collection0Name - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - startTransaction: true - autocommit: false - writeConcern: { $$exists: false } - commandName: create - databaseName: *database0Name - - commandStartedEvent: - command: - commitTransaction: 1 - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - startTransaction: { $$exists: false } - autocommit: false - writeConcern: { $$exists: false } - commandName: commitTransaction - databaseName: admin - - - description: "create index on a non-existing collection" - runOnRequirements: - - minServerVersion: "4.3.4" - topologies: [ replicaset, sharded ] - operations: - - name: dropCollection - object: *database0 - arguments: - collection: *collection0Name - - name: startTransaction - object: *session0 - - name: createIndex - object: *collection0 - arguments: - session: *session0 - name: &indexName "x_1" - keys: { x: 1 } - - name: assertIndexNotExists - object: testRunner - arguments: - databaseName: *database0Name - collectionName: *collection0Name - indexName: *indexName - - name: commitTransaction - object: *session0 - - name: assertIndexExists - object: testRunner - arguments: - databaseName: *database0Name - collectionName: *collection0Name - indexName: *indexName - expectEvents: - - client: *client0 - events: - - commandStartedEvent: - command: - drop: *collection0Name - writeConcern: { $$exists: false } - commandName: drop - databaseName: *database0Name - - commandStartedEvent: - command: - createIndexes: *collection0Name - indexes: - - name: *indexName - key: { x: 1 } - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - startTransaction: true - autocommit: false - writeConcern: { $$exists: false } - commandName: createIndexes - databaseName: *database0Name - - commandStartedEvent: - command: - commitTransaction: 1 - lsid: { $$sessionLsid: *session0 } - txnNumber: 1 - startTransaction: { $$exists: false } - autocommit: false - writeConcern: { $$exists: false } - commandName: commitTransaction - databaseName: admin diff --git a/testdata/uri-options/auth-options.json b/testdata/uri-options/auth-options.json deleted file mode 100644 index fadbac35d2..0000000000 --- a/testdata/uri-options/auth-options.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "tests": [ - { - "description": "Valid auth options are parsed correctly (GSSAPI)", - "uri": "mongodb://foo:bar@example.com/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:true&authSource=$external", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "authMechanism": "GSSAPI", - "authMechanismProperties": { - "SERVICE_NAME": "other", - "CANONICALIZE_HOST_NAME": true - }, - "authSource": "$external" - } - }, - { - "description": "Valid auth options are parsed correctly (SCRAM-SHA-1)", - "uri": "mongodb://foo:bar@example.com/?authMechanism=SCRAM-SHA-1&authSource=authSourceDB", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "authMechanism": "SCRAM-SHA-1", - "authSource": "authSourceDB" - } - } - ] -} diff --git a/testdata/uri-options/auth-options.yml b/testdata/uri-options/auth-options.yml deleted file mode 100644 index cd63b0738d..0000000000 --- a/testdata/uri-options/auth-options.yml +++ /dev/null @@ -1,24 +0,0 @@ -tests: - - - description: "Valid auth options are parsed correctly (GSSAPI)" - uri: "mongodb://foo:bar@example.com/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:true&authSource=$external" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - authMechanism: "GSSAPI" - authMechanismProperties: - SERVICE_NAME: "other" - CANONICALIZE_HOST_NAME: true - authSource: "$external" - - - description: "Valid auth options are parsed correctly (SCRAM-SHA-1)" - uri: "mongodb://foo:bar@example.com/?authMechanism=SCRAM-SHA-1&authSource=authSourceDB" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - authMechanism: "SCRAM-SHA-1" - authSource: "authSourceDB" diff --git a/testdata/uri-options/ca.pem b/testdata/uri-options/ca.pem deleted file mode 100644 index b4bdaefa85..0000000000 --- a/testdata/uri-options/ca.pem +++ /dev/null @@ -1 +0,0 @@ -# This file exists solely for the purpose of facilitating drivers which check for the existence of files specified in the URI options at parse time. diff --git a/testdata/uri-options/cert.pem b/testdata/uri-options/cert.pem deleted file mode 100644 index b4bdaefa85..0000000000 --- a/testdata/uri-options/cert.pem +++ /dev/null @@ -1 +0,0 @@ -# This file exists solely for the purpose of facilitating drivers which check for the existence of files specified in the URI options at parse time. diff --git a/testdata/uri-options/client.pem b/testdata/uri-options/client.pem deleted file mode 100644 index b4bdaefa85..0000000000 --- a/testdata/uri-options/client.pem +++ /dev/null @@ -1 +0,0 @@ -# This file exists solely for the purpose of facilitating drivers which check for the existence of files specified in the URI options at parse time. diff --git a/testdata/uri-options/compression-options.json b/testdata/uri-options/compression-options.json deleted file mode 100644 index 16bd27b2cc..0000000000 --- a/testdata/uri-options/compression-options.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "tests": [ - { - "description": "Valid compression options are parsed correctly", - "uri": "mongodb://example.com/?compressors=zlib&zlibCompressionLevel=9", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "compressors": [ - "zlib" - ], - "zlibCompressionLevel": 9 - } - }, - { - "description": "Multiple compressors are parsed correctly", - "uri": "mongodb://example.com/?compressors=snappy,zlib", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "compressors": [ - "snappy", - "zlib" - ] - } - }, - { - "description": "Non-numeric zlibCompressionLevel causes a warning", - "uri": "mongodb://example.com/?compressors=zlib&zlibCompressionLevel=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Too low zlibCompressionLevel causes a warning", - "uri": "mongodb://example.com/?compressors=zlib&zlibCompressionLevel=-2", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Too high zlibCompressionLevel causes a warning", - "uri": "mongodb://example.com/?compressors=zlib&zlibCompressionLevel=10", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - } - ] -} diff --git a/testdata/uri-options/compression-options.yml b/testdata/uri-options/compression-options.yml deleted file mode 100644 index 35ec9eb92f..0000000000 --- a/testdata/uri-options/compression-options.yml +++ /dev/null @@ -1,48 +0,0 @@ -tests: - - - description: "Valid compression options are parsed correctly" - uri: "mongodb://example.com/?compressors=zlib&zlibCompressionLevel=9" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - compressors: - - "zlib" - zlibCompressionLevel: 9 - - - description: "Multiple compressors are parsed correctly" - uri: "mongodb://example.com/?compressors=snappy,zlib" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - compressors: - - "snappy" - - "zlib" - - - description: "Non-numeric zlibCompressionLevel causes a warning" - uri: "mongodb://example.com/?compressors=zlib&zlibCompressionLevel=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Too low zlibCompressionLevel causes a warning" - uri: "mongodb://example.com/?compressors=zlib&zlibCompressionLevel=-2" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Too high zlibCompressionLevel causes a warning" - uri: "mongodb://example.com/?compressors=zlib&zlibCompressionLevel=10" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - diff --git a/testdata/uri-options/concern-options.json b/testdata/uri-options/concern-options.json deleted file mode 100644 index 2b3783746c..0000000000 --- a/testdata/uri-options/concern-options.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "tests": [ - { - "description": "Valid read and write concern are parsed correctly", - "uri": "mongodb://example.com/?readConcernLevel=majority&w=5&wTimeoutMS=30000&journal=false", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "readConcernLevel": "majority", - "w": 5, - "wTimeoutMS": 30000, - "journal": false - } - }, - { - "description": "Arbitrary string readConcernLevel does not cause a warning", - "uri": "mongodb://example.com/?readConcernLevel=arbitraryButStillValid", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "readConcernLevel": "arbitraryButStillValid" - } - }, - { - "description": "Arbitrary string w doesn't cause a warning", - "uri": "mongodb://example.com/?w=arbitraryButStillValid", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "w": "arbitraryButStillValid" - } - }, - { - "description": "Too low w causes a warning", - "uri": "mongodb://example.com/?w=-2", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Non-numeric wTimeoutMS causes a warning", - "uri": "mongodb://example.com/?wTimeoutMS=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Too low wTimeoutMS causes a warning", - "uri": "mongodb://example.com/?wTimeoutMS=-2", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Invalid journal causes a warning", - "uri": "mongodb://example.com/?journal=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - } - ] -} diff --git a/testdata/uri-options/concern-options.yml b/testdata/uri-options/concern-options.yml deleted file mode 100644 index c883241739..0000000000 --- a/testdata/uri-options/concern-options.yml +++ /dev/null @@ -1,55 +0,0 @@ -tests: - - - description: "Valid read and write concern are parsed correctly" - uri: "mongodb://example.com/?readConcernLevel=majority&w=5&wTimeoutMS=30000&journal=false" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - readConcernLevel: "majority" - w: 5 - wTimeoutMS: 30000 - journal: false - - - description: "Arbitrary string readConcernLevel does not cause a warning" - uri: "mongodb://example.com/?readConcernLevel=arbitraryButStillValid" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - readConcernLevel: "arbitraryButStillValid" - - - description: "Arbitrary string w doesn't cause a warning" - uri: "mongodb://example.com/?w=arbitraryButStillValid" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - w: "arbitraryButStillValid" - - - description: "Non-numeric wTimeoutMS causes a warning" - uri: "mongodb://example.com/?wTimeoutMS=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Too low wTimeoutMS causes a warning" - uri: "mongodb://example.com/?wTimeoutMS=-2" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Invalid journal causes a warning" - uri: "mongodb://example.com/?journal=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} diff --git a/testdata/uri-options/connection-options.json b/testdata/uri-options/connection-options.json deleted file mode 100644 index 8bb05cc721..0000000000 --- a/testdata/uri-options/connection-options.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "tests": [ - { - "description": "Valid connection and timeout options are parsed correctly", - "uri": "mongodb://example.com/?appname=URI-OPTIONS-SPEC-TEST&connectTimeoutMS=20000&heartbeatFrequencyMS=5000&localThresholdMS=3000&maxIdleTimeMS=50000&replicaSet=uri-options-spec&retryWrites=true&serverSelectionTimeoutMS=15000&socketTimeoutMS=7500", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "appname": "URI-OPTIONS-SPEC-TEST", - "connectTimeoutMS": 20000, - "heartbeatFrequencyMS": 5000, - "localThresholdMS": 3000, - "maxIdleTimeMS": 50000, - "replicaSet": "uri-options-spec", - "retryWrites": true, - "serverSelectionTimeoutMS": 15000, - "socketTimeoutMS": 7500 - } - }, - { - "description": "Non-numeric connectTimeoutMS causes a warning", - "uri": "mongodb://example.com/?connectTimeoutMS=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Too low connectTimeoutMS causes a warning", - "uri": "mongodb://example.com/?connectTimeoutMS=-2", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Non-numeric heartbeatFrequencyMS causes a warning", - "uri": "mongodb://example.com/?heartbeatFrequencyMS=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Too low heartbeatFrequencyMS causes a warning", - "uri": "mongodb://example.com/?heartbeatFrequencyMS=-2", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Non-numeric localThresholdMS causes a warning", - "uri": "mongodb://example.com/?localThresholdMS=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Too low localThresholdMS causes a warning", - "uri": "mongodb://example.com/?localThresholdMS=-2", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Invalid retryWrites causes a warning", - "uri": "mongodb://example.com/?retryWrites=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Non-numeric serverSelectionTimeoutMS causes a warning", - "uri": "mongodb://example.com/?serverSelectionTimeoutMS=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Too low serverSelectionTimeoutMS causes a warning", - "uri": "mongodb://example.com/?serverSelectionTimeoutMS=-2", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Non-numeric socketTimeoutMS causes a warning", - "uri": "mongodb://example.com/?socketTimeoutMS=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Too low socketTimeoutMS causes a warning", - "uri": "mongodb://example.com/?socketTimeoutMS=-2", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "directConnection=true", - "uri": "mongodb://example.com/?directConnection=true", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "directConnection": true - } - }, - { - "description": "directConnection=true with multiple seeds", - "uri": "mongodb://example1.com,example2.com/?directConnection=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "directConnection=false", - "uri": "mongodb://example.com/?directConnection=false", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "directConnection": false - } - }, - { - "description": "directConnection=false with multiple seeds", - "uri": "mongodb://example1.com,example2.com/?directConnection=false", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "directConnection": false - } - }, - { - "description": "Invalid directConnection value", - "uri": "mongodb://example.com/?directConnection=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "loadBalanced=true", - "uri": "mongodb://example.com/?loadBalanced=true", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "loadBalanced": true - } - }, - { - "description": "loadBalanced=true with directConnection=false", - "uri": "mongodb://example.com/?loadBalanced=true&directConnection=false", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "loadBalanced": true, - "directConnection": false - } - }, - { - "description": "loadBalanced=false", - "uri": "mongodb://example.com/?loadBalanced=false", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "loadBalanced": false - } - }, - { - "description": "Invalid loadBalanced value", - "uri": "mongodb://example.com/?loadBalanced=1", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "loadBalanced=true with multiple hosts causes an error", - "uri": "mongodb://example1,example2/?loadBalanced=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "loadBalanced=true with directConnection=true causes an error", - "uri": "mongodb://example.com/?loadBalanced=true&directConnection=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "loadBalanced=true with replicaSet causes an error", - "uri": "mongodb://example.com/?loadBalanced=true&replicaSet=replset", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - } - ] -} diff --git a/testdata/uri-options/connection-options.yml b/testdata/uri-options/connection-options.yml deleted file mode 100644 index 32d22d5927..0000000000 --- a/testdata/uri-options/connection-options.yml +++ /dev/null @@ -1,209 +0,0 @@ -tests: - - - description: "Valid connection and timeout options are parsed correctly" - uri: "mongodb://example.com/?appname=URI-OPTIONS-SPEC-TEST&connectTimeoutMS=20000&heartbeatFrequencyMS=5000&localThresholdMS=3000&maxIdleTimeMS=50000&replicaSet=uri-options-spec&retryWrites=true&serverSelectionTimeoutMS=15000&socketTimeoutMS=7500" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - appname: "URI-OPTIONS-SPEC-TEST" - connectTimeoutMS: 20000 - heartbeatFrequencyMS: 5000 - localThresholdMS: 3000 - maxIdleTimeMS: 50000 - replicaSet: "uri-options-spec" - retryWrites: true - serverSelectionTimeoutMS: 15000 - socketTimeoutMS: 7500 - - - description: "Non-numeric connectTimeoutMS causes a warning" - uri: "mongodb://example.com/?connectTimeoutMS=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Too low connectTimeoutMS causes a warning" - uri: "mongodb://example.com/?connectTimeoutMS=-2" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Non-numeric heartbeatFrequencyMS causes a warning" - uri: "mongodb://example.com/?heartbeatFrequencyMS=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Too low heartbeatFrequencyMS causes a warning" - uri: "mongodb://example.com/?heartbeatFrequencyMS=-2" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Non-numeric localThresholdMS causes a warning" - uri: "mongodb://example.com/?localThresholdMS=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Too low localThresholdMS causes a warning" - uri: "mongodb://example.com/?localThresholdMS=-2" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Invalid retryWrites causes a warning" - uri: "mongodb://example.com/?retryWrites=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Non-numeric serverSelectionTimeoutMS causes a warning" - uri: "mongodb://example.com/?serverSelectionTimeoutMS=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Too low serverSelectionTimeoutMS causes a warning" - uri: "mongodb://example.com/?serverSelectionTimeoutMS=-2" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Non-numeric socketTimeoutMS causes a warning" - uri: "mongodb://example.com/?socketTimeoutMS=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Too low socketTimeoutMS causes a warning" - uri: "mongodb://example.com/?socketTimeoutMS=-2" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: directConnection=true - uri: "mongodb://example.com/?directConnection=true" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - directConnection: true - - - description: directConnection=true with multiple seeds - uri: "mongodb://example1.com,example2.com/?directConnection=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: directConnection=false - uri: "mongodb://example.com/?directConnection=false" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - directConnection: false - - - description: directConnection=false with multiple seeds - uri: "mongodb://example1.com,example2.com/?directConnection=false" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - directConnection: false - - - description: Invalid directConnection value - uri: "mongodb://example.com/?directConnection=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: loadBalanced=true - uri: "mongodb://example.com/?loadBalanced=true" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - loadBalanced: true - - - description: loadBalanced=true with directConnection=false - uri: "mongodb://example.com/?loadBalanced=true&directConnection=false" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - loadBalanced: true - directConnection: false - - - description: loadBalanced=false - uri: "mongodb://example.com/?loadBalanced=false" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - loadBalanced: false - - - description: Invalid loadBalanced value - uri: "mongodb://example.com/?loadBalanced=1" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: loadBalanced=true with multiple hosts causes an error - uri: "mongodb://example1,example2/?loadBalanced=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: loadBalanced=true with directConnection=true causes an error - uri: "mongodb://example.com/?loadBalanced=true&directConnection=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: loadBalanced=true with replicaSet causes an error - uri: "mongodb://example.com/?loadBalanced=true&replicaSet=replset" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} diff --git a/testdata/uri-options/connection-pool-options.json b/testdata/uri-options/connection-pool-options.json deleted file mode 100644 index be401f55d5..0000000000 --- a/testdata/uri-options/connection-pool-options.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "tests": [ - { - "description": "Valid connection pool options are parsed correctly", - "uri": "mongodb://example.com/?maxIdleTimeMS=50000", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "maxIdleTimeMS": 50000 - } - }, - { - "description": "Non-numeric maxIdleTimeMS causes a warning", - "uri": "mongodb://example.com/?maxIdleTimeMS=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Too low maxIdleTimeMS causes a warning", - "uri": "mongodb://example.com/?maxIdleTimeMS=-2", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - } - ] -} diff --git a/testdata/uri-options/connection-pool-options.yml b/testdata/uri-options/connection-pool-options.yml deleted file mode 100644 index 54cee220b5..0000000000 --- a/testdata/uri-options/connection-pool-options.yml +++ /dev/null @@ -1,26 +0,0 @@ -tests: - - - description: "Valid connection pool options are parsed correctly" - uri: "mongodb://example.com/?maxIdleTimeMS=50000" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - maxIdleTimeMS: 50000 - - - description: "Non-numeric maxIdleTimeMS causes a warning" - uri: "mongodb://example.com/?maxIdleTimeMS=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Too low maxIdleTimeMS causes a warning" - uri: "mongodb://example.com/?maxIdleTimeMS=-2" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} diff --git a/testdata/uri-options/read-preference-options.json b/testdata/uri-options/read-preference-options.json deleted file mode 100644 index cdac6a63c3..0000000000 --- a/testdata/uri-options/read-preference-options.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "tests": [ - { - "description": "Valid read preference options are parsed correctly", - "uri": "mongodb://example.com/?readPreference=primaryPreferred&readPreferenceTags=dc:ny,rack:1&maxStalenessSeconds=120&readPreferenceTags=dc:ny", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "readPreference": "primaryPreferred", - "readPreferenceTags": [ - { - "dc": "ny", - "rack": "1" - }, - { - "dc": "ny" - } - ], - "maxStalenessSeconds": 120 - } - }, - { - "description": "Single readPreferenceTags is parsed as array of size one", - "uri": "mongodb://example.com/?readPreference=secondary&readPreferenceTags=dc:ny", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "readPreferenceTags": [ - { - "dc": "ny" - } - ] - } - }, - { - "description": "Invalid readPreferenceTags causes a warning", - "uri": "mongodb://example.com/?readPreferenceTags=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Non-numeric maxStalenessSeconds causes a warning", - "uri": "mongodb://example.com/?maxStalenessSeconds=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Too low maxStalenessSeconds causes a warning", - "uri": "mongodb://example.com/?maxStalenessSeconds=-2", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - } - ] -} diff --git a/testdata/uri-options/read-preference-options.yml b/testdata/uri-options/read-preference-options.yml deleted file mode 100644 index 4ced669acf..0000000000 --- a/testdata/uri-options/read-preference-options.yml +++ /dev/null @@ -1,53 +0,0 @@ -tests: - - - description: "Valid read preference options are parsed correctly" - uri: "mongodb://example.com/?readPreference=primaryPreferred&readPreferenceTags=dc:ny,rack:1&maxStalenessSeconds=120&readPreferenceTags=dc:ny" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - readPreference: "primaryPreferred" - readPreferenceTags: - - - dc: "ny" - rack: "1" - - - dc: "ny" - maxStalenessSeconds: 120 - - - description: "Single readPreferenceTags is parsed as array of size one" - uri: "mongodb://example.com/?readPreference=secondary&readPreferenceTags=dc:ny" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - readPreferenceTags: - - - dc: "ny" - - - description: "Invalid readPreferenceTags causes a warning" - uri: "mongodb://example.com/?readPreferenceTags=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Non-numeric maxStalenessSeconds causes a warning" - uri: "mongodb://example.com/?maxStalenessSeconds=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "Too low maxStalenessSeconds causes a warning" - uri: "mongodb://example.com/?maxStalenessSeconds=-2" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - diff --git a/testdata/uri-options/sdam-options.json b/testdata/uri-options/sdam-options.json deleted file mode 100644 index 673f5607ee..0000000000 --- a/testdata/uri-options/sdam-options.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "tests": [ - { - "description": "serverMonitoringMode=auto", - "uri": "mongodb://example.com/?serverMonitoringMode=auto", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "serverMonitoringMode": "auto" - } - }, - { - "description": "serverMonitoringMode=stream", - "uri": "mongodb://example.com/?serverMonitoringMode=stream", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "serverMonitoringMode": "stream" - } - }, - { - "description": "serverMonitoringMode=poll", - "uri": "mongodb://example.com/?serverMonitoringMode=poll", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "serverMonitoringMode": "poll" - } - }, - { - "description": "invalid serverMonitoringMode", - "uri": "mongodb://example.com/?serverMonitoringMode=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - } - ] -} diff --git a/testdata/uri-options/sdam-options.yml b/testdata/uri-options/sdam-options.yml deleted file mode 100644 index 8f72ff4098..0000000000 --- a/testdata/uri-options/sdam-options.yml +++ /dev/null @@ -1,35 +0,0 @@ -tests: - - description: "serverMonitoringMode=auto" - uri: "mongodb://example.com/?serverMonitoringMode=auto" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - serverMonitoringMode: "auto" - - - description: "serverMonitoringMode=stream" - uri: "mongodb://example.com/?serverMonitoringMode=stream" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - serverMonitoringMode: "stream" - - - description: "serverMonitoringMode=poll" - uri: "mongodb://example.com/?serverMonitoringMode=poll" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - serverMonitoringMode: "poll" - - - description: "invalid serverMonitoringMode" - uri: "mongodb://example.com/?serverMonitoringMode=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} diff --git a/testdata/uri-options/single-threaded-options.json b/testdata/uri-options/single-threaded-options.json deleted file mode 100644 index fcd24fb880..0000000000 --- a/testdata/uri-options/single-threaded-options.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "tests": [ - { - "description": "Valid options specific to single-threaded drivers are parsed correctly", - "uri": "mongodb://example.com/?serverSelectionTryOnce=false", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "serverSelectionTryOnce": false - } - }, - { - "description": "Invalid serverSelectionTryOnce causes a warning", - "uri": "mongodb://example.com/?serverSelectionTryOnce=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - } - ] -} diff --git a/testdata/uri-options/single-threaded-options.yml b/testdata/uri-options/single-threaded-options.yml deleted file mode 100644 index 6c2b02e196..0000000000 --- a/testdata/uri-options/single-threaded-options.yml +++ /dev/null @@ -1,18 +0,0 @@ -tests: - - - description: "Valid options specific to single-threaded drivers are parsed correctly" - uri: "mongodb://example.com/?serverSelectionTryOnce=false" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - serverSelectionTryOnce: false - - - description: "Invalid serverSelectionTryOnce causes a warning" - uri: "mongodb://example.com/?serverSelectionTryOnce=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} diff --git a/testdata/uri-options/srv-options.json b/testdata/uri-options/srv-options.json deleted file mode 100644 index ffc356f12f..0000000000 --- a/testdata/uri-options/srv-options.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "tests": [ - { - "description": "SRV URI with custom srvServiceName", - "uri": "mongodb+srv://test22.test.build.10gen.cc/?srvServiceName=customname", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "srvServiceName": "customname" - } - }, - { - "description": "Non-SRV URI with custom srvServiceName", - "uri": "mongodb://example.com/?srvServiceName=customname", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "SRV URI with srvMaxHosts", - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "srvMaxHosts": 2 - } - }, - { - "description": "SRV URI with negative integer for srvMaxHosts", - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=-1", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "SRV URI with invalid type for srvMaxHosts", - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=foo", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "Non-SRV URI with srvMaxHosts", - "uri": "mongodb://example.com/?srvMaxHosts=2", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "SRV URI with positive srvMaxHosts and replicaSet", - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2&replicaSet=foo", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "SRV URI with positive srvMaxHosts and loadBalanced=true", - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2&loadBalanced=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "SRV URI with positive srvMaxHosts and loadBalanced=false", - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2&loadBalanced=false", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "loadBalanced": false, - "srvMaxHosts": 2 - } - }, - { - "description": "SRV URI with srvMaxHosts=0 and replicaSet", - "uri": "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=0&replicaSet=foo", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "replicaSet": "foo", - "srvMaxHosts": 0 - } - }, - { - "description": "SRV URI with srvMaxHosts=0 and loadBalanced=true", - "uri": "mongodb+srv://test3.test.build.10gen.cc/?srvMaxHosts=0&loadBalanced=true", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "loadBalanced": true, - "srvMaxHosts": 0 - } - } - ] -} diff --git a/testdata/uri-options/srv-options.yml b/testdata/uri-options/srv-options.yml deleted file mode 100644 index 2f5210cbe7..0000000000 --- a/testdata/uri-options/srv-options.yml +++ /dev/null @@ -1,89 +0,0 @@ -tests: - - description: "SRV URI with custom srvServiceName" - uri: "mongodb+srv://test22.test.build.10gen.cc/?srvServiceName=customname" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - srvServiceName: "customname" - - description: "Non-SRV URI with custom srvServiceName" - uri: "mongodb://example.com/?srvServiceName=customname" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - description: "SRV URI with srvMaxHosts" - uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - srvMaxHosts: 2 - - description: "SRV URI with negative integer for srvMaxHosts" - uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=-1" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - description: "SRV URI with invalid type for srvMaxHosts" - uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=foo" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - description: "Non-SRV URI with srvMaxHosts" - uri: "mongodb://example.com/?srvMaxHosts=2" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - # Note: Testing URI validation for srvMaxHosts conflicting with either - # loadBalanced=true or replicaSet specified via TXT records is covered by - # the Initial DNS Seedlist Discovery test suite. - - description: "SRV URI with positive srvMaxHosts and replicaSet" - uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2&replicaSet=foo" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - description: "SRV URI with positive srvMaxHosts and loadBalanced=true" - uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2&loadBalanced=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - description: "SRV URI with positive srvMaxHosts and loadBalanced=false" - uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2&loadBalanced=false" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - loadBalanced: false - srvMaxHosts: 2 - - description: "SRV URI with srvMaxHosts=0 and replicaSet" - uri: "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=0&replicaSet=foo" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - replicaSet: foo - srvMaxHosts: 0 - - description: "SRV URI with srvMaxHosts=0 and loadBalanced=true" - uri: "mongodb+srv://test3.test.build.10gen.cc/?srvMaxHosts=0&loadBalanced=true" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - loadBalanced: true - srvMaxHosts: 0 \ No newline at end of file diff --git a/testdata/uri-options/tls-options.json b/testdata/uri-options/tls-options.json deleted file mode 100644 index edf6042943..0000000000 --- a/testdata/uri-options/tls-options.json +++ /dev/null @@ -1,649 +0,0 @@ -{ - "tests": [ - { - "description": "Valid required tls options are parsed correctly", - "uri": "mongodb://example.com/?tls=true&tlsCAFile=ca.pem&tlsCertificateKeyFile=cert.pem", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "tls": true, - "tlsCAFile": "ca.pem", - "tlsCertificateKeyFile": "cert.pem" - } - }, - { - "description": "Valid tlsCertificateKeyFilePassword is parsed correctly", - "uri": "mongodb://example.com/?tlsCertificateKeyFilePassword=hunter2", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "tlsCertificateKeyFilePassword": "hunter2" - } - }, - { - "description": "Invalid tlsAllowInvalidCertificates causes a warning", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidCertificates is parsed correctly", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=true", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "tlsAllowInvalidCertificates": true - } - }, - { - "description": "Invalid tlsAllowInvalidCertificates causes a warning", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidHostnames is parsed correctly", - "uri": "mongodb://example.com/?tlsAllowInvalidHostnames=true", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "tlsAllowInvalidHostnames": true - } - }, - { - "description": "Invalid tlsAllowInvalidHostnames causes a warning", - "uri": "mongodb://example.com/?tlsAllowInvalidHostnames=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsInsecure is parsed correctly", - "uri": "mongodb://example.com/?tlsInsecure=true", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "tlsInsecure": true - } - }, - { - "description": "Invalid tlsInsecure causes a warning", - "uri": "mongodb://example.com/?tlsInsecure=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsInsecure and tlsAllowInvalidCertificates both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsInsecure=true&tlsAllowInvalidCertificates=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsInsecure and tlsAllowInvalidCertificates both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsInsecure=false&tlsAllowInvalidCertificates=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidCertificates and tlsInsecure both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=true&tlsInsecure=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidCertificates and tlsInsecure both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=false&tlsInsecure=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsInsecure and tlsAllowInvalidHostnames both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsInsecure=true&tlsAllowInvalidHostnames=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsInsecure and tlsAllowInvalidHostnames both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsInsecure=false&tlsAllowInvalidHostnames=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidHostnames and tlsInsecure both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsAllowInvalidHostnames=true&tlsInsecure=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidHostnames and tlsInsecure both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsAllowInvalidHostnames=false&tlsInsecure=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tls=true and ssl=true doesn't warn", - "uri": "mongodb://example.com/?tls=true&ssl=true", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tls=false and ssl=false doesn't warn", - "uri": "mongodb://example.com/?tls=false&ssl=false", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "ssl=true and tls=true doesn't warn", - "uri": "mongodb://example.com/?ssl=true&tls=true", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "ssl=false and tls=false doesn't warn", - "uri": "mongodb://example.com/?ssl=false&tls=false", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tls=false and ssl=true raises error", - "uri": "mongodb://example.com/?tls=false&ssl=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tls=true and ssl=false raises error", - "uri": "mongodb://example.com/?tls=true&ssl=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "ssl=false and tls=true raises error", - "uri": "mongodb://example.com/?ssl=false&tls=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "ssl=true and tls=false raises error", - "uri": "mongodb://example.com/?ssl=true&tls=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck can be set to true", - "uri": "mongodb://example.com/?tls=true&tlsDisableCertificateRevocationCheck=true", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "tls": true, - "tlsDisableCertificateRevocationCheck": true - } - }, - { - "description": "tlsDisableCertificateRevocationCheck can be set to false", - "uri": "mongodb://example.com/?tls=true&tlsDisableCertificateRevocationCheck=false", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "tls": true, - "tlsDisableCertificateRevocationCheck": false - } - }, - { - "description": "tlsAllowInvalidCertificates and tlsDisableCertificateRevocationCheck both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=true&tlsDisableCertificateRevocationCheck=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidCertificates=true and tlsDisableCertificateRevocationCheck=false raises an error", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=true&tlsDisableCertificateRevocationCheck=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidCertificates=false and tlsDisableCertificateRevocationCheck=true raises an error", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=false&tlsDisableCertificateRevocationCheck=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidCertificates and tlsDisableCertificateRevocationCheck both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=false&tlsDisableCertificateRevocationCheck=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck and tlsAllowInvalidCertificates both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsDisableCertificateRevocationCheck=true&tlsAllowInvalidCertificates=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck=true and tlsAllowInvalidCertificates=false raises an error", - "uri": "mongodb://example.com/?tlsDisableCertificateRevocationCheck=true&tlsAllowInvalidCertificates=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck=false and tlsAllowInvalidCertificates=true raises an error", - "uri": "mongodb://example.com/?tlsDisableCertificateRevocationCheck=false&tlsAllowInvalidCertificates=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck and tlsAllowInvalidCertificates both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsDisableCertificateRevocationCheck=false&tlsAllowInvalidCertificates=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsInsecure and tlsDisableCertificateRevocationCheck both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsInsecure=true&tlsDisableCertificateRevocationCheck=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsInsecure=true and tlsDisableCertificateRevocationCheck=false raises an error", - "uri": "mongodb://example.com/?tlsInsecure=true&tlsDisableCertificateRevocationCheck=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsInsecure=false and tlsDisableCertificateRevocationCheck=true raises an error", - "uri": "mongodb://example.com/?tlsInsecure=false&tlsDisableCertificateRevocationCheck=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsInsecure and tlsDisableCertificateRevocationCheck both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsInsecure=false&tlsDisableCertificateRevocationCheck=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck and tlsInsecure both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsDisableCertificateRevocationCheck=true&tlsInsecure=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck=true and tlsInsecure=false raises an error", - "uri": "mongodb://example.com/?tlsDisableCertificateRevocationCheck=true&tlsInsecure=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck=false and tlsInsecure=true raises an error", - "uri": "mongodb://example.com/?tlsDisableCertificateRevocationCheck=false&tlsInsecure=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck and tlsInsecure both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsDisableCertificateRevocationCheck=false&tlsInsecure=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck and tlsDisableOCSPEndpointCheck both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsDisableCertificateRevocationCheck=true&tlsDisableOCSPEndpointCheck=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck=true and tlsDisableOCSPEndpointCheck=false raises an error", - "uri": "mongodb://example.com/?tlsDisableCertificateRevocationCheck=true&tlsDisableOCSPEndpointCheck=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck=false and tlsDisableOCSPEndpointCheck=true raises an error", - "uri": "mongodb://example.com/?tlsDisableCertificateRevocationCheck=false&tlsDisableOCSPEndpointCheck=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableCertificateRevocationCheck and tlsDisableOCSPEndpointCheck both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsDisableCertificateRevocationCheck=false&tlsDisableOCSPEndpointCheck=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck and tlsDisableCertificateRevocationCheck both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsDisableOCSPEndpointCheck=true&tlsDisableCertificateRevocationCheck=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck=true and tlsDisableCertificateRevocationCheck=false raises an error", - "uri": "mongodb://example.com/?tlsDisableOCSPEndpointCheck=true&tlsDisableCertificateRevocationCheck=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck=false and tlsDisableCertificateRevocationCheck=true raises an error", - "uri": "mongodb://example.com/?tlsDisableOCSPEndpointCheck=false&tlsDisableCertificateRevocationCheck=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck and tlsDisableCertificateRevocationCheck both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsDisableOCSPEndpointCheck=false&tlsDisableCertificateRevocationCheck=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck can be set to true", - "uri": "mongodb://example.com/?tls=true&tlsDisableOCSPEndpointCheck=true", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "tls": true, - "tlsDisableOCSPEndpointCheck": true - } - }, - { - "description": "tlsDisableOCSPEndpointCheck can be set to false", - "uri": "mongodb://example.com/?tls=true&tlsDisableOCSPEndpointCheck=false", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "tls": true, - "tlsDisableOCSPEndpointCheck": false - } - }, - { - "description": "tlsInsecure and tlsDisableOCSPEndpointCheck both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsInsecure=true&tlsDisableOCSPEndpointCheck=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsInsecure=true and tlsDisableOCSPEndpointCheck=false raises an error", - "uri": "mongodb://example.com/?tlsInsecure=true&tlsDisableOCSPEndpointCheck=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsInsecure=false and tlsDisableOCSPEndpointCheck=true raises an error", - "uri": "mongodb://example.com/?tlsInsecure=false&tlsDisableOCSPEndpointCheck=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsInsecure and tlsDisableOCSPEndpointCheck both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsInsecure=false&tlsDisableOCSPEndpointCheck=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck and tlsInsecure both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsDisableOCSPEndpointCheck=true&tlsInsecure=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck=true and tlsInsecure=false raises an error", - "uri": "mongodb://example.com/?tlsDisableOCSPEndpointCheck=true&tlsInsecure=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck=false and tlsInsecure=true raises an error", - "uri": "mongodb://example.com/?tlsDisableOCSPEndpointCheck=false&tlsInsecure=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck and tlsInsecure both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsDisableOCSPEndpointCheck=false&tlsInsecure=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidCertificates and tlsDisableOCSPEndpointCheck both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=true&tlsDisableOCSPEndpointCheck=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidCertificates=true and tlsDisableOCSPEndpointCheck=false raises an error", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=true&tlsDisableOCSPEndpointCheck=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidCertificates=false and tlsDisableOCSPEndpointCheck=true raises an error", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=false&tlsDisableOCSPEndpointCheck=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsAllowInvalidCertificates and tlsDisableOCSPEndpointCheck both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsAllowInvalidCertificates=false&tlsDisableOCSPEndpointCheck=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck and tlsAllowInvalidCertificates both present (and true) raises an error", - "uri": "mongodb://example.com/?tlsDisableOCSPEndpointCheck=true&tlsAllowInvalidCertificates=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck=true and tlsAllowInvalidCertificates=false raises an error", - "uri": "mongodb://example.com/?tlsDisableOCSPEndpointCheck=true&tlsAllowInvalidCertificates=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck=false and tlsAllowInvalidCertificates=true raises an error", - "uri": "mongodb://example.com/?tlsDisableOCSPEndpointCheck=false&tlsAllowInvalidCertificates=true", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - }, - { - "description": "tlsDisableOCSPEndpointCheck and tlsAllowInvalidCertificates both present (and false) raises an error", - "uri": "mongodb://example.com/?tlsDisableOCSPEndpointCheck=false&tlsAllowInvalidCertificates=false", - "valid": false, - "warning": false, - "hosts": null, - "auth": null, - "options": {} - } - ] -} diff --git a/testdata/uri-options/tls-options.yml b/testdata/uri-options/tls-options.yml deleted file mode 100644 index 66ada972a7..0000000000 --- a/testdata/uri-options/tls-options.yml +++ /dev/null @@ -1,578 +0,0 @@ -tests: - - - description: "Valid required tls options are parsed correctly" - uri: "mongodb://example.com/?tls=true&tlsCAFile=ca.pem&tlsCertificateKeyFile=cert.pem" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - tls: true - tlsCAFile: "ca.pem" - tlsCertificateKeyFile: "cert.pem" - - - description: "Valid tlsCertificateKeyFilePassword is parsed correctly" - uri: "mongodb://example.com/?tlsCertificateKeyFilePassword=hunter2" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - tlsCertificateKeyFilePassword: "hunter2" - - - description: "Invalid tlsAllowInvalidCertificates causes a warning" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "tlsAllowInvalidCertificates is parsed correctly" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=true" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - tlsAllowInvalidCertificates: true - - - description: "Invalid tlsAllowInvalidCertificates causes a warning" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "tlsAllowInvalidHostnames is parsed correctly" - uri: "mongodb://example.com/?tlsAllowInvalidHostnames=true" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - tlsAllowInvalidHostnames: true - - - description: "Invalid tlsAllowInvalidHostnames causes a warning" - uri: "mongodb://example.com/?tlsAllowInvalidHostnames=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "tlsInsecure is parsed correctly" - uri: "mongodb://example.com/?tlsInsecure=true" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - tlsInsecure: true - - - description: "Invalid tlsInsecure causes a warning" - uri: "mongodb://example.com/?tlsInsecure=invalid" - valid: true - warning: true - hosts: ~ - auth: ~ - options: {} - - - description: "tlsInsecure and tlsAllowInvalidCertificates both present (and true) raises an error" - uri: "mongodb://example.com/?tlsInsecure=true&tlsAllowInvalidCertificates=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsInsecure and tlsAllowInvalidCertificates both present (and false) raises an error" - uri: "mongodb://example.com/?tlsInsecure=false&tlsAllowInvalidCertificates=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsAllowInvalidCertificates and tlsInsecure both present (and true) raises an error" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=true&tlsInsecure=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsAllowInvalidCertificates and tlsInsecure both present (and false) raises an error" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=false&tlsInsecure=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsInsecure and tlsAllowInvalidHostnames both present (and true) raises an error" - uri: "mongodb://example.com/?tlsInsecure=true&tlsAllowInvalidHostnames=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsInsecure and tlsAllowInvalidHostnames both present (and false) raises an error" - uri: "mongodb://example.com/?tlsInsecure=false&tlsAllowInvalidHostnames=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsAllowInvalidHostnames and tlsInsecure both present (and true) raises an error" - uri: "mongodb://example.com/?tlsAllowInvalidHostnames=true&tlsInsecure=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsAllowInvalidHostnames and tlsInsecure both present (and false) raises an error" - uri: "mongodb://example.com/?tlsAllowInvalidHostnames=false&tlsInsecure=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tls=true and ssl=true doesn't warn" - uri: "mongodb://example.com/?tls=true&ssl=true" - valid: true - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tls=false and ssl=false doesn't warn" - uri: "mongodb://example.com/?tls=false&ssl=false" - valid: true - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "ssl=true and tls=true doesn't warn" - uri: "mongodb://example.com/?ssl=true&tls=true" - valid: true - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "ssl=false and tls=false doesn't warn" - uri: "mongodb://example.com/?ssl=false&tls=false" - valid: true - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tls=false and ssl=true raises error" - uri: "mongodb://example.com/?tls=false&ssl=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tls=true and ssl=false raises error" - uri: "mongodb://example.com/?tls=true&ssl=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "ssl=false and tls=true raises error" - uri: "mongodb://example.com/?ssl=false&tls=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "ssl=true and tls=false raises error" - uri: "mongodb://example.com/?ssl=true&tls=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableCertificateRevocationCheck can be set to true" - uri: "mongodb://example.com/?tls=true&tlsDisableCertificateRevocationCheck=true" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - tls: true - tlsDisableCertificateRevocationCheck: true - - - description: "tlsDisableCertificateRevocationCheck can be set to false" - uri: "mongodb://example.com/?tls=true&tlsDisableCertificateRevocationCheck=false" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - tls: true - tlsDisableCertificateRevocationCheck: false - # 4 permutations of [tlsAllowInvalidCertificates=true/false, tlsDisableCertificateRevocationCheck=true/false] - - - description: "tlsAllowInvalidCertificates and tlsDisableCertificateRevocationCheck both present (and true) raises an error" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=true&tlsDisableCertificateRevocationCheck=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsAllowInvalidCertificates=true and tlsDisableCertificateRevocationCheck=false raises an error" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=true&tlsDisableCertificateRevocationCheck=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsAllowInvalidCertificates=false and tlsDisableCertificateRevocationCheck=true raises an error" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=false&tlsDisableCertificateRevocationCheck=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsAllowInvalidCertificates and tlsDisableCertificateRevocationCheck both present (and false) raises an error" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=false&tlsDisableCertificateRevocationCheck=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - # 4 permutations of [tlsDisableCertificateRevocationCheck=true/false, tlsAllowInvalidCertificates=true/false] - - - description: "tlsDisableCertificateRevocationCheck and tlsAllowInvalidCertificates both present (and true) raises an error" - uri: "mongodb://example.com/?tlsDisableCertificateRevocationCheck=true&tlsAllowInvalidCertificates=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableCertificateRevocationCheck=true and tlsAllowInvalidCertificates=false raises an error" - uri: "mongodb://example.com/?tlsDisableCertificateRevocationCheck=true&tlsAllowInvalidCertificates=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableCertificateRevocationCheck=false and tlsAllowInvalidCertificates=true raises an error" - uri: "mongodb://example.com/?tlsDisableCertificateRevocationCheck=false&tlsAllowInvalidCertificates=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableCertificateRevocationCheck and tlsAllowInvalidCertificates both present (and false) raises an error" - uri: "mongodb://example.com/?tlsDisableCertificateRevocationCheck=false&tlsAllowInvalidCertificates=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - # 4 permutations of [tlsInsecure=true/false, tlsDisableCertificateRevocationCheck=true/false] - - - description: "tlsInsecure and tlsDisableCertificateRevocationCheck both present (and true) raises an error" - uri: "mongodb://example.com/?tlsInsecure=true&tlsDisableCertificateRevocationCheck=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsInsecure=true and tlsDisableCertificateRevocationCheck=false raises an error" - uri: "mongodb://example.com/?tlsInsecure=true&tlsDisableCertificateRevocationCheck=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsInsecure=false and tlsDisableCertificateRevocationCheck=true raises an error" - uri: "mongodb://example.com/?tlsInsecure=false&tlsDisableCertificateRevocationCheck=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsInsecure and tlsDisableCertificateRevocationCheck both present (and false) raises an error" - uri: "mongodb://example.com/?tlsInsecure=false&tlsDisableCertificateRevocationCheck=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - # 4 permutations of [tlsDisableCertificateRevocationCheck=true/false, tlsInsecure=true/false] - - - description: "tlsDisableCertificateRevocationCheck and tlsInsecure both present (and true) raises an error" - uri: "mongodb://example.com/?tlsDisableCertificateRevocationCheck=true&tlsInsecure=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableCertificateRevocationCheck=true and tlsInsecure=false raises an error" - uri: "mongodb://example.com/?tlsDisableCertificateRevocationCheck=true&tlsInsecure=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableCertificateRevocationCheck=false and tlsInsecure=true raises an error" - uri: "mongodb://example.com/?tlsDisableCertificateRevocationCheck=false&tlsInsecure=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableCertificateRevocationCheck and tlsInsecure both present (and false) raises an error" - uri: "mongodb://example.com/?tlsDisableCertificateRevocationCheck=false&tlsInsecure=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - # 4 permutations of [tlsDisableCertificateRevocationCheck=true/false, tlsDisableOCSPEndpointCheck=true/false] - - - description: "tlsDisableCertificateRevocationCheck and tlsDisableOCSPEndpointCheck both present (and true) raises an error" - uri: "mongodb://example.com/?tlsDisableCertificateRevocationCheck=true&tlsDisableOCSPEndpointCheck=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableCertificateRevocationCheck=true and tlsDisableOCSPEndpointCheck=false raises an error" - uri: "mongodb://example.com/?tlsDisableCertificateRevocationCheck=true&tlsDisableOCSPEndpointCheck=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableCertificateRevocationCheck=false and tlsDisableOCSPEndpointCheck=true raises an error" - uri: "mongodb://example.com/?tlsDisableCertificateRevocationCheck=false&tlsDisableOCSPEndpointCheck=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableCertificateRevocationCheck and tlsDisableOCSPEndpointCheck both present (and false) raises an error" - uri: "mongodb://example.com/?tlsDisableCertificateRevocationCheck=false&tlsDisableOCSPEndpointCheck=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - # 4 permutations of [tlsDisableOCSPEndpointCheck=true/false, tlsDisableCertificateRevocationCheck=true/false] - - - description: "tlsDisableOCSPEndpointCheck and tlsDisableCertificateRevocationCheck both present (and true) raises an error" - uri: "mongodb://example.com/?tlsDisableOCSPEndpointCheck=true&tlsDisableCertificateRevocationCheck=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableOCSPEndpointCheck=true and tlsDisableCertificateRevocationCheck=false raises an error" - uri: "mongodb://example.com/?tlsDisableOCSPEndpointCheck=true&tlsDisableCertificateRevocationCheck=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableOCSPEndpointCheck=false and tlsDisableCertificateRevocationCheck=true raises an error" - uri: "mongodb://example.com/?tlsDisableOCSPEndpointCheck=false&tlsDisableCertificateRevocationCheck=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableOCSPEndpointCheck and tlsDisableCertificateRevocationCheck both present (and false) raises an error" - uri: "mongodb://example.com/?tlsDisableOCSPEndpointCheck=false&tlsDisableCertificateRevocationCheck=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableOCSPEndpointCheck can be set to true" - uri: "mongodb://example.com/?tls=true&tlsDisableOCSPEndpointCheck=true" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - tls: true - tlsDisableOCSPEndpointCheck: true - - - description: "tlsDisableOCSPEndpointCheck can be set to false" - uri: "mongodb://example.com/?tls=true&tlsDisableOCSPEndpointCheck=false" - valid: true - warning: false - hosts: ~ - auth: ~ - options: - tls: true - tlsDisableOCSPEndpointCheck: false - # 4 permutations of [tlsInsecure=true/false, tlsDisableOCSPEndpointCheck=true/false] - - - description: "tlsInsecure and tlsDisableOCSPEndpointCheck both present (and true) raises an error" - uri: "mongodb://example.com/?tlsInsecure=true&tlsDisableOCSPEndpointCheck=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsInsecure=true and tlsDisableOCSPEndpointCheck=false raises an error" - uri: "mongodb://example.com/?tlsInsecure=true&tlsDisableOCSPEndpointCheck=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsInsecure=false and tlsDisableOCSPEndpointCheck=true raises an error" - uri: "mongodb://example.com/?tlsInsecure=false&tlsDisableOCSPEndpointCheck=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsInsecure and tlsDisableOCSPEndpointCheck both present (and false) raises an error" - uri: "mongodb://example.com/?tlsInsecure=false&tlsDisableOCSPEndpointCheck=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - # 4 permutations of [tlsDisableOCSPEndpointCheck=true/false, tlsInsecure=true/false] - - - description: "tlsDisableOCSPEndpointCheck and tlsInsecure both present (and true) raises an error" - uri: "mongodb://example.com/?tlsDisableOCSPEndpointCheck=true&tlsInsecure=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableOCSPEndpointCheck=true and tlsInsecure=false raises an error" - uri: "mongodb://example.com/?tlsDisableOCSPEndpointCheck=true&tlsInsecure=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableOCSPEndpointCheck=false and tlsInsecure=true raises an error" - uri: "mongodb://example.com/?tlsDisableOCSPEndpointCheck=false&tlsInsecure=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableOCSPEndpointCheck and tlsInsecure both present (and false) raises an error" - uri: "mongodb://example.com/?tlsDisableOCSPEndpointCheck=false&tlsInsecure=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - # 4 permutations of [tlsAllowInvalidCertificates=true/false, tlsDisableOCSPEndpointCheck=true/false] - - - description: "tlsAllowInvalidCertificates and tlsDisableOCSPEndpointCheck both present (and true) raises an error" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=true&tlsDisableOCSPEndpointCheck=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsAllowInvalidCertificates=true and tlsDisableOCSPEndpointCheck=false raises an error" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=true&tlsDisableOCSPEndpointCheck=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsAllowInvalidCertificates=false and tlsDisableOCSPEndpointCheck=true raises an error" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=false&tlsDisableOCSPEndpointCheck=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsAllowInvalidCertificates and tlsDisableOCSPEndpointCheck both present (and false) raises an error" - uri: "mongodb://example.com/?tlsAllowInvalidCertificates=false&tlsDisableOCSPEndpointCheck=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - # 4 permutations of [tlsDisableOCSPEndpointCheck=true/false, tlsAllowInvalidCertificates=true/false] - - - description: "tlsDisableOCSPEndpointCheck and tlsAllowInvalidCertificates both present (and true) raises an error" - uri: "mongodb://example.com/?tlsDisableOCSPEndpointCheck=true&tlsAllowInvalidCertificates=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableOCSPEndpointCheck=true and tlsAllowInvalidCertificates=false raises an error" - uri: "mongodb://example.com/?tlsDisableOCSPEndpointCheck=true&tlsAllowInvalidCertificates=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableOCSPEndpointCheck=false and tlsAllowInvalidCertificates=true raises an error" - uri: "mongodb://example.com/?tlsDisableOCSPEndpointCheck=false&tlsAllowInvalidCertificates=true" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} - - - description: "tlsDisableOCSPEndpointCheck and tlsAllowInvalidCertificates both present (and false) raises an error" - uri: "mongodb://example.com/?tlsDisableOCSPEndpointCheck=false&tlsAllowInvalidCertificates=false" - valid: false - warning: false - hosts: ~ - auth: ~ - options: {} diff --git a/testdata/versioned-api/crud-api-version-1-strict.json b/testdata/versioned-api/crud-api-version-1-strict.json deleted file mode 100644 index c1c8ecce01..0000000000 --- a/testdata/versioned-api/crud-api-version-1-strict.json +++ /dev/null @@ -1,1109 +0,0 @@ -{ - "description": "CRUD Api Version 1 (strict)", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.9" - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent" - ], - "serverApi": { - "version": "1", - "strict": true - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "versioned-api-tests" - } - }, - { - "database": { - "id": "adminDatabase", - "client": "client", - "databaseName": "admin" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "_yamlAnchors": { - "versions": [ - { - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - ] - }, - "initialData": [ - { - "collectionName": "test", - "databaseName": "versioned-api-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "tests": [ - { - "description": "aggregate on collection appends declared API version", - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "aggregate on database appends declared API version", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "aggregate", - "object": "adminDatabase", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ] - }, - "expectError": { - "errorCodeName": "APIStrictError" - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": 1, - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "bulkWrite appends declared API version", - "operations": [ - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 6, - "x": 66 - } - } - }, - { - "updateOne": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "deleteMany": { - "filter": { - "x": { - "$nin": [ - 24, - 34 - ] - } - } - } - }, - { - "updateMany": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "deleteOne": { - "filter": { - "_id": 7 - } - } - }, - { - "replaceOne": { - "filter": { - "_id": 4 - }, - "replacement": { - "_id": 4, - "x": 44 - }, - "upsert": true - } - } - ], - "ordered": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 6, - "x": 66 - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 2 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "x": { - "$nin": [ - 24, - 34 - ] - } - }, - "limit": 0 - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": 7 - }, - "limit": 1 - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 4 - }, - "u": { - "_id": 4, - "x": 44 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": true - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "countDocuments appends declared API version", - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "x": { - "$gt": 11 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$match": { - "x": { - "$gt": 11 - } - } - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "deleteMany appends declared API version", - "operations": [ - { - "name": "deleteMany", - "object": "collection", - "arguments": { - "filter": { - "x": { - "$nin": [ - 24, - 34 - ] - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "x": { - "$nin": [ - 24, - 34 - ] - } - }, - "limit": 0 - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "deleteOne appends declared API version", - "operations": [ - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 7 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": 7 - }, - "limit": 1 - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "distinct appends declared API version", - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": {} - }, - "expectError": { - "isError": true, - "errorContains": "command distinct is not in API Version 1", - "errorCodeName": "APIStrictError" - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "distinct": "test", - "key": "x", - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "estimatedDocumentCount appends declared API version", - "runOnRequirements": [ - { - "minServerVersion": "5.0.9", - "maxServerVersion": "5.0.99" - }, - { - "minServerVersion": "5.3.2" - } - ], - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "arguments": {} - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "count": "test", - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "find and getMore append API version", - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "batchSize": 3 - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test", - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "findOneAndDelete appends declared API version", - "operations": [ - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "test", - "query": { - "_id": 1 - }, - "remove": true, - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "findOneAndReplace appends declared API version", - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 33 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "test", - "query": { - "_id": 1 - }, - "update": { - "x": 33 - }, - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "findOneAndUpdate appends declared API version", - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "test", - "query": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "insertMany appends declared API version", - "operations": [ - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 6, - "x": 66 - }, - { - "_id": 7, - "x": 77 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 6, - "x": 66 - }, - { - "_id": 7, - "x": 77 - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "insertOne appends declared API version", - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 6, - "x": 66 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 6, - "x": 66 - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "replaceOne appends declared API version", - "operations": [ - { - "name": "replaceOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 4 - }, - "replacement": { - "_id": 4, - "x": 44 - }, - "upsert": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 4 - }, - "u": { - "_id": 4, - "x": 44 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": true - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "updateMany appends declared API version", - "operations": [ - { - "name": "updateMany", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "updateOne appends declared API version", - "operations": [ - { - "name": "updateOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 2 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/versioned-api/crud-api-version-1-strict.yml b/testdata/versioned-api/crud-api-version-1-strict.yml deleted file mode 100644 index 17c4bee0f9..0000000000 --- a/testdata/versioned-api/crud-api-version-1-strict.yml +++ /dev/null @@ -1,419 +0,0 @@ -description: "CRUD Api Version 1 (strict)" - -schemaVersion: "1.4" - -runOnRequirements: - - minServerVersion: "4.9" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - serverApi: - version: "1" - strict: true - - database: - id: &database database - client: *client - databaseName: &databaseName versioned-api-tests - - database: - id: &adminDatabase adminDatabase - client: *client - databaseName: &adminDatabaseName admin - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -_yamlAnchors: - versions: - - &expectedApiVersion - apiVersion: "1" - apiStrict: true - apiDeprecationErrors: { $$unsetOrMatches: false } - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - -tests: - - description: "aggregate on collection appends declared API version" - operations: - - name: aggregate - object: *collection - arguments: - pipeline: &pipeline - - $sort: { x : 1 } - - $match: { _id: { $gt: 1 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - aggregate: *collectionName - pipeline: *pipeline - <<: *expectedApiVersion - - - description: "aggregate on database appends declared API version" - runOnRequirements: - # serverless does not support either of the current database-level aggregation stages ($listLocalSessions and - # $currentOp) - - serverless: "forbid" - operations: - - name: aggregate - object: *adminDatabase - arguments: - pipeline: &pipeline - - $listLocalSessions: {} - - $limit: 1 - expectError: - errorCodeName: "APIStrictError" - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - aggregate: 1 - pipeline: *pipeline - <<: *expectedApiVersion - - - description: "bulkWrite appends declared API version" - operations: - - name: bulkWrite - object: *collection - arguments: - requests: - - insertOne: - document: { _id: 6, x: 66 } - - updateOne: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - - deleteMany: - filter: { x: { $nin: [ 24, 34 ] } } - - updateMany: - filter: { _id: { $gt: 1 } } - update: { $inc: { x: 1 } } - - deleteOne: - filter: { _id: 7 } - - replaceOne: - filter: { _id: 4 } - replacement: { _id: 4, x: 44 } - upsert: true - ordered: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: - - { _id: 6, x: 66 } - <<: *expectedApiVersion - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: 2 } - u: { $inc: { x: 1 } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - <<: *expectedApiVersion - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - { q: { x: { $nin: [ 24, 34 ] } }, limit: 0 } - <<: *expectedApiVersion - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: { $gt: 1 } } - u: { $inc: { x: 1 } } - multi: true - upsert: { $$unsetOrMatches: false } - <<: *expectedApiVersion - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - { q: { _id: 7 }, limit: 1 } - <<: *expectedApiVersion - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: 4 } - u: { _id: 4, x: 44 } - multi: { $$unsetOrMatches: false } - upsert: true - <<: *expectedApiVersion - - - description: "countDocuments appends declared API version" - operations: - - name: countDocuments - object: *collection - arguments: - filter: &filter - x : { $gt: 11 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - aggregate: *collectionName - pipeline: - - { $match: *filter } - - { $group: { _id: 1, n: { $sum: 1 } } } - <<: *expectedApiVersion - - - description: "deleteMany appends declared API version" - operations: - - name: deleteMany - object: *collection - arguments: - filter: { x: { $nin: [ 24, 34 ] } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - { q: { x: { $nin: [ 24, 34 ] } }, limit: 0 } - <<: *expectedApiVersion - - - description: "deleteOne appends declared API version" - operations: - - name: deleteOne - object: *collection - arguments: - filter: { _id: 7 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - { q: { _id: 7 }, limit: 1 } - <<: *expectedApiVersion - - # distinct will fail until drivers replace it with an alternative - # implementation - - description: "distinct appends declared API version" - operations: - - name: distinct - object: *collection - arguments: - fieldName: x - filter: {} - expectError: - isError: true - errorContains: "command distinct is not in API Version 1" - errorCodeName: "APIStrictError" - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - distinct: *collectionName - key: x - <<: *expectedApiVersion - - - description: "estimatedDocumentCount appends declared API version" - # See: https://jira.mongodb.org/browse/SERVER-63850 - runOnRequirements: - - minServerVersion: "5.0.9" - maxServerVersion: "5.0.99" - - minServerVersion: "5.3.2" - operations: - - name: estimatedDocumentCount - object: *collection - arguments: {} - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - count: *collectionName - <<: *expectedApiVersion - - - description: "find and getMore append API version" - operations: - - name: find - object: *collection - arguments: - filter: {} - sort: { _id: 1 } - batchSize: 3 - expectResult: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - find: *collectionName - <<: *expectedApiVersion - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - <<: *expectedApiVersion - - - description: "findOneAndDelete appends declared API version" - operations: - - name: findOneAndDelete - object: *collection - arguments: - filter: &filter { _id: 1 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - findAndModify: *collectionName - query: *filter - remove: true - <<: *expectedApiVersion - - - description: "findOneAndReplace appends declared API version" - operations: - - name: findOneAndReplace - object: *collection - arguments: - filter: &filter { _id: 1 } - replacement: &replacement { x: 33 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - findAndModify: *collectionName - query: *filter - update: *replacement - <<: *expectedApiVersion - - - description: "findOneAndUpdate appends declared API version" - operations: - - name: findOneAndUpdate - object: collection - arguments: - filter: &filter { _id: 1 } - update: &update { $inc: { x: 1 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - findAndModify: *collectionName - query: *filter - update: *update - <<: *expectedApiVersion - - - description: "insertMany appends declared API version" - operations: - - name: insertMany - object: *collection - arguments: - documents: - - { _id: 6, x: 66 } - - { _id: 7, x: 77 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: - - { _id: 6, x: 66 } - - { _id: 7, x: 77 } - <<: *expectedApiVersion - - - description: "insertOne appends declared API version" - operations: - - name: insertOne - object: *collection - arguments: - document: { _id: 6, x: 66 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: - - { _id: 6, x: 66 } - <<: *expectedApiVersion - - - description: "replaceOne appends declared API version" - operations: - - name: replaceOne - object: *collection - arguments: - filter: { _id: 4 } - replacement: { _id: 4, x: 44 } - upsert: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: 4 } - u: { _id: 4, x: 44 } - multi: { $$unsetOrMatches: false } - upsert: true - <<: *expectedApiVersion - - - description: "updateMany appends declared API version" - operations: - - name: updateMany - object: *collection - arguments: - filter: { _id: { $gt: 1 } } - update: { $inc: { x: 1 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: { $gt: 1 } } - u: { $inc: { x: 1 } } - multi: true - upsert: { $$unsetOrMatches: false } - <<: *expectedApiVersion - - - description: "updateOne appends declared API version" - operations: - - name: updateOne - object: *collection - arguments: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: 2 } - u: { $inc: { x: 1 } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - <<: *expectedApiVersion diff --git a/testdata/versioned-api/crud-api-version-1.json b/testdata/versioned-api/crud-api-version-1.json deleted file mode 100644 index 23ef59a6d9..0000000000 --- a/testdata/versioned-api/crud-api-version-1.json +++ /dev/null @@ -1,1182 +0,0 @@ -{ - "description": "CRUD Api Version 1", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.9" - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent" - ], - "serverApi": { - "version": "1", - "deprecationErrors": true - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "versioned-api-tests" - } - }, - { - "database": { - "id": "adminDatabase", - "client": "client", - "databaseName": "admin" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - } - ], - "_yamlAnchors": { - "versions": [ - { - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - ], - "namespace": "versioned-api-tests.test" - }, - "initialData": [ - { - "collectionName": "test", - "databaseName": "versioned-api-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "tests": [ - { - "description": "aggregate on collection appends declared API version", - "operations": [ - { - "name": "aggregate", - "object": "collection", - "arguments": { - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$sort": { - "x": 1 - } - }, - { - "$match": { - "_id": { - "$gt": 1 - } - } - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "aggregate on database appends declared API version", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "aggregate", - "object": "adminDatabase", - "arguments": { - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": 1, - "pipeline": [ - { - "$listLocalSessions": {} - }, - { - "$limit": 1 - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "bulkWrite appends declared API version", - "operations": [ - { - "name": "bulkWrite", - "object": "collection", - "arguments": { - "requests": [ - { - "insertOne": { - "document": { - "_id": 6, - "x": 66 - } - } - }, - { - "updateOne": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "deleteMany": { - "filter": { - "x": { - "$nin": [ - 24, - 34 - ] - } - } - } - }, - { - "updateMany": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - } - } - }, - { - "deleteOne": { - "filter": { - "_id": 7 - } - } - }, - { - "replaceOne": { - "filter": { - "_id": 4 - }, - "replacement": { - "_id": 4, - "x": 44 - }, - "upsert": true - } - } - ], - "ordered": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 6, - "x": 66 - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - }, - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 2 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - }, - { - "commandStartedEvent": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "x": { - "$nin": [ - 24, - 34 - ] - } - }, - "limit": 0 - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - }, - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - }, - { - "commandStartedEvent": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": 7 - }, - "limit": 1 - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - }, - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 4 - }, - "u": { - "_id": 4, - "x": 44 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": true - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "client bulkWrite appends declared API version", - "runOnRequirements": [ - { - "minServerVersion": "8.0", - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "clientBulkWrite", - "object": "client", - "arguments": { - "models": [ - { - "insertOne": { - "namespace": "versioned-api-tests.test", - "document": { - "_id": 6, - "x": 6 - } - } - } - ], - "verboseResults": true - }, - "expectResult": { - "insertedCount": 1, - "upsertedCount": 0, - "matchedCount": 0, - "modifiedCount": 0, - "deletedCount": 0, - "insertResults": { - "0": { - "insertedId": 6 - } - }, - "updateResults": {}, - "deleteResults": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "commandName": "bulkWrite", - "databaseName": "admin", - "command": { - "bulkWrite": 1, - "errorsOnly": false, - "ordered": true, - "ops": [ - { - "insert": 0, - "document": { - "_id": 6, - "x": 6 - } - } - ], - "nsInfo": [ - { - "ns": "versioned-api-tests.test" - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "countDocuments appends declared API version", - "operations": [ - { - "name": "countDocuments", - "object": "collection", - "arguments": { - "filter": { - "x": { - "$gt": 11 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "aggregate": "test", - "pipeline": [ - { - "$match": { - "x": { - "$gt": 11 - } - } - }, - { - "$group": { - "_id": 1, - "n": { - "$sum": 1 - } - } - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "deleteMany appends declared API version", - "operations": [ - { - "name": "deleteMany", - "object": "collection", - "arguments": { - "filter": { - "x": { - "$nin": [ - 24, - 34 - ] - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "x": { - "$nin": [ - 24, - 34 - ] - } - }, - "limit": 0 - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "deleteOne appends declared API version", - "operations": [ - { - "name": "deleteOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 7 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "delete": "test", - "deletes": [ - { - "q": { - "_id": 7 - }, - "limit": 1 - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "distinct appends declared API version", - "operations": [ - { - "name": "distinct", - "object": "collection", - "arguments": { - "fieldName": "x", - "filter": {} - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "distinct": "test", - "key": "x", - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "estimatedDocumentCount appends declared API version", - "runOnRequirements": [ - { - "minServerVersion": "5.0.9", - "maxServerVersion": "5.0.99" - }, - { - "minServerVersion": "5.3.2" - } - ], - "operations": [ - { - "name": "estimatedDocumentCount", - "object": "collection", - "arguments": {} - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "count": "test", - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "find and getMore append API version", - "operations": [ - { - "name": "find", - "object": "collection", - "arguments": { - "filter": {}, - "sort": { - "_id": 1 - }, - "batchSize": 3 - }, - "expectResult": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "find": "test", - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - }, - { - "commandStartedEvent": { - "command": { - "getMore": { - "$$type": [ - "int", - "long" - ] - }, - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "findOneAndDelete appends declared API version", - "operations": [ - { - "name": "findOneAndDelete", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "test", - "query": { - "_id": 1 - }, - "remove": true, - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "findOneAndReplace appends declared API version", - "operations": [ - { - "name": "findOneAndReplace", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - }, - "replacement": { - "x": 33 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "test", - "query": { - "_id": 1 - }, - "update": { - "x": 33 - }, - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "findOneAndUpdate appends declared API version", - "operations": [ - { - "name": "findOneAndUpdate", - "object": "collection", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "findAndModify": "test", - "query": { - "_id": 1 - }, - "update": { - "$inc": { - "x": 1 - } - }, - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "insertMany appends declared API version", - "operations": [ - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 6, - "x": 66 - }, - { - "_id": 7, - "x": 77 - } - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 6, - "x": 66 - }, - { - "_id": 7, - "x": 77 - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "insertOne appends declared API version", - "operations": [ - { - "name": "insertOne", - "object": "collection", - "arguments": { - "document": { - "_id": 6, - "x": 66 - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 6, - "x": 66 - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "replaceOne appends declared API version", - "operations": [ - { - "name": "replaceOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 4 - }, - "replacement": { - "_id": 4, - "x": 44 - }, - "upsert": true - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 4 - }, - "u": { - "_id": 4, - "x": 44 - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": true - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "updateMany appends declared API version", - "operations": [ - { - "name": "updateMany", - "object": "collection", - "arguments": { - "filter": { - "_id": { - "$gt": 1 - } - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": { - "$gt": 1 - } - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": true, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - }, - { - "description": "updateOne appends declared API version", - "operations": [ - { - "name": "updateOne", - "object": "collection", - "arguments": { - "filter": { - "_id": 2 - }, - "update": { - "$inc": { - "x": 1 - } - } - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "update": "test", - "updates": [ - { - "q": { - "_id": 2 - }, - "u": { - "$inc": { - "x": 1 - } - }, - "multi": { - "$$unsetOrMatches": false - }, - "upsert": { - "$$unsetOrMatches": false - } - } - ], - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/versioned-api/crud-api-version-1.yml b/testdata/versioned-api/crud-api-version-1.yml deleted file mode 100644 index 01e0323420..0000000000 --- a/testdata/versioned-api/crud-api-version-1.yml +++ /dev/null @@ -1,455 +0,0 @@ -description: "CRUD Api Version 1" - -schemaVersion: "1.4" - -runOnRequirements: - - minServerVersion: "4.9" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - serverApi: - version: "1" - # Deprecation errors is set to true to ensure that drivers don't use any - # deprecated server API in their logic. - deprecationErrors: true - - database: - id: &database database - client: *client - databaseName: &databaseName versioned-api-tests - - database: - id: &adminDatabase adminDatabase - client: *client - databaseName: &adminDatabaseName admin - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - -_yamlAnchors: - versions: - - &expectedApiVersion - apiVersion: "1" - apiStrict: { $$unsetOrMatches: false } - apiDeprecationErrors: true - namespace: &namespace "versioned-api-tests.test" - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - -tests: - - description: "aggregate on collection appends declared API version" - operations: - - name: aggregate - object: *collection - arguments: - pipeline: &pipeline - - $sort: { x : 1 } - - $match: { _id: { $gt: 1 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - aggregate: *collectionName - pipeline: *pipeline - <<: *expectedApiVersion - - - description: "aggregate on database appends declared API version" - runOnRequirements: - # serverless does not support either of the current database-level aggregation stages ($listLocalSessions and - # $currentOp) - - serverless: forbid - operations: - - name: aggregate - object: *adminDatabase - arguments: - pipeline: &pipeline - - $listLocalSessions: {} - - $limit: 1 - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - aggregate: 1 - pipeline: *pipeline - <<: *expectedApiVersion - - - description: "bulkWrite appends declared API version" - operations: - - name: bulkWrite - object: *collection - arguments: - requests: - - insertOne: - document: { _id: 6, x: 66 } - - updateOne: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - - deleteMany: - filter: { x: { $nin: [ 24, 34 ] } } - - updateMany: - filter: { _id: { $gt: 1 } } - update: { $inc: { x: 1 } } - - deleteOne: - filter: { _id: 7 } - - replaceOne: - filter: { _id: 4 } - replacement: { _id: 4, x: 44 } - upsert: true - ordered: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: - - { _id: 6, x: 66 } - <<: *expectedApiVersion - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: 2 } - u: { $inc: { x: 1 } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - <<: *expectedApiVersion - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - { q: { x: { $nin: [ 24, 34 ] } }, limit: 0 } - <<: *expectedApiVersion - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: { $gt: 1 } } - u: { $inc: { x: 1 } } - multi: true - upsert: { $$unsetOrMatches: false } - <<: *expectedApiVersion - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - { q: { _id: 7 }, limit: 1 } - <<: *expectedApiVersion - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: 4 } - u: { _id: 4, x: 44 } - multi: { $$unsetOrMatches: false } - upsert: true - <<: *expectedApiVersion - - - description: "client bulkWrite appends declared API version" - runOnRequirements: - - minServerVersion: "8.0" # `bulkWrite` added to server 8.0 - serverless: forbid - operations: - - name: clientBulkWrite - object: *client - arguments: - models: - - insertOne: - namespace: *namespace - document: { _id: 6, x: 6 } - verboseResults: true - expectResult: - insertedCount: 1 - upsertedCount: 0 - matchedCount: 0 - modifiedCount: 0 - deletedCount: 0 - insertResults: - 0: - insertedId: 6 - updateResults: {} - deleteResults: {} - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: bulkWrite - databaseName: admin - command: - bulkWrite: 1 - errorsOnly: false - ordered: true - ops: - - insert: 0 - document: { _id: 6, x: 6 } - nsInfo: - - { ns: *namespace } - <<: *expectedApiVersion - - - description: "countDocuments appends declared API version" - operations: - - name: countDocuments - object: *collection - arguments: - filter: &filter - x : { $gt: 11 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - aggregate: *collectionName - pipeline: - - { $match: *filter } - - { $group: { _id: 1, n: { $sum: 1 } } } - <<: *expectedApiVersion - - - description: "deleteMany appends declared API version" - operations: - - name: deleteMany - object: *collection - arguments: - filter: { x: { $nin: [ 24, 34 ] } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - { q: { x: { $nin: [ 24, 34 ] } }, limit: 0 } - <<: *expectedApiVersion - - - description: "deleteOne appends declared API version" - operations: - - name: deleteOne - object: *collection - arguments: - filter: { _id: 7 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - delete: *collectionName - deletes: - - { q: { _id: 7 }, limit: 1 } - <<: *expectedApiVersion - - - description: "distinct appends declared API version" - operations: - - name: distinct - object: *collection - arguments: - fieldName: x - filter: {} - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - distinct: *collectionName - key: x - <<: *expectedApiVersion - - - description: "estimatedDocumentCount appends declared API version" - # See: https://jira.mongodb.org/browse/SERVER-63850 - runOnRequirements: - - minServerVersion: "5.0.9" - maxServerVersion: "5.0.99" - - minServerVersion: "5.3.2" - operations: - - name: estimatedDocumentCount - object: *collection - arguments: {} - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - count: *collectionName - <<: *expectedApiVersion - - - description: "find and getMore append API version" - operations: - - name: find - object: *collection - arguments: - filter: {} - sort: { _id: 1 } - batchSize: 3 - expectResult: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - find: *collectionName - <<: *expectedApiVersion - - commandStartedEvent: - command: - getMore: { $$type: [ int, long ] } - <<: *expectedApiVersion - - - description: "findOneAndDelete appends declared API version" - operations: - - name: findOneAndDelete - object: *collection - arguments: - filter: &filter { _id: 1 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - findAndModify: *collectionName - query: *filter - remove: true - <<: *expectedApiVersion - - - description: "findOneAndReplace appends declared API version" - operations: - - name: findOneAndReplace - object: *collection - arguments: - filter: &filter { _id: 1 } - replacement: &replacement { x: 33 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - findAndModify: *collectionName - query: *filter - update: *replacement - <<: *expectedApiVersion - - - description: "findOneAndUpdate appends declared API version" - operations: - - name: findOneAndUpdate - object: collection - arguments: - filter: &filter { _id: 1 } - update: &update { $inc: { x: 1 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - findAndModify: *collectionName - query: *filter - update: *update - <<: *expectedApiVersion - - - description: "insertMany appends declared API version" - operations: - - name: insertMany - object: *collection - arguments: - documents: - - { _id: 6, x: 66 } - - { _id: 7, x: 77 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: - - { _id: 6, x: 66 } - - { _id: 7, x: 77 } - <<: *expectedApiVersion - - - description: "insertOne appends declared API version" - operations: - - name: insertOne - object: *collection - arguments: - document: { _id: 6, x: 66 } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: - - { _id: 6, x: 66 } - <<: *expectedApiVersion - - - description: "replaceOne appends declared API version" - operations: - - name: replaceOne - object: *collection - arguments: - filter: { _id: 4 } - replacement: { _id: 4, x: 44 } - upsert: true - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: 4 } - u: { _id: 4, x: 44 } - multi: { $$unsetOrMatches: false } - upsert: true - <<: *expectedApiVersion - - - description: "updateMany appends declared API version" - operations: - - name: updateMany - object: *collection - arguments: - filter: { _id: { $gt: 1 } } - update: { $inc: { x: 1 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: { $gt: 1 } } - u: { $inc: { x: 1 } } - multi: true - upsert: { $$unsetOrMatches: false } - <<: *expectedApiVersion - - - description: "updateOne appends declared API version" - operations: - - name: updateOne - object: *collection - arguments: - filter: { _id: 2 } - update: { $inc: { x: 1 } } - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - update: *collectionName - updates: - - q: { _id: 2 } - u: { $inc: { x: 1 } } - multi: { $$unsetOrMatches: false } - upsert: { $$unsetOrMatches: false } - <<: *expectedApiVersion diff --git a/testdata/versioned-api/runcommand-helper-no-api-version-declared.json b/testdata/versioned-api/runcommand-helper-no-api-version-declared.json deleted file mode 100644 index 17e0126d10..0000000000 --- a/testdata/versioned-api/runcommand-helper-no-api-version-declared.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "description": "RunCommand helper: No API version declared", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.9", - "serverParameters": { - "requireApiVersion": false - } - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "versioned-api-tests" - } - } - ], - "tests": [ - { - "description": "runCommand does not inspect or change the command document", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1, - "apiVersion": "server_will_never_support_this_api_version" - } - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "ping": 1, - "apiVersion": "server_will_never_support_this_api_version", - "apiStrict": { - "$$exists": false - }, - "apiDeprecationErrors": { - "$$exists": false - } - }, - "commandName": "ping", - "databaseName": "versioned-api-tests" - } - } - ] - } - ] - }, - { - "description": "runCommand does not prevent sending invalid API version declarations", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "ping", - "command": { - "ping": 1, - "apiStrict": true - } - }, - "expectError": { - "isError": true, - "isClientError": false - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "ping": 1, - "apiVersion": { - "$$exists": false - }, - "apiStrict": true, - "apiDeprecationErrors": { - "$$exists": false - } - }, - "commandName": "ping", - "databaseName": "versioned-api-tests" - } - } - ] - } - ] - } - ] -} diff --git a/testdata/versioned-api/runcommand-helper-no-api-version-declared.yml b/testdata/versioned-api/runcommand-helper-no-api-version-declared.yml deleted file mode 100644 index c17481ab1e..0000000000 --- a/testdata/versioned-api/runcommand-helper-no-api-version-declared.yml +++ /dev/null @@ -1,75 +0,0 @@ -description: "RunCommand helper: No API version declared" - -schemaVersion: "1.4" - -runOnRequirements: - - minServerVersion: "4.9" - serverParameters: - requireApiVersion: false - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - - database: - id: &database database - client: *client - databaseName: &databaseName versioned-api-tests - -tests: - - description: "runCommand does not inspect or change the command document" - runOnRequirements: - # serverless does not currently reject invalid API versions on - # certain commands (CLOUDP-87926) - - serverless: "forbid" - operations: - - name: runCommand - object: *database - arguments: - commandName: ping - command: - ping: 1 - apiVersion: "server_will_never_support_this_api_version" - expectError: - isError: true - isClientError: false - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - ping: 1 - apiVersion: "server_will_never_support_this_api_version" - apiStrict: { $$exists: false } - apiDeprecationErrors: { $$exists: false } - commandName: ping - databaseName: *databaseName - - - description: "runCommand does not prevent sending invalid API version declarations" - runOnRequirements: - # serverless does not currently reject invalid API versions on - # certain commands (CLOUDP-87926) - - serverless: "forbid" - operations: - - name: runCommand - object: *database - arguments: - commandName: ping - command: - ping: 1 - apiStrict: true - expectError: - isError: true - isClientError: false - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - ping: 1 - apiVersion: { $$exists: false } - apiStrict: true - apiDeprecationErrors: { $$exists: false } - commandName: ping - databaseName: *databaseName diff --git a/testdata/versioned-api/test-commands-deprecation-errors.json b/testdata/versioned-api/test-commands-deprecation-errors.json deleted file mode 100644 index 0668df830a..0000000000 --- a/testdata/versioned-api/test-commands-deprecation-errors.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "description": "Test commands: deprecation errors", - "schemaVersion": "1.1", - "runOnRequirements": [ - { - "minServerVersion": "4.9", - "serverParameters": { - "enableTestCommands": true, - "acceptApiVersion2": true, - "requireApiVersion": false - } - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "versioned-api-tests" - } - } - ], - "tests": [ - { - "description": "Running a command that is deprecated raises a deprecation error", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "testDeprecationInVersion2", - "command": { - "testDeprecationInVersion2": 1, - "apiVersion": "2", - "apiDeprecationErrors": true - } - }, - "expectError": { - "isError": true, - "errorContains": "command testDeprecationInVersion2 is deprecated in API Version 2", - "errorCodeName": "APIDeprecationError" - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "testDeprecationInVersion2": 1, - "apiVersion": "2", - "apiStrict": { - "$$exists": false - }, - "apiDeprecationErrors": true - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/versioned-api/test-commands-deprecation-errors.yml b/testdata/versioned-api/test-commands-deprecation-errors.yml deleted file mode 100644 index c2cb827b96..0000000000 --- a/testdata/versioned-api/test-commands-deprecation-errors.yml +++ /dev/null @@ -1,47 +0,0 @@ -description: "Test commands: deprecation errors" - -schemaVersion: "1.1" - -runOnRequirements: - - minServerVersion: "4.9" - serverParameters: - enableTestCommands: true - acceptApiVersion2: true - requireApiVersion: false - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - # This client is configured without a declared API version, as we cannot - # declare an unknown API version. - - database: - id: &database database - client: *client - databaseName: &databaseName versioned-api-tests - -tests: - - description: "Running a command that is deprecated raises a deprecation error" - operations: - - name: runCommand - object: *database - arguments: - commandName: testDeprecationInVersion2 - command: - testDeprecationInVersion2: 1 - apiVersion: "2" - apiDeprecationErrors: true - expectError: - isError: true - errorContains: "command testDeprecationInVersion2 is deprecated in API Version 2" - errorCodeName: "APIDeprecationError" - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - testDeprecationInVersion2: 1 - apiVersion: "2" - apiStrict: { $$exists: false } - apiDeprecationErrors: true diff --git a/testdata/versioned-api/test-commands-strict-mode.json b/testdata/versioned-api/test-commands-strict-mode.json deleted file mode 100644 index 9c4ebea785..0000000000 --- a/testdata/versioned-api/test-commands-strict-mode.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "description": "Test commands: strict mode", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.9", - "serverParameters": { - "enableTestCommands": true - }, - "serverless": "forbid" - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent" - ], - "serverApi": { - "version": "1", - "strict": true - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "versioned-api-tests" - } - } - ], - "tests": [ - { - "description": "Running a command that is not part of the versioned API results in an error", - "operations": [ - { - "name": "runCommand", - "object": "database", - "arguments": { - "commandName": "testVersion2", - "command": { - "testVersion2": 1 - } - }, - "expectError": { - "isError": true, - "errorContains": "command testVersion2 is not in API Version 1", - "errorCodeName": "APIStrictError" - } - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "testVersion2": 1, - "apiVersion": "1", - "apiStrict": true, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/versioned-api/test-commands-strict-mode.yml b/testdata/versioned-api/test-commands-strict-mode.yml deleted file mode 100644 index f53b6e6a2f..0000000000 --- a/testdata/versioned-api/test-commands-strict-mode.yml +++ /dev/null @@ -1,46 +0,0 @@ -description: "Test commands: strict mode" - -schemaVersion: "1.4" - -runOnRequirements: - - minServerVersion: "4.9" - serverParameters: - enableTestCommands: true - # serverless gives a different error for unrecognized testVersion2 command - serverless: "forbid" - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - serverApi: - version: "1" - strict: true - - database: - id: &database database - client: *client - databaseName: &databaseName versioned-api-tests - -tests: - - description: "Running a command that is not part of the versioned API results in an error" - operations: - - name: runCommand - object: *database - arguments: - commandName: testVersion2 - command: - testVersion2: 1 - expectError: - isError: true - errorContains: "command testVersion2 is not in API Version 1" - errorCodeName: "APIStrictError" - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - testVersion2: 1 - apiVersion: "1" - apiStrict: true - apiDeprecationErrors: { $$unsetOrMatches: false } diff --git a/testdata/versioned-api/transaction-handling.json b/testdata/versioned-api/transaction-handling.json deleted file mode 100644 index 32031296af..0000000000 --- a/testdata/versioned-api/transaction-handling.json +++ /dev/null @@ -1,348 +0,0 @@ -{ - "description": "Transaction handling", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "minServerVersion": "4.9", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "commandStartedEvent" - ], - "serverApi": { - "version": "1" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "versioned-api-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "test" - } - }, - { - "session": { - "id": "session", - "client": "client" - } - } - ], - "_yamlAnchors": { - "versions": [ - { - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - ] - }, - "initialData": [ - { - "collectionName": "test", - "databaseName": "versioned-api-tests", - "documents": [ - { - "_id": 1, - "x": 11 - }, - { - "_id": 2, - "x": 22 - }, - { - "_id": 3, - "x": 33 - }, - { - "_id": 4, - "x": 44 - }, - { - "_id": 5, - "x": 55 - } - ] - } - ], - "tests": [ - { - "description": "All commands in a transaction declare an API version", - "runOnRequirements": [ - { - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "operations": [ - { - "name": "startTransaction", - "object": "session" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session", - "document": { - "_id": 6, - "x": 66 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 6 - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session", - "document": { - "_id": 7, - "x": 77 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 7 - } - } - } - }, - { - "name": "commitTransaction", - "object": "session" - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 6, - "x": 66 - } - ], - "lsid": { - "$$sessionLsid": "session" - }, - "startTransaction": true, - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 7, - "x": 77 - } - ], - "lsid": { - "$$sessionLsid": "session" - }, - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session" - }, - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - }, - { - "description": "abortTransaction includes an API version", - "runOnRequirements": [ - { - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "operations": [ - { - "name": "startTransaction", - "object": "session" - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session", - "document": { - "_id": 6, - "x": 66 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 6 - } - } - } - }, - { - "name": "insertOne", - "object": "collection", - "arguments": { - "session": "session", - "document": { - "_id": 7, - "x": 77 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 7 - } - } - } - }, - { - "name": "abortTransaction", - "object": "session" - } - ], - "expectEvents": [ - { - "client": "client", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 6, - "x": 66 - } - ], - "lsid": { - "$$sessionLsid": "session" - }, - "startTransaction": true, - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 7, - "x": 77 - } - ], - "lsid": { - "$$sessionLsid": "session" - }, - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - }, - { - "commandStartedEvent": { - "command": { - "abortTransaction": 1, - "lsid": { - "$$sessionLsid": "session" - }, - "apiVersion": "1", - "apiStrict": { - "$$unsetOrMatches": false - }, - "apiDeprecationErrors": { - "$$unsetOrMatches": false - } - } - } - } - ] - } - ] - } - ] -} diff --git a/testdata/versioned-api/transaction-handling.yml b/testdata/versioned-api/transaction-handling.yml deleted file mode 100644 index bc7cc318dc..0000000000 --- a/testdata/versioned-api/transaction-handling.yml +++ /dev/null @@ -1,128 +0,0 @@ -description: "Transaction handling" - -schemaVersion: "1.3" - -runOnRequirements: - - minServerVersion: "4.9" - topologies: [ replicaset, sharded, load-balanced ] - -createEntities: - - client: - id: &client client - observeEvents: - - commandStartedEvent - serverApi: - version: "1" - - database: - id: &database database - client: *client - databaseName: &databaseName versioned-api-tests - - collection: - id: &collection collection - database: *database - collectionName: &collectionName test - - session: - id: &session session - client: *client - -_yamlAnchors: - versions: - - &expectedApiVersion - apiVersion: "1" - apiStrict: { $$unsetOrMatches: false } - apiDeprecationErrors: { $$unsetOrMatches: false } - - -initialData: - - collectionName: *collectionName - databaseName: *databaseName - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - - { _id: 3, x: 33 } - - { _id: 4, x: 44 } - - { _id: 5, x: 55 } - -tests: - - description: "All commands in a transaction declare an API version" - runOnRequirements: - - topologies: [ replicaset, sharded, load-balanced ] - operations: - - name: startTransaction - object: *session - - name: insertOne - object: *collection - arguments: - session: *session - document: { _id: 6, x: 66 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 6 } } } - - name: insertOne - object: *collection - arguments: - session: *session - document: { _id: 7, x: 77 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 7 } } } - - name: commitTransaction - object: *session - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: [ { _id: 6, x: 66 } ] - lsid: { $$sessionLsid: *session } - startTransaction: true - <<: *expectedApiVersion - - commandStartedEvent: - command: - insert: *collectionName - documents: [ { _id: 7, x: 77 } ] - lsid: { $$sessionLsid: *session } - <<: *expectedApiVersion - - commandStartedEvent: - command: - commitTransaction: 1 - lsid: { $$sessionLsid: *session } - <<: *expectedApiVersion - - description: "abortTransaction includes an API version" - runOnRequirements: - - topologies: [ replicaset, sharded, load-balanced ] - operations: - - name: startTransaction - object: *session - - name: insertOne - object: *collection - arguments: - session: *session - document: { _id: 6, x: 66 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 6 } } } - - name: insertOne - object: *collection - arguments: - session: *session - document: { _id: 7, x: 77 } - expectResult: { $$unsetOrMatches: { insertedId: { $$unsetOrMatches: 7 } } } - - name: abortTransaction - object: *session - expectEvents: - - client: *client - events: - - commandStartedEvent: - command: - insert: *collectionName - documents: [ { _id: 6, x: 66 } ] - lsid: { $$sessionLsid: *session } - startTransaction: true - <<: *expectedApiVersion - - commandStartedEvent: - command: - insert: *collectionName - documents: [ { _id: 7, x: 77 } ] - lsid: { $$sessionLsid: *session } - <<: *expectedApiVersion - - commandStartedEvent: - command: - abortTransaction: 1 - lsid: { $$sessionLsid: *session } - <<: *expectedApiVersion diff --git a/version/version.go b/version/version.go index bbae8739d0..a25574af3b 100644 --- a/version/version.go +++ b/version/version.go @@ -11,4 +11,4 @@ package version // Driver is the current version of the driver. -var Driver = "2.2.2" +var Driver = "2.2.0" diff --git a/x/mongo/driver/auth/auth_test.go b/x/mongo/driver/auth/auth_test.go index 4736144e59..2edf872a4d 100644 --- a/x/mongo/driver/auth/auth_test.go +++ b/x/mongo/driver/auth/auth_test.go @@ -7,13 +7,19 @@ package auth_test import ( + "context" + "fmt" "net/http" "testing" "github.com/google/go-cmp/cmp" "go.mongodb.org/mongo-driver/v2/internal/require" "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" "go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" "go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage" ) @@ -101,3 +107,56 @@ func compareResponses(t *testing.T, wm []byte, expectedPayload bsoncore.Document t.Errorf("Payloads don't match. got %v; want %v", actualPayload, expectedPayload) } } + +type testAuthenticator struct{} + +func (a *testAuthenticator) Auth(context.Context, *driver.AuthConfig) error { + return fmt.Errorf("test error") +} + +func (a *testAuthenticator) Reauth(context.Context, *driver.AuthConfig) error { + return nil +} + +func TestPerformAuthentication(t *testing.T) { + t.Parallel() + + cases := []struct { + name string + authenticateToAnything bool + require func(*testing.T, error) + }{ + { + name: "positive", + authenticateToAnything: true, + require: func(t *testing.T, err error) { + require.EqualError(t, err, "auth error: test error") + }, + }, + { + name: "negative", + authenticateToAnything: false, + require: func(t *testing.T, err error) { + require.NoError(t, err) + }, + }, + } + mnetconn := mnet.NewConnection(&drivertest.ChannelConn{}) + for _, tc := range cases { + tc := tc + + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + handshaker := auth.Handshaker(nil, &auth.HandshakeOptions{ + Authenticator: &testAuthenticator{}, + PerformAuthentication: func(description.Server) bool { + return tc.authenticateToAnything + }, + }) + + err := handshaker.FinishHandshake(context.Background(), mnetconn) + tc.require(t, err) + }) + } +} diff --git a/x/mongo/driver/batch_cursor.go b/x/mongo/driver/batch_cursor.go index f444739661..6d6cd211a5 100644 --- a/x/mongo/driver/batch_cursor.go +++ b/x/mongo/driver/batch_cursor.go @@ -381,14 +381,40 @@ func (bc *BatchCursor) getMore(ctx context.Context) { bc.err = Operation{ CommandFn: func(dst []byte, _ description.SelectedServer) ([]byte, error) { + // If maxAwaitTime > remaining timeoutMS - minRoundTripTime, then use + // send remaining TimeoutMS - minRoundTripTime allowing the server an + // opportunity to respond with an empty batch. + var maxTimeMS int64 + if bc.maxAwaitTime != nil { + _, ctxDeadlineSet := ctx.Deadline() + + if ctxDeadlineSet { + rttMonitor := bc.Server().RTTMonitor() + + var ok bool + maxTimeMS, ok = driverutil.CalculateMaxTimeMS(ctx, rttMonitor.Min()) + if !ok && maxTimeMS <= 0 { + return nil, fmt.Errorf( + "calculated server-side timeout (%v ms) is less than or equal to 0 (%v): %w", + maxTimeMS, + rttMonitor.Stats(), + ErrDeadlineWouldBeExceeded) + } + } + + if !ctxDeadlineSet || bc.maxAwaitTime.Milliseconds() < maxTimeMS { + maxTimeMS = bc.maxAwaitTime.Milliseconds() + } + } + dst = bsoncore.AppendInt64Element(dst, "getMore", bc.id) dst = bsoncore.AppendStringElement(dst, "collection", bc.collection) if numToReturn > 0 { dst = bsoncore.AppendInt32Element(dst, "batchSize", numToReturn) } - if bc.maxAwaitTime != nil && *bc.maxAwaitTime > 0 { - dst = bsoncore.AppendInt64Element(dst, "maxTimeMS", int64(*bc.maxAwaitTime)/int64(time.Millisecond)) + if maxTimeMS > 0 { + dst = bsoncore.AppendInt64Element(dst, "maxTimeMS", maxTimeMS) } comment, err := codecutil.MarshalValue(bc.comment, bc.encoderFn) diff --git a/x/mongo/driver/operation.go b/x/mongo/driver/operation.go index 2597a5de66..50136456e4 100644 --- a/x/mongo/driver/operation.go +++ b/x/mongo/driver/operation.go @@ -1724,34 +1724,16 @@ func (op Operation) calculateMaxTimeMS(ctx context.Context, rttMin time.Duration return 0, nil } - deadline, ok := ctx.Deadline() - if !ok { - return 0, nil - } - - remainingTimeout := time.Until(deadline) - - // Always round up to the next millisecond value so we never truncate the calculated - // maxTimeMS value (e.g. 400 microseconds evaluates to 1ms, not 0ms). - maxTimeMS := int64((remainingTimeout - rttMin + time.Millisecond - 1) / time.Millisecond) - if maxTimeMS <= 0 { + // Calculate maxTimeMS value to potentially be appended to the wire message. + maxTimeMS, ok := driverutil.CalculateMaxTimeMS(ctx, rttMin) + if !ok && maxTimeMS <= 0 { return 0, fmt.Errorf( - "remaining time %v until context deadline is less than or equal to min network round-trip time %v (%v): %w", - remainingTimeout, - rttMin, + "calculated server-side timeout (%v ms) is less than or equal to 0 (%v): %w", + maxTimeMS, rttStats, ErrDeadlineWouldBeExceeded) } - // The server will return a "BadValue" error if maxTimeMS is greater - // than the maximum positive int32 value (about 24.9 days). If the - // user specified a timeout value greater than that, omit maxTimeMS - // and let the client-side timeout handle cancelling the op if the - // timeout is ever reached. - if maxTimeMS > math.MaxInt32 { - return 0, nil - } - return maxTimeMS, nil } diff --git a/x/mongo/driver/topology/connection.go b/x/mongo/driver/topology/connection.go index d9cf6985d6..b1bf1d13f1 100644 --- a/x/mongo/driver/topology/connection.go +++ b/x/mongo/driver/topology/connection.go @@ -211,7 +211,7 @@ func (c *connection) connect(ctx context.Context) (err error) { // Assign the result of DialContext to a temporary net.Conn to ensure that c.nc is not set in an error case. tempNc, err := c.config.dialer.DialContext(ctx, c.addr.Network(), c.addr.String()) if err != nil { - return ConnectionError{Wrapped: err, init: true} + return ConnectionError{Wrapped: err, init: true, message: fmt.Sprintf("failed to connect to %s", c.addr)} } c.nc = tempNc @@ -228,7 +228,7 @@ func (c *connection) connect(ctx context.Context) (err error) { tlsNc, err := configureTLS(ctx, c.config.tlsConnectionSource, c.nc, c.addr, tlsConfig, ocspOpts) if err != nil { - return ConnectionError{Wrapped: err, init: true} + return ConnectionError{Wrapped: err, init: true, message: fmt.Sprintf("failed to configure TLS for %s", c.addr)} } c.nc = tlsNc } @@ -340,7 +340,10 @@ func transformNetworkError(ctx context.Context, originalError error, contextDead return originalError } if netErr, ok := originalError.(net.Error); ok && netErr.Timeout() { - return fmt.Errorf("%w: %s", context.DeadlineExceeded, originalError.Error()) + return fmt.Errorf("%w: %s: %s", + context.DeadlineExceeded, + "client timed out waiting for server response", + originalError.Error()) } return originalError @@ -412,9 +415,6 @@ func (c *connection) readWireMessage(ctx context.Context) ([]byte, error) { c.close() } message := errMsg - if errors.Is(err, io.EOF) { - message = "socket was unexpectedly closed" - } return nil, ConnectionError{ ConnectionID: c.id, Wrapped: transformNetworkError(ctx, err, contextDeadlineUsed), diff --git a/x/mongo/driver/topology/connection_test.go b/x/mongo/driver/topology/connection_test.go index 1e9068f674..5b2f39f272 100644 --- a/x/mongo/driver/topology/connection_test.go +++ b/x/mongo/driver/topology/connection_test.go @@ -63,8 +63,8 @@ func TestConnection(t *testing.T) { t.Run("connect", func(t *testing.T) { t.Run("dialer error", func(t *testing.T) { err := errors.New("dialer error") - var want error = ConnectionError{Wrapped: err, init: true} - conn := newConnection(address.Address(""), WithDialer(func(Dialer) Dialer { + var want error = ConnectionError{Wrapped: err, init: true, message: "failed to connect to testaddr:27017"} + conn := newConnection(address.Address("testaddr"), WithDialer(func(Dialer) Dialer { return DialerFunc(func(context.Context, string, string) (net.Conn, error) { return nil, err }) })) got := conn.connect(context.Background()) @@ -151,7 +151,7 @@ func TestConnection(t *testing.T) { close(doneChan) assert.Eventually(t, - func() bool { return done.Load().(bool) }, + func() bool { return done.Load() != nil && done.Load().(bool) }, 100*time.Millisecond, 1*time.Millisecond, "TODO") @@ -1100,3 +1100,64 @@ func (tcl *testCancellationListener) assertCalledOnce(t *testing.T) { assert.Equal(t, 1, tcl.numListen, "expected Listen to be called once, got %d", tcl.numListen) assert.Equal(t, 1, tcl.numStopListening, "expected StopListening to be called once, got %d", tcl.numListen) } + +type testContext struct { + context.Context + deadline time.Time +} + +func (tc *testContext) Deadline() (time.Time, bool) { + return tc.deadline, false +} + +func TestConnectionError(t *testing.T) { + t.Parallel() + + t.Run("EOF", func(t *testing.T) { + t.Parallel() + + addr := bootstrapConnections(t, 1, func(nc net.Conn) { + _ = nc.Close() + }) + + p := newPool( + poolConfig{Address: address.Address(addr.String())}, + ) + defer p.close(context.Background()) + err := p.ready() + require.NoError(t, err, "unexpected close error") + + conn, err := p.checkOut(context.Background()) + require.NoError(t, err, "unexpected checkOut error") + + _, err = conn.readWireMessage(context.Background()) + assert.ErrorContains(t, err, "connection closed unexpectedly by the other side: EOF") + }) + t.Run("timeout", func(t *testing.T) { + t.Parallel() + + timeout := 10 * time.Millisecond + + addr := bootstrapConnections(t, 1, func(nc net.Conn) { + time.Sleep(timeout * 2) + _ = nc.Close() + }) + + p := newPool( + poolConfig{Address: address.Address(addr.String())}, + ) + defer p.close(context.Background()) + err := p.ready() + require.NoError(t, err) + + conn, err := p.checkOut(context.Background()) + require.NoError(t, err) + + ctx := &testContext{ + Context: context.Background(), + deadline: time.Now().Add(timeout), + } + _, err = conn.readWireMessage(ctx) + assert.ErrorContains(t, err, "client timed out waiting for server response") + }) +} diff --git a/x/mongo/driver/topology/errors.go b/x/mongo/driver/topology/errors.go index 79f11f7f79..dee1941542 100644 --- a/x/mongo/driver/topology/errors.go +++ b/x/mongo/driver/topology/errors.go @@ -10,11 +10,17 @@ import ( "context" "errors" "fmt" + "io" + "net" + "os" + "strings" "time" "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" ) +var _ error = ConnectionError{} + // ConnectionError represents a connection error. type ConnectionError struct { ConnectionID string @@ -28,21 +34,28 @@ type ConnectionError struct { // Error implements the error interface. func (e ConnectionError) Error() string { - message := e.message + var messages []string if e.init { - fullMsg := "error occurred during connection handshake" - if message != "" { - fullMsg = fmt.Sprintf("%s: %s", fullMsg, message) - } - message = fullMsg + messages = append(messages, "error occurred during connection handshake") } - if e.Wrapped != nil && message != "" { - return fmt.Sprintf("connection(%s) %s: %s", e.ConnectionID, message, e.Wrapped.Error()) + if e.message != "" { + messages = append(messages, e.message) } if e.Wrapped != nil { - return fmt.Sprintf("connection(%s) %s", e.ConnectionID, e.Wrapped.Error()) + if errors.Is(e.Wrapped, io.EOF) { + messages = append(messages, "connection closed unexpectedly by the other side") + } + if errors.Is(e.Wrapped, os.ErrDeadlineExceeded) { + messages = append(messages, "client timed out waiting for server response") + } else if err, ok := e.Wrapped.(net.Error); ok && err.Timeout() { + messages = append(messages, "client timed out waiting for server response") + } + messages = append(messages, e.Wrapped.Error()) + } + if len(messages) > 0 { + return fmt.Sprintf("connection(%s) %s", e.ConnectionID, strings.Join(messages, ": ")) } - return fmt.Sprintf("connection(%s) %s", e.ConnectionID, message) + return fmt.Sprintf("connection(%s)", e.ConnectionID) } // Unwrap returns the underlying error. diff --git a/x/mongo/driver/topology/pool_test.go b/x/mongo/driver/topology/pool_test.go index ba22f95036..f58e1cf204 100644 --- a/x/mongo/driver/topology/pool_test.go +++ b/x/mongo/driver/topology/pool_test.go @@ -471,6 +471,7 @@ func TestPool_checkOut(t *testing.T) { dialErr := errors.New("create new connection error") p := newPool(poolConfig{ + Address: "testaddr", ConnectTimeout: defaultConnectionTimeout, }, WithDialer(func(Dialer) Dialer { return DialerFunc(func(context.Context, string, string) (net.Conn, error) { @@ -481,7 +482,7 @@ func TestPool_checkOut(t *testing.T) { require.NoError(t, err) _, err = p.checkOut(context.Background()) - var want error = ConnectionError{Wrapped: dialErr, init: true} + var want error = ConnectionError{Wrapped: dialErr, init: true, message: "failed to connect to testaddr:27017"} assert.Equalf(t, want, err, "should return error from calling checkOut()") // If a connection initialization error occurs during checkOut, removing and closing the // failed connection both happen asynchronously with the checkOut. Wait for up to 2s for @@ -1205,7 +1206,7 @@ func TestBackgroundRead(t *testing.T) { defer cancel() _, err = conn.readWireMessage(ctx) regex := regexp.MustCompile( - `^connection\(.*\[-\d+\]\) incomplete read of message header: context deadline exceeded: read tcp 127.0.0.1:.*->127.0.0.1:.*: i\/o timeout$`, + `^connection\(.*\[-\d+\]\) incomplete read of message header: context deadline exceeded: client timed out waiting for server response: read tcp 127.0.0.1:.*->127.0.0.1:.*: i\/o timeout$`, ) assert.True(t, regex.MatchString(err.Error()), "error %q does not match pattern %q", err, regex) assert.Nil(t, conn.awaitRemainingBytes, "conn.awaitRemainingBytes should be nil") @@ -1245,7 +1246,7 @@ func TestBackgroundRead(t *testing.T) { defer cancel() _, err = conn.readWireMessage(ctx) regex := regexp.MustCompile( - `^connection\(.*\[-\d+\]\) incomplete read of message header: context deadline exceeded: read tcp 127.0.0.1:.*->127.0.0.1:.*: i\/o timeout$`, + `^connection\(.*\[-\d+\]\) incomplete read of message header: context deadline exceeded: client timed out waiting for server response: read tcp 127.0.0.1:.*->127.0.0.1:.*: i\/o timeout$`, ) assert.True(t, regex.MatchString(err.Error()), "error %q does not match pattern %q", err, regex) err = p.checkIn(conn) @@ -1292,7 +1293,7 @@ func TestBackgroundRead(t *testing.T) { defer cancel() _, err = conn.readWireMessage(ctx) regex := regexp.MustCompile( - `^connection\(.*\[-\d+\]\) incomplete read of message header: context deadline exceeded: read tcp 127.0.0.1:.*->127.0.0.1:.*: i\/o timeout$`, + `^connection\(.*\[-\d+\]\) incomplete read of message header: context deadline exceeded: client timed out waiting for server response: read tcp 127.0.0.1:.*->127.0.0.1:.*: i\/o timeout$`, ) assert.True(t, regex.MatchString(err.Error()), "error %q does not match pattern %q", err, regex) err = p.checkIn(conn) @@ -1344,7 +1345,7 @@ func TestBackgroundRead(t *testing.T) { defer cancel() _, err = conn.readWireMessage(ctx) regex := regexp.MustCompile( - `^connection\(.*\[-\d+\]\) incomplete read of message header: context deadline exceeded: read tcp 127.0.0.1:.*->127.0.0.1:.*: i\/o timeout$`, + `^connection\(.*\[-\d+\]\) incomplete read of message header: context deadline exceeded: client timed out waiting for server response: read tcp 127.0.0.1:.*->127.0.0.1:.*: i\/o timeout$`, ) assert.True(t, regex.MatchString(err.Error()), "error %q does not match pattern %q", err, regex) err = p.checkIn(conn) @@ -1398,7 +1399,7 @@ func TestBackgroundRead(t *testing.T) { defer cancel() _, err = conn.readWireMessage(ctx) regex := regexp.MustCompile( - `^connection\(.*\[-\d+\]\) incomplete read of full message: context deadline exceeded: read tcp 127.0.0.1:.*->127.0.0.1:.*: i\/o timeout$`, + `^connection\(.*\[-\d+\]\) incomplete read of full message: context deadline exceeded: client timed out waiting for server response: read tcp 127.0.0.1:.*->127.0.0.1:.*: i\/o timeout$`, ) assert.True(t, regex.MatchString(err.Error()), "error %q does not match pattern %q", err, regex) err = p.checkIn(conn) @@ -1448,7 +1449,7 @@ func TestBackgroundRead(t *testing.T) { defer cancel() _, err = conn.readWireMessage(ctx) regex := regexp.MustCompile( - `^connection\(.*\[-\d+\]\) incomplete read of full message: context deadline exceeded: read tcp 127.0.0.1:.*->127.0.0.1:.*: i\/o timeout$`, + `^connection\(.*\[-\d+\]\) incomplete read of full message: context deadline exceeded: client timed out waiting for server response: read tcp 127.0.0.1:.*->127.0.0.1:.*: i\/o timeout$`, ) assert.True(t, regex.MatchString(err.Error()), "error %q does not match pattern %q", err, regex) err = p.checkIn(conn) diff --git a/x/mongo/driver/topology/server_test.go b/x/mongo/driver/topology/server_test.go index 5ab5692840..818a7818f6 100644 --- a/x/mongo/driver/topology/server_test.go +++ b/x/mongo/driver/topology/server_test.go @@ -376,7 +376,7 @@ func TestServer(t *testing.T) { } authErr := ConnectionError{Wrapped: &auth.Error{}, init: true} - netErr := ConnectionError{Wrapped: &net.AddrError{}, init: true} + netErr := ConnectionError{Wrapped: &net.AddrError{}, init: true, message: "failed to connect to localhost:27017"} for _, tt := range serverTestTable { t.Run(tt.name, func(t *testing.T) { var returnConnectionError bool diff --git a/x/mongo/driver/topology/topology_options.go b/x/mongo/driver/topology/topology_options.go index aefa74c56a..2ddc7434bd 100644 --- a/x/mongo/driver/topology/topology_options.go +++ b/x/mongo/driver/topology/topology_options.go @@ -15,9 +15,11 @@ import ( "go.mongodb.org/mongo-driver/v2/event" "go.mongodb.org/mongo-driver/v2/internal/logger" + "go.mongodb.org/mongo-driver/v2/internal/optionsutil" "go.mongodb.org/mongo-driver/v2/mongo/options" "go.mongodb.org/mongo-driver/v2/x/mongo/driver" "go.mongodb.org/mongo-driver/v2/x/mongo/driver/auth" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" "go.mongodb.org/mongo-driver/v2/x/mongo/driver/ocsp" "go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation" "go.mongodb.org/mongo-driver/v2/x/mongo/driver/session" @@ -270,6 +272,14 @@ func NewConfigFromOptionsWithAuthenticator(opts *options.ClientOptions, clock *s // Required for SASL mechanism negotiation during handshake handshakeOpts.DBUser = opts.Auth.AuthSource + "." + opts.Auth.Username } + if a := optionsutil.Value(opts.Custom, "authenticateToAnything"); a != nil { + if v, ok := a.(bool); ok && v { + // Authenticate arbiters + handshakeOpts.PerformAuthentication = func(_ description.Server) bool { + return true + } + } + } handshaker = func(driver.Handshaker) driver.Handshaker { return auth.Handshaker(nil, handshakeOpts) diff --git a/x/mongo/driver/topology/topology_options_test.go b/x/mongo/driver/topology/topology_options_test.go index 759ab9aa4a..680aa638a7 100644 --- a/x/mongo/driver/topology/topology_options_test.go +++ b/x/mongo/driver/topology/topology_options_test.go @@ -7,6 +7,7 @@ package topology import ( + "context" "fmt" "net/url" "reflect" @@ -17,6 +18,10 @@ import ( "go.mongodb.org/mongo-driver/v2/internal/require" "go.mongodb.org/mongo-driver/v2/mongo/options" "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/description" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/xoptions" ) func TestDirectConnectionFromConnString(t *testing.T) { @@ -85,6 +90,76 @@ func TestLoadBalancedFromConnString(t *testing.T) { } } +type testAuthenticator struct{} + +var _ driver.Authenticator = &testAuthenticator{} + +func (a *testAuthenticator) Auth(context.Context, *driver.AuthConfig) error { + return fmt.Errorf("test error") +} + +func (a *testAuthenticator) Reauth(context.Context, *driver.AuthConfig) error { + return nil +} + +func TestAuthenticateToAnything(t *testing.T) { + t.Parallel() + + cases := []struct { + name string + set func(*options.ClientOptions) error + require func(*testing.T, error) + }{ + { + name: "default", + set: func(*options.ClientOptions) error { return nil }, + require: func(t *testing.T, err error) { + require.NoError(t, err) + }, + }, + { + name: "positive", + set: func(opt *options.ClientOptions) error { + return xoptions.SetInternalClientOptions(opt, "authenticateToAnything", true) + }, + require: func(t *testing.T, err error) { + require.EqualError(t, err, "auth error: test error") + }, + }, + { + name: "negative", + set: func(opt *options.ClientOptions) error { + return xoptions.SetInternalClientOptions(opt, "authenticateToAnything", false) + }, + require: func(t *testing.T, err error) { + require.NoError(t, err) + }, + }, + } + + describer := &drivertest.ChannelConn{ + Desc: description.Server{Kind: description.ServerKindRSArbiter}, + } + for _, tc := range cases { + tc := tc + + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + opt := options.Client().SetAuth(options.Credential{Username: "foo", Password: "bar"}) + err := tc.set(opt) + require.NoError(t, err, "error setting authenticateToAnything: %v", err) + cfg, err := NewConfigFromOptionsWithAuthenticator(opt, nil, &testAuthenticator{}) + require.NoError(t, err, "error constructing topology config: %v", err) + + srvrCfg := newServerConfig(defaultConnectionTimeout, cfg.ServerOpts...) + connCfg := newConnectionConfig(srvrCfg.connectionOpts...) + err = connCfg.handshaker.FinishHandshake(context.TODO(), &mnet.Connection{Describer: describer}) + tc.require(t, err) + }) + } +} + func TestTopologyNewConfig(t *testing.T) { t.Run("default ServerSelectionTimeout", func(t *testing.T) { cfg, err := NewConfig(options.Client(), nil) diff --git a/x/mongo/driver/xoptions/options.go b/x/mongo/driver/xoptions/options.go new file mode 100644 index 0000000000..68e28e7cd8 --- /dev/null +++ b/x/mongo/driver/xoptions/options.go @@ -0,0 +1,47 @@ +// Copyright (C) MongoDB, Inc. 2025-present. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + +package xoptions + +import ( + "fmt" + + "go.mongodb.org/mongo-driver/v2/internal/optionsutil" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" +) + +// SetInternalClientOptions sets internal options for ClientOptions. +// +// Deprecated: This function is for internal use only. It may be changed or removed in any release. +func SetInternalClientOptions(opts *options.ClientOptions, key string, option any) error { + typeErrFunc := func(t string) error { + return fmt.Errorf("unexpected type for %s: %T is not %s", key, option, t) + } + switch key { + case "crypt": + c, ok := option.(driver.Crypt) + if !ok { + return typeErrFunc("driver.Crypt") + } + opts.Crypt = c + case "deployment": + d, ok := option.(driver.Deployment) + if !ok { + return typeErrFunc("driver.Deployment") + } + opts.Deployment = d + case "authenticateToAnything": + b, ok := option.(bool) + if !ok { + return typeErrFunc("bool") + } + opts.Custom = optionsutil.WithValue(opts.Custom, key, b) + default: + return fmt.Errorf("unsupported option: %s", key) + } + return nil +} diff --git a/x/mongo/driver/xoptions/options_test.go b/x/mongo/driver/xoptions/options_test.go new file mode 100644 index 0000000000..284fe914a1 --- /dev/null +++ b/x/mongo/driver/xoptions/options_test.go @@ -0,0 +1,89 @@ +// Copyright (C) MongoDB, Inc. 2025-present. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + +package xoptions + +import ( + "fmt" + "testing" + + "go.mongodb.org/mongo-driver/v2/internal/optionsutil" + "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver" + "go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest" +) + +func TestSetInternalClientOptions(t *testing.T) { + t.Parallel() + + cases := []struct { + key string + value any + }{ + { + key: "authenticateToAnything", + value: true, + }, + } + for _, tc := range cases { + tc := tc + + t.Run(fmt.Sprintf("set %s", tc.key), func(t *testing.T) { + t.Parallel() + + opts := options.Client() + err := SetInternalClientOptions(opts, tc.key, tc.value) + require.NoError(t, err, "error setting %s: %v", tc.key, err) + v := optionsutil.Value(opts.Custom, tc.key) + require.Equal(t, tc.value, v, "expected %v, got %v", tc.value, v) + }) + } + + t.Run("set crypt", func(t *testing.T) { + t.Parallel() + + c := driver.NewCrypt(&driver.CryptOptions{}) + opts := options.Client() + err := SetInternalClientOptions(opts, "crypt", c) + require.NoError(t, err, "error setting crypt: %v", err) + require.Equal(t, c, opts.Crypt, "expected %v, got %v", c, opts.Crypt) + }) + + t.Run("set crypt - wrong type", func(t *testing.T) { + t.Parallel() + + opts := options.Client() + err := SetInternalClientOptions(opts, "crypt", &drivertest.MockDeployment{}) + require.EqualError(t, err, "unexpected type for crypt: *drivertest.MockDeployment is not driver.Crypt") + }) + + t.Run("set deployment", func(t *testing.T) { + t.Parallel() + + d := &drivertest.MockDeployment{} + opts := options.Client() + err := SetInternalClientOptions(opts, "deployment", d) + require.NoError(t, err, "error setting deployment: %v", err) + require.Equal(t, d, opts.Deployment, "expected %v, got %v", d, opts.Deployment) + }) + + t.Run("set deployment - wrong type", func(t *testing.T) { + t.Parallel() + + opts := options.Client() + err := SetInternalClientOptions(opts, "deployment", driver.NewCrypt(&driver.CryptOptions{})) + require.EqualError(t, err, "unexpected type for deployment: *driver.crypt is not driver.Deployment") + }) + + t.Run("set unsupported option", func(t *testing.T) { + t.Parallel() + + opts := options.Client() + err := SetInternalClientOptions(opts, "unsupported", "unsupported") + require.EqualError(t, err, "unsupported option: unsupported") + }) +}