test(monitor): force binary fixtures into harvest tests
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
b54daae418
commit
db3ddc133e
2 changed files with 3 additions and 4 deletions
|
|
@ -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.
|
||||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue