deckhand/deckhand/tests/functional/gabbits/document-render-success-sin...

38 lines
1.1 KiB
YAML

# Tests success path for using a generic document as a substitution source.
# In this case, the DataSchema-registered document unusual/DictWithSecret/v1
# is used as the source.
#
# 1. Purges existing data to ensure test isolation
# 2. Adds initial documents from substitution sample of design doc
# 3. Verifies fully substituted document data
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
desc: Create initial documents
PUT: /api/v1.0/buckets/mop/documents
status: 200
data: <@resources/design-doc-substitution-generic-sample.yaml
- name: verify_substitutions
desc: Check for expected substitutions
GET: /api/v1.0/revisions/$RESPONSE['$.[0].status.revision']/rendered-documents
query_parameters:
schema: armada/Chart/v1
status: 200
response_multidoc_jsonpaths:
$.`len`: 1
$.[0].metadata.name: example-chart-01
$.[0].data: secret-from-generic-document