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
|
|
@ -39,6 +39,22 @@ def test_chat_requires_prompt_source():
|
|||
parse_error(["--chat"])
|
||||
|
||||
|
||||
def test_max_tokens_nonpositive_rejected():
|
||||
parse_error(["--start", "--max-tokens", "0"])
|
||||
parse_error(["--start", "--max-tokens", "-5"])
|
||||
|
||||
|
||||
def test_max_tokens_positive_ok():
|
||||
args = parse(["--start", "--max-tokens", "4096"])
|
||||
assert args.max_tokens == 4096
|
||||
|
||||
|
||||
def test_expose_and_no_expose_flags():
|
||||
assert parse(["--start", "--expose"]).expose is True
|
||||
assert parse(["--start", "--no-expose"]).expose is False
|
||||
assert parse(["--start"]).expose is None # unset => config decides
|
||||
|
||||
|
||||
def test_chat_with_prompt_is_valid():
|
||||
args = parse(["--chat", "-p", "hello"])
|
||||
assert args.chat is True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue