deckhand/deckhand/tests/functional/gabbits/document-crud.yaml

31 lines
875 B
YAML

# Test creation of a single document and verify duplciates will be ignored
defaults:
request_headers:
content-type: application/x-yaml
tests:
- name: create_single_document
desc: Create a sample document
POST: /api/v1.0/documents
status: 201
data: <@resources/sample-doc.yaml
response_headers:
content-type: application/x-yaml
- name: verify_single_document
desc: Check that a single document was created above
GET: /api/v1.0/revisions/$RESPONSE['$.documents[0].revision_id']/documents
status: 200
response_headers:
content-type: application/x-yaml
response_multidoc_jsonpaths:
$.documents[*].metadata.name: a-unique-config-name-12345
- name: create_duplicate_document
desc: Attempt to duplicate sample document
POST: /api/v1.0/documents
status: 204
data: <@resources/sample-doc.yaml