aeec7a0345
Add focused regression coverage for validation rules called out in PLAN.md. Chunk upload tests now prove that an otherwise valid upload rejects an out-of-range chunk index through the HTTP API. Completion tests now prove that a manually corrupted chunk file is not assembled into a final file. Update TESTS.md so the reusable checklist reflects these automated proofs. Test Plan: - just check - just nginx-smoke Refs: PLAN.md validation checklist
2.3 KiB
2.3 KiB
Test Scenarios
Keep this file as the reusable verification checklist while implementing
PLAN.md.
Automated
just check- Runs formatting, all Rust tests, and clippy.
- Current coverage:
GET /serves the static browser page.GET /healthzreportsok.POST /api/uploadscreatesmeta.jsonand chunk directories.POST /api/uploadsrejects an empty file name.PUT /api/uploads/:id/chunks/:indexstores validated chunk files.PUT /api/uploads/:id/chunks/:indexrejects wrong-size chunks.PUT /api/uploads/:id/chunks/:indexrejects out-of-range indexes.PUT /api/uploads/:id/chunks/:indexaccepts duplicate chunks.GET /api/uploads/:idreports completed chunks from disk.POST /api/uploads/:id/completeassembles verified chunks.POST /api/uploads/:id/completerejects incomplete uploads.POST /api/uploads/:id/completerejects corrupt chunk files.static/app.jspassesnode --check.
just nginx-smoke- Runs upl behind nginx in Docker.
- Uploads a 17 MiB file through nginx.
- Restarts the Rust backend mid-upload, resumes through nginx, completes, and compares SHA-256 hashes.
Manual
These scenarios come from PLAN.md and should be retested as the matching
features land.
- Upload a small file in one pass.
- Upload a file larger than one chunk.
- Kill the browser tab mid-upload and resume.
- Restart the Rust server mid-upload and resume.
- Interrupt the network and resume.
- Pause from the browser controls and resume.
- Reload the page and resume from the pending upload list.
- In a browser with the File System Access API, resume without reselecting the file after granting read permission.
- In a browser without the File System Access API, resume after reselecting the same file.
- Retry a duplicate chunk and confirm it is accepted idempotently.
- Attempt an invalid chunk index and confirm it is rejected.
- Attempt a wrong-size non-final chunk and confirm it is rejected.
- Complete an upload and compare the final file with the source file:
- Install
deploy/nginx/upl.conf.exampleon the deployment host, add the real TLS certificate and access-control settings, and repeat the resume scenarios through the public nginx URL.
sha256sum source-file data/complete/uploaded-file