2 Commits
Author SHA1 Message Date
w3cjandClaude Opus 5.5 5c8aeafcbc test: gosec's G703 off in test files, where it reports a helper's write on some runs only
gosec's taint analysis reported internal/gitprotect's test helper write
(G703) on some runs and not others, which failed macOS CI's lint at
4f99e407 and passed on its re-run. A nolint there would fail nolintlint
on the runs that don't report it, so .golangci.yml excludes G703 in
_test.go files, as it does for tests/e2e, and the 12 nolint:gosec
comments that only covered G703 in tests go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-12 12:50:32 -07:00
w3cjandClaude Opus 5.5 e7a62d3677 test(state): run the state fixture tests over every release's fixture
The tests of a release's frozen state (testdata/v<release>/<os>/) run
over every release folder, so adding the next release's state is its
folder and its expectations.

- internal/vm: stateFixtures() lists each release's expectations (its
  VMs, vm.json's version, the layout version, its one-repo clones, and
  check functions for its VMs, defaults and agent store); 0.1.0's are
  v010Fixture() in fixture_v010_test.go. TestFixtureVMStates,
  TestFixtureVMsRead, TestFixtureSettings, TestFixtureAgentStore and
  TestFixtureClonesReadAsOneRepo run once per release and system, and
  TestStateFixturesListed fails when a testdata/v*/ folder has no entry
  or an entry has no folder.
- internal/proxy: TestFixtureBindings and TestFixtureProxyConfig read
  every release's files; fixtureBinaries() records each release's and
  system's binary SHA-256. TestV010Rules stays 0.1.0's own grammar table.
- internal/secrets: storeFixtures() lists each release's Linux secret;
  TestFixtureStoreGet runs each, TestStoreFixturesListed checks every
  release with a linux/ folder has one.
- internal/cli: TestFixtureScripts fails when a release folder has no
  script that runs `fixture v<release>`, or a script names a folder
  that isn't there. The scripts stay per release (fixture_v010*.txtar),
  because their checks are of that release's VMs.

testdata/v0.1.0 is unchanged; its generate.sh and generate.txtar run
against the v0.1.0 tag as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 07:20:28 -07:00