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 <mahe.tardy@gmail.com>
  • Loading branch information
mtardy committed Oct 13, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 922704e commit 6f7d645
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
@@ -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()

0 comments on commit 6f7d645

Please sign in to comment.