From c9067156d98925e8df9671e80cd119344190aa42 Mon Sep 17 00:00:00 2001 From: Dominic Schabel Date: Mon, 17 Dec 2018 11:04:52 +0100 Subject: [PATCH] Message fixed Signed-off-by: Dominic Schabel --- .../mgmt/rest/resource/MgmtSoftwareModuleResourceTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hawkbit-rest/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtSoftwareModuleResourceTest.java b/hawkbit-rest/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtSoftwareModuleResourceTest.java index 7e7ca9854..bb7f33abe 100644 --- a/hawkbit-rest/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtSoftwareModuleResourceTest.java +++ b/hawkbit-rest/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtSoftwareModuleResourceTest.java @@ -206,7 +206,7 @@ public class MgmtSoftwareModuleResourceTest extends AbstractManagementApiIntegra .accept(MediaType.APPLICATION_JSON)).andDo(MockMvcResultPrinter.print()) .andExpect(status().isForbidden()); } - + @Test @Description("Verifies that artifact with invalid filename cannot be uploaded to prevent cross site scripting.") public void uploadArtifactFailsIfFilenameInvalide() throws Exception { @@ -219,7 +219,7 @@ public class MgmtSoftwareModuleResourceTest extends AbstractManagementApiIntegra mvc.perform(fileUpload("/rest/v1/softwaremodules/{smId}/artifacts", sm.getId()).file(file) .accept(MediaType.APPLICATION_JSON)).andDo(MockMvcResultPrinter.print()) .andExpect(status().isBadRequest()) - .andExpect(jsonPath("$.message", containsString("The filename might contain unsafe HTML code."))); + .andExpect(jsonPath("$.message", containsString("Invalid characters in string"))); } private void assertArtifact(final SoftwareModule sm, final byte[] random) throws IOException {