From 7a85c0d86c30c491da807292644103b48df64a6d Mon Sep 17 00:00:00 2001 From: Mahe Tardy Date: Tue, 10 Oct 2023 17:18:10 +0000 Subject: [PATCH] pkg/testutils: default value for option.Config.HubbleLib [upstream commit 0690282853cc585fec592e259316e45f910e19df] 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 --- pkg/testutils/sensors/testrun.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/testutils/sensors/testrun.go b/pkg/testutils/sensors/testrun.go index 32e4f3c4e43..d23b9ac5e01 100644 --- a/pkg/testutils/sensors/testrun.go +++ b/pkg/testutils/sensors/testrun.go @@ -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()