agent (unreleased): a cut write of agent.json cannot leave a blind box — a journal of the old bytes, a repair at start (R-1380)
gates / gates (push) Successful in 42s
gates / gates (push) Successful in 42s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
54ac2c2ac9
commit
db01ae0f2a
12 files changed
+582
-66
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package localapi
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"gitea.dooplex.hu/admin/felhom-agent/internal/config"
|
||||
)
|
||||
|
||||
// TestMain points the config write journal (config.CutWriteDir, R-1380) at a temp folder: the real one is the
|
||||
// agent's state folder on a box, and a test must not need it.
|
||||
func TestMain(m *testing.M) {
|
||||
dir, err := os.MkdirTemp("", "felhom-cutwrite-")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
config.CutWriteDir = dir
|
||||
code := m.Run()
|
||||
_ = os.RemoveAll(dir)
|
||||
os.Exit(code)
|
||||
}
|
||||
Reference in new issue
Block a user