From 59aa19624b564001a7c768bca12a28d4cc0f5dee Mon Sep 17 00:00:00 2001 From: frabacche Date: Mon, 15 Apr 2024 21:19:46 +0200 Subject: [PATCH 1/2] COAR NotifyService IT failures: NotifyServiceInboundPatternsRemoveOperation supports modification to match an exact path --- .../ldn/NotifyServiceInboundPatternsRemoveOperation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/patch/operation/ldn/NotifyServiceInboundPatternsRemoveOperation.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/patch/operation/ldn/NotifyServiceInboundPatternsRemoveOperation.java index 76890f792ea..2ff00dcab58 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/patch/operation/ldn/NotifyServiceInboundPatternsRemoveOperation.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/patch/operation/ldn/NotifyServiceInboundPatternsRemoveOperation.java @@ -66,6 +66,6 @@ public boolean supports(Object objectToMatch, Operation operation) { String path = operation.getPath().trim(); return (objectToMatch instanceof NotifyServiceEntity && operation.getOp().trim().equalsIgnoreCase(OPERATION_REMOVE) && - path.startsWith(OPERATION_PATH)); + path.startsWith(OPERATION_PATH) && path.endsWith(OPERATION_PATH)); } } From 2a46888ec68e80035f15ffcab665e5245ef7b71a Mon Sep 17 00:00:00 2001 From: frabacche Date: Thu, 18 Apr 2024 09:10:31 +0200 Subject: [PATCH 2/2] COAR NotifyService IT failures: remove ignore annotation to the guilty test methods! --- .../org/dspace/app/rest/NotifyServiceRestRepositoryIT.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/NotifyServiceRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/NotifyServiceRestRepositoryIT.java index 5c6d394ffda..6ea0d890b92 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/NotifyServiceRestRepositoryIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/NotifyServiceRestRepositoryIT.java @@ -1266,8 +1266,7 @@ public void NotifyServiceInboundPatternConstraintReplaceOperationBadRequestTest( .andExpect(status().isBadRequest()); } - // Temporarily disable. See: https://github.com/DSpace/DSpace/issues/9457 - @Ignore + @Test public void NotifyServiceInboundPatternConstraintRemoveOperationTest() throws Exception { @@ -1332,8 +1331,6 @@ public void NotifyServiceInboundPatternConstraintRemoveOperationTest() throws Ex ))); } - // Temporarily disable. See: https://github.com/DSpace/DSpace/issues/9457 - @Ignore @Test public void NotifyServiceInboundPatternConstraintRemoveOperationBadRequestTest() throws Exception {