deckhand/deckhand/tests/functional/gabbits/document-crud-error-bucket-...

34 lines
960 B
YAML

# Tests error paths for document crud.
#
# 1. Purges existing data to ensure test isolation
# 2. Creates a single initial document in one bucket
# 3. Attempts to create the same document in a separate bucket.
# - Verifies 409 response code
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
- name: create
desc: Create initial documents
PUT: /api/v1.0/bucket/a/documents
status: 200
data: <@resources/sample-doc.yaml
- name: error
desc: Trigger error case
PUT: /api/v1.0/bucket/b/documents
status: 409
data: <@resources/sample-doc.yaml
# Deckhand exceptions return the following content-type header by
# default. TODO(fmontei): Override that later.
response_headers:
content-type: 'application/json; charset=UTF-8'