gates / gates (push) Successful in 42s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
22 lines
473 B
Go
22 lines
473 B
Go
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)
|
|
}
|