+
+ - name: test the delay policy type not there yet
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20001
+ method: GET
+ response:
+ status_code: 404
+
+ - name: not yet in type list
+ request:
+ url: http://localhost:10000/a1-p/policytypes
+ method: GET
+ response:
+ status_code: 200
+ body: []
+
+ - name: instance list 404
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20001/policies
+ method: GET
+ response:
+ status_code: 404
+
+ - name: put the type
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20001
+ method: PUT
+ json:
+ name: test policy
+ description: just for testing
+ policy_type_id: 20001
+ create_schema:
+ "$schema": http://json-schema.org/draft-07/schema#
+ type: object
+ properties:
+ test:
+ type: string
+ required:
+ - test
+ additionalProperties: false
+ response:
+ status_code: 201
+
+ - name: type there now
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20001
+ method: GET
+ response:
+ status_code: 200
+ body:
+ name: test policy
+ description: just for testing
+ policy_type_id: 20001
+ create_schema:
+ "$schema": http://json-schema.org/draft-07/schema#
+ type: object
+ properties:
+ test:
+ type: string
+ required:
+ - test
+ additionalProperties: false
+
+ - name: now in type list
+ request:
+ url: http://localhost:10000/a1-p/policytypes
+ method: GET
+ response:
+ status_code: 200
+ body:
+ - 20001
+
+ - name: instance list 200 but empty
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20001/policies
+ method: GET
+ response:
+ status_code: 200
+ body: []
+
+ - name: test the delay policy instance get not there yet
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
+ method: GET
+ response:
+ status_code: 404
+
+ - name: test the delay policy status get not there yet
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest/status
+ method: GET
+ response:
+ status_code: 404
+
+ - name: bad body for delaytest
+ request:
+ url: http://localhost:10000/a1-p/policytypes/20001/policies/delaytest
+ method: PUT
+ json:
+ not: "welcome"
+ response:
+ status_code: 400
+
+ - name: create delay policy instance