mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 06:23:17 -10:00
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]>