Merged in CST-11045 (pull request #1269)

CST-11045 Rest side changes for the review-endorsement-ingest patterns +Checkstyle fix on QAEventServiceImpl

* CST-11045 Rest side changes for the review-endorsement-ingest patterns +Checkstyle fix on QAEventServiceImpl

* CST-11045 Rollback of the 2 changed files containing the patterns

* CST-11045 Changed again the 2 files containing the patterns, error during the tests are logged but not regarding IT class changed


Approved-by: Andrea Bollini
This commit is contained in:
Mattia Vianelli
2023-11-11 16:37:09 +00:00
committed by Andrea Bollini
parent 75bd22b32b
commit f2cc19f4a1
3 changed files with 19 additions and 19 deletions

View File

@@ -78,7 +78,7 @@ public class QAEventServiceImpl implements QAEventService {
@Autowired @Autowired
private QAEventsDaoImpl qaEventsDao; private QAEventsDaoImpl qaEventsDao;
@Autowired(required=false) @Autowired(required = false)
@Qualifier("qaAutomaticProcessingMap") @Qualifier("qaAutomaticProcessingMap")
private Map<String, QAEventAutomaticProcessingEvaluation> qaAutomaticProcessingMap; private Map<String, QAEventAutomaticProcessingEvaluation> qaAutomaticProcessingMap;

View File

@@ -30,7 +30,7 @@ public class SubmissionCOARNotifyRestRepositoryIT extends AbstractControllerInte
@Test @Test
public void findAllTestUnAuthorized() throws Exception { public void findAllTestUnAuthorized() throws Exception {
getClient().perform(get("/api/config/submissioncoarnotifyconfigs")) getClient().perform(get("/api/config/submissioncoarnotifyconfigs"))
.andExpect(status().isUnauthorized()); .andExpect(status().isUnauthorized());
} }
@Test @Test
@@ -38,18 +38,18 @@ public class SubmissionCOARNotifyRestRepositoryIT extends AbstractControllerInte
String epersonToken = getAuthToken(eperson.getEmail(), password); String epersonToken = getAuthToken(eperson.getEmail(), password);
getClient(epersonToken).perform(get("/api/config/submissioncoarnotifyconfigs")) getClient(epersonToken).perform(get("/api/config/submissioncoarnotifyconfigs"))
.andExpect(status().isOk()) .andExpect(status().isOk())
.andExpect(content().contentType(contentType)) .andExpect(content().contentType(contentType))
.andExpect(jsonPath("$._embedded.submissioncoarnotifyconfigs", Matchers.containsInAnyOrder( .andExpect(jsonPath("$._embedded.submissioncoarnotifyconfigs", Matchers.containsInAnyOrder(
SubmissionCOARNotifyMatcher.matchCOARNotifyEntry("coarnotify", SubmissionCOARNotifyMatcher.matchCOARNotifyEntry("coarnotify",
List.of("review", "endorsement", "ingest")) List.of("request-review", "request-endorsement", "request-ingest"))
))); )));
} }
@Test @Test
public void findOneTestUnAuthorized() throws Exception { public void findOneTestUnAuthorized() throws Exception {
getClient().perform(get("/api/config/submissioncoarnotifyconfigs/coarnotify")) getClient().perform(get("/api/config/submissioncoarnotifyconfigs/coarnotify"))
.andExpect(status().isUnauthorized()); .andExpect(status().isUnauthorized());
} }
@Test @Test
@@ -57,7 +57,7 @@ public class SubmissionCOARNotifyRestRepositoryIT extends AbstractControllerInte
String epersonToken = getAuthToken(eperson.getEmail(), password); String epersonToken = getAuthToken(eperson.getEmail(), password);
getClient(epersonToken).perform(get("/api/config/submissioncoarnotifyconfigs/non-existing-coar")) getClient(epersonToken).perform(get("/api/config/submissioncoarnotifyconfigs/non-existing-coar"))
.andExpect(status().isNotFound()); .andExpect(status().isNotFound());
} }
@Test @Test
@@ -65,12 +65,12 @@ public class SubmissionCOARNotifyRestRepositoryIT extends AbstractControllerInte
String epersonToken = getAuthToken(eperson.getEmail(), password); String epersonToken = getAuthToken(eperson.getEmail(), password);
getClient(epersonToken).perform(get("/api/config/submissioncoarnotifyconfigs/coarnotify")) getClient(epersonToken).perform(get("/api/config/submissioncoarnotifyconfigs/coarnotify"))
.andExpect(status().isOk()) .andExpect(status().isOk())
.andExpect(content().contentType(contentType)) .andExpect(content().contentType(contentType))
.andExpect(jsonPath("$", Matchers.is( .andExpect(jsonPath("$", Matchers.is(
SubmissionCOARNotifyMatcher.matchCOARNotifyEntry("coarnotify", SubmissionCOARNotifyMatcher.matchCOARNotifyEntry("coarnotify",
List.of("review", "endorsement", "ingest")) List.of("request-review", "request-endorsement", "request-ingest"))
))); )));
} }
} }

View File

@@ -10,9 +10,9 @@
<map> <map>
<entry key="coarnotify"> <entry key="coarnotify">
<list> <list>
<value>review</value> <value>request-review</value>
<value>endorsement</value> <value>request-endorsement</value>
<value>ingest</value> <value>request-ingest</value>
</list> </list>
</entry> </entry>
</map> </map>