Repository navigation
test(tea-release): create the fixture tag with its message on the command line - #324
Conversation
Vulnetix config planManager
0 to create, 1 to update, 0 to delete, 0 unchanged |
0x73746F66
left a comment
There was a problem hiding this comment.
Reuse review: test-only, one-line fixture fix in cmd/tea_release_test.go (annotated tag message passed on the command line). Uses the existing initGitRepo fixture rather than a new one. No changes needed.
0x73746F66
left a comment
There was a problem hiding this comment.
Reuse review: no reinvented Vulnetix patterns found. The change stays inside the package it covers, uses stdlib/testify helpers already used by the repo's tests, and adds no new client, auth, config-schema or shared-package duplicate (checked internal/testutils and sibling repos). Rebased onto current main locally: go vet and go test pass for every touched package. The earlier red checks (CodeQL Analyze, Install a release with verified provenance, Lockfile) were GitHub API rate-limit failures, not code failures; this will be re-run on a rebased head before merge.
…mand line initGitRepo ran a bare `git tag <name>`, leaving the lightweight or annotated choice to the environment's git config. Where that config asks for an annotation, git opens an editor and the nine tagged tea-release tests fail with "Terminal is dumb, but EDITOR unset". The helper now makes an annotated tag with -m (and turns tag signing off, as it already does for commits); gitCommitDate resolves annotated tags to their commit. Closes #294
ae7c3e4 to
1c2d4b8
Compare
Vulnetix config planManager
0 to create, 1 to update, 0 to delete, 0 unchanged |
Closes #294
What
initGitRepoincmd/tea_release_test.gonow runsgit tag -a -m "test tag <name>" <name>instead of a baregit tag <name>, and setstag.gpgsign=falsein the throwaway repository next to the existingcommit.gpgsign=false.Why
A bare
git tagleaves the lightweight/annotated choice to whatever git config the environment carries. Where that asks for an annotation (signing or forced annotation), git opens an editor and the nine tagged tests fail withTerminal is dumb, but EDITOR unset. Supplying the message on the command line matches how the helper already makes every commit.gitCommitDateresolves<tag>^{commit}andgit describe --tagsreads annotated tags, so the tests check the same behaviour.Verified
go test -run 'TestGitDescribe|TestResolveTeaRelease|TestGitCommitDate' ./cmd/passes, also withTERM=dumband noEDITOR.