test(tt4): Tier-4 PTY end-to-end tests for the four critical flows
Wire the Tier-4 tier from ADR-0008 — the first tests that drive the actual built binary in a real pseudo-terminal. tests/e2e_pty.rs spawns the binary under portable-pty at a fixed 100x30, parses output with vt100, and asserts on the rendered screen with tight (3s) fail-fast waits. Serial (one PTY at a time) for predictable timing on the low-parallelism runner; each test gets its own temp --data-dir so it never touches real projects. The four flows mirror ADR-0008's Tier-4 scope: - cold launch -> create table -> graceful quit (Ctrl-C) - create + add column -> quit -> reopen (--resume) -> schema (incl. column) restored - export -> import into a fresh project -> schema + data rebuilt - undo after DROP TABLE, through the confirm modal (y) Table presence is read from the Tables sidebar region (not whole-screen) since the Output panel echoes commands; commands are paced to completion (real-user cadence) — a command sent mid-rebuild can be misread against a stale schema cache (issue #39). Also two NFR perf measurements via the harness (NFR-1 startup, NFR-3 idle RSS) against generous debug-binary bounds for gross-regression detection; the real release figures (median 29 ms / 10 MB) are recorded in the NFR doc. Deps (dev): portable-pty 0.9, vt100 0.16 (both current; expectrl from ADR-0008 dropped — it bundles a conflicting PTY layer). Runs by default in `cargo test`, so the existing Linux CI gate exercises it (advances TT5). PTY-in-container verified (openpty+spawn works under Docker). Full suite: 2519 passed / 0 failed / 1 ignored. clippy + fmt clean. Relates to TT4 / ADR-0008.
This commit is contained in:
@@ -59,8 +59,10 @@ zip = { version = "5.1.1", default-features = false, features = ["deflate"] }
|
||||
|
||||
[dev-dependencies]
|
||||
insta = { version = "1.47.2", features = ["yaml"] }
|
||||
portable-pty = "0.9"
|
||||
pretty_assertions = "1.4.1"
|
||||
tempfile = "3.27.0"
|
||||
vt100 = "0.16"
|
||||
|
||||
# Dev/test build hygiene (see CLAUDE.md "Build hygiene"). `cargo test`
|
||||
# links ~25 separate integration-test binaries, each statically
|
||||
|
||||
Reference in New Issue
Block a user