| 1 | { |
| 2 | "description": "listSearchIndexes", |
| 3 | "schemaVersion": "1.4", |
| 4 | "createEntities": [ |
| 5 | { |
| 6 | "client": { |
| 7 | "id": "client0", |
| 8 | "useMultipleMongoses": false, |
| 9 | "observeEvents": [ |
| 10 | "commandStartedEvent" |
| 11 | ] |
| 12 | } |
| 13 | }, |
| 14 | { |
| 15 | "database": { |
| 16 | "id": "database0", |
| 17 | "client": "client0", |
| 18 | "databaseName": "database0" |
| 19 | } |
| 20 | }, |
| 21 | { |
| 22 | "collection": { |
| 23 | "id": "collection0", |
| 24 | "database": "database0", |
| 25 | "collectionName": "collection0" |
| 26 | } |
| 27 | } |
| 28 | ], |
| 29 | "runOnRequirements": [ |
| 30 | { |
| 31 | "minServerVersion": "7.0.0", |
| 32 | "topologies": [ |
| 33 | "replicaset", |
| 34 | "load-balanced", |
| 35 | "sharded" |
| 36 | ], |
| 37 | "serverless": "forbid" |
| 38 | } |
| 39 | ], |
| 40 | "tests": [ |
| 41 | { |
| 42 | "description": "when no name is provided, it does not populate the filter", |
| 43 | "operations": [ |
| 44 | { |
| 45 | "name": "listSearchIndexes", |
| 46 | "object": "collection0", |
| 47 | "expectError": { |
| 48 | "isError": true, |
| 49 | "errorContains": "Atlas" |
| 50 | } |
| 51 | } |
| 52 | ], |
| 53 | "expectEvents": [ |
| 54 | { |
| 55 | "client": "client0", |
| 56 | "events": [ |
| 57 | { |
| 58 | "commandStartedEvent": { |
| 59 | "command": { |
| 60 | "aggregate": "collection0", |
| 61 | "pipeline": [ |
| 62 | { |
| 63 | "$listSearchIndexes": {} |
| 64 | } |
| 65 | ] |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | ] |
| 70 | } |
| 71 | ] |
| 72 | }, |
| 73 | { |
| 74 | "description": "when a name is provided, it is present in the filter", |
| 75 | "operations": [ |
| 76 | { |
| 77 | "name": "listSearchIndexes", |
| 78 | "object": "collection0", |
| 79 | "arguments": { |
| 80 | "name": "test index" |
| 81 | }, |
| 82 | "expectError": { |
| 83 | "isError": true, |
| 84 | "errorContains": "Atlas" |
| 85 | } |
| 86 | } |
| 87 | ], |
| 88 | "expectEvents": [ |
| 89 | { |
| 90 | "client": "client0", |
| 91 | "events": [ |
| 92 | { |
| 93 | "commandStartedEvent": { |
| 94 | "command": { |
| 95 | "aggregate": "collection0", |
| 96 | "pipeline": [ |
| 97 | { |
| 98 | "$listSearchIndexes": { |
| 99 | "name": "test index" |
| 100 | } |
| 101 | } |
| 102 | ], |
| 103 | "$db": "database0" |
| 104 | } |
| 105 | } |
| 106 | } |
| 107 | ] |
| 108 | } |
| 109 | ] |
| 110 | }, |
| 111 | { |
| 112 | "description": "aggregation cursor options are supported", |
| 113 | "operations": [ |
| 114 | { |
| 115 | "name": "listSearchIndexes", |
| 116 | "object": "collection0", |
| 117 | "arguments": { |
| 118 | "name": "test index", |
| 119 | "aggregationOptions": { |
| 120 | "batchSize": 10 |
| 121 | } |
| 122 | }, |
| 123 | "expectError": { |
| 124 | "isError": true, |
| 125 | "errorContains": "Atlas" |
| 126 | } |
| 127 | } |
| 128 | ], |
| 129 | "expectEvents": [ |
| 130 | { |
| 131 | "client": "client0", |
| 132 | "events": [ |
| 133 | { |
| 134 | "commandStartedEvent": { |
| 135 | "command": { |
| 136 | "aggregate": "collection0", |
| 137 | "cursor": { |
| 138 | "batchSize": 10 |
| 139 | }, |
| 140 | "pipeline": [ |
| 141 | { |
| 142 | "$listSearchIndexes": { |
| 143 | "name": "test index" |
| 144 | } |
| 145 | } |
| 146 | ], |
| 147 | "$db": "database0" |
| 148 | } |
| 149 | } |
| 150 | } |
| 151 | ] |
| 152 | } |
| 153 | ] |
| 154 | } |
| 155 | ] |
| 156 | } |