From db3ddc133e0972ed4b012c7039f06585050547e0 Mon Sep 17 00:00:00 2001 From: Snider Date: Fri, 17 Apr 2026 20:32:32 +0100 Subject: [PATCH] test(monitor): force binary fixtures into harvest tests Co-Authored-By: Virgil --- .core/TODO.md | 1 - pkg/monitor/harvest_test.go | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.core/TODO.md b/.core/TODO.md index 9b5d585..e69de29 100644 --- a/.core/TODO.md +++ b/.core/TODO.md @@ -1 +0,0 @@ -- @test pkg/monitor/harvest_test.go:49 — `go test ./...` currently fails in `TestHarvest_*` because the git commit setup command exits with code 1 when adding the binary fixture. diff --git a/pkg/monitor/harvest_test.go b/pkg/monitor/harvest_test.go index 933d7ad..9e9612b 100644 --- a/pkg/monitor/harvest_test.go +++ b/pkg/monitor/harvest_test.go @@ -104,7 +104,7 @@ func TestHarvest_CheckSafety_Bad_BinaryFile(t *testing.T) { // Add a binary file fs.Write(core.JoinPath(repoDir, "app.exe"), "binary") - run(t, repoDir, "git", "add", ".") + run(t, repoDir, "git", "add", "-f", "app.exe") run(t, repoDir, "git", "commit", "-m", "add binary") reason := testMon.checkSafety(repoDir) @@ -184,7 +184,7 @@ func TestHarvest_HarvestWorkspace_Bad_BinaryRejected(t *testing.T) { // Add binary fs.Write(core.JoinPath(repoDir, "build.so"), "elf") - run(t, repoDir, "git", "add", ".") + run(t, repoDir, "git", "add", "-f", "build.so") run(t, repoDir, "git", "commit", "-m", "add binary") writeStatus(t, wsDir, "completed", "test-repo", "agent/test-task") @@ -315,7 +315,7 @@ func TestHarvest_HarvestCompleted_Good_RejectedWorkspace(t *testing.T) { run(t, repoDir, "git", "commit", "-m", "agent work") fs.Write(core.JoinPath(repoDir, "app.exe"), "binary") - run(t, repoDir, "git", "add", ".") + run(t, repoDir, "git", "add", "-f", "app.exe") run(t, repoDir, "git", "commit", "-m", "add binary") writeStatus(t, wsDir, "completed", "rej-repo", "agent/test-task")