40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
# Test success path for sample Airship documents
|
|
#
|
|
# 1. Purges existing data to ensure test isolation
|
|
# 2. Creates sample Airship documents and schemas
|
|
# 3. Checks that the documents pass schema validation
|
|
|
|
defaults:
|
|
request_headers:
|
|
content-type: application/x-yaml
|
|
response_headers:
|
|
content-type: application/x-yaml
|
|
verbose: true
|
|
|
|
tests:
|
|
- name: purge
|
|
desc: Begin testing from known state.
|
|
DELETE: /api/v1.0/revisions
|
|
status: 204
|
|
response_headers: null
|
|
|
|
- name: initialize
|
|
desc: Add example schema
|
|
PUT: /api/v1.0/buckets/mop/documents
|
|
status: 200
|
|
data: <@resources/ucp-sample-documents.yaml
|
|
|
|
- name: verify_schema_is_valid
|
|
desc: Check schema validation of the added schema
|
|
GET: /api/v1.0/revisions/$HISTORY['initialize'].$RESPONSE['$.[0].status.revision']/validations/deckhand-schema-validation
|
|
status: 200
|
|
response_multidoc_jsonpaths:
|
|
$.`len`: 1
|
|
$.[0].count: 5
|
|
$.[0].results[*].status:
|
|
- success
|
|
- success
|
|
- success
|
|
- success
|
|
- success
|