deckhand/deckhand/tests/functional/gabbits/substitution/substitution-results-in-none-bug.yaml
Sergiy Markin be9f97b846 Airflow 2.10.2 + ubuntu_jammy
Change-Id: I7c8a637efc1e969ab6814447e76068caaca0e66e
2024-09-26 17:25:57 +00:00

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