|
1 | 1 | { |
2 | | - "version": 2, |
| 2 | + "version": 3, |
3 | 3 | "tests": [ |
4 | 4 | { |
5 | 5 | "name": "success", |
6 | 6 | "token": "dc2fe149-04ce-45e5-a317-41425942abba", |
7 | 7 | "retrieve_response": { |
8 | 8 | "success": true, |
9 | 9 | "data": { |
| 10 | + "event_id": "ev_dc2fe149-04ce-45e5-a317-41425942abba", |
10 | 11 | "risk_intelligence": { |
11 | 12 | "risk_scores": { |
12 | 13 | "overall": 2, |
|
104 | 105 | } |
105 | 106 | } |
106 | 107 | }, |
107 | | - "details": { |
| 108 | + "token": { |
108 | 109 | "timestamp": "2023-08-04T13:01:25Z", |
109 | 110 | "expires_at": "2023-08-04T13:06:25Z", |
110 | | - "num_uses": 1 |
| 111 | + "num_uses": 1, |
| 112 | + "origin": "https://example.com" |
111 | 113 | } |
112 | 114 | } |
113 | 115 | }, |
114 | 116 | "retrieve_status_code": 200, |
115 | 117 | "expectation": { |
116 | 118 | "was_able_to_retrieve": true, |
| 119 | + "is_valid": true, |
117 | 120 | "is_client_error": false |
118 | 121 | } |
119 | 122 | }, |
|
123 | 126 | "retrieve_response": { |
124 | 127 | "success": true, |
125 | 128 | "data": { |
| 129 | + "event_id": "ev_c4b0031a-68c1-481e-a40e-fe526b0e0398", |
126 | 130 | "risk_intelligence": { |
127 | 131 | "risk_scores": { |
128 | 132 | "overall": 1, |
|
137 | 141 | "ip": "127.0.0.1" |
138 | 142 | } |
139 | 143 | }, |
140 | | - "details": { |
| 144 | + "token": { |
141 | 145 | "timestamp": "2023-08-04T13:01:25Z", |
142 | 146 | "expires_at": "2023-08-04T13:06:25Z", |
143 | | - "num_uses": 1 |
| 147 | + "num_uses": 1, |
| 148 | + "origin": "https://example.com" |
144 | 149 | } |
145 | 150 | } |
146 | 151 | }, |
147 | 152 | "retrieve_status_code": 200, |
148 | 153 | "expectation": { |
149 | 154 | "was_able_to_retrieve": true, |
| 155 | + "is_valid": true, |
150 | 156 | "is_client_error": false |
151 | 157 | } |
152 | 158 | }, |
|
163 | 169 | "retrieve_status_code": 401, |
164 | 170 | "expectation": { |
165 | 171 | "was_able_to_retrieve": false, |
| 172 | + "is_valid": false, |
166 | 173 | "is_client_error": true |
167 | 174 | } |
168 | 175 | }, |
|
179 | 186 | "retrieve_status_code": 401, |
180 | 187 | "expectation": { |
181 | 188 | "was_able_to_retrieve": false, |
| 189 | + "is_valid": false, |
182 | 190 | "is_client_error": true |
183 | 191 | } |
184 | 192 | }, |
|
195 | 203 | "retrieve_status_code": 400, |
196 | 204 | "expectation": { |
197 | 205 | "was_able_to_retrieve": false, |
| 206 | + "is_valid": false, |
198 | 207 | "is_client_error": true |
199 | 208 | } |
200 | 209 | }, |
201 | 210 | { |
202 | | - "name": "token_expired", |
203 | | - "token": "c0cf28c8-891b-4643-989d-47899339e5e7", |
| 211 | + "name": "token_missing", |
| 212 | + "token": "", |
204 | 213 | "retrieve_response": { |
205 | 214 | "success": false, |
206 | 215 | "error": { |
207 | | - "error_code": "token_expired", |
| 216 | + "error_code": "token_missing", |
208 | 217 | "detail": "" |
209 | 218 | } |
210 | 219 | }, |
211 | 220 | "retrieve_status_code": 400, |
212 | 221 | "expectation": { |
213 | 222 | "was_able_to_retrieve": false, |
| 223 | + "is_valid": false, |
214 | 224 | "is_client_error": true |
215 | 225 | } |
216 | 226 | }, |
| 227 | + { |
| 228 | + "name": "token_expired", |
| 229 | + "token": "c0cf28c8-891b-4643-989d-47899339e5e7", |
| 230 | + "retrieve_response": { |
| 231 | + "success": false, |
| 232 | + "error": { |
| 233 | + "error_code": "token_expired", |
| 234 | + "detail": "" |
| 235 | + } |
| 236 | + }, |
| 237 | + "retrieve_status_code": 200, |
| 238 | + "expectation": { |
| 239 | + "was_able_to_retrieve": true, |
| 240 | + "is_valid": false, |
| 241 | + "is_client_error": false |
| 242 | + } |
| 243 | + }, |
| 244 | + { |
| 245 | + "name": "token_invalid", |
| 246 | + "token": "14af7076-8579-4038-8369-7348afc47844", |
| 247 | + "retrieve_response": { |
| 248 | + "success": false, |
| 249 | + "error": { |
| 250 | + "error_code": "token_invalid", |
| 251 | + "detail": "" |
| 252 | + } |
| 253 | + }, |
| 254 | + "retrieve_status_code": 200, |
| 255 | + "expectation": { |
| 256 | + "was_able_to_retrieve": true, |
| 257 | + "is_valid": false, |
| 258 | + "is_client_error": false |
| 259 | + } |
| 260 | + }, |
217 | 261 | { |
218 | 262 | "name": "bad_response_500", |
219 | 263 | "token": "12f35538-ed0e-43e4-9504-3379a22983bf", |
220 | 264 | "retrieve_response": "<html><body>Something went horribly wrong</body></html>", |
221 | 265 | "retrieve_status_code": 500, |
222 | 266 | "expectation": { |
223 | 267 | "was_able_to_retrieve": false, |
| 268 | + "is_valid": false, |
224 | 269 | "is_client_error": false |
225 | 270 | } |
226 | 271 | } |
|
0 commit comments