+ name: test policy
+ description: just for testing
+ policy_type_id: 20002
+ create_schema:
+ "$schema": http://json-schema.org/draft-07/schema#
+ type: object
+ properties:
+ test:
+ type: string
+ required:
+ - test
+ additionalProperties: false
+
+ - name: create policy instance that will go to a broken routing endpoint
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20002/policies/brokentest
+ method: PUT
+ json:
+ test: foo
+ headers:
+ content-type: application/json
+ response:
+ status_code: 202
+
+ - name: should be no status
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20002/policies/brokentest/status
+ method: GET
+ response:
+ status_code: 200
+ json: []
+
+ # this one cant currently be deleted, see the comment in a1/data.py
+
+---
+
+test_name: bad_requests
+
+stages:
+
+ - name: bad type get
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20666
+ method: GET
+ response:
+ status_code: 404
+
+ - name: bad instance get bad type
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20666/policies/nonono
+ method: GET
+ response:
+ status_code: 404
+
+ - name: bad int range 1
+ request:
+ url: http://localhost:10000/a1-p/policytypes/0
+ method: PUT
+ json:
+ name: test policy
+ description: just for testing
+ policy_type_id: 0
+ create_schema:
+ "$schema": http://json-schema.org/draft-07/schema#
+ type: object
+ response:
+ status_code: 400
+
+ - name: bad int range 2
+ request:
+ url: http://localhost:10000/a1-p/policytypes/2147483648
+ method: PUT
+ json:
+ name: test policy
+ description: just for testing
+ policy_type_id: 2147483648
+ create_schema:
+ "$schema": http://json-schema.org/draft-07/schema#
+ type: object