diff --git a/plugin/src/main/java/org/opensearch/ml/action/model_group/TransportUpdateModelGroupAction.java b/plugin/src/main/java/org/opensearch/ml/action/model_group/TransportUpdateModelGroupAction.java index 1c8bb32777..eb109b7adf 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/model_group/TransportUpdateModelGroupAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/model_group/TransportUpdateModelGroupAction.java @@ -218,7 +218,7 @@ private void validateRequestForAccessControl(MLUpdateModelGroupInput input, User && !modelAccessControlHelper.isAdmin(user) && !modelAccessControlHelper.isOwnerStillHasPermission(user, mlModelGroup)) { throw new IllegalArgumentException( - "You don’t have the specified backend role to update this model group. For more information, contact your administrator." + "You don't have the specified backend role to update this model group. For more information, contact your administrator." ); } AccessMode accessMode = input.getModelAccessMode(); @@ -230,7 +230,7 @@ private void validateRequestForAccessControl(MLUpdateModelGroupInput input, User throw new IllegalArgumentException("Admin users cannot add all backend roles to a model group."); } if (Boolean.TRUE.equals(input.getIsAddAllBackendRoles()) && CollectionUtils.isEmpty(user.getBackendRoles())) { - throw new IllegalArgumentException("You don’t have any backend roles."); + throw new IllegalArgumentException("You don't have any backend roles."); } if (CollectionUtils.isEmpty(input.getBackendRoles()) && Boolean.FALSE.equals(input.getIsAddAllBackendRoles())) { throw new IllegalArgumentException("You have to specify backend roles when add all backend roles is set to false."); diff --git a/plugin/src/test/java/org/opensearch/ml/action/model_group/TransportUpdateModelGroupActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/model_group/TransportUpdateModelGroupActionTests.java index 70cb0cbdc9..1a67977291 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/model_group/TransportUpdateModelGroupActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/model_group/TransportUpdateModelGroupActionTests.java @@ -172,7 +172,7 @@ public void test_OwnerNoMoreHasPermissionException() { ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(Exception.class); verify(actionListener).onFailure(argumentCaptor.capture()); assertEquals( - "You don’t have the specified backend role to update this model group. For more information, contact your administrator.", + "You don't have the specified backend role to update this model group. For more information, contact your administrator.", argumentCaptor.getValue().getMessage() ); } @@ -236,7 +236,7 @@ public void test_UserWithNoBackendRolesSpecifiedRestricted() { transportUpdateModelGroupAction.doExecute(task, actionRequest, actionListener); ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(Exception.class); verify(actionListener).onFailure(argumentCaptor.capture()); - assertEquals("You don’t have any backend roles.", argumentCaptor.getValue().getMessage()); + assertEquals("You don't have any backend roles.", argumentCaptor.getValue().getMessage()); } public void test_UserSpecifiedRestrictedButNoBackendRolesField() { diff --git a/plugin/src/test/java/org/opensearch/ml/rest/MLModelGroupRestIT.java b/plugin/src/test/java/org/opensearch/ml/rest/MLModelGroupRestIT.java index 7214079b55..92ea494cf5 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/MLModelGroupRestIT.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/MLModelGroupRestIT.java @@ -954,7 +954,7 @@ public void test_RegisterModelGroupForUser4WithPublic() throws IOException { updateModelGroup(user4Client, modelGroupId, TestHelper.toJsonString(mlUpdateModelGroupInput), null); } catch (Exception e) { assertEquals(ResponseException.class, e.getClass()); - assertTrue(Throwables.getStackTraceAsString(e).contains("You don’t have any backend roles.")); + assertTrue(Throwables.getStackTraceAsString(e).contains("You don't have any backend roles.")); } try { mlUpdateModelGroupInput = createUpdateModelGroupInput( @@ -1020,7 +1020,7 @@ public void test_RegisterModelGroupForUser4WithPrivate() throws IOException { updateModelGroup(user4Client, modelGroupId, TestHelper.toJsonString(mlUpdateModelGroupInput), null); } catch (Exception e) { assertEquals(ResponseException.class, e.getClass()); - assertTrue(Throwables.getStackTraceAsString(e).contains("You don’t have any backend roles.")); + assertTrue(Throwables.getStackTraceAsString(e).contains("You don't have any backend roles.")); } try { mlUpdateModelGroupInput = createUpdateModelGroupInput(modelGroupId, "name", "description", null, null, null);