First-attempt commit3a5c6e184only captured the .gitignore change; the pre-commit hook silently dropped the 343 staged moves/deletes during lint-staged's "no matching task" path. This commit re-applies the intended J1 content on top ofbec75f143(which was pushed in parallel). Uses --no-verify because: - J1 only touches .md/.json/.log/.png/binaries — zero code that would benefit from lint-staged, typecheck, or vitest - The hook demonstrated it corrupts pure-rename commits in this repo - Explicitly authorized by user for this one commit Changes (343 total: 169 deletions + 174 renames): Binaries purged (~167 MB): - veza-backend-api/{server,modern-server,encrypt_oauth_tokens,seed,seed-v2} Generated reports purged: - 9 apps/web/lint_report*.json (~32 MB) - 8 apps/web/tsc_*.{log,txt} + ts_*.log (TS error snapshots) - 3 apps/web/storybook_*.json (1375+ stored errors) - apps/web/{build_errors*,build_output,final_errors}.txt - 70 veza-backend-api/coverage*.out + coverage_groups/ (~4 MB) - 3 veza-backend-api/internal/handlers/*.bak Root cleanup: - 54 audit-*.png (visual regression baselines, ~11 MB) - 9 stale MVP-era scripts (Jan 27, hardcoded v0.101): start_{iteration,mvp,recovery}.sh, test_{mvp_endpoints,protected_endpoints,user_journey}.sh, validate_v0101.sh, verify_logs_setup.sh, gen_hash.py Session docs archived (not deleted — preserved under docs/archive/): - 78 apps/web/*.md → docs/archive/frontend-sessions-2026/ - 43 veza-backend-api/*.md → docs/archive/backend-sessions-2026/ - 53 docs/{RETROSPECTIVE_V,SMOKE_TEST_V,PLAN_V0_,V0_*_RELEASE_SCOPE, AUDIT_,PLAN_ACTION_AUDIT,REMEDIATION_PROGRESS}*.md → docs/archive/v0-history/ README.md and CONTRIBUTING.md preserved in apps/web/ and veza-backend-api/. Note: The .gitignore rules preventing recurrence were already pushed in3a5c6e184and remain in place — this commit does not modify .gitignore. Refs: AUDIT_REPORT.md §11
198 lines
4.8 KiB
Markdown
198 lines
4.8 KiB
Markdown
# Smoke Test v0.802 — Cloud Complet, Fichiers & Gear Avancé
|
|
|
|
## Prérequis
|
|
|
|
- `veza-backend-api` compilé et démarré
|
|
- PostgreSQL avec migrations appliquées jusqu'à 122
|
|
- MinIO/S3 configuré pour cloud storage
|
|
- `.env` avec `DATABASE_URL`, `JWT_SECRET`, `S3_BUCKET`, `S3_ENDPOINT`
|
|
- Utilisateur enregistré avec token JWT valide
|
|
- Au moins 1 fichier cloud uploadé, 1 gear créé
|
|
|
|
---
|
|
|
|
## 1. Cloud Versioning (CL1)
|
|
|
|
### 1.1 Lister les versions
|
|
|
|
```bash
|
|
curl -s http://localhost:8080/api/v1/cloud/files/{FILE_ID}/versions \
|
|
-H "Authorization: Bearer {TOKEN}" | jq .
|
|
# Attendu: { "success": true, "data": { "versions": [...] } }
|
|
```
|
|
|
|
### 1.2 Restaurer une version
|
|
|
|
```bash
|
|
curl -s -X POST http://localhost:8080/api/v1/cloud/files/{FILE_ID}/restore/1 \
|
|
-H "Authorization: Bearer {TOKEN}" | jq .
|
|
# Attendu: 200, fichier restauré à la version 1
|
|
```
|
|
|
|
---
|
|
|
|
## 2. Cloud Sharing (CL1)
|
|
|
|
### 2.1 Partager un fichier
|
|
|
|
```bash
|
|
curl -s -X POST http://localhost:8080/api/v1/cloud/files/{FILE_ID}/share \
|
|
-H "Authorization: Bearer {TOKEN}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"permissions": "read", "expires_in_hours": 24}' | jq .
|
|
# Attendu: 200, { "share_url": "...", "token": "...", "expires_at": "..." }
|
|
```
|
|
|
|
### 2.2 Accéder à un fichier partagé
|
|
|
|
```bash
|
|
curl -s http://localhost:8080/api/v1/cloud/shared/{TOKEN} | jq .
|
|
# Attendu: 200, fichier metadata (pas besoin d'auth)
|
|
```
|
|
|
|
### 2.3 Token expiré
|
|
|
|
```bash
|
|
# Utiliser un token expiré
|
|
# Attendu: 404 ou 410, "share link expired"
|
|
```
|
|
|
|
---
|
|
|
|
## 3. Export GDPR (CL1)
|
|
|
|
### 3.1 Demander l'export
|
|
|
|
```bash
|
|
curl -s -X POST http://localhost:8080/api/v1/users/me/export \
|
|
-H "Authorization: Bearer {TOKEN}" | jq .
|
|
# Attendu: 202 Accepted, { "message": "Export started, you will be notified when ready" }
|
|
```
|
|
|
|
---
|
|
|
|
## 4. Upload Avancé (FM1)
|
|
|
|
### 4.1 Batch upload (frontend)
|
|
|
|
```bash
|
|
# Frontend: naviguer vers Upload
|
|
# Sélectionner 3+ fichiers audio simultanément
|
|
# Vérifier: progress bars individuelles, max 3 en parallèle
|
|
# Vérifier: chaque fichier peut être annulé individuellement
|
|
```
|
|
|
|
### 4.2 Tags auto-suggest
|
|
|
|
```bash
|
|
curl -s "http://localhost:8080/api/v1/tags/suggest?q=hip" \
|
|
-H "Authorization: Bearer {TOKEN}" | jq .
|
|
# Attendu: 200, { "suggestions": ["hip-hop", "hip hop", ...] }
|
|
```
|
|
|
|
### 4.3 Formats additionnels
|
|
|
|
```bash
|
|
# Frontend: uploader un fichier .ogg, .aiff, .m4a
|
|
# Vérifier: upload accepté, transcoding en cours
|
|
# Vérifier: fichier jouable après transcoding
|
|
```
|
|
|
|
---
|
|
|
|
## 5. Gear Warranty (GR1)
|
|
|
|
### 5.1 Ajouter warranty à un gear
|
|
|
|
```bash
|
|
curl -s -X PUT http://localhost:8080/api/v1/inventory/gear/{GEAR_ID} \
|
|
-H "Authorization: Bearer {TOKEN}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"warranty_start": "2025-01-01", "warranty_end": "2027-01-01"}' | jq .
|
|
# Attendu: 200, gear mis à jour avec dates warranty
|
|
```
|
|
|
|
---
|
|
|
|
## 6. Gear Documents (GR1)
|
|
|
|
### 6.1 Upload facture
|
|
|
|
```bash
|
|
curl -s -X POST http://localhost:8080/api/v1/inventory/gear/{GEAR_ID}/documents \
|
|
-H "Authorization: Bearer {TOKEN}" \
|
|
-F "file=@invoice.pdf" \
|
|
-F "type=invoice" | jq .
|
|
# Attendu: 201, document créé avec filename, type, storage_key
|
|
```
|
|
|
|
### 6.2 Lister documents
|
|
|
|
```bash
|
|
curl -s http://localhost:8080/api/v1/inventory/gear/{GEAR_ID}/documents \
|
|
-H "Authorization: Bearer {TOKEN}" | jq .
|
|
# Attendu: 200, liste de documents
|
|
```
|
|
|
|
---
|
|
|
|
## 7. Gear Repairs (GR1)
|
|
|
|
### 7.1 Ajouter une réparation
|
|
|
|
```bash
|
|
curl -s -X POST http://localhost:8080/api/v1/inventory/gear/{GEAR_ID}/repairs \
|
|
-H "Authorization: Bearer {TOKEN}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"repair_date": "2026-01-15", "description": "Fixed broken knob", "cost_cents": 5000, "provider": "Music Repair Shop"}' | jq .
|
|
# Attendu: 201, repair créée
|
|
```
|
|
|
|
### 7.2 Lister les réparations
|
|
|
|
```bash
|
|
curl -s http://localhost:8080/api/v1/inventory/gear/{GEAR_ID}/repairs \
|
|
-H "Authorization: Bearer {TOKEN}" | jq .
|
|
# Attendu: 200, liste de réparations avec coûts
|
|
```
|
|
|
|
---
|
|
|
|
## 8. Frontend
|
|
|
|
### 8.1 Cloud versions
|
|
|
|
```bash
|
|
# Frontend: naviguer vers Cloud, sélectionner un fichier
|
|
# Vérifier: onglet "Versions" visible
|
|
# Vérifier: bouton "Restore" sur chaque version
|
|
# Vérifier: bouton "Share" ouvre modal avec lien
|
|
```
|
|
|
|
### 8.2 Gear tabs
|
|
|
|
```bash
|
|
# Frontend: naviguer vers Inventory, sélectionner un gear
|
|
# Vérifier: onglets "Documents" et "Repairs" visibles
|
|
# Vérifier: badge "Warranty expires in X days" si applicable
|
|
# Vérifier: upload PDF fonctionne dans l'onglet Documents
|
|
```
|
|
|
|
---
|
|
|
|
## 9. Tests automatisés
|
|
|
|
```bash
|
|
cd veza-backend-api && go test ./... -v -run "Cloud|Gear|Tag"
|
|
cd apps/web && npm run build
|
|
```
|
|
|
|
---
|
|
|
|
## 10. Documentation
|
|
|
|
- [ ] `docs/API_REFERENCE.md` contient sections Cloud, Upload, Gear
|
|
- [ ] `CHANGELOG.md` contient entrée v0.802
|
|
- [ ] `docs/PROJECT_STATE.md` : Dernier tag = v0.802
|
|
- [ ] `docs/FEATURE_STATUS.md` : section "Livré en v0.802"
|
|
- [ ] `git tag v0.802` créé
|