Skip to content
Snippets Groups Projects
Commit 70414f67 authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-4095 config: Use `stage` profile

parent 27562f2d
No related branches found
No related tags found
2 merge requests!9Draft: Ozg 4094 wiremock ausprobieren,!7Ozg-4094 Konfiguration für nachrichten-manager
Pipeline #1553 passed
......@@ -11,7 +11,7 @@
<groupId>de.ozgcloud.osiv2</groupId>
<artifactId>osiv2-postfach</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>0.1.0-SNAPSHOT</version>
<name>OZG-Cloud-OSIv2-Postfach</name>
<description>OSIv2-Postfach-Anbindung für OZG-Cloud-Nachrichten</description>
......@@ -25,6 +25,11 @@
</properties>
<dependencies>
<!-- OZG-Cloud -->
<dependency>
<groupId>de.ozgcloud.api-lib</groupId>
<artifactId>ozg-cloud-spring-boot-starter</artifactId>
<version>${api-lib.version}</version>
</dependency>
<dependency>
<groupId>de.ozgcloud.nachrichten</groupId>
<artifactId>nachrichten-manager-postfach-interface</artifactId>
......
spring:
security:
oauth2:
client:
registration:
osi2:
client-id: 'OZG-Kopfstelle'
client-secret: 'changeme'
scope: default, access_urn:dataport:osi:sh:stage:ozgkopfstelle
authorization-grant-type: 'client_credentials'
client-authentication-method: client_secret_post
provider:
osi2:
token-uri: 'https://idp.serviceportal-stage.schleswig-holstein.de/webidp2/connect/token'
ozgcloud:
osiv2-postfach:
enabled: true
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:
enabled: true
host: 127.0.0.1
port: 3128
spring:
jackson:
default-property-inclusion: NON_NULL
security:
oauth2:
client:
registration:
osi2:
client-id: 'OZG-Kopfstelle'
client-secret: 'changeme'
scope: default, access_urn:dataport:osi:sh:stage:ozgkopfstelle
authorization-grant-type: 'client_credentials'
client-authentication-method: client_secret_post
provider:
osi2:
token-uri: 'https://idp.serviceportal-stage.schleswig-holstein.de/webidp2/connect/token'
ozgcloud:
osiv2-postfach:
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:
enabled: true
host: 127.0.0.1
port: 3128
default-property-inclusion: NON_NULL
\ No newline at end of file
......@@ -38,7 +38,7 @@ import de.ozgcloud.nachrichten.postfach.osiv2.gen.model.MessageExchangeReceiveMe
import lombok.SneakyThrows;
@SpringBootTest(classes = TestApplication.class)
@ActiveProfiles("itcase")
@ActiveProfiles({"itcase", "stage"})
@TestPropertySource(properties = {
"ozgcloud.osiv2-postfach.http-proxy.enabled=false",
})
......
......@@ -23,7 +23,7 @@ import de.ozgcloud.nachrichten.postfach.osiv2.factory.PostfachAddressTestFactory
import de.ozgcloud.nachrichten.postfach.osiv2.factory.PostfachNachrichtTestFactory;
@SpringBootTest(classes = TestApplication.class)
@ActiveProfiles("local")
@ActiveProfiles({ "local", "stage" })
@EnabledIfEnvironmentVariable(named = "SH_STAGE_CLIENT_SECRET", matches = ".+")
public class OsiPostfachRemoteServiceRemoteITCase {
......@@ -78,10 +78,10 @@ public class OsiPostfachRemoteServiceRemoteITCase {
@DisplayName("receive all messages")
@Nested
class TestReceiveAllMessages{
class TestReceiveAllMessages {
@Test
void shouldReceiveAllMessage(){
void shouldReceiveAllMessage() {
Stream<PostfachNachricht> allMessages = osiPostfachRemoteService.getAllMessages();
var messages = allMessages.toList();
......@@ -93,10 +93,10 @@ public class OsiPostfachRemoteServiceRemoteITCase {
@Disabled
@DisplayName("delete message")
@Nested
class TestDeleteMessageById{
class TestDeleteMessageById {
@Test
void shouldDeleteMessage(){
void shouldDeleteMessage() {
assertThatCode(() -> osiPostfachRemoteService.deleteMessage("5dd65c1e-bd41-4c3d-bf98-be769ca341dc"))
.doesNotThrowAnyException();
}
......
ozgcloud:
osiv2-postfach:
enabled: true
logging:
level:
de.ozgcloud.nachrichten.postfach.osiv2: DEBUG
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment