Files
loader/_docs/02_document/tests/resource-limit-tests.md
T
Oleksandr Bezdieniezhnykh 8f7deb3fca Add E2E tests, fix bugs
Made-with: Cursor
2026-04-13 05:17:48 +03:00

38 lines
1.3 KiB
Markdown

# Resource Limit Tests
### NFT-RES-LIM-01: Large file upload
**Summary**: Verify the system handles uploading a large resource (>10MB) without crashing.
**Traces to**: AC-5
**Category**: File size limits
**Preconditions**: Logged in; mock API and CDN available.
**Steps**:
| Step | Consumer Action | Expected System Response |
|------|----------------|------------------------|
| 1 | POST /upload/largefile multipart (file=10MB random bytes) | HTTP 200, body: `{"status": "ok"}` |
**Expected outcome**: Upload succeeds; file is split into small (≤3KB or 30%) and big parts
**Max execution time**: 30s
---
### NFT-RES-LIM-02: Concurrent unlock requests
**Summary**: Verify the system correctly handles multiple simultaneous unlock requests (only one should proceed).
**Traces to**: AC-6
**Category**: Concurrency
**Preconditions**: Encrypted archive at IMAGES_PATH; Docker daemon accessible.
**Steps**:
| Step | Consumer Action | Expected System Response |
|------|----------------|------------------------|
| 1 | POST /unlock (request A) | HTTP 200, state starts processing |
| 2 | POST /unlock (request B, concurrent) | HTTP 200, returns current in-progress state (does not start second unlock) |
**Expected outcome**: Only one unlock runs; second request returns current state without starting a duplicate