|
DRIVERS-2524 added a legacy format QE test with embedded null fields in a command_started_event:
- command_started_event:
|
command:
|
create: *encrypted_collection_name
|
encryptedFields: &encrypted_fields_expectation {
|
# Expect state collections are not included in the encryptedFields sent to the server.
|
"escCollection": null,
|
"ecocCollection": null,
|
"eccCollection": null,
|
https://github.com/mongodb/specifications/blob/aa28f78/source/client-side-encryption/tests/legacy/fle2v2-CreateCollection.yml#L99-L107
AFAIK only top-level nulls are intended to be treated specially and embedded documents are supposed to be compared with exact match semantics. When implementing this test in PYTHON-3614 I had to add a workaround in pymongo's legacy test runner like this:
# Workaround an incorrect command started event in fle2v2-CreateCollection.yml
|
# added in DRIVERS-2524.
|
if key == "encryptedFields":
|
for n in ("eccCollection", "ecocCollection", "escCollection"):
|
if val.get(n) is None:
|
val.pop(n, None)
|
Is this workaround is required or can we simply remove the escCollection/etc.. fields from the test?
|