+ enforce: true
+ window_length: 10
+ blocking_rate: 20
+ trigger_threshold: 10
+
+ - name: test the admission control policy status get
+ delay_before: 3 # give it a few seconds for rmr
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000/policies/admission_control_policy/status
+ method: GET
+ response:
+ status_code: 200
+ # tavern doesn't yet let you check string statuses!!!
+
+ - name: instance list 200 and contains the instance
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000/policies
+ method: GET
+ response:
+ status_code: 200
+ body:
+ - admission_control_policy
+
+ # DELETE the instance and make sure subsequent GETs return properly
+ - name: delete the instance
+ delay_after: 3 # give it a few seconds for rmr
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000/policies/admission_control_policy
+ method: DELETE
+ response:
+ status_code: 202
+
+ - name: instance list 200 but no instance
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000/policies
+ method: GET
+ response:
+ status_code: 200
+ body: []
+
+ - name: cant get instance status
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000/policies/admission_control_policy/status
+ method: GET
+ response:
+ status_code: 404
+
+ - name: cant get instance
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000/policies/admission_control_policy
+ method: GET
+ response:
+ status_code: 404
+
+ - name: delete ac type
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000
+ method: DELETE
+ response:
+ status_code: 204
+
+ - name: cant delete again
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000
+ method: DELETE
+ response:
+ status_code: 404
+
+ - name: cant get
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20000
+ method: DELETE
+ response:
+ status_code: 404
+
+ - name: empty type list
+ request:
+ url: http://localhost:10000/a1-p/policytypes
+ method: GET
+ response:
+ status_code: 200
+ body: []
+