Add comprehensive integrity verification tests

- Round-trip verification: upload → download → verify hash matches
- Client-side verification workflow: pre-upload hash computation, checksum header validation
- Size variant tests: integrity verification for 1KB, 100KB, 1MB, 10MB files
- Consistency check endpoint: response format, after upload, limit parameter
- Digest header tests: RFC 3230 format validation, base64 encoding
- Verification modes: pre-verification and streaming verification
- Corruption detection tests:
  - Single bit flip detection
  - Truncated content detection
  - Appended content detection
  - Client-side hash mismatch detection
  - Consistency check detects size mismatches
  - Consistency check detects missing S3 objects
This commit is contained in:
Mondo Diaz
2026-01-16 18:13:03 +00:00
parent 2bb619975e
commit bce27c43f3
2 changed files with 768 additions and 0 deletions

View File

@@ -19,6 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added download header tests: Content-Type, Content-Length, Content-Disposition, ETag, X-Checksum-SHA256
- Added error handling tests: timeout behavior, checksum validation, resource cleanup, graceful error responses
- Added version API tests: version creation, auto-detection, listing, download by version prefix, deletion
- Added integrity verification tests: round-trip hash verification, client-side verification workflow, size variants (1KB-10MB)
- Added consistency check endpoint tests with response format validation
- Added corruption detection tests: bit flip, truncation, appended content, size mismatch, missing S3 objects
- Added Digest header tests (RFC 3230) and verification mode tests
- Added `package_versions` table for immutable version tracking separate from mutable tags (#56)
- Versions are set at upload time via explicit `version` parameter or auto-detected from filename/metadata
- Version detection priority: explicit parameter > package metadata > filename pattern