Add the attachment failure scenarios and S3 checks
lab4_scenarios.py drives the public contract through tests/client.py: failover-upload stops the replica that answered the upload with the stop-one hook and downloads through another one comparing SHA-256, and s3-outage stops S3 and records status and time of upload, download, metadata, a text message and readiness before bringing it back. Both print JSON with an ok field. s3-check.sh checks published ports, the console, two more bootstrap runs without state changes, the allowed and denied operations of the API key and anonymous access including a plain HTTP GET from a separate container. evidence-attachments.sh shows where the bytes live and compares a stored object with its metadata outside the API. Makefile gains scenario, s3-check and attachments-evidence, ruff covers the new script, and the CI acceptance job runs both scenarios and the S3 check after the smoke test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5aa766acff
commit
24f9d6195b
@@ -45,8 +45,8 @@
|
||||
|
||||
## 8. Сценарии отказов и обвязка
|
||||
|
||||
- [ ] 8.1 `scripts/lab4_scenarios.py` (`failover-upload`, `s3-outage`), `scripts/s3-check.sh`, `scripts/evidence-attachments.sh`; цели Makefile `scenario`, `s3-check`, `attachments-evidence`; ruff для новых `scripts/*.py`
|
||||
- [ ] 8.2 CI-job под лабу 4: сценарии вложений после smoke
|
||||
- [x] 8.1 `scripts/lab4_scenarios.py` (`failover-upload`, `s3-outage`), `scripts/s3-check.sh`, `scripts/evidence-attachments.sh`; цели Makefile `scenario`, `s3-check`, `attachments-evidence`; ruff для новых `scripts/*.py`
|
||||
- [x] 8.2 CI-job под лабу 4: сценарии вложений после smoke
|
||||
- [ ] 8.3 Проверка группы: `make test`, `make test-persistence ACTION_SCRIPT=scripts/restart.sh`, `make test-failover ACTION_SCRIPT=scripts/stop-one.sh` по обеим репликам с `make restore`, `make scenario SCENARIO=failover-upload`, `make scenario SCENARIO=s3-outage`, `make s3-check`
|
||||
|
||||
## 9. Отчёт
|
||||
|
||||
Reference in New Issue
Block a user