Skip to content

Commit

Permalink
DRIVERS-2524 fix commandStarted events with encryptionInformation (#1405
Browse files Browse the repository at this point in the history
)

* add escCollection and ecocCollection to commandStarted events

escCollection and ecocCollection are appended by libmongocrypt

* fix indent of encryptionInformation

* add missing `ordered: true`

* regenerate tests
  • Loading branch information
kevinAlbs committed Apr 21, 2023
1 parent 73fddca commit eb3d882
Show file tree
Hide file tree
Showing 126 changed files with 1,848 additions and 593 deletions.
Expand Up @@ -48,6 +48,14 @@ tests:
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:
Expand Down
Expand Up @@ -63,7 +63,11 @@ tests:
encryptionInformation:
type: 1
schema:
"default.default": *encrypted_fields
"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:
Expand All @@ -82,10 +86,15 @@ tests:
},
"limit": 1
}
ordered: true
encryptionInformation:
type: 1
schema:
"default.default": *encrypted_fields
"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:
Expand Down
Expand Up @@ -66,7 +66,12 @@ tests:
encryptionInformation:
type: 1
schema:
"default.default": *encrypted_fields
"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:
Expand All @@ -84,7 +89,12 @@ tests:
encryptionInformation:
type: 1
schema:
"default.default": *encrypted_fields
"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:
Expand Down
Expand Up @@ -45,6 +45,8 @@ tests:
},
"schema": {
"default.default": {
"escCollection": "enxcol_.default.esc",
"ecocCollection": "enxcol_.default.ecoc",
"fields": []
}
}
Expand Down
Expand Up @@ -64,7 +64,12 @@ tests:
encryptionInformation:
type: 1
schema:
"default.default": *encrypted_fields
"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:
Expand All @@ -83,7 +88,12 @@ tests:
encryptionInformation:
type: 1
schema:
"default.default": *encrypted_fields
"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:
Expand Down Expand Up @@ -148,7 +158,12 @@ tests:
encryptionInformation:
type: 1
schema:
"default.default": *encrypted_fields
"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:
Expand All @@ -168,7 +183,12 @@ tests:
encryptionInformation:
type: 1
schema:
"default.default": *encrypted_fields
"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:
Expand Down
Expand Up @@ -62,7 +62,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand All @@ -80,7 +84,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand Down
Expand Up @@ -66,7 +66,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand All @@ -77,7 +81,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand All @@ -100,7 +108,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand Down
Expand Up @@ -67,7 +67,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand All @@ -78,7 +82,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand All @@ -98,10 +106,15 @@ tests:
"limit": 1
}
]
ordered: true
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand Down
Expand Up @@ -68,7 +68,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand All @@ -79,7 +83,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand All @@ -98,7 +106,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand Down
Expand Up @@ -66,7 +66,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand All @@ -77,7 +81,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand All @@ -94,7 +102,11 @@ tests:
encryptionInformation:
type: 1
schema:
default.default: *encrypted_fields
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:
Expand Down

0 comments on commit eb3d882

Please sign in to comment.