From 83e75583e33e828875464ba2db2b95585d091847 Mon Sep 17 00:00:00 2001 From: Nilesh Sarupriya Date: Thu, 7 Nov 2024 12:53:20 +0530 Subject: [PATCH] chore: use spybean for SessionUserService and remove unused method for populating the userId in the ActionExecuteDTO (#37268) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description > Fix test case for EE Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.Sanity" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 87131cbe02fa4e13ef4a88288ffa64a27846c9fc > Cypress dashboard. > Tags: `@tag.Sanity` > Spec: >
Thu, 07 Nov 2024 06:49:49 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit ## Summary by CodeRabbit - **Tests** - Updated the `sessionUserService` field in the test class to utilize partial mocking, enhancing the verification of interactions during tests. - **Bug Fixes** - Removed the method responsible for populating user IDs in action execution, streamlining user identification handling. --------- Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com> --- .../solutions/ce/ActionExecutionSolutionCEImpl.java | 9 --------- .../solutions/ce/ActionExecutionSolutionCEImplTest.java | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java index c8db695056..38c8664141 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java @@ -265,15 +265,6 @@ public class ActionExecutionSolutionCEImpl implements ActionExecutionSolutionCE })); } - /** - * Populates the requestParams with logged in userId. - * If the user is not logged in, set the parameter as anonymousUserId - * - */ - protected Mono populateExecuteActionDTOWithUserId(ExecuteActionDTO executeActionDTO) { - return Mono.just(executeActionDTO); - } - /** * Executes the action(queries) by creating executeActionDTO and sending it to the plugin for further execution * diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImplTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImplTest.java index c6c1eb9561..603142af94 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImplTest.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImplTest.java @@ -109,7 +109,7 @@ class ActionExecutionSolutionCEImplTest { @MockBean ApplicationService applicationService; - @MockBean + @SpyBean SessionUserService sessionUserService; @MockBean