31 lines
766 B
YAML
31 lines
766 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/buckets/a/documents
|
|
status: 200
|
|
data: <@resources/sample-doc.yaml
|
|
|
|
- name: error
|
|
desc: Trigger error case
|
|
PUT: /api/v1.0/buckets/b/documents
|
|
status: 409
|
|
data: <@resources/sample-doc.yaml
|