fix: clear OLLIE env in tests to prevent FUSE mount hangs
This commit is contained in:
parent
1e96d4c7f4
commit
ccacdc4ec8
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in New Issue