From b3e451f895603f2d6145615ba544112c44ab7873 Mon Sep 17 00:00:00 2001 From: Paul Latzelsperger Date: Fri, 29 Mar 2024 10:14:01 +0100 Subject: [PATCH] fix tests --- .../edc/identity/mapper/BdrsClientExtensionTest.java | 4 ++-- .../edc/samples/multitenancy/MultiTenantRuntime.java | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/edc-extensions/bdrs-client/src/test/java/org/eclipse/tractusx/edc/identity/mapper/BdrsClientExtensionTest.java b/edc-extensions/bdrs-client/src/test/java/org/eclipse/tractusx/edc/identity/mapper/BdrsClientExtensionTest.java index 4ca60ab13..6123f1332 100644 --- a/edc-extensions/bdrs-client/src/test/java/org/eclipse/tractusx/edc/identity/mapper/BdrsClientExtensionTest.java +++ b/edc-extensions/bdrs-client/src/test/java/org/eclipse/tractusx/edc/identity/mapper/BdrsClientExtensionTest.java @@ -30,7 +30,6 @@ import static org.eclipse.tractusx.edc.identity.mapper.BdrsClientExtension.BDRS_SERVER_URL_PROPERTY; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.isNull; -import static org.mockito.ArgumentMatchers.matches; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -52,6 +51,7 @@ void createClient_whenUrlMissing_expectLogError(ServiceExtensionContext context, when(cfg.getString(eq(BDRS_SERVER_URL_PROPERTY), isNull())).thenReturn(null); extension.getBdrsAudienceResolver(context); - verify(monitor).severe(matches("^The following property was expected but was not provided: '.*'. This runtime will not work correctly!$")); + verify(monitor).severe(eq("Mandatory config value missing: 'tx.iam.iatp.bdrs.server.url'. This runtime will not be fully operational! Starting with v0.7.x this will be a runtime error.")); + } } \ No newline at end of file diff --git a/samples/multi-tenancy/src/main/java/org/eclipse/tractusx/edc/samples/multitenancy/MultiTenantRuntime.java b/samples/multi-tenancy/src/main/java/org/eclipse/tractusx/edc/samples/multitenancy/MultiTenantRuntime.java index fac9b12cf..d7ac26513 100644 --- a/samples/multi-tenancy/src/main/java/org/eclipse/tractusx/edc/samples/multitenancy/MultiTenantRuntime.java +++ b/samples/multi-tenancy/src/main/java/org/eclipse/tractusx/edc/samples/multitenancy/MultiTenantRuntime.java @@ -51,11 +51,6 @@ protected void boot() { loadTenantsConfig().getConfig("edc.tenants").partition().forEach(this::bootTenant); } - @Override - protected void onError(Exception e) { - throw new EdcException(e); - } - private void bootTenant(Config tenantConfig) { var baseProperties = System.getProperties(); tenantConfig.getRelativeEntries().forEach(System::setProperty);