From 59e37088876a9d5853b56e213a079bf98dc0df60 Mon Sep 17 00:00:00 2001 From: ajaz Date: Fri, 22 Nov 2024 18:17:04 +0530 Subject: [PATCH] fix: address review comments --- src/commands/api-mesh/__tests__/delete.test.js | 2 +- src/lib/devConsole.js | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/commands/api-mesh/__tests__/delete.test.js b/src/commands/api-mesh/__tests__/delete.test.js index 789ef30..57f7fe4 100644 --- a/src/commands/api-mesh/__tests__/delete.test.js +++ b/src/commands/api-mesh/__tests__/delete.test.js @@ -260,7 +260,7 @@ describe('delete command tests', () => { `); }); - test('should delete mesh if correct args are provided', async () => { + test('should delete mesh if correct args are provided', async () => { const runResult = await DeleteCommand.run(); expect(initRequestId).toHaveBeenCalled(); diff --git a/src/lib/devConsole.js b/src/lib/devConsole.js index 79c5a4d..93f9b32 100644 --- a/src/lib/devConsole.js +++ b/src/lib/devConsole.js @@ -90,21 +90,7 @@ const describeMesh = async (organizationId, projectId, workspaceId, workspaceNam logger.info('Response from getMeshId %s', meshId); - if (meshId) { - const credential = await getApiKeyCredential(organizationId, projectId, workspaceId); - - if (credential) { - return { meshId, apiKey: null }; - } else { - logger.error('credentials not found on workspace'); - - return { meshId, apiKey: null }; - } - } else { - logger.error(`Unable to retrieve meshId.`); - - throw new Error(`Unable to retrieve meshId.`); - } + return { meshId, apiKey: null }; } catch (error) { logger.error(error);