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
176 - name: test the admission control policy status get
177 delay_before: 3 # give it a few seconds for rmr
179 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
184 instance_status: "IN EFFECT"
185 has_been_deleted: False
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: 8 # 3 + 11 > 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
217 - name: instance list 200 but no instance
219 url: http://localhost:10000/a1-p/policytypes/6660666/policies
225 - name: cant get instance status
227 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
232 - name: cant get instance
234 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
239 - name: delete ac type
241 url: http://localhost:10000/a1-p/policytypes/6660666
246 - name: cant delete again
248 url: http://localhost:10000/a1-p/policytypes/6660666
255 url: http://localhost:10000/a1-p/policytypes/6660666
260 - name: empty type list
262 url: http://localhost:10000/a1-p/policytypes
271 test_name: test the delay receiver
275 - name: test the delay policy type not there yet
277 url: http://localhost:10000/a1-p/policytypes/20001
282 - name: not yet in type list
284 url: http://localhost:10000/a1-p/policytypes
290 - name: instance list 404
292 url: http://localhost:10000/a1-p/policytypes/20001/policies
299 url: http://localhost:10000/a1-p/policytypes/20001
303 description: just for testing
304 policy_type_id: 20001
306 "$schema": http://json-schema.org/draft-07/schema#
313 additionalProperties: false
317 - name: type there now
319 url: http://localhost:10000/a1-p/policytypes/20001
325 description: just for testing
326 policy_type_id: 20001
328 "$schema": http://json-schema.org/draft-07/schema#
335 additionalProperties: false
337 - name: now in type list
339 url: http://localhost:10000/a1-p/policytypes
346 - name: instance list 200 but empty
348 url: http://localhost:10000/a1-p/policytypes/20001/policies
354 - name: test the delay policy instance get not there yet
356 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
361 - name: test the delay policy status get not there yet
363 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
368 - name: bad body for delaytest
370 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
377 - name: create delay policy instance
379 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
384 content-type: application/json
388 - name: test the delay status get, not in effect yet
390 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
395 instance_status: "NOT IN EFFECT"
396 has_been_deleted: False
398 - name: test the delay policy get
400 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
407 - name: instance list 200 and there
409 url: http://localhost:10000/a1-p/policytypes/20001/policies
416 - name: test the delay status get
418 delay_before: 6 # give it a few seconds for rmr ; delay reciever sleeps for 5 seconds by default
420 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
425 instance_status: "IN EFFECT"
426 has_been_deleted: False
428 # DELETE the instance and make sure subsequent GETs return properly
429 - name: delete the instance
431 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
436 - name: test the delay status get immediately
438 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
443 instance_status: "IN EFFECT"
444 has_been_deleted: True
446 - name: test the delay status get after delay but before timers
449 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
454 instance_status: "NOT IN EFFECT"
455 has_been_deleted: True
457 - name: test the delay status get after delay and after the timers
460 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
467 test_name: test query
470 - name: type not there yet
472 url: http://localhost:10000/a1-p/policytypes/1006001
479 url: http://localhost:10000/a1-p/policytypes/1006001
484 policy_type_id: 1006001
486 "$schema": http://json-schema.org/draft-07/schema#
488 additionalProperties: false
497 - name: type there now
499 url: http://localhost:10000/a1-p/policytypes/1006001
504 - name: instance list 200 but empty
506 url: http://localhost:10000/a1-p/policytypes/1006001/policies
514 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt1
519 content-type: application/json
525 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt2
530 content-type: application/json
534 - name: instance list
536 url: http://localhost:10000/a1-p/policytypes/1006001/policies
542 # after the query, a1 should send, query receiver should send back, and the policy should be in effect
543 # sometimes in kubernetes, this test takes a long time to work because of an k8s issue
544 # empirically we find that the si95 rmr finally "detects" failure after about 75 seconds, retries, and then works.
545 - name: test the query status get
549 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt1/status
554 instance_status: "IN EFFECT"
555 has_been_deleted: False
557 - name: test the query status get 2
561 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt2/status
566 instance_status: "IN EFFECT"
567 has_been_deleted: False
571 test_name: test bad routing file endpoint
577 url: http://localhost:10000/a1-p/policytypes/20002
581 description: just for testing
582 policy_type_id: 20002
584 "$schema": http://json-schema.org/draft-07/schema#
591 additionalProperties: false
593 - name: create policy instance that will go to a broken routing endpoint
595 url: http://localhost:10000/a1-p/policytypes/20002/policies/brokentest
600 content-type: application/json
604 - name: should be no status
606 url: http://localhost:10000/a1-p/policytypes/20002/policies/brokentest/status
612 # this one cant currently be deleted, see the comment in a1/data.py
616 test_name: bad_requests
622 url: http://localhost:10000/a1-p/policytypes/20666
627 - name: bad instance get bad type
629 url: http://localhost:10000/a1-p/policytypes/20666/policies/nonono
634 - name: bad int range 1
636 url: http://localhost:10000/a1-p/policytypes/0
640 description: just for testing
643 "$schema": http://json-schema.org/draft-07/schema#
648 - name: bad int range 2
650 url: http://localhost:10000/a1-p/policytypes/2147483648
654 description: just for testing
655 policy_type_id: 2147483648
657 "$schema": http://json-schema.org/draft-07/schema#