diff --git a/integration_test/factsengine_integration_test.go b/integration_test/factsengine_integration_test.go index 431cc8ca..0725c07b 100644 --- a/integration_test/factsengine_integration_test.go +++ b/integration_test/factsengine_integration_test.go @@ -14,6 +14,7 @@ import ( "github.com/trento-project/agent/internal/factsengine" "github.com/trento-project/agent/internal/factsengine/adapters" "github.com/trento-project/agent/internal/factsengine/entities" + "github.com/trento-project/agent/internal/factsengine/gatherers" "github.com/trento-project/contracts/pkg/events" ) @@ -80,8 +81,12 @@ func (s *FactsEngineIntegrationTestGatherer) Gather(requests []entities.FactRequ func (suite *FactsEngineIntegrationTestSuite) TestFactsEngineIntegration() { agentID := "some-agent" - engine := factsengine.NewFactsEngine(agentID, suite.factsEngineService) - engine.AddGatherer("integration", NewFactsEngineIntegrationTestGatherer()) + gathererManager := gatherers.NewManager(map[string]gatherers.FactGatherer{ + gatherers.CorosyncFactKey: gatherers.NewDefaultCorosyncConfGatherer(), + "integration": NewFactsEngineIntegrationTestGatherer(), + }) + + engine := factsengine.NewFactsEngine(agentID, suite.factsEngineService, *gathererManager) err := engine.Subscribe() if err != nil {