Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CDimonaco committed Sep 23, 2022
1 parent 91e8eb9 commit b0c08e9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions integration_test/factsengine_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit b0c08e9

Please sign in to comment.