Skip to content

Commit

Permalink
pkg/testutils: default value for option.Config.HubbleLib
Browse files Browse the repository at this point in the history
The testutils Config.TetragonLib (or in the end ConfigDefault.TetragonLib)
was never written to the actual option.Config.HubbleLib. We noticed it
was done manually all over the place in tests so this commit adds it in
TestSensorRun that runs in TestMain.

Signed-off-by: Mahe Tardy <[email protected]>
  • Loading branch information
mtardy committed Oct 13, 2023
1 parent 80323c8 commit 77ebd7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/testutils/sensors/testrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ func TestSensorsRun(m *testing.M, sensorName string) int {
bpf.CheckOrMountDebugFS()
bpf.ConfigureResourceLimits()

if config.TetragonLib != "" {
option.Config.HubbleLib = config.TetragonLib
}

bpf.SetMapPrefix(testMapDir)
defer func() {
log := logger.GetLogger()
Expand Down

0 comments on commit 77ebd7e

Please sign in to comment.