Pin CLI error messages by driving their real call sites (closes #87)
check / check (push) Successful in 58s
check / check (push) Successful in 58s
errmsg_test.go now calls the function that emits each user-visible CLI error message and asserts on the full text it returns, instead of rendering format strings copied from production, so rewording any pinned message fails the suite. The unknown-command message is driven through the root command's action. The signer-mismatch case signs a manifest with a throwaway gpg key and is skipped where gpg is absent, like the repo's other signing tests. The freshen mtime-presence test gives the scanned file an epoch mtime, so it fails if recordEntry reads an absent manifest mtime as the epoch. Model: opus-4-8 (first implementation); opus-5-5 (completion, this message)
This commit was merged in pull request #117.
This commit is contained in:
@@ -110,7 +110,10 @@ func TestFreshenRecordEntryMtimePresence(t *testing.T) {
|
||||
|
||||
const relPath = "file1.txt"
|
||||
|
||||
mtime := time.Unix(1_700_000_000, 0)
|
||||
// The scanned file's mtime is the Unix epoch. If recordEntry ever misreads
|
||||
// an absent manifest mtime as the epoch, the "absent" case below would
|
||||
// compare equal to this and be classified unchanged, so the test fails.
|
||||
mtime := time.Unix(0, 0)
|
||||
info := stubFileInfo{size: 8, mtime: mtime}
|
||||
|
||||
for _, tc := range []struct {
|
||||
|
||||
Reference in New Issue
Block a user