Skip to content

Commit

Permalink
feature: #639 remove PolicyCheckerService.isValid() check
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-lcapellino committed Jun 18, 2024
1 parent e1eb275 commit 81d839a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,6 @@ private CatalogItem getCatalogItem(final NotificationMessage notification, final
.build())
.build()
).stream()
.filter(catalogItem -> {
log.info("-- catalog item check --");
log.info("Item {}: {}", catalogItem.getItemId(), catalogItem);
boolean isValid = policyCheckerService.isValid(catalogItem.getPolicy(), notification.getSendTo()
);
log.info("IsValid : {}", isValid);
return isValid;
})
.findFirst()
.orElseThrow();
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ void givenCorrectInvestigationMessageButSendRequestThrowsException_whenStartEdcT
final String idsPath = "/api/v1/dsp";
when(edcProperties.getIdsPath()).thenReturn(idsPath);
when(edcCatalogFacade.fetchCatalogItems(any())).thenReturn(List.of(catalogItem));
when(policyCheckerService.isValid(null, null)).thenReturn(true);
when(contractNegotiationService.negotiate(receiverEdcUrl + idsPath, catalogItem, null, null))
.thenReturn(NegotiationResponse.builder().contractAgreementId(agreementId).build());
when(endpointDataReference.getEndpoint()).thenReturn("endpoint");
Expand Down Expand Up @@ -111,7 +110,6 @@ void givenCorrectInvestigationMessageButNegotiateContractAgreementHasNoCatalogIt
final String idsPath = "/api/v1/dsp";
when(edcProperties.getIdsPath()).thenReturn(idsPath);
when(edcCatalogFacade.fetchCatalogItems(any())).thenReturn(List.of(catalogItem));
when(policyCheckerService.isValid(null, null)).thenReturn(true);
when(contractNegotiationService.negotiate(receiverEdcUrl + idsPath, catalogItem, null, null))
.thenReturn(null);

Expand Down

0 comments on commit 81d839a

Please sign in to comment.