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
186 - name: instance list 200 and contains the instance
188 url: http://localhost:10000/a1-p/policytypes/6660666/policies
193 - admission_control_policy
195 # DELETE the instance and make sure subsequent GETs return properly
196 - name: delete the instance
199 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
204 - name: status should now be not in effect but still there
205 delay_before: 3 # give it a few seconds for rmr
206 delay_after: 8 # 3 + 11 > 10; that is, wait until t2 expires
208 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
213 instance_status: "NOT IN EFFECT"
214 has_been_deleted: True
216 - name: instance list 200 but no instance
218 url: http://localhost:10000/a1-p/policytypes/6660666/policies
224 - name: cant get instance status
226 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy/status
231 - name: cant get instance
233 url: http://localhost:10000/a1-p/policytypes/6660666/policies/admission_control_policy
238 - name: delete ac type
240 url: http://localhost:10000/a1-p/policytypes/6660666
245 - name: cant delete again
247 url: http://localhost:10000/a1-p/policytypes/6660666
254 url: http://localhost:10000/a1-p/policytypes/6660666
259 - name: empty type list
261 url: http://localhost:10000/a1-p/policytypes
270 test_name: test the delay receiver
274 - name: test the delay policy type not there yet
276 url: http://localhost:10000/a1-p/policytypes/20001
281 - name: not yet in type list
283 url: http://localhost:10000/a1-p/policytypes
289 - name: instance list 404
291 url: http://localhost:10000/a1-p/policytypes/20001/policies
298 url: http://localhost:10000/a1-p/policytypes/20001
302 description: just for testing
303 policy_type_id: 20001
305 "$schema": http://json-schema.org/draft-07/schema#
312 additionalProperties: false
316 - name: type there now
318 url: http://localhost:10000/a1-p/policytypes/20001
324 description: just for testing
325 policy_type_id: 20001
327 "$schema": http://json-schema.org/draft-07/schema#
334 additionalProperties: false
336 - name: now in type list
338 url: http://localhost:10000/a1-p/policytypes
345 - name: instance list 200 but empty
347 url: http://localhost:10000/a1-p/policytypes/20001/policies
353 - name: test the delay policy instance get not there yet
355 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
360 - name: test the delay policy status get not there yet
362 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
367 - name: bad body for delaytest
369 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
376 - name: create delay policy instance
378 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
383 content-type: application/json
387 - name: test the delay status get, not in effect yet
389 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
394 instance_status: "NOT IN EFFECT"
395 has_been_deleted: False
397 - name: test the delay policy get
399 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
406 - name: instance list 200 and there
408 url: http://localhost:10000/a1-p/policytypes/20001/policies
415 - name: test the delay status get
417 delay_before: 6 # give it a few seconds for rmr ; delay reciever sleeps for 5 seconds by default
419 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
424 instance_status: "IN EFFECT"
425 has_been_deleted: False
427 # DELETE the instance and make sure subsequent GETs return properly
428 - name: delete the instance
430 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
435 - name: test the delay status get immediately
437 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
442 instance_status: "IN EFFECT"
443 has_been_deleted: True
445 - name: test the delay status get after delay but before timers
448 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
453 instance_status: "NOT IN EFFECT"
454 has_been_deleted: True
456 - name: test the delay status get after delay and after the timers
459 url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
466 test_name: test query
469 - name: type not there yet
471 url: http://localhost:10000/a1-p/policytypes/1006001
478 url: http://localhost:10000/a1-p/policytypes/1006001
483 policy_type_id: 1006001
485 "$schema": http://json-schema.org/draft-07/schema#
487 additionalProperties: false
496 - name: type there now
498 url: http://localhost:10000/a1-p/policytypes/1006001
503 - name: instance list 200 but empty
505 url: http://localhost:10000/a1-p/policytypes/1006001/policies
513 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt1
518 content-type: application/json
524 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt2
529 content-type: application/json
533 - name: instance list
535 url: http://localhost:10000/a1-p/policytypes/1006001/policies
541 # after the query, a1 should send, query receiver should send back, and the policy should be in effect
542 # sometimes in kubernetes, this test takes a long time to work because of an k8s issue
543 # empirically we find that the si95 rmr finally "detects" failure after about 75 seconds, retries, and then works.
544 - name: test the query status get
548 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt1/status
553 instance_status: "IN EFFECT"
554 has_been_deleted: False
556 - name: test the query status get 2
560 url: http://localhost:10000/a1-p/policytypes/1006001/policies/qt2/status
565 instance_status: "IN EFFECT"
566 has_been_deleted: False
570 test_name: test bad routing file endpoint
576 url: http://localhost:10000/a1-p/policytypes/20002
580 description: just for testing
581 policy_type_id: 20002
583 "$schema": http://json-schema.org/draft-07/schema#
590 additionalProperties: false
592 - name: create policy instance that will go to a broken routing endpoint
594 url: http://localhost:10000/a1-p/policytypes/20002/policies/brokentest
599 content-type: application/json
603 - name: should be no status
605 url: http://localhost:10000/a1-p/policytypes/20002/policies/brokentest/status
611 # this one cant currently be deleted, see the comment in a1/data.py
615 test_name: bad_requests
621 url: http://localhost:10000/a1-p/policytypes/20666
626 - name: bad instance get bad type
628 url: http://localhost:10000/a1-p/policytypes/20666/policies/nonono
633 - name: bad int range 1
635 url: http://localhost:10000/a1-p/policytypes/0
639 description: just for testing
642 "$schema": http://json-schema.org/draft-07/schema#
647 - name: bad int range 2
649 url: http://localhost:10000/a1-p/policytypes/2147483648
653 description: just for testing
654 policy_type_id: 2147483648
656 "$schema": http://json-schema.org/draft-07/schema#