From fa8bea5a97c8d36a3b919410ae988c8b012ac051 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 16 Oct 2024 14:00:33 -0300 Subject: [PATCH] Add mock for API client's asInternalUser endpoint --- plugins/main/server/routes/wazuh-api-http-status.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/main/server/routes/wazuh-api-http-status.test.ts b/plugins/main/server/routes/wazuh-api-http-status.test.ts index 977cf2c43a..6a6c578e4d 100644 --- a/plugins/main/server/routes/wazuh-api-http-status.test.ts +++ b/plugins/main/server/routes/wazuh-api-http-status.test.ts @@ -21,6 +21,15 @@ const context = { warn: jest.fn(), error: jest.fn(), }, + api: { + client: { + asInternalUser: { + request: jest.fn().mockRejectedValue({ + response: {}, + }), + }, + }, + }, }, wazuh_core: { manageHosts: {