Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions __tests__/create.testcases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# /create Endpoint Test Cases

## Expected Behaviors

### 1. POST /create with valid object
- Should return 201
- Response: created object

### 2. POST /create with missing required fields
- Should return 400
- Response: error message indicating missing fields

### 3. POST /create with malformed JSON
- Should return 400 or 500
- Response: error message, no stack trace

### 4. POST /create with empty body
- Should return 400
- Response: error message

### 5. POST /create with duplicate object
- Should return 409
- Response: error message indicating conflict

---

Add new cases as needed. Checklist for /create route.
31 changes: 31 additions & 0 deletions __tests__/delete.testcases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# /delete Endpoint Test Cases

## Expected Behaviors

### 1. DELETE /delete with valid object ID (body)
- Should return 204
- Response: no content

### 2. DELETE /delete/:id with valid object ID (param)
- Should return 204
- Response: no content

### 3. DELETE /delete with missing object ID
- Should return 400
- Response: error message indicating missing ID

### 4. DELETE /delete with malformed JSON
- Should return 400 or 500
- Response: error message, no stack trace

### 5. DELETE /delete with empty body
- Should return 400
- Response: error message

### 6. DELETE /delete/:id with non-existent object
- Should return 404
- Response: error message indicating not found

---

Add new cases as needed. Checklist for /delete route.
27 changes: 27 additions & 0 deletions __tests__/overwrite.testcases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# /overwrite Endpoint Test Cases

## Expected Behaviors

### 1. PUT /overwrite with valid object and version
- Should return 200
- Response: overwritten object

### 2. PUT /overwrite with missing version
- Should return 400
- Response: error message indicating missing version

### 3. PUT /overwrite with version mismatch
- Should return 409
- Response: error message indicating conflict

### 4. PUT /overwrite with malformed JSON
- Should return 400 or 500
- Response: error message, no stack trace

### 5. PUT /overwrite with empty body
- Should return 400
- Response: error message

---

Add new cases as needed. Checklist for /overwrite route.
49 changes: 49 additions & 0 deletions __tests__/query.testcases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Query Route Test Cases

This file documents the test cases for the /query endpoint. These are not executable tests, but serve as a checklist for future test harness development.

## Expected Behaviors

### 1. POST /query with body {}
- Should return 200
- Response: empty result set (e.g., [])

### 2. POST /query with body []
- Should return 400
- Response: error message indicating invalid query shape

### 3. POST /query with body null
- Should return 400
- Response: error message indicating invalid query

### 4. POST /query with body ""
- Should return 400
- Response: error message indicating invalid query

### 5. POST /query with body 0
- Should return 400
- Response: error message indicating invalid query

### 6. POST /query with body true
- Should return 400
- Response: error message indicating invalid query

### 7. POST /query with valid query object
- Should return 200
- Response: result set matching query

### 8. POST /query with malformed JSON (e.g., {broken json)
- Should return 400 or 500
- Response: error message, no stack trace

### 9. POST /query with missing limit/skip
- Should default to limit=10, skip=0
- Should return 200

### 10. POST /query with negative limit/skip
- Should return 400
- Response: error message indicating invalid parameters

---

Add new cases as needed. This file is for planning and tracking test coverage for /query route.
27 changes: 27 additions & 0 deletions __tests__/update.testcases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# /update Endpoint Test Cases

## Expected Behaviors

### 1. PUT /update with valid object
- Should return 200
- Response: updated object

### 2. PUT /update with missing object ID
- Should return 400
- Response: error message indicating missing ID

### 3. PUT /update with malformed JSON
- Should return 400 or 500
- Response: error message, no stack trace

### 4. PUT /update with empty body
- Should return 400
- Response: error message

### 5. PUT /update with non-existent object
- Should return 404
- Response: error message indicating not found

---

Add new cases as needed. Checklist for /update route.