| 1 | { |
| 2 | "description": "snapshot-sessions-not-supported-client-error", |
| 3 | "schemaVersion": "1.0", |
| 4 | "runOnRequirements": [ |
| 5 | { |
| 6 | "minServerVersion": "3.6", |
| 7 | "maxServerVersion": "4.4.99" |
| 8 | } |
| 9 | ], |
| 10 | "createEntities": [ |
| 11 | { |
| 12 | "client": { |
| 13 | "id": "client0", |
| 14 | "observeEvents": [ |
| 15 | "commandStartedEvent", |
| 16 | "commandFailedEvent" |
| 17 | ] |
| 18 | } |
| 19 | }, |
| 20 | { |
| 21 | "database": { |
| 22 | "id": "database0", |
| 23 | "client": "client0", |
| 24 | "databaseName": "database0" |
| 25 | } |
| 26 | }, |
| 27 | { |
| 28 | "collection": { |
| 29 | "id": "collection0", |
| 30 | "database": "database0", |
| 31 | "collectionName": "collection0" |
| 32 | } |
| 33 | }, |
| 34 | { |
| 35 | "session": { |
| 36 | "id": "session0", |
| 37 | "client": "client0", |
| 38 | "sessionOptions": { |
| 39 | "snapshot": true |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | ], |
| 44 | "initialData": [ |
| 45 | { |
| 46 | "collectionName": "collection0", |
| 47 | "databaseName": "database0", |
| 48 | "documents": [ |
| 49 | { |
| 50 | "_id": 1, |
| 51 | "x": 11 |
| 52 | } |
| 53 | ] |
| 54 | } |
| 55 | ], |
| 56 | "tests": [ |
| 57 | { |
| 58 | "description": "Client error on find with snapshot", |
| 59 | "operations": [ |
| 60 | { |
| 61 | "name": "find", |
| 62 | "object": "collection0", |
| 63 | "arguments": { |
| 64 | "session": "session0", |
| 65 | "filter": {} |
| 66 | }, |
| 67 | "expectError": { |
| 68 | "isClientError": true, |
| 69 | "errorContains": "Snapshot reads require MongoDB 5.0 or later" |
| 70 | } |
| 71 | } |
| 72 | ], |
| 73 | "expectEvents": [ |
| 74 | { |
| 75 | "client": "client0", |
| 76 | "events": [] |
| 77 | } |
| 78 | ] |
| 79 | }, |
| 80 | { |
| 81 | "description": "Client error on aggregate with snapshot", |
| 82 | "operations": [ |
| 83 | { |
| 84 | "name": "aggregate", |
| 85 | "object": "collection0", |
| 86 | "arguments": { |
| 87 | "session": "session0", |
| 88 | "pipeline": [] |
| 89 | }, |
| 90 | "expectError": { |
| 91 | "isClientError": true, |
| 92 | "errorContains": "Snapshot reads require MongoDB 5.0 or later" |
| 93 | } |
| 94 | } |
| 95 | ], |
| 96 | "expectEvents": [ |
| 97 | { |
| 98 | "client": "client0", |
| 99 | "events": [] |
| 100 | } |
| 101 | ] |
| 102 | }, |
| 103 | { |
| 104 | "description": "Client error on distinct with snapshot", |
| 105 | "operations": [ |
| 106 | { |
| 107 | "name": "distinct", |
| 108 | "object": "collection0", |
| 109 | "arguments": { |
| 110 | "fieldName": "x", |
| 111 | "filter": {}, |
| 112 | "session": "session0" |
| 113 | }, |
| 114 | "expectError": { |
| 115 | "isClientError": true, |
| 116 | "errorContains": "Snapshot reads require MongoDB 5.0 or later" |
| 117 | } |
| 118 | } |
| 119 | ], |
| 120 | "expectEvents": [ |
| 121 | { |
| 122 | "client": "client0", |
| 123 | "events": [] |
| 124 | } |
| 125 | ] |
| 126 | } |
| 127 | ] |
| 128 | } |