chain-studio/test
flemming-it d9dca60cfb
Some checks failed
Security / Security check (push) Failing after 1s
test(studio): seven FaiLog cases + visibleForTesting path override
FaiLog used to compute its destination directly from HOME, which
made it impossible to test without scribbling on the operator's
real ~/.fai/logs/. Adds a static testPathOverride seam tagged
@visibleForTesting so the singleton can be redirected at a per-
test temp file.

The new test/fai_log_test.dart covers:

  - append() writes one JSON-shaped line per event
  - context field round-trips when supplied
  - tail() returns oldest-first
  - tail(maxLines:) caps and keeps the newest entries
  - rotation moves the previous log to .log.1 past 256 KiB
  - path getter honours the override
  - writes to an impossible path do not throw — best-effort
    contract that protects the UI from log-write failures

Production behaviour is unchanged: when the override is null
the path getter still computes from HOME/USERPROFILE.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-06-04 02:43:06 +02:00
..
integration chore(studio): switch to fai_client_sdk (renamed from fai_dart_sdk) 2026-05-26 13:46:32 +02:00
fai_log_test.dart test(studio): seven FaiLog cases + visibleForTesting path override 2026-06-04 02:43:06 +02:00
friendly_error_test.dart feat(studio): trust pass — friendly errors + store clarity + MCP i18n 2026-05-25 12:36:14 +02:00
load_docs_test.dart fix(welcome): structured doc-load error + Forgejo fallback link 2026-05-30 00:54:46 +02:00
widget_test.dart feat(studio): pencil-into-editor + back button + collapsible rail 2026-05-30 12:04:05 +02:00