From 2243c1c32978c304f0fdd63ec9a4b075361c96ac Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Tue, 1 Apr 2025 14:37:42 -0500 Subject: [PATCH 1/8] Revert "CDRIVER-5959 temporarily restrict updateDescription tests to 8.1 or older (#1970)" This reverts commit b5649edc41933cef8c5b18fd8558075828ccbf0c. --- .../unified/change-streams-disambiguatedPaths.json | 1 - .../unified/change-streams-pre_and_post_images.json | 1 - .../tests/json/change_streams/unified/change-streams.json | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json index 9d69132c20..b177e1ff58 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json @@ -26,7 +26,6 @@ "runOnRequirements": [ { "minServerVersion": "6.1.0", - "maxServerVersion": "8.1.0", "topologies": [ "replicaset", "sharded-replicaset", diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-pre_and_post_images.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-pre_and_post_images.json index d060c71173..8beefb2bc8 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-pre_and_post_images.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-pre_and_post_images.json @@ -4,7 +4,6 @@ "runOnRequirements": [ { "minServerVersion": "6.0.0", - "maxServerVersion": "8.1.0", "topologies": [ "replicaset", "sharded-replicaset", diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams.json b/src/libmongoc/tests/json/change_streams/unified/change-streams.json index ac7878b83a..25d8689624 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams.json @@ -4,7 +4,6 @@ "runOnRequirements": [ { "minServerVersion": "3.6", - "maxServerVersion": "8.1", "topologies": [ "replicaset" ], @@ -113,8 +112,7 @@ "description": "Test array truncation", "runOnRequirements": [ { - "minServerVersion": "4.7", - "maxServerVersion": "8.1" + "minServerVersion": "4.7" } ], "operations": [ From e9b98afc732630795a810389f64460f8401bf222 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Tue, 1 Apr 2025 14:37:44 -0500 Subject: [PATCH 2/8] Format change streams unified spec tests --- .../change-streams-disambiguatedPaths.json | 437 +++++++++--------- .../unified/change-streams.json | 2 +- 2 files changed, 219 insertions(+), 220 deletions(-) diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json index b177e1ff58..9a639801ee 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json @@ -1,252 +1,251 @@ { - "description": "disambiguatedPaths", - "schemaVersion": "1.3", - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "database0" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "collection0" - } + "description": "disambiguatedPaths", + "schemaVersion": "1.3", + "createEntities": [ + { + "client": { + "id": "client0", + "useMultipleMongoses": false } - ], - "runOnRequirements": [ - { - "minServerVersion": "6.1.0", - "topologies": [ - "replicaset", - "sharded-replicaset", - "load-balanced", - "sharded" - ] + }, + { + "database": { + "id": "database0", + "client": "client0", + "databaseName": "database0" } - ], - "initialData": [ - { - "collectionName": "collection0", - "databaseName": "database0", - "documents": [] + }, + { + "collection": { + "id": "collection0", + "database": "database0", + "collectionName": "collection0" } - ], - "tests": [ - { - "description": "disambiguatedPaths is not present when showExpandedEvents is false/unset", - "operations": [ - { - "name": "insertOne", - "object": "collection0", - "arguments": { - "document": { - "_id": 1, - "a": { - "1": 1 - } + } + ], + "runOnRequirements": [ + { + "minServerVersion": "6.1.0", + "topologies": [ + "replicaset", + "sharded-replicaset", + "load-balanced", + "sharded" + ] + } + ], + "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": [] }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [] + "saveResultAsEntity": "changeStream0" + }, + { + "name": "updateOne", + "object": "collection0", + "arguments": { + "filter": { + "_id": 1 }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "a.1": 2 - } + "update": { + "$set": { + "a.1": 2 } } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "database0", - "coll": "collection0" + } + }, + { + "name": "iterateUntilDocumentOrError", + "object": "changeStream0", + "expectResult": { + "operationType": "update", + "ns": { + "db": "database0", + "coll": "collection0" + }, + "updateDescription": { + "updatedFields": { + "$$exists": true }, - "updateDescription": { - "updatedFields": { - "$$exists": true - }, - "removedFields": { - "$$exists": true - }, - "truncatedArrays": { - "$$exists": true - }, - "disambiguatedPaths": { - "$$exists": false - } + "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 - } + } + ] + }, + { + "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 }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "showExpandedEvents": true + "saveResultAsEntity": "changeStream0" + }, + { + "name": "updateOne", + "object": "collection0", + "arguments": { + "filter": { + "_id": 1 }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "a.1": 2 - } + "update": { + "$set": { + "a.1": 2 } } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "database0", - "coll": "collection0" + } + }, + { + "name": "iterateUntilDocumentOrError", + "object": "changeStream0", + "expectResult": { + "operationType": "update", + "ns": { + "db": "database0", + "coll": "collection0" + }, + "updateDescription": { + "updatedFields": { + "$$exists": true }, - "updateDescription": { - "updatedFields": { - "$$exists": true - }, - "removedFields": { - "$$exists": true - }, - "truncatedArrays": { - "$$exists": true - }, - "disambiguatedPaths": { - "a.1": [ - "a", - "1" - ] - } + "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 - } - ] - } + } + ] + }, + { + "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 }, - { - "name": "createChangeStream", - "object": "collection0", - "arguments": { - "pipeline": [], - "showExpandedEvents": true + "saveResultAsEntity": "changeStream0" + }, + { + "name": "updateOne", + "object": "collection0", + "arguments": { + "filter": { + "_id": 1 }, - "saveResultAsEntity": "changeStream0" - }, - { - "name": "updateOne", - "object": "collection0", - "arguments": { - "filter": { - "_id": 1 - }, - "update": { - "$set": { - "a.0.1": 2 - } + "update": { + "$set": { + "a.0.1": 2 } } - }, - { - "name": "iterateUntilDocumentOrError", - "object": "changeStream0", - "expectResult": { - "operationType": "update", - "ns": { - "db": "database0", - "coll": "collection0" + } + }, + { + "name": "iterateUntilDocumentOrError", + "object": "changeStream0", + "expectResult": { + "operationType": "update", + "ns": { + "db": "database0", + "coll": "collection0" + }, + "updateDescription": { + "updatedFields": { + "$$exists": true }, - "updateDescription": { - "updatedFields": { - "$$exists": true - }, - "removedFields": { - "$$exists": true - }, - "truncatedArrays": { - "$$exists": true - }, - "disambiguatedPaths": { - "a.0.1": [ - "a", - { - "$$type": "int" - }, - "1" - ] - } + "removedFields": { + "$$exists": true + }, + "truncatedArrays": { + "$$exists": true + }, + "disambiguatedPaths": { + "a.0.1": [ + "a", + { + "$$type": "int" + }, + "1" + ] } } } - ] - } - ] - } - \ No newline at end of file + } + ] + } + ] +} diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams.json b/src/libmongoc/tests/json/change_streams/unified/change-streams.json index 25d8689624..c8b60ed4e2 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams.json @@ -1792,4 +1792,4 @@ ] } ] -} \ No newline at end of file +} From 3b1b3c20c268bb6004f388435c185cf217822930 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Tue, 1 Apr 2025 14:37:44 -0500 Subject: [PATCH 3/8] CDRIVER-4469 sync change streams unified spec tests with d9a0e7b2 --- .../unified/change-streams-clusterTime.json | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 src/libmongoc/tests/json/change_streams/unified/change-streams-clusterTime.json diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-clusterTime.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-clusterTime.json new file mode 100644 index 0000000000..3411d4e27e --- /dev/null +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-clusterTime.json @@ -0,0 +1,81 @@ +{ + "description": "change-streams-clusterTime", + "schemaVersion": "1.3", + "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", + "sharded-replicaset", + "load-balanced", + "sharded" + ] + } + ], + "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 + } + } + } + ] + } + ] +} From 8348f77d73127d4a4c0e3fa86ce4941d83291d30 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Tue, 1 Apr 2025 14:37:45 -0500 Subject: [PATCH 4/8] CDRIVER-4471 sync change streams unified spec tests with 9a8abe81 --- .../unified/change-streams-disambiguatedPaths.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json index 9a639801ee..91d8e66da2 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json @@ -1,6 +1,6 @@ { "description": "disambiguatedPaths", - "schemaVersion": "1.3", + "schemaVersion": "1.4", "createEntities": [ { "client": { @@ -31,7 +31,8 @@ "sharded-replicaset", "load-balanced", "sharded" - ] + ], + "serverless": "forbid" } ], "initialData": [ From 93b738f876dc05e6010c371e4f36d1c5d5b9670e Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Tue, 1 Apr 2025 14:37:45 -0500 Subject: [PATCH 5/8] CDRIVER-4469 sync change streams unified spec tests with 1a3b359a --- .../change_streams/unified/change-streams-clusterTime.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-clusterTime.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-clusterTime.json index 3411d4e27e..55b4ae3fbc 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-clusterTime.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-clusterTime.json @@ -1,6 +1,6 @@ { "description": "change-streams-clusterTime", - "schemaVersion": "1.3", + "schemaVersion": "1.4", "createEntities": [ { "client": { @@ -31,7 +31,8 @@ "sharded-replicaset", "load-balanced", "sharded" - ] + ], + "serverless": "forbid" } ], "initialData": [ From 1f1269f9d3453d91bafcbc69b6c92baeab6e8517 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Tue, 1 Apr 2025 14:37:45 -0500 Subject: [PATCH 6/8] CDRIVER-4639 sync change streams unified spec tests with 474ddfcc --- .../change_streams/unified/change-streams-clusterTime.json | 1 - .../unified/change-streams-disambiguatedPaths.json | 1 - .../json/change_streams/unified/change-streams-errors.json | 4 ++-- .../unified/change-streams-pre_and_post_images.json | 2 +- .../unified/change-streams-resume-allowlist.json | 2 +- .../unified/change-streams-resume-errorLabels.json | 2 +- .../unified/change-streams-showExpandedEvents.json | 2 -- 7 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-clusterTime.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-clusterTime.json index 55b4ae3fbc..2b09e548f1 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-clusterTime.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-clusterTime.json @@ -28,7 +28,6 @@ "minServerVersion": "4.0.0", "topologies": [ "replicaset", - "sharded-replicaset", "load-balanced", "sharded" ], diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json index 91d8e66da2..e6cc5ef66e 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json @@ -28,7 +28,6 @@ "minServerVersion": "6.1.0", "topologies": [ "replicaset", - "sharded-replicaset", "load-balanced", "sharded" ], diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-errors.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-errors.json index 04fe8f04f3..65e99e541e 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-errors.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-errors.json @@ -145,7 +145,7 @@ "minServerVersion": "4.1.11", "topologies": [ "replicaset", - "sharded-replicaset", + "sharded", "load-balanced" ] } @@ -190,7 +190,7 @@ "minServerVersion": "4.2", "topologies": [ "replicaset", - "sharded-replicaset", + "sharded", "load-balanced" ] } diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-pre_and_post_images.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-pre_and_post_images.json index 8beefb2bc8..e62fc03459 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-pre_and_post_images.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-pre_and_post_images.json @@ -6,7 +6,7 @@ "minServerVersion": "6.0.0", "topologies": [ "replicaset", - "sharded-replicaset", + "sharded", "load-balanced" ], "serverless": "forbid" diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-resume-allowlist.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-resume-allowlist.json index b4953ec736..1ec72b432b 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-resume-allowlist.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-resume-allowlist.json @@ -6,7 +6,7 @@ "minServerVersion": "3.6", "topologies": [ "replicaset", - "sharded-replicaset", + "sharded", "load-balanced" ], "serverless": "forbid" diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-resume-errorLabels.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-resume-errorLabels.json index f5f4505a9f..7fd70108f0 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-resume-errorLabels.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-resume-errorLabels.json @@ -6,7 +6,7 @@ "minServerVersion": "4.3.1", "topologies": [ "replicaset", - "sharded-replicaset", + "sharded", "load-balanced" ], "serverless": "forbid" diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-showExpandedEvents.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-showExpandedEvents.json index a59a818493..b9594e0c1e 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-showExpandedEvents.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-showExpandedEvents.json @@ -6,7 +6,6 @@ "minServerVersion": "6.0.0", "topologies": [ "replicaset", - "sharded-replicaset", "sharded" ], "serverless": "forbid" @@ -463,7 +462,6 @@ "runOnRequirements": [ { "topologies": [ - "sharded-replicaset", "sharded" ] } From bfb0f278e6899c9e01ecec5f08bfc7e836bbda61 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Tue, 1 Apr 2025 14:37:45 -0500 Subject: [PATCH 7/8] CDRIVER-5863 sync change streams unified spec tests with 449d0397 --- .../unified/change-streams-nsType.json | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 src/libmongoc/tests/json/change_streams/unified/change-streams-nsType.json diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-nsType.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-nsType.json new file mode 100644 index 0000000000..1861c9a5e0 --- /dev/null +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-nsType.json @@ -0,0 +1,145 @@ +{ + "description": "change-streams-nsType", + "schemaVersion": "1.7", + "runOnRequirements": [ + { + "minServerVersion": "8.1.0", + "topologies": [ + "replicaset", + "sharded" + ], + "serverless": "forbid" + } + ], + "createEntities": [ + { + "client": { + "id": "client0", + "useMultipleMongoses": false + } + }, + { + "database": { + "id": "database0", + "client": "client0", + "databaseName": "database0" + } + } + ], + "tests": [ + { + "description": "nsType is present when creating collections", + "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", + "nsType": "collection" + } + } + ] + }, + { + "description": "nsType is present when creating timeseries", + "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", + "timeseries": { + "timeField": "time", + "metaField": "meta", + "granularity": "minutes" + } + } + }, + { + "name": "iterateUntilDocumentOrError", + "object": "changeStream0", + "expectResult": { + "operationType": "create", + "nsType": "timeseries" + } + } + ] + }, + { + "description": "nsType is present when creating views", + "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", + "nsType": "view" + } + } + ] + } + ] +} From 98a331e525945335a27fef02330b530ae214e679 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Tue, 1 Apr 2025 14:37:46 -0500 Subject: [PATCH 8/8] CDRIVER-5959 sync change streams unified spec tests with 0aee4aad --- .../change-streams-disambiguatedPaths.json | 64 ------------------- .../unified/change-streams.json | 12 +++- 2 files changed, 11 insertions(+), 65 deletions(-) diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json b/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json index e6cc5ef66e..a8667b5436 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams-disambiguatedPaths.json @@ -42,70 +42,6 @@ } ], "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": [ diff --git a/src/libmongoc/tests/json/change_streams/unified/change-streams.json b/src/libmongoc/tests/json/change_streams/unified/change-streams.json index c8b60ed4e2..a155d85b6e 100644 --- a/src/libmongoc/tests/json/change_streams/unified/change-streams.json +++ b/src/libmongoc/tests/json/change_streams/unified/change-streams.json @@ -181,7 +181,12 @@ "field": "array", "newSize": 2 } - ] + ], + "disambiguatedPaths": { + "$$unsetOrMatches": { + "$$exists": true + } + } } } } @@ -1408,6 +1413,11 @@ "$$unsetOrMatches": { "$$exists": true } + }, + "disambiguatedPaths": { + "$$unsetOrMatches": { + "$$exists": true + } } } }