3 Commits
Author SHA1 Message Date
w3cjandClaude Opus 5.5 6e4e330c66 test(golden): limactl list --json of a running VM, captured on a Linux host
Captured with mise run e2e -- --golden --only images,project on the Debian
13 x86_64 host (Lima v2.2.1, QEMU). TestGoldenLimactlList reads it with the
other systems' fixtures.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 06:09:06 -07:00
w3cjandClaude Opus 5.5 af325b4bd8 test(lima): capture the Linux overlay disk's qemu-img info golden fixture
tests/e2e.sh --only project --golden on Fedora 43 (x86_64), home and
user name replaced: a project VM's qcow2 overlay of its image's disk.
TestGoldenQemuImgInfo now checks the qemu-img stub's backing-filename
field against it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 00:55:08 -07:00
w3cjandClaude Opus 5.5 cf30bdfd99 test: golden fixtures from the real tools, captured by e2e
testdata/golden/<os>/ holds what the real tools printed, and the tests
check devvm's parsers and the stubs against it on any machine:
limactl-version.txt and limactl-list-stopped.json (TestLimactlStubContract's
dummy instances, with STUB_GOLDEN set), limactl-list-running.json (a
running project VM), qemu-img-info.json (base's disk, Linux),
qemu-img-info-overlay.json (a project VM's, Linux, when project runs
there), security-missing.txt and tmutil-isexcluded.txt (macOS).

- tests/e2e.sh --golden captures them into the checkout: images runs the
  contract test with STUB_GOLDEN, qemu-img info, security and tmutil;
  project lists its first VM. Home, user name, full name, timezone and a
  VM's environment are replaced (golden in e2e, anonymous in Go). A
  capture isn't a check, so check counts don't change; --slots passes it
  on.
- TestGoldenLimactlVersion, TestGoldenLimactlList and
  TestGoldenQemuImgInfo read every system's fixtures through limaVersion,
  Lima.list and diskInfo, and check every field the stub prints is one the
  real tool prints, of the same kind (the stub's listing after the
  contract scenario); TestShapes checks the comparison and anonymous.
  TestGoldenSecurityTmutil checks the stubs' exit status and form on
  macOS.

Captured on this Mac (e2e --only images,project,tools --slots 2 --golden)
and on Fedora (--only images --golden). Docs: testing.md's Golden
fixtures, contributing (--golden, the stubs), AGENTS.md's testdata row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 00:18:50 -07:00