From fde1379745729777b049d94e641e4766cf457d4d Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Thu, 13 Jun 2024 16:38:29 +0200 Subject: [PATCH] adjust tests --- client/internal/routemanager/manager_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/internal/routemanager/manager_test.go b/client/internal/routemanager/manager_test.go index 8fc6054e8d4..1b226da29bb 100644 --- a/client/internal/routemanager/manager_test.go +++ b/client/internal/routemanager/manager_test.go @@ -435,7 +435,11 @@ func TestManagerUpdateRoutes(t *testing.T) { _, _, err = routeManager.UpdateRoutes(testCase.inputSerial+uint64(len(testCase.inputInitRoutes)), testCase.inputRoutes) require.NoError(t, err, "should update routes") - require.Len(t, routeManager.clientNetworks, testCase.clientNetworkWatchersExpectedAllowed, "client networks size should match") + expectedWatchers := testCase.clientNetworkWatchersExpected + if testCase.clientNetworkWatchersExpectedAllowed != 0 { + expectedWatchers = testCase.clientNetworkWatchersExpectedAllowed + } + require.Len(t, routeManager.clientNetworks, expectedWatchers, "client networks size should match") if runtime.GOOS == "linux" && routeManager.serverRouter != nil { sr := routeManager.serverRouter.(*defaultServerRouter)