blob: a025643ca2faa31085ec6e2bdb0fe3bbc598e39d [file] [log] [blame]
Tommy Carpenter5ad8f032019-05-30 14:33:21 -04001# test_a1.tavern.yaml
2
Tommy Carpenterfdf05042019-07-18 20:21:21 +00003test_name: test healthcheck
4
5stages:
6 - name: test the a1 healthcheck
7 request:
8 url: http://localhost:10000/a1-p/healthcheck
9 method: GET
10 response:
11 status_code: 200
12
Tommy Carpenter5ad8f032019-05-30 14:33:21 -040013---
14
15test_name: test admission control
16
17stages:
Tommy Carpenter91ae8892019-09-18 10:45:50 -040018 - name: type not there yet
19 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -050020 url: http://localhost:10000/a1-p/policytypes/6660666
Tommy Carpenter91ae8892019-09-18 10:45:50 -040021 method: GET
22 response:
23 status_code: 404
24
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -040025 - name: type list empty
26 request:
27 url: http://localhost:10000/a1-p/policytypes
28 method: GET
29 response:
30 status_code: 200
31 body: []
32
33 - name: instance list 404
34 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -050035 url: http://localhost:10000/a1-p/policytypes/6660666/policies
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -040036 method: GET
37 response:
38 status_code: 404
39
Tommy Carpenter91ae8892019-09-18 10:45:50 -040040 - name: put the type
41 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -050042 url: http://localhost:10000/a1-p/policytypes/6660666
Tommy Carpenter91ae8892019-09-18 10:45:50 -040043 method: PUT
44 json:
45 name: Admission Control
46 description: various parameters to control admission of dual connection
Tommy Carpentera7672bf2019-11-21 10:49:56 -050047 policy_type_id: 6660666
Tommy Carpenter91ae8892019-09-18 10:45:50 -040048 create_schema:
49 "$schema": http://json-schema.org/draft-07/schema#
50 type: object
Tommy Carpenter03a00832019-11-22 09:15:35 -050051 additionalProperties: false
Tommy Carpenter91ae8892019-09-18 10:45:50 -040052 properties:
Tommy Carpenter03a00832019-11-22 09:15:35 -050053 class:
54 type: integer
55 minimum: 1
56 maximum: 256
57 description: integer id representing class to which we are applying policy
Tommy Carpenter91ae8892019-09-18 10:45:50 -040058 enforce:
59 type: boolean
Tommy Carpenter03a00832019-11-22 09:15:35 -050060 description: Whether to enable or disable enforcement of policy on this class
Tommy Carpenter91ae8892019-09-18 10:45:50 -040061 window_length:
62 type: integer
Tommy Carpenter03a00832019-11-22 09:15:35 -050063 minimum: 15
64 maximum: 300
65 description: Sliding window length in seconds
Tommy Carpenter91ae8892019-09-18 10:45:50 -040066 trigger_threshold:
67 type: integer
Tommy Carpenter91ae8892019-09-18 10:45:50 -040068 minimum: 1
Tommy Carpenter03a00832019-11-22 09:15:35 -050069 blocking_rate:
70 type: number
71 minimum: 0
72 maximum: 100
Tommy Carpenter91ae8892019-09-18 10:45:50 -040073 required:
Tommy Carpenter03a00832019-11-22 09:15:35 -050074 - class
Tommy Carpenter91ae8892019-09-18 10:45:50 -040075 - enforce
Tommy Carpenter91ae8892019-09-18 10:45:50 -040076 - window_length
Tommy Carpenter03a00832019-11-22 09:15:35 -050077 - trigger_threshold
78 - blocking_rate
Tommy Carpenterbfa46142019-09-26 11:14:16 -040079 response:
80 status_code: 201
Tommy Carpenter91ae8892019-09-18 10:45:50 -040081
82 - name: type there now
83 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -050084 url: http://localhost:10000/a1-p/policytypes/6660666
Tommy Carpenter91ae8892019-09-18 10:45:50 -040085 method: GET
86 response:
87 status_code: 200
88
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -040089 - name: now in type list
90 request:
91 url: http://localhost:10000/a1-p/policytypes
92 method: GET
93 response:
94 status_code: 200
Tommy Carpentera7672bf2019-11-21 10:49:56 -050095 body: [6660666]
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -040096
97 - name: instance list 200 but empty
98 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -050099 url: http://localhost:10000/a1-p/policytypes/6660666/policies
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -0400100 method: GET
101 response:
102 status_code: 200
103 body: []
104
Tommy Carpenter40caa312019-09-12 16:24:10 -0400105 - name: test the admission control policy get not there yet
106 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500107 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
Tommy Carpenter40caa312019-09-12 16:24:10 -0400108 method: GET
109 response:
110 status_code: 404
111
112 - name: test the admission control policy status get not there yet
113 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500114 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
Tommy Carpenter40caa312019-09-12 16:24:10 -0400115 method: GET
116 response:
117 status_code: 404
118
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400119 - name: bad body for admission control policy
120 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500121 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400122 method: PUT
123 json:
124 not: "expected"
125 headers:
126 content-type: application/json
127 response:
128 status_code: 400
129
130 - name: not a json
131 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500132 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400133 method: PUT
134 data: "asdf"
135 response:
136 status_code: 415
137
138 # put it properly
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400139 - name: put the admission control policy instance
Tommy Carpenter5ad8f032019-05-30 14:33:21 -0400140 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500141 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
Tommy Carpenter5ad8f032019-05-30 14:33:21 -0400142 method: PUT
143 json:
Tommy Carpenter03a00832019-11-22 09:15:35 -0500144 class: 12
Tommy Carpenter24514462019-07-16 11:25:52 -0400145 enforce: true
Tommy Carpenter03a00832019-11-22 09:15:35 -0500146 window_length: 20
Tommy Carpenter24514462019-07-16 11:25:52 -0400147 blocking_rate: 20
148 trigger_threshold: 10
Tommy Carpenter5ad8f032019-05-30 14:33:21 -0400149 headers:
150 content-type: application/json
151 response:
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400152 status_code: 202
Tommy Carpenter5ad8f032019-05-30 14:33:21 -0400153
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400154 - name: cant delete type with instances
155 delay_before: 3 # wait for the type acks to come back first
156 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500157 url: http://localhost:10000/a1-p/policytypes/6660666
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400158 method: DELETE
159 response:
160 status_code: 400
161
Tommy Carpenterfdf05042019-07-18 20:21:21 +0000162 - name: test the admission control policy get
163 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500164 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
Tommy Carpenterfdf05042019-07-18 20:21:21 +0000165 method: GET
166 response:
167 status_code: 200
168 body:
Tommy Carpenter03a00832019-11-22 09:15:35 -0500169 class: 12
Tommy Carpenter40caa312019-09-12 16:24:10 -0400170 enforce: true
Tommy Carpenter03a00832019-11-22 09:15:35 -0500171 window_length: 20
Tommy Carpenter40caa312019-09-12 16:24:10 -0400172 blocking_rate: 20
173 trigger_threshold: 10
174
Tommy Carpenter03a00832019-11-22 09:15:35 -0500175
Tommy Carpenter40caa312019-09-12 16:24:10 -0400176 - name: test the admission control policy status get
177 delay_before: 3 # give it a few seconds for rmr
178 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500179 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
Tommy Carpenter40caa312019-09-12 16:24:10 -0400180 method: GET
181 response:
182 status_code: 200
Tommy Carpenter0a3f6762019-11-06 09:24:16 -0500183 body:
184 instance_status: "IN EFFECT"
185 has_been_deleted: False
Tommy Carpenter40caa312019-09-12 16:24:10 -0400186
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -0400187 - name: instance list 200 and contains the instance
188 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500189 url: http://localhost:10000/a1-p/policytypes/6660666/policies
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -0400190 method: GET
191 response:
192 status_code: 200
193 body:
194 - admission_control_policy
195
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400196 # DELETE the instance and make sure subsequent GETs return properly
197 - name: delete the instance
Tommy Carpenter0a3f6762019-11-06 09:24:16 -0500198 delay_after: 4
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400199 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500200 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400201 method: DELETE
202 response:
203 status_code: 202
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -0400204
Tommy Carpenter0a3f6762019-11-06 09:24:16 -0500205 - name: status should now be not in effect but still there
206 delay_before: 3 # give it a few seconds for rmr
207 delay_after: 8 # 3 + 11 > 10; that is, wait until t2 expires
208 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500209 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
Tommy Carpenter0a3f6762019-11-06 09:24:16 -0500210 method: GET
211 response:
212 status_code: 200
213 body:
214 instance_status: "NOT IN EFFECT"
215 has_been_deleted: True
216
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400217 - name: instance list 200 but no instance
218 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500219 url: http://localhost:10000/a1-p/policytypes/6660666/policies
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400220 method: GET
221 response:
222 status_code: 200
223 body: []
224
225 - name: cant get instance status
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400226 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500227 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400228 method: GET
229 response:
230 status_code: 404
231
232 - name: cant get instance
233 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500234 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400235 method: GET
236 response:
237 status_code: 404
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -0400238
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400239 - name: delete ac type
240 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500241 url: http://localhost:10000/a1-p/policytypes/6660666
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400242 method: DELETE
243 response:
244 status_code: 204
245
246 - name: cant delete again
247 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500248 url: http://localhost:10000/a1-p/policytypes/6660666
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400249 method: DELETE
250 response:
251 status_code: 404
252
253 - name: cant get
254 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500255 url: http://localhost:10000/a1-p/policytypes/6660666
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400256 method: DELETE
257 response:
258 status_code: 404
259
260 - name: empty type list
261 request:
262 url: http://localhost:10000/a1-p/policytypes
263 method: GET
264 response:
265 status_code: 200
266 body: []
267
268
Tommy Carpenter40caa312019-09-12 16:24:10 -0400269---
270
271test_name: test the delay receiver
272
273stages:
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400274
275 - name: test the delay policy type not there yet
276 request:
277 url: http://localhost:10000/a1-p/policytypes/20001
278 method: GET
279 response:
280 status_code: 404
281
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -0400282 - name: not yet in type list
283 request:
284 url: http://localhost:10000/a1-p/policytypes
285 method: GET
286 response:
287 status_code: 200
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400288 body: []
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -0400289
290 - name: instance list 404
291 request:
292 url: http://localhost:10000/a1-p/policytypes/20001/policies
293 method: GET
294 response:
295 status_code: 404
296
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400297 - name: put the type
298 request:
299 url: http://localhost:10000/a1-p/policytypes/20001
300 method: PUT
301 json:
302 name: test policy
303 description: just for testing
304 policy_type_id: 20001
305 create_schema:
306 "$schema": http://json-schema.org/draft-07/schema#
307 type: object
308 properties:
309 test:
310 type: string
311 required:
312 - test
313 additionalProperties: false
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400314 response:
315 status_code: 201
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400316
317 - name: type there now
318 request:
319 url: http://localhost:10000/a1-p/policytypes/20001
320 method: GET
321 response:
322 status_code: 200
323 body:
324 name: test policy
325 description: just for testing
326 policy_type_id: 20001
327 create_schema:
328 "$schema": http://json-schema.org/draft-07/schema#
329 type: object
330 properties:
331 test:
332 type: string
333 required:
334 - test
335 additionalProperties: false
336
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -0400337 - name: now in type list
338 request:
339 url: http://localhost:10000/a1-p/policytypes
340 method: GET
341 response:
342 status_code: 200
343 body:
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -0400344 - 20001
345
346 - name: instance list 200 but empty
347 request:
348 url: http://localhost:10000/a1-p/policytypes/20001/policies
349 method: GET
350 response:
351 status_code: 200
352 body: []
353
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400354 - name: test the delay policy instance get not there yet
Tommy Carpenter40caa312019-09-12 16:24:10 -0400355 request:
356 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
357 method: GET
358 response:
359 status_code: 404
360
361 - name: test the delay policy status get not there yet
362 request:
363 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
364 method: GET
365 response:
366 status_code: 404
367
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400368 - name: bad body for delaytest
369 request:
370 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
371 method: PUT
372 json:
373 not: "welcome"
374 response:
375 status_code: 400
376
Tommy Carpenter148e2692019-09-20 10:09:01 -0400377 - name: create delay policy instance
Tommy Carpenter40caa312019-09-12 16:24:10 -0400378 request:
379 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
380 method: PUT
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400381 json:
382 test: foo
Tommy Carpenter40caa312019-09-12 16:24:10 -0400383 headers:
384 content-type: application/json
385 response:
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400386 status_code: 202
Tommy Carpenter40caa312019-09-12 16:24:10 -0400387
Tommy Carpenter0a3f6762019-11-06 09:24:16 -0500388 - name: test the delay status get, not in effect yet
389 request:
390 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
391 method: GET
392 response:
393 status_code: 200
394 body:
395 instance_status: "NOT IN EFFECT"
396 has_been_deleted: False
397
Tommy Carpenter40caa312019-09-12 16:24:10 -0400398 - name: test the delay policy get
399 request:
400 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
401 method: GET
402 response:
403 status_code: 200
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400404 body:
405 test: foo
Tommy Carpenter40caa312019-09-12 16:24:10 -0400406
Tommy Carpenter30a7bdc2019-09-23 09:48:23 -0400407 - name: instance list 200 and there
408 request:
409 url: http://localhost:10000/a1-p/policytypes/20001/policies
410 method: GET
411 response:
412 status_code: 200
413 body:
414 - delaytest
415
Tommy Carpenter0a3f6762019-11-06 09:24:16 -0500416 - name: test the delay status get
417 max_retries: 3
418 delay_before: 6 # give it a few seconds for rmr ; delay reciever sleeps for 5 seconds by default
419 request:
420 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
421 method: GET
422 response:
423 status_code: 200
424 body:
425 instance_status: "IN EFFECT"
426 has_been_deleted: False
427
428 # DELETE the instance and make sure subsequent GETs return properly
429 - name: delete the instance
430 request:
431 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
432 method: DELETE
433 response:
434 status_code: 202
435
436 - name: test the delay status get immediately
437 request:
438 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
439 method: GET
440 response:
441 status_code: 200
442 body:
443 instance_status: "IN EFFECT"
444 has_been_deleted: True
445
446 - name: test the delay status get after delay but before timers
447 delay_before: 7
448 request:
449 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
450 method: GET
451 response:
452 status_code: 200
453 body:
454 instance_status: "NOT IN EFFECT"
455 has_been_deleted: True
456
457 - name: test the delay status get after delay and after the timers
458 delay_before: 7
459 request:
460 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
461 method: GET
462 response:
463 status_code: 404
464
Tommy Carpenter148e2692019-09-20 10:09:01 -0400465---
466
Tommy Carpenter9d5ad712019-12-02 11:02:01 -0500467test_name: test query
468
469stages:
470 - name: type not there yet
471 request:
472 url: http://localhost:10000/a1-p/policytypes/1006001
473 method: GET
474 response:
475 status_code: 404
476
477 - name: put the type
478 request:
479 url: http://localhost:10000/a1-p/policytypes/1006001
480 method: PUT
481 json:
482 name: query test
483 description: test
484 policy_type_id: 1006001
485 create_schema:
486 "$schema": http://json-schema.org/draft-07/schema#
487 type: object
488 additionalProperties: false
489 properties:
490 foo:
491 type: string
492 required:
493 - foo
494 response:
495 status_code: 201
496
497 - name: type there now
498 request:
499 url: http://localhost:10000/a1-p/policytypes/1006001
500 method: GET
501 response:
502 status_code: 200
503
504 - name: instance list 200 but empty
505 request:
506 url: http://localhost:10000/a1-p/policytypes/1006001/policies
507 method: GET
508 response:
509 status_code: 200
510 body: []
511
512 - name: instance 1
513 request:
514 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt1
515 method: PUT
516 json:
517 foo: "bar1"
518 headers:
519 content-type: application/json
520 response:
521 status_code: 202
522
523 - name: instance 2
524 request:
525 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt2
526 method: PUT
527 json:
528 foo: "bar2"
529 headers:
530 content-type: application/json
531 response:
532 status_code: 202
533
534 - name: instance list
535 request:
536 url: http://localhost:10000/a1-p/policytypes/1006001/policies
537 method: GET
538 response:
539 status_code: 200
540 body: [qt1, qt2]
541
542 # after the query, a1 should send, query receiver should send back, and the policy should be in effect
543
544 - name: test the query status get
545 max_retries: 3
546 delay_before: 6 # give it a few seconds for rmr ; delay reciever sleeps for 5 seconds by default
547 request:
548 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt1/status
549 method: GET
550 response:
551 status_code: 200
552 body:
553 instance_status: "IN EFFECT"
554 has_been_deleted: False
555
556 - name: test the query status get 2
557 max_retries: 3
558 delay_before: 6 # give it a few seconds for rmr ; delay reciever sleeps for 5 seconds by default
559 request:
560 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt2/status
561 method: GET
562 response:
563 status_code: 200
564 body:
565 instance_status: "IN EFFECT"
566 has_been_deleted: False
567
568---
569
Tommy Carpenter148e2692019-09-20 10:09:01 -0400570test_name: test bad routing file endpoint
571
572stages:
573
574 - name: put the type
575 request:
576 url: http://localhost:10000/a1-p/policytypes/20002
577 method: PUT
578 json:
579 name: test policy
580 description: just for testing
581 policy_type_id: 20002
582 create_schema:
583 "$schema": http://json-schema.org/draft-07/schema#
584 type: object
585 properties:
586 test:
587 type: string
588 required:
589 - test
590 additionalProperties: false
591
592 - name: create policy instance that will go to a broken routing endpoint
593 request:
594 url: http://localhost:10000/a1-p/policytypes/20002/policies/brokentest
595 method: PUT
596 json:
597 test: foo
598 headers:
599 content-type: application/json
600 response:
Tommy Carpenterbfa46142019-09-26 11:14:16 -0400601 status_code: 202
Tommy Carpenter148e2692019-09-20 10:09:01 -0400602
603 - name: should be no status
Tommy Carpenter148e2692019-09-20 10:09:01 -0400604 request:
605 url: http://localhost:10000/a1-p/policytypes/20002/policies/brokentest/status
606 method: GET
607 response:
608 status_code: 200
609 body: []
610
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400611 # this one cant currently be deleted, see the comment in a1/data.py
Tommy Carpenter40caa312019-09-12 16:24:10 -0400612
Tommy Carpenter5ad8f032019-05-30 14:33:21 -0400613---
614
615test_name: bad_requests
616
617stages:
Tommy Carpenter5ad8f032019-05-30 14:33:21 -0400618
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400619 - name: bad type get
620 request:
Tommy Carpenter148e2692019-09-20 10:09:01 -0400621 url: http://localhost:10000/a1-p/policytypes/20666
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400622 method: GET
623 response:
624 status_code: 404
625
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400626 - name: bad instance get bad type
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400627 request:
Tommy Carpenterf87c8572019-10-07 11:15:45 -0400628 url: http://localhost:10000/a1-p/policytypes/20666/policies/nonono
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400629 method: GET
630 response:
631 status_code: 404
632
633 - name: bad int range 1
634 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500635 url: http://localhost:10000/a1-p/policytypes/0
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400636 method: PUT
637 json:
638 name: test policy
639 description: just for testing
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500640 policy_type_id: 0
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400641 create_schema:
642 "$schema": http://json-schema.org/draft-07/schema#
643 type: object
644 response:
645 status_code: 400
646
647 - name: bad int range 2
648 request:
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500649 url: http://localhost:10000/a1-p/policytypes/2147483648
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400650 method: PUT
651 json:
652 name: test policy
653 description: just for testing
Tommy Carpentera7672bf2019-11-21 10:49:56 -0500654 policy_type_id: 2147483648
Tommy Carpenter91ae8892019-09-18 10:45:50 -0400655 create_schema:
656 "$schema": http://json-schema.org/draft-07/schema#
657 type: object
658 response:
659 status_code: 400