3 test_name: test healthcheck
6 - name: test the a1 healthcheck
8 url: http://localhost:10000/a1-p/healthcheck
15 test_name: test admission control
18 - name: type not there yet
20 url: http://localhost:10000/a1-p/policytypes/6660666
25 - name: type list empty
27 url: http://localhost:10000/a1-p/policytypes
33 - name: instance list 404
35 url: http://localhost:10000/a1-p/policytypes/6660666/policies
42 url: http://localhost:10000/a1-p/policytypes/6660666
45 name: Admission Control
46 description: various parameters to control admission of dual connection
47 policy_type_id: 6660666
49 "$schema": http://json-schema.org/draft-07/schema#
51 additionalProperties: false
57 description: integer id representing class to which we are applying policy
60 description: Whether to enable or disable enforcement of policy on this class
65 description: Sliding window length in seconds
82 - name: type there now
84 url: http://localhost:10000/a1-p/policytypes/6660666
89 - name: now in type list
91 url: http://localhost:10000/a1-p/policytypes
97 - name: instance list 200 but empty
99 url: http://localhost:10000/a1-p/policytypes/6660666/policies
105 - name: test the admission control policy get not there yet
107 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
112 - name: test the admission control policy status get not there yet
114 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
119 - name: bad body for admission control policy
121 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
126 content-type: application/json
132 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
139 - name: put the admission control policy instance
141 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
148 trigger_threshold: 10
150 content-type: application/json
154 - name: cant delete type with instances
155 delay_before: 3 # wait for the type acks to come back first
157 url: http://localhost:10000/a1-p/policytypes/6660666
162 - name: test the admission control policy get
164 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
173 trigger_threshold: 10
175 - name: test the admission control policy status get
176 delay_before: 10 # give it a few seconds for rmr
178 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
183 instance_status: "IN EFFECT"
184 has_been_deleted: False
185 created_at: !anyfloat
187 - name: instance list 200 and contains the instance
189 url: http://localhost:10000/a1-p/policytypes/6660666/policies
194 - admission_control_policy
196 # DELETE the instance and make sure subsequent GETs return properly
197 - name: delete the instance
200 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
205 - 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: 10 # 3 + 10 > 10; that is, wait until t2 expires
209 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
214 instance_status: "NOT IN EFFECT"
215 has_been_deleted: True
216 deleted_at: !anyfloat
217 created_at: !anyfloat
219 - name: instance list 200 but no instance
221 url: http://localhost:10000/a1-p/policytypes/6660666/policies
227 - name: cant get instance status
229 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
234 - name: cant get instance
236 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
241 - name: delete ac type
243 url: http://localhost:10000/a1-p/policytypes/6660666
248 - name: cant delete again
250 url: http://localhost:10000/a1-p/policytypes/6660666
257 url: http://localhost:10000/a1-p/policytypes/6660666
262 - name: empty type list
264 url: http://localhost:10000/a1-p/policytypes
273 test_name: test the delay receiver
277 - name: test the delay policy type not there yet
279 url: http://localhost:10000/a1-p/policytypes/20001
284 - name: not yet in type list
286 url: http://localhost:10000/a1-p/policytypes
292 - name: instance list 404
294 url: http://localhost:10000/a1-p/policytypes/20001/policies
301 url: http://localhost:10000/a1-p/policytypes/20001
305 description: just for testing
306 policy_type_id: 20001
308 "$schema": http://json-schema.org/draft-07/schema#
315 additionalProperties: false
319 - name: type there now
321 url: http://localhost:10000/a1-p/policytypes/20001
327 description: just for testing
328 policy_type_id: 20001
330 "$schema": http://json-schema.org/draft-07/schema#
337 additionalProperties: false
339 - name: now in type list
341 url: http://localhost:10000/a1-p/policytypes
348 - name: instance list 200 but empty
350 url: http://localhost:10000/a1-p/policytypes/20001/policies
356 - name: test the delay policy instance get not there yet
358 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
363 - name: test the delay policy status get not there yet
365 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
370 - name: bad body for delaytest
372 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
379 - name: create delay policy instance
381 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
386 content-type: application/json
390 - name: test the delay status get, not in effect yet
392 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
397 instance_status: "NOT IN EFFECT"
398 has_been_deleted: False
399 created_at: !anyfloat
401 - name: test the delay policy get
403 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
410 - name: instance list 200 and there
412 url: http://localhost:10000/a1-p/policytypes/20001/policies
419 - name: test the delay status get
421 delay_before: 6 # give it a few seconds for rmr ; delay reciever sleeps for 5 seconds by default
423 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
428 instance_status: "IN EFFECT"
429 has_been_deleted: False
430 created_at: !anyfloat
432 # DELETE the instance and make sure subsequent GETs return properly
433 - name: delete the instance
435 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
440 - name: test the delay status get immediately
442 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
447 instance_status: "IN EFFECT"
448 has_been_deleted: True
449 deleted_at: !anyfloat
450 created_at: !anyfloat
452 - name: test the delay status get after delay but before timers
455 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
460 instance_status: "NOT IN EFFECT"
461 has_been_deleted: True
462 deleted_at: !anyfloat
463 created_at: !anyfloat
465 - name: test the delay status get after delay and after the timers
468 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
475 test_name: test query
478 - name: type not there yet
480 url: http://localhost:10000/a1-p/policytypes/1006001
487 url: http://localhost:10000/a1-p/policytypes/1006001
492 policy_type_id: 1006001
494 "$schema": http://json-schema.org/draft-07/schema#
496 additionalProperties: false
505 - name: type there now
507 url: http://localhost:10000/a1-p/policytypes/1006001
512 - name: instance list 200 but empty
514 url: http://localhost:10000/a1-p/policytypes/1006001/policies
522 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt1
527 content-type: application/json
533 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt2
538 content-type: application/json
542 - name: instance list
544 url: http://localhost:10000/a1-p/policytypes/1006001/policies
550 # after the query, a1 should send, query receiver should send back, and the policy should be in effect
551 # sometimes in kubernetes, this test takes a long time to work because of an k8s issue
552 # empirically we find that the si95 rmr finally "detects" failure after about 75 seconds, retries, and then works.
553 - name: test the query status get
557 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt1/status
562 instance_status: "IN EFFECT"
563 has_been_deleted: False
564 created_at: !anyfloat
566 - name: test the query status get 2
570 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt2/status
575 instance_status: "IN EFFECT"
576 has_been_deleted: False
577 created_at: !anyfloat
581 test_name: test bad routing file endpoint
587 url: http://localhost:10000/a1-p/policytypes/20002
591 description: just for testing
592 policy_type_id: 20002
594 "$schema": http://json-schema.org/draft-07/schema#
601 additionalProperties: false
603 - name: create policy instance that will go to a broken routing endpoint
605 url: http://localhost:10000/a1-p/policytypes/20002/policies/brokentest
610 content-type: application/json
614 - name: should be no status
616 url: http://localhost:10000/a1-p/policytypes/20002/policies/brokentest/status
622 # this one cant currently be deleted, see the comment in a1/data.py
626 test_name: bad_requests
632 url: http://localhost:10000/a1-p/policytypes/20666
637 - name: bad instance get bad type
639 url: http://localhost:10000/a1-p/policytypes/20666/policies/nonono
644 - name: bad int range 1
646 url: http://localhost:10000/a1-p/policytypes/0
650 description: just for testing
653 "$schema": http://json-schema.org/draft-07/schema#
658 - name: bad int range 2
660 url: http://localhost:10000/a1-p/policytypes/2147483648
664 description: just for testing
665 policy_type_id: 2147483648
667 "$schema": http://json-schema.org/draft-07/schema#