test: close coverage gaps + opt-in integration smoke
Unit-Tests (kein Docker nötig), 130 Tests gesamt:
- config: ${ENV}- und ~-Expansion in hf_home
- prompt_io: _pin_dns (DNS-Rebinding wird abgewiesen, andere Hosts unberührt,
Resolver wird wiederhergestellt)
- actions: do_check (running/healthy, missing), do_start non-dry-run
(Happy-Path + Readiness-Fehler mit --logs), _container_lock Force-Bypass
- cli: --max-tokens <= 0 abgelehnt, --expose/--no-expose
scripts/smoke.sh: opt-in End-to-End-Test gegen echten Docker + llama.cpp-Server
(--api-key-Round-Trip inkl. 401/200, start/check/chat/stream/stop, eigener
Container/Port, Cleanup-Trap).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
24202feee6
commit
f83f36fdfb
6 changed files with 268 additions and 4 deletions
16
README.md
16
README.md
|
|
@ -152,9 +152,19 @@ pytest -q
|
|||
```
|
||||
|
||||
Die Test-Suite deckt die Prompt-Eingabeschicht (Datei- und URL-Quellen inkl.
|
||||
SSRF-Abwehr mit gemockter DNS-Auflösung), die Konfigurationsauflösung, die
|
||||
CLI-Validierung sowie Docker-/HTTP-Operationen (mit gemocktem `subprocess`
|
||||
bzw. `requests`) ab.
|
||||
SSRF-Abwehr mit gemockter DNS-Auflösung und DNS-Pinning), die
|
||||
Konfigurationsauflösung (inkl. `${ENV}`-Expansion), die CLI-Validierung, die
|
||||
Action-Orchestrierung (`do_start`/`do_change`/`do_check`/`do_chat`, Locking,
|
||||
dry-run) sowie Docker-/HTTP-Operationen (mit gemocktem `subprocess` bzw.
|
||||
`requests`) ab.
|
||||
|
||||
Für einen End-to-End-Test gegen einen **echten** Docker + llama.cpp-Server (u. a.
|
||||
`--api-key`-Round-Trip, Streaming, `--check`-Exit-Codes) gibt es einen opt-in
|
||||
Rauchtest — er startet einen separaten Container und räumt danach auf:
|
||||
|
||||
```bash
|
||||
SMOKE_GPU=1 scripts/smoke.sh
|
||||
```
|
||||
|
||||
## Lizenz
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue