[DRIVERS-2383] Update CSE unified tests expectResult: null Created: 07/Jul/22  Updated: 07/Jul/22  Resolved: 07/Jul/22

Status: Closed
Project: Drivers
Component/s: Client Side Encryption, Unified Test Runner
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Ross Lawley Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates DRIVERS-2382 Update CSE unified tests expectResult... Implementing
Epic Link: Key Management API
Driver Changes: Needed
Quarter: FY23Q2

 Description   

Summary

The current tests users expectResult: null however, it should use {"$$unsetOrMatches": null}.

$$unsetOrMatches:

This operator can be used anywhere a matched value is expected (including expectResult), excluding an array element because Arrays Must Contain the Same Number of Elements. The test runner MUST assert that the actual value either does not exist or matches the expected value. Matching the expected value MUST use the standard rules in Evaluating Matches, which means that it may contain special operators.

This is because its testing the absence of a result and comparing against a Bson Null.

Motivation

Keeps the test runner to spec.

Is this ticket only for tests?

Yes


Generated at Thu Feb 08 08:25:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.