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 authored and kkourt committed Oct 16, 2023
1 parent 4eeb0bc commit 10bf8dc
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 10bf8dc

Please sign in to comment.