From 5659c08180ca3997255d92de489c4110a0420dff Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Tue, 2 Jul 2024 13:03:25 +0200 Subject: [PATCH] feature: #639 fix integration tests --- .../investigation/InvestigationPolicyExpirationIT.java | 4 ++-- .../investigation/InvestigationPolicyNotSupportedIT.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/investigation/InvestigationPolicyExpirationIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/investigation/InvestigationPolicyExpirationIT.java index 3a16136d44..9b8c3ea1e6 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/investigation/InvestigationPolicyExpirationIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/investigation/InvestigationPolicyExpirationIT.java @@ -144,8 +144,8 @@ void shouldNotApproveInvestigationStatus_whenPolicyIsExpired() throws JoseExcept .body("pageSize", Matchers.is(10)) .body("content", Matchers.hasSize(1)) .body("content[0].sendTo", Matchers.is(Matchers.not(Matchers.blankOrNullString()))) - .body("content[0].messages[0].errorMessage", Matchers.is("Failed to negotiate contract agreement: Consumption of asset '40276218-e31b-4c35-a7c8-017e8edb702e' is not permitted as the required catalog offer policies are expired.")) - .body("content[0].messages[1].errorMessage", Matchers.is("Failed to negotiate contract agreement: Consumption of asset '40276218-e31b-4c35-a7c8-017e8edb702e' is not permitted as the required catalog offer policies are expired.")); + .body("content[0].messages[0].errorMessage", Matchers.is("Failed to negotiate contract agreement: Policy from BPNL00000003CNKC has expired.")) + .body("content[0].messages[1].errorMessage", Matchers.is("Failed to negotiate contract agreement: Policy from BPNL00000003CNKC has expired.")); notificationMessageSupport.assertMessageSize(2); } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/investigation/InvestigationPolicyNotSupportedIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/investigation/InvestigationPolicyNotSupportedIT.java index 7bfcffd6b2..335210a109 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/investigation/InvestigationPolicyNotSupportedIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/notification/investigation/InvestigationPolicyNotSupportedIT.java @@ -144,8 +144,8 @@ void shouldNotApproveInvestigationStatus_whenPolicyDoesNotComply() throws JoseEx .body("pageSize", Matchers.is(10)) .body("content", Matchers.hasSize(1)) .body("content[0].sendTo", Matchers.is(Matchers.not(Matchers.blankOrNullString()))) - .body("content[0].messages[0].errorMessage", Matchers.is("Failed to negotiate contract agreement: Consumption of asset '40276218-e31b-4c35-a7c8-017e8edb702e' is not permitted as the required catalog offer policies do not comply with defined policies.")) - .body("content[0].messages[1].errorMessage", Matchers.is("Failed to negotiate contract agreement: Consumption of asset '40276218-e31b-4c35-a7c8-017e8edb702e' is not permitted as the required catalog offer policies do not comply with defined policies.")); + .body("content[0].messages[0].errorMessage", Matchers.endsWith("did not match with policy from BPNL00000003CNKC.")) + .body("content[0].messages[1].errorMessage", Matchers.endsWith("did not match with policy from BPNL00000003CNKC.")); notificationMessageSupport.assertMessageSize(2); }