fix: clear OLLIE env in tests to prevent FUSE mount hangs

This commit is contained in:
Levi Neely 2026-05-19 15:20:31 +02:00
parent 1e96d4c7f4
commit ccacdc4ec8
2 changed files with 3 additions and 0 deletions

View File

@ -85,6 +85,7 @@ func defaultBE() *mockBackend {
// by directly setting preamble on AgentEnv.
func newCore(t *testing.T, be backend.Backend, hooks Hooks) *agent {
t.Helper()
t.Setenv("OLLIE", "")
if be == nil {
be = defaultBE()
}
@ -2108,6 +2109,7 @@ func (m *mockEnvServer) get(k string) string {
func newCoreWithExecServer(t *testing.T, srv *mockEnvServer) *agent {
t.Helper()
t.Setenv("OLLIE", "")
d := tools.NewDispatcher()
d.AddServer("execute", srv)
env := AgentEnv{

View File

@ -17,6 +17,7 @@ func TestMain(m *testing.M) {
panic(err)
}
os.Setenv("OLLIE_CFG_PATH", filepath.Join(wd, "testdata"))
os.Setenv("OLLIE", "")
os.Exit(m.Run())
}