diff --git a/src/main/java/de/ozgcloud/nachrichten/postfach/osiv2/config/Osi2PostfachProperties.java b/src/main/java/de/ozgcloud/nachrichten/postfach/osiv2/config/Osi2PostfachProperties.java index 6d4bb53ccd296a1d687bb7701480eebfdeaf63da..81ef4623dcd53c1d2ab13b03c5b233bd79de5386 100644 --- a/src/main/java/de/ozgcloud/nachrichten/postfach/osiv2/config/Osi2PostfachProperties.java +++ b/src/main/java/de/ozgcloud/nachrichten/postfach/osiv2/config/Osi2PostfachProperties.java @@ -17,7 +17,7 @@ import lombok.Setter; @RequiredArgsConstructor public class Osi2PostfachProperties { - static final String PREFIX = "ozgcloud.osiv2"; + public static final String PREFIX = "ozgcloud.osiv2"; private boolean enabled; @@ -30,7 +30,7 @@ public class Osi2PostfachProperties { @Configuration @ConfigurationProperties(prefix = ApiConfiguration.PREFIX) public static class ApiConfiguration { - static final String PREFIX = Osi2PostfachProperties.PREFIX + ".api"; + public static final String PREFIX = Osi2PostfachProperties.PREFIX + ".api"; private String resource; private String url; @@ -47,7 +47,7 @@ public class Osi2PostfachProperties { @Configuration @ConfigurationProperties(prefix = ProxyConfiguration.PREFIX) public static class ProxyConfiguration { - static final String PREFIX = Osi2PostfachProperties.PREFIX + ".proxy"; + public static final String PREFIX = Osi2PostfachProperties.PREFIX + ".proxy"; private boolean enabled; diff --git a/src/main/resources/application-stage.yml b/src/main/resources/application-stage.yml index 6892480bd6613072000a2bd939e6a72845bd109b..c2804acf5bd4bec3a1e037f7cf334c73b2905050 100644 --- a/src/main/resources/application-stage.yml +++ b/src/main/resources/application-stage.yml @@ -13,14 +13,14 @@ spring: osi2: token-uri: 'https://idp.serviceportal-stage.schleswig-holstein.de/webidp2/connect/token' ozgcloud: - osiv2-postfach: + osiv2: enabled: false api: resource: 'urn:dataport:osi:postfach:rz2:stage:sh' url: 'https://api-gateway-stage.dataport.de:443/api/osi_postfach/1.0.0' tenant: 'SH' name-identifier: 'ozgkopfstelle' - http-proxy: + proxy: enabled: true host: 127.0.0.1 port: 3128 diff --git a/src/test/java/de/ozgcloud/nachrichten/postfach/osiv2/OsiPostfachRemoteServiceITCase.java b/src/test/java/de/ozgcloud/nachrichten/postfach/osiv2/OsiPostfachRemoteServiceITCase.java index d521985848e025dc5f2b12b1fba15e3d2d99a0ee..53c668ba248ea650bfef43752bf141c9d1112773 100644 --- a/src/test/java/de/ozgcloud/nachrichten/postfach/osiv2/OsiPostfachRemoteServiceITCase.java +++ b/src/test/java/de/ozgcloud/nachrichten/postfach/osiv2/OsiPostfachRemoteServiceITCase.java @@ -38,7 +38,7 @@ import de.ozgcloud.nachrichten.postfach.osiv2.gen.model.MessageExchangeReceiveMe import lombok.SneakyThrows; @SpringBootTest(classes = TestApplication.class) -@ActiveProfiles({"stage", "itcase"}) +@ActiveProfiles({ "stage", "itcase" }) @TestPropertySource(properties = { "ozgcloud.osiv2.proxy.enabled=false", }) diff --git a/src/test/java/de/ozgcloud/nachrichten/postfach/osiv2/OsiPostfachRemoteServiceRemoteITCase.java b/src/test/java/de/ozgcloud/nachrichten/postfach/osiv2/OsiPostfachRemoteServiceRemoteITCase.java index 482ed08e7a448aa564d66a9f85612bb976db5faf..bfe893d4894db385d82927d12af57d282d8bc35e 100644 --- a/src/test/java/de/ozgcloud/nachrichten/postfach/osiv2/OsiPostfachRemoteServiceRemoteITCase.java +++ b/src/test/java/de/ozgcloud/nachrichten/postfach/osiv2/OsiPostfachRemoteServiceRemoteITCase.java @@ -6,7 +6,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Stream; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/src/test/java/de/ozgcloud/nachrichten/postfach/osiv2/OsiPostfachRemoteServiceTest.java b/src/test/java/de/ozgcloud/nachrichten/postfach/osiv2/OsiPostfachRemoteServiceTest.java index a00ab88ae8b7d18aa79a228c651d55ff472a8289..685c36f61dd8d1d44afc185da5bf94bf3eb4ee67 100644 --- a/src/test/java/de/ozgcloud/nachrichten/postfach/osiv2/OsiPostfachRemoteServiceTest.java +++ b/src/test/java/de/ozgcloud/nachrichten/postfach/osiv2/OsiPostfachRemoteServiceTest.java @@ -81,6 +81,7 @@ class OsiPostfachRemoteServiceTest { verify(postfachApiFacadeService).deleteMessage(any()); } + @DisplayName("should throw osi postfach exception on runtime exception") @Test void shouldThrowOsiPostfachExceptionOnRuntimeException() { diff --git a/src/test/resources/application-itcase.yml b/src/test/resources/application-itcase.yml index d8cacf79a13dd9feec526bea7afc6695e6f0b136..41e84786e9e76db63c2d6671a55ae56dddae6ea7 100644 --- a/src/test/resources/application-itcase.yml +++ b/src/test/resources/application-itcase.yml @@ -1,5 +1,5 @@ ozgcloud: - osiv2-postfach: + osiv2: enabled: true logging: level: