From c71dff653788564b32fbeb6718e20915d7b3b80e Mon Sep 17 00:00:00 2001 From: luke <348358584@qq.com> Date: Wed, 1 Jan 2025 18:55:06 +0800 Subject: [PATCH] feat(auth): fix unit test --- .../apollo/portal/controller/PermissionController.java | 2 +- .../apollo/portal/controller/PermissionControllerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java index 820e7d19983..d72b8bd8ce2 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java @@ -259,7 +259,7 @@ public ResponseEntity assignClusterNamespaceRoleToUser(@PathVariable Strin } @PreAuthorize(value = "@permissionValidator.hasAssignRolePermission(#appId)") - @DeleteMapping("/apps/{appId}/envs/{env}/clusters/{clusterName}/ns _roles/{roleType}") + @DeleteMapping("/apps/{appId}/envs/{env}/clusters/{clusterName}/ns_roles/{roleType}") public ResponseEntity removeClusterNamespaceRoleFromUser(@PathVariable String appId, @PathVariable String env, @PathVariable String clusterName, @PathVariable String roleType, @RequestParam String user) { RequestPrecondition.checkArgumentsNotEmpty(user); diff --git a/apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/controller/PermissionControllerTest.java b/apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/controller/PermissionControllerTest.java index 6e953923687..8785ef60cec 100644 --- a/apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/controller/PermissionControllerTest.java +++ b/apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/controller/PermissionControllerTest.java @@ -76,7 +76,7 @@ public void testClusterNamespaceRoleLifeCycle() { // check role assigned ResponseEntity afterAssign = restTemplate.getForEntity( - url("/apps/{appId}/envs/{env}/clusters/{clusterName}/role_users"), + url("/apps/{appId}/envs/{env}/clusters/{clusterName}/ns_role_users"), ClusterNamespaceRolesAssignedUsers.class, appId, env, clusterName); assertEquals(200, afterAssign.getStatusCodeValue()); body = afterAssign.getBody();