It is currently surprising for users when null is getting substituted into documents when there is no actual source data to grab. Silent "None" substitution sometimes results in surprising symptoms in complex configurations. Depends-On: If2b08f443cde765a1dbfaf7bac6b549591e59148 Change-Id: I253dc1d10f9493b9611fb6abd86810c6d57afbf6
36 lines
1.2 KiB
YAML
36 lines
1.2 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
|
|
|
|
tests:
|
|
- name: purge
|
|
desc: Begin testing from known state.
|
|
DELETE: /api/v1.0/revisions
|
|
status: 204
|
|
response_headers: null
|
|
|
|
- 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
|
|
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
|