|
| 1 | +{ |
| 2 | + "description": "change-streams-nsType", |
| 3 | + "schemaVersion": "1.7", |
| 4 | + "runOnRequirements": [ |
| 5 | + { |
| 6 | + "minServerVersion": "8.1.0", |
| 7 | + "topologies": [ |
| 8 | + "replicaset", |
| 9 | + "sharded" |
| 10 | + ], |
| 11 | + "serverless": "forbid" |
| 12 | + } |
| 13 | + ], |
| 14 | + "createEntities": [ |
| 15 | + { |
| 16 | + "client": { |
| 17 | + "id": "client0", |
| 18 | + "useMultipleMongoses": false |
| 19 | + } |
| 20 | + }, |
| 21 | + { |
| 22 | + "database": { |
| 23 | + "id": "database0", |
| 24 | + "client": "client0", |
| 25 | + "databaseName": "database0" |
| 26 | + } |
| 27 | + } |
| 28 | + ], |
| 29 | + "tests": [ |
| 30 | + { |
| 31 | + "description": "nsType is present when creating collections", |
| 32 | + "operations": [ |
| 33 | + { |
| 34 | + "name": "dropCollection", |
| 35 | + "object": "database0", |
| 36 | + "arguments": { |
| 37 | + "collection": "foo" |
| 38 | + } |
| 39 | + }, |
| 40 | + { |
| 41 | + "name": "createChangeStream", |
| 42 | + "object": "database0", |
| 43 | + "arguments": { |
| 44 | + "pipeline": [], |
| 45 | + "showExpandedEvents": true |
| 46 | + }, |
| 47 | + "saveResultAsEntity": "changeStream0" |
| 48 | + }, |
| 49 | + { |
| 50 | + "name": "createCollection", |
| 51 | + "object": "database0", |
| 52 | + "arguments": { |
| 53 | + "collection": "foo" |
| 54 | + } |
| 55 | + }, |
| 56 | + { |
| 57 | + "name": "iterateUntilDocumentOrError", |
| 58 | + "object": "changeStream0", |
| 59 | + "expectResult": { |
| 60 | + "operationType": "create", |
| 61 | + "nsType": "collection" |
| 62 | + } |
| 63 | + } |
| 64 | + ] |
| 65 | + }, |
| 66 | + { |
| 67 | + "description": "nsType is present when creating timeseries", |
| 68 | + "operations": [ |
| 69 | + { |
| 70 | + "name": "dropCollection", |
| 71 | + "object": "database0", |
| 72 | + "arguments": { |
| 73 | + "collection": "foo" |
| 74 | + } |
| 75 | + }, |
| 76 | + { |
| 77 | + "name": "createChangeStream", |
| 78 | + "object": "database0", |
| 79 | + "arguments": { |
| 80 | + "pipeline": [], |
| 81 | + "showExpandedEvents": true |
| 82 | + }, |
| 83 | + "saveResultAsEntity": "changeStream0" |
| 84 | + }, |
| 85 | + { |
| 86 | + "name": "createCollection", |
| 87 | + "object": "database0", |
| 88 | + "arguments": { |
| 89 | + "collection": "foo", |
| 90 | + "timeseries": { |
| 91 | + "timeField": "time", |
| 92 | + "metaField": "meta", |
| 93 | + "granularity": "minutes" |
| 94 | + } |
| 95 | + } |
| 96 | + }, |
| 97 | + { |
| 98 | + "name": "iterateUntilDocumentOrError", |
| 99 | + "object": "changeStream0", |
| 100 | + "expectResult": { |
| 101 | + "operationType": "create", |
| 102 | + "nsType": "timeseries" |
| 103 | + } |
| 104 | + } |
| 105 | + ] |
| 106 | + }, |
| 107 | + { |
| 108 | + "description": "nsType is present when creating views", |
| 109 | + "operations": [ |
| 110 | + { |
| 111 | + "name": "dropCollection", |
| 112 | + "object": "database0", |
| 113 | + "arguments": { |
| 114 | + "collection": "foo" |
| 115 | + } |
| 116 | + }, |
| 117 | + { |
| 118 | + "name": "createChangeStream", |
| 119 | + "object": "database0", |
| 120 | + "arguments": { |
| 121 | + "pipeline": [], |
| 122 | + "showExpandedEvents": true |
| 123 | + }, |
| 124 | + "saveResultAsEntity": "changeStream0" |
| 125 | + }, |
| 126 | + { |
| 127 | + "name": "createCollection", |
| 128 | + "object": "database0", |
| 129 | + "arguments": { |
| 130 | + "collection": "foo", |
| 131 | + "viewOn": "testName" |
| 132 | + } |
| 133 | + }, |
| 134 | + { |
| 135 | + "name": "iterateUntilDocumentOrError", |
| 136 | + "object": "changeStream0", |
| 137 | + "expectResult": { |
| 138 | + "operationType": "create", |
| 139 | + "nsType": "view" |
| 140 | + } |
| 141 | + } |
| 142 | + ] |
| 143 | + } |
| 144 | + ] |
| 145 | +} |
0 commit comments