41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
# Tests success path for missing substitution source data.
|
|
#
|
|
# 1. Purges existing data to ensure test isolation
|
|
# 2. Adds documents with a bad substitution source path
|
|
# 3. Verifies that a 400 Bad Request is raised
|
|
|
|
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: {}
|
|
|
|
- name: initialize_documents_with_missing_src_substitution_path
|
|
desc: |
|
|
Initialize the test documents where the destination document references
|
|
a path via `src.path` that doesn't exist in the source document.
|
|
PUT: /api/v1.0/buckets/mop/documents
|
|
status: 200
|
|
response_headers:
|
|
content-type: application/x-yaml
|
|
data: <@resources/substitution-results-in-none-bug.yaml
|
|
|
|
- name: verify_bad_request_raised
|
|
desc: |
|
|
Check that a 400 Bad Request is raised because the source data could not
|
|
be found since the `src.path` doesn't exist in the source document.
|
|
GET: /api/v1.0/revisions/$RESPONSE['$.[0].status.revision']/rendered-documents
|
|
query_parameters:
|
|
schema: deckhand/Dest/v1
|
|
status: 400
|
|
response_headers:
|
|
content-type: application/x-yaml
|