From 0d853bcd6760eb76b19abd862a9b30ee7894e534 Mon Sep 17 00:00:00 2001 From: Salah Aldeen Al Saleh Date: Tue, 26 Nov 2024 12:13:45 -0800 Subject: [PATCH] add handler test --- pkg/handlers/handlers_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/handlers/handlers_test.go b/pkg/handlers/handlers_test.go index 384330f919..c569dceebc 100644 --- a/pkg/handlers/handlers_test.go +++ b/pkg/handlers/handlers_test.go @@ -1429,6 +1429,16 @@ var HandlerPolicyTests = map[string][]HandlerPolicyTest{ ExpectStatus: http.StatusOK, }, }, + "GetDebugInfo": { + { + Roles: []rbactypes.Role{rbac.ClusterAdminRole}, + SessionRoles: []string{rbac.ClusterAdminRoleID}, + Calls: func(storeRecorder *mock_store.MockStoreMockRecorder, handlerRecorder *mock_handlers.MockKOTSHandlerMockRecorder) { + handlerRecorder.GetDebugInfo(gomock.Any(), gomock.Any()) + }, + ExpectStatus: http.StatusOK, + }, + }, // Upgrade Service "StartUpgradeService": {