From bb35b9ad2e9bcb6e429d1ab8e1a5f95e26722729 Mon Sep 17 00:00:00 2001 From: Murali Reddy Date: Fri, 17 Jul 2020 06:54:34 +0530 Subject: [PATCH] fix lint error: minor fix to catch the error from .bgpServer.Stop() --- pkg/controllers/routing/network_routes_controller_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/controllers/routing/network_routes_controller_test.go b/pkg/controllers/routing/network_routes_controller_test.go index 0a4fd9165a..e66d4fd37c 100644 --- a/pkg/controllers/routing/network_routes_controller_test.go +++ b/pkg/controllers/routing/network_routes_controller_test.go @@ -1523,7 +1523,11 @@ func Test_routeReflectorConfiguration(t *testing.T) { err := testcase.nrc.startBgpServer() if err == nil { - defer testcase.nrc.bgpServer.Stop() + defer func() { + if err := testcase.nrc.bgpServer.Stop(); err != nil { + t.Fatalf("failed to stop BGP server : %s", err) + } + }() } if testcase.expectedBgpToStart {