Skip to content
Snippets Groups Projects
Commit c0b1c55a authored by OZGCloud's avatar OZGCloud
Browse files

Merge branch 'master' into OZG-6810-FileManager-Dateiinhalt-ersetzen-proto

# Conflicts:
#	vorgang-manager-server/pom.xml
#	vorgang-manager-server/src/test/java/de/ozgcloud/vorgang/collaboration/CollaborationITCase.java
parents a450fd60 17e282bb
Branches
Tags
1 merge request!4Revert "OZG-6810 [tmp] update version"
Showing with 247 additions and 167 deletions
...@@ -5,17 +5,18 @@ ...@@ -5,17 +5,18 @@
<parent> <parent>
<groupId>de.ozgcloud.common</groupId> <groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-parent</artifactId> <artifactId>ozgcloud-common-parent</artifactId>
<version>4.7.0-SNAPSHOT</version> <version>4.7.0</version>
<relativePath /> <relativePath />
</parent> </parent>
<groupId>de.ozgcloud.bescheid</groupId> <groupId>de.ozgcloud.bescheid</groupId>
<artifactId>bescheid-manager</artifactId> <artifactId>bescheid-manager</artifactId>
<name>OZG-Cloud Bescheid Manager</name> <name>OZG-Cloud Bescheid Manager</name>
<version>1.22.0-SNAPSHOT</version> <version>1.23.0-SNAPSHOT</version>
<inceptionYear>2020</inceptionYear>
<properties> <properties>
<vorgang-manager.version>2.19.0-SNAPSHOT</vorgang-manager.version> <vorgang-manager.version>2.20.0-SNAPSHOT</vorgang-manager.version>
<nachrichten-manager.version>2.14.0</nachrichten-manager.version> <nachrichten-manager.version>2.14.0</nachrichten-manager.version>
<document-manager.version>1.2.0-SNAPSHOT</document-manager.version> <document-manager.version>1.2.0-SNAPSHOT</document-manager.version>
<api-lib.version>0.14.0</api-lib.version> <api-lib.version>0.14.0</api-lib.version>
......
...@@ -29,14 +29,11 @@ ...@@ -29,14 +29,11 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>de.ozgcloud.vorgang</groupId> <groupId>de.ozgcloud.vorgang</groupId>
<artifactId>vorgang-manager</artifactId> <artifactId>vorgang-manager</artifactId>
<version>2.19.0-SNAPSHOT</version> <version>2.20.0-SNAPSHOT</version>
<name>OZG-Cloud Vorgang Manager</name> <name>OZG-Cloud Vorgang Manager</name>
<packaging>pom</packaging> <packaging>pom</packaging>
<inceptionYear>2020</inceptionYear>
<properties>
<ozgcloud.license.version>1.6.0</ozgcloud.license.version>
</properties>
<modules> <modules>
<module>vorgang-manager-interface</module> <module>vorgang-manager-interface</module>
...@@ -53,29 +50,6 @@ ...@@ -53,29 +50,6 @@
<plugin> <plugin>
<groupId>com.mycila</groupId> <groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId> <artifactId>license-maven-plugin</artifactId>
<version>4.1</version>
<configuration>
<mapping>
<config>SCRIPT_STYLE</config>
</mapping>
<licenseSets>
<licenseSet>
<header>license/eupl_v1_2_de/header.txt</header>
<excludes>
<exclude>**/README</exclude>
<exclude>src/test/resources/**</exclude>
<exclude>src/main/resources/**</exclude>
</excludes>
</licenseSet>
</licenseSets>
</configuration>
<dependencies>
<dependency>
<groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-license</artifactId>
<version>${ozgcloud.license.version}</version>
</dependency>
</dependencies>
</plugin> </plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
......
...@@ -164,6 +164,12 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }} ...@@ -164,6 +164,12 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- define "app.fachstelleHost" -}}
{{- if (.Values.fachstelle).enabled -}}
{{- required "fachstelle.host must be set" .Values.fachstelle.host | quote }}
{{- end -}}
{{- end -}}
{{- define "app.getZufiManagerAddress" -}} {{- define "app.getZufiManagerAddress" -}}
{{- required "zufiManager.address must be set" (.Values.zufiManager).address -}} {{- required "zufiManager.address must be set" (.Values.zufiManager).address -}}
{{- end -}} {{- end -}}
\ No newline at end of file
...@@ -242,7 +242,18 @@ spec: ...@@ -242,7 +242,18 @@ spec:
- name: ozgcloud_notification_eingangsbestaetigung_replyAllowed - name: ozgcloud_notification_eingangsbestaetigung_replyAllowed
value: {{ quote (((.Values.ozgcloud).notification).eingangsbestaetigung).replyAllowed }} value: {{ quote (((.Values.ozgcloud).notification).eingangsbestaetigung).replyAllowed }}
{{- end }} {{- end }}
{{- if ((.Values.ozgcloud).xdomea).behoerdenschluessel }}
- name: ozgcloud_xdomea_behoerdenschluessel
value: {{ ((.Values.ozgcloud).xdomea).behoerdenschluessel | quote }}
{{- end }}
{{- if ((.Values.ozgcloud).xdomea).behoerdenschluesselUri }}
- name: ozgcloud_xdomea_behoerdenschluesselUri
value: {{ ((.Values.ozgcloud).xdomea).behoerdenschluesselUri}}
{{- end }}
{{- if ((.Values.ozgcloud).xdomea).behoerdenschluesselVersion }}
- name: ozgcloud_xdomea_behoerdenschluesselVersion
value: {{ ((.Values.ozgcloud).xdomea).behoerdenschluesselVersion | quote }}
{{- end }}
{{- if (.Values.ozgcloud).processors}} {{- if (.Values.ozgcloud).processors}}
{{- range $processor_index, $processor := (.Values.ozgcloud).processors }} {{- range $processor_index, $processor := (.Values.ozgcloud).processors }}
- name: ozgcloud_processors_{{ $processor_index }}_address - name: ozgcloud_processors_{{ $processor_index }}_address
...@@ -267,6 +278,8 @@ spec: ...@@ -267,6 +278,8 @@ spec:
- name: ozgcloud_alfa_host - name: ozgcloud_alfa_host
value: {{ include "app.alfaHost" . }} value: {{ include "app.alfaHost" . }}
- name: ozgcloud_fachstelle_host
value: {{ include "app.fachstelleHost" . }}
- name: ozgcloud_vorgangManager_serviceAddress - name: ozgcloud_vorgangManager_serviceAddress
value: {{ include "app.ozgcloud_vorgangmanager_address" . }} value: {{ include "app.ozgcloud_vorgangmanager_address" . }}
......
#
# Copyright (C) 2024 Das Land Schleswig-Holstein vertreten durch den
# Ministerpräsidenten des Landes Schleswig-Holstein
# Staatskanzlei
# Abteilung Digitalisierung und zentrales IT-Management der Landesregierung
#
# Lizenziert unter der EUPL, Version 1.2 oder - sobald
# diese von der Europäischen Kommission genehmigt wurden -
# Folgeversionen der EUPL ("Lizenz");
# Sie dürfen dieses Werk ausschließlich gemäß
# dieser Lizenz nutzen.
# Eine Kopie der Lizenz finden Sie hier:
#
# https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
#
# Sofern nicht durch anwendbare Rechtsvorschriften
# gefordert oder in schriftlicher Form vereinbart, wird
# die unter der Lizenz verbreitete Software "so wie sie
# ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN -
# ausdrücklich oder stillschweigend - verbreitet.
# Die sprachspezifischen Genehmigungen und Beschränkungen
# unter der Lizenz sind dem Lizenztext zu entnehmen.
#
suite: test fachstelle host
release:
name: vorgang-manager
namespace: sh-helm-test
templates:
- templates/deployment.yaml
set:
baseUrl: test.sh.ozg-cloud.de
ozgcloud:
environment: dev
bezeichner: helm
imagePullSecret: test-image-pull-secret
tests:
- it: should set fachstelle host
set:
fachstelle:
enabled: true
host: https://hamburg.mein-kreis.de
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_fachstelle_host
value: https://hamburg.mein-kreis.de
- it: should fail if host url is not set
set:
fachstelle:
enabled: true
asserts:
- failedTemplate:
errorMessage: "fachstelle.host must be set"
- it: should not fail if fachstelle is not enabled and host is not set
asserts:
- notContains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_fachstelle_host
#
# Copyright (C) 2024 Das Land Schleswig-Holstein vertreten durch den
# Ministerpräsidenten des Landes Schleswig-Holstein
# Staatskanzlei
# Abteilung Digitalisierung und zentrales IT-Management der Landesregierung
#
# Lizenziert unter der EUPL, Version 1.2 oder - sobald
# diese von der Europäischen Kommission genehmigt wurden -
# Folgeversionen der EUPL ("Lizenz");
# Sie dürfen dieses Werk ausschließlich gemäß
# dieser Lizenz nutzen.
# Eine Kopie der Lizenz finden Sie hier:
#
# https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
#
# Sofern nicht durch anwendbare Rechtsvorschriften
# gefordert oder in schriftlicher Form vereinbart, wird
# die unter der Lizenz verbreitete Software "so wie sie
# ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN -
# ausdrücklich oder stillschweigend - verbreitet.
# Die sprachspezifischen Genehmigungen und Beschränkungen
# unter der Lizenz sind dem Lizenztext zu entnehmen.
#
suite: test xdomea properties
release:
name: vorgang-manager
namespace: sh-helm-test
templates:
- templates/deployment.yaml
set:
baseUrl: test.sh.ozg-cloud.de
ozgcloud:
environment: dev
bezeichner: helm
imagePullSecret: test-image-pull-secret
tests:
- it: should not contain behoerdenschlüssel properties if values are missing
set:
# note: explicitly non-set behoerdenschlüssel properties
asserts:
- notContains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_xdomea_behoerdenschluessel
any: true
- notContains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_xdomea_behoerdenschluesselUri
any: true
- notContains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_xdomea_behoerdenschluesselVersion
any: true
- it: should set (optional) behoerdenschlüssel properties
set:
ozgcloud:
xdomea:
behoerdenschluessel: "123456"
behoerdenschluesselUri: "uri.uri:uri"
behoerdenschluesselVersion: "version 1"
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_xdomea_behoerdenschluessel
value: "123456"
- contains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_xdomea_behoerdenschluesselUri
value: "uri.uri:uri"
- contains:
path: spec.template.spec.containers[0].env
content:
name: ozgcloud_xdomea_behoerdenschluesselVersion
value: "version 1"
\ No newline at end of file
...@@ -6,15 +6,16 @@ ...@@ -6,15 +6,16 @@
<parent> <parent>
<groupId>de.ozgcloud.common</groupId> <groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-parent</artifactId> <artifactId>ozgcloud-common-parent</artifactId>
<version>4.7.0-SNAPSHOT</version> <version>4.7.0</version>
<relativePath /> <relativePath />
</parent> </parent>
<groupId>de.ozgcloud.vorgang</groupId> <groupId>de.ozgcloud.vorgang</groupId>
<artifactId>vorgang-manager-base</artifactId> <artifactId>vorgang-manager-base</artifactId>
<version>2.19.0-SNAPSHOT</version> <version>2.20.0-SNAPSHOT</version>
<name>OZG-Cloud Vorgang Manager Base</name> <name>OZG-Cloud Vorgang Manager Base</name>
<inceptionYear>2020</inceptionYear>
<dependencies> <dependencies>
<dependency> <dependency>
......
...@@ -4,14 +4,15 @@ ...@@ -4,14 +4,15 @@
<parent> <parent>
<groupId>de.ozgcloud.common</groupId> <groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-dependencies</artifactId> <artifactId>ozgcloud-common-dependencies</artifactId>
<version>4.7.0-SNAPSHOT</version> <version>4.7.0</version>
<relativePath/> <relativePath/>
</parent> </parent>
<groupId>de.ozgcloud.command</groupId> <groupId>de.ozgcloud.command</groupId>
<artifactId>command-manager</artifactId> <artifactId>command-manager</artifactId>
<version>2.19.0-SNAPSHOT</version> <version>2.20.0-SNAPSHOT</version>
<name>OZG-Cloud Command Manager</name> <name>OZG-Cloud Command Manager</name>
<inceptionYear>2020</inceptionYear>
<properties> <properties>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version> <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
......
...@@ -30,16 +30,17 @@ ...@@ -30,16 +30,17 @@
<parent> <parent>
<groupId>de.ozgcloud.common</groupId> <groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-dependencies</artifactId> <artifactId>ozgcloud-common-dependencies</artifactId>
<version>4.7.0-SNAPSHOT</version> <version>4.7.0</version>
<relativePath/> <relativePath/>
</parent> </parent>
<groupId>de.ozgcloud.vorgang</groupId> <groupId>de.ozgcloud.vorgang</groupId>
<artifactId>vorgang-manager-interface</artifactId> <artifactId>vorgang-manager-interface</artifactId>
<version>2.19.0-SNAPSHOT</version> <version>2.20.0-SNAPSHOT</version>
<name>OZG-Cloud Vorgang Manager gRPC Interface</name> <name>OZG-Cloud Vorgang Manager gRPC Interface</name>
<description>Interface (gRPC) for Vorgang Manager Server</description> <description>Interface (gRPC) for Vorgang Manager Server</description>
<inceptionYear>2020</inceptionYear>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
...@@ -50,7 +51,6 @@ ...@@ -50,7 +51,6 @@
<maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.target>${java.version}</maven.compiler.target>
<find-and-replace-maven-plugin.version>1.1.0</find-and-replace-maven-plugin.version> <find-and-replace-maven-plugin.version>1.1.0</find-and-replace-maven-plugin.version>
<ozgcloud.license.version>1.6.0</ozgcloud.license.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
...@@ -139,34 +139,6 @@ ...@@ -139,34 +139,6 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- TODO move to common -->
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<mapping>
<proto>SLASHSTAR_STYLE</proto>
<config>SCRIPT_STYLE</config>
</mapping>
<licenseSets>
<licenseSet>
<header>license/eupl_v1_2_de/header.txt</header>
<excludes>
<exclude>**/*.yaml</exclude>
<exclude>**/*.yml</exclude>
<exclude>README.md</exclude>
</excludes>
</licenseSet>
</licenseSets>
</configuration>
<dependencies>
<dependency>
<groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-license</artifactId>
<version>${ozgcloud.license.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
......
...@@ -32,16 +32,17 @@ ...@@ -32,16 +32,17 @@
<parent> <parent>
<groupId>de.ozgcloud.common</groupId> <groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-parent</artifactId> <artifactId>ozgcloud-common-parent</artifactId>
<version>4.7.0-SNAPSHOT</version> <version>4.7.0</version>
<relativePath /> <relativePath />
</parent> </parent>
<groupId>de.ozgcloud.vorgang</groupId> <groupId>de.ozgcloud.vorgang</groupId>
<artifactId>vorgang-manager-server</artifactId> <artifactId>vorgang-manager-server</artifactId>
<version>2.19.0-SNAPSHOT</version> <version>2.20.0-SNAPSHOT</version>
<name>OZG-Cloud Vorgang Manager Server</name> <name>OZG-Cloud Vorgang Manager Server</name>
<description>Server Implementierung des VorgangManagers</description> <description>Server Implementierung des VorgangManagers</description>
<inceptionYear>2020</inceptionYear>
<properties> <properties>
<java.version>21</java.version> <java.version>21</java.version>
...@@ -49,18 +50,17 @@ ...@@ -49,18 +50,17 @@
<spring-boot.build-image.imageName>docker.ozg-sh.de/vorgang-manager:build-latest</spring-boot.build-image.imageName> <spring-boot.build-image.imageName>docker.ozg-sh.de/vorgang-manager:build-latest</spring-boot.build-image.imageName>
<ozgcloud.license.version>1.3.0</ozgcloud.license.version> <zufi-manager-interface.version>1.6.0</zufi-manager-interface.version>
<zufi-manager-interface.version>1.4.0</zufi-manager-interface.version>
<user-manager-interface.version>2.9.0</user-manager-interface.version> <user-manager-interface.version>2.12.0</user-manager-interface.version>
<bescheid-manager.version>1.22.0-SNAPSHOT</bescheid-manager.version> <bescheid-manager.version>1.23.0-SNAPSHOT</bescheid-manager.version>
<processor-manager.version>0.5.0</processor-manager.version> <processor-manager.version>0.5.0</processor-manager.version>
<nachrichten-manager.version>2.14.1</nachrichten-manager.version> <nachrichten-manager.version>2.14.1</nachrichten-manager.version>
<api-lib.version>0.15.0-SNAPSHOT</api-lib.version> <api-lib.version>0.16.0-SNAPSHOT</api-lib.version>
<notification-manager.version>2.12.0</notification-manager.version> <notification-manager.version>2.13.0</notification-manager.version>
<collaboration-manager.version>0.6.0-SNAPSHOT</collaboration-manager.version> <collaboration-manager.version>0.6.0</collaboration-manager.version>
<archive-manager.version>0.1.0-SNAPSHOT</archive-manager.version> <archive-manager.version>0.1.0</archive-manager.version>
<document-manager.version>1.2.0-SNAPSHOT</document-manager.version> <document-manager.version>1.1.0</document-manager.version>
<zip.version>2.11.5</zip.version> <zip.version>2.11.5</zip.version>
<jsoup.version>1.15.3</jsoup.version> <jsoup.version>1.15.3</jsoup.version>
...@@ -440,35 +440,6 @@ ...@@ -440,35 +440,6 @@
<groupId>pl.project13.maven</groupId> <groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId> <artifactId>git-commit-id-plugin</artifactId>
</plugin> </plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<mapping>
<config>SCRIPT_STYLE</config>
<ftlh>FTL</ftlh>
</mapping>
<licenseSets>
<licenseSet>
<header>license/eupl_v1_2_de/header.txt</header>
<excludes>
<exclude>**/README</exclude>
<exclude>src/test/resources/**</exclude>
<exclude>src/main/resources/*.yml</exclude>
<exclude>src/main/resources/*.txt</exclude>
</excludes>
</licenseSet>
</licenseSets>
</configuration>
<dependencies>
<dependency>
<groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-license</artifactId>
<version>${ozgcloud.license.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins> </plugins>
</build> </build>
......
...@@ -33,6 +33,7 @@ import java.io.ByteArrayOutputStream; ...@@ -33,6 +33,7 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
...@@ -53,15 +54,18 @@ import org.springframework.data.mongodb.core.query.Criteria; ...@@ -53,15 +54,18 @@ import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.gridfs.GridFsTemplate; import org.springframework.data.mongodb.gridfs.GridFsTemplate;
import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.util.ReflectionTestUtils;
import com.google.protobuf.ByteString; import com.google.protobuf.ByteString;
import com.thedeanda.lorem.LoremIpsum; import com.thedeanda.lorem.LoremIpsum;
import de.ozgcloud.apilib.client_attribute.grpc.OzgCloudClientAttributeMapper;
import de.ozgcloud.apilib.user.OzgCloudUserId; import de.ozgcloud.apilib.user.OzgCloudUserId;
import de.ozgcloud.apilib.user.OzgCloudUserProfile; import de.ozgcloud.apilib.user.OzgCloudUserProfile;
import de.ozgcloud.apilib.user.OzgCloudUserProfileService; import de.ozgcloud.apilib.user.OzgCloudUserProfileService;
import de.ozgcloud.collaboration.CollaborationManagerConfiguration; import de.ozgcloud.collaboration.CollaborationManagerConfiguration;
import de.ozgcloud.collaboration.CollaborationRequest; import de.ozgcloud.collaboration.CollaborationRequest;
import de.ozgcloud.collaboration.CollaborationService;
import de.ozgcloud.collaboration.CollaborationServiceGrpc.CollaborationServiceBlockingStub; import de.ozgcloud.collaboration.CollaborationServiceGrpc.CollaborationServiceBlockingStub;
import de.ozgcloud.collaboration.GrpcGetFileContentRequest; import de.ozgcloud.collaboration.GrpcGetFileContentRequest;
import de.ozgcloud.collaboration.request.CollaborationRequestId; import de.ozgcloud.collaboration.request.CollaborationRequestId;
...@@ -102,21 +106,23 @@ import net.devh.boot.grpc.client.inject.GrpcClient; ...@@ -102,21 +106,23 @@ import net.devh.boot.grpc.client.inject.GrpcClient;
"grpc.client.vorgang-manager.address=in-process:test", "grpc.client.vorgang-manager.address=in-process:test",
"grpc.client.ozgcloud-command-manager.address=in-process:test", "grpc.client.ozgcloud-command-manager.address=in-process:test",
"grpc.client.file-manager.address=in-process:test", "grpc.client.file-manager.address=in-process:test",
"grpc.client.vorgang-attached-item.address=in-process:test",
"grpc.client.inProcess.address=in-process:test", "grpc.client.inProcess.address=in-process:test",
"grpc.client.pluto.address=in-process:test" "grpc.client.pluto.address=in-process:test"
}) })
@DataITCase @DataITCase
@WithMockCustomUser @WithMockCustomUser
@DirtiesContext @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
class CollaborationITCase { class CollaborationITCase {
private static final String FIELD_COLLABORATION_VORGANG_ID = "collaborationVorgangId"; private static final String FIELD_COLLABORATION_VORGANG_ID = "collaborationVorgangId";
private static final String TITEL = "Collaboration Vorgang"; private static final String TITEL = "Collaboration Vorgang";
private static final String BESCHREIBUNG = "Beschreibung der Anfrage"; private static final String BESCHREIBUNG = "Beschreibung der Anfrage";
private static final String MUK_POSTFACH_ID = UUID.randomUUID().toString();
@Autowired @Autowired
private CommandService commandService; private CommandService commandService;
@Autowired
private CollaborationService collaborationService;
@Autowired @Autowired
private MongoOperations mongoOperations; private MongoOperations mongoOperations;
...@@ -131,12 +137,14 @@ class CollaborationITCase { ...@@ -131,12 +137,14 @@ class CollaborationITCase {
@Mock @Mock
private OzgCloudUserProfile ozgCloudUserProfile; private OzgCloudUserProfile ozgCloudUserProfile;
@MockBean
private OzgCloudClientAttributeMapper clientAttributeMapper;
private String vorgangId; private String vorgangId;
@BeforeEach @BeforeEach
void init() { void init() {
when(postfachRemoteService.getPostfachType()).thenReturn(ServiceKontoTestFactory.TYPE); when(postfachRemoteService.getPostfachType()).thenReturn("MUK");
mongoOperations.dropCollection(Command.class); mongoOperations.dropCollection(Command.class);
mongoOperations.dropCollection(Vorgang.class); mongoOperations.dropCollection(Vorgang.class);
mongoOperations.dropCollection(VorgangAttachedItem.class); mongoOperations.dropCollection(VorgangAttachedItem.class);
...@@ -215,7 +223,7 @@ class CollaborationITCase { ...@@ -215,7 +223,7 @@ class CollaborationITCase {
"titel", TITEL, "titel", TITEL,
"beschreibung", BESCHREIBUNG, "beschreibung", BESCHREIBUNG,
"collaborationLevel", collaborationLevel, "collaborationLevel", collaborationLevel,
"zustaendigeStelle", ZustaendigeStelleTestFactory.ORGANISATIONSEINHEIT_ID)) "zustaendigeStelle", MUK_POSTFACH_ID))
.build(); .build();
} }
...@@ -227,7 +235,7 @@ class CollaborationITCase { ...@@ -227,7 +235,7 @@ class CollaborationITCase {
} }
private void waitUntilCommandHasStatus(String commandId, CommandStatus status) { private void waitUntilCommandHasStatus(String commandId, CommandStatus status) {
await().atMost(600, TimeUnit.SECONDS).until( await().atMost(70, TimeUnit.SECONDS).until(
() -> mongoOperations.findById(commandId, Command.class), () -> mongoOperations.findById(commandId, Command.class),
command -> command.getStatus() == status); command -> command.getStatus() == status);
} }
...@@ -264,7 +272,7 @@ class CollaborationITCase { ...@@ -264,7 +272,7 @@ class CollaborationITCase {
assertThat(collaborationVorgang.getHeader()).extracting(VorgangHead::getCollaborationLevel) assertThat(collaborationVorgang.getHeader()).extracting(VorgangHead::getCollaborationLevel)
.isEqualTo(CreateCollaborationVorgangRequestTestFactory.COLLABORATION_LEVEL); .isEqualTo(CreateCollaborationVorgangRequestTestFactory.COLLABORATION_LEVEL);
assertThat(collaborationVorgang.getHeader()).extracting(VorgangHead::getOrganisationsEinheitId) assertThat(collaborationVorgang.getHeader()).extracting(VorgangHead::getOrganisationsEinheitId)
.isEqualTo(ZustaendigeStelleTestFactory.ORGANISATIONSEINHEIT_ID); .isEqualTo(MUK_POSTFACH_ID);
assertThat(collaborationVorgang.getClientAttributes()).isEmpty(); assertThat(collaborationVorgang.getClientAttributes()).isEmpty();
} }
...@@ -280,6 +288,8 @@ class CollaborationITCase { ...@@ -280,6 +288,8 @@ class CollaborationITCase {
private static final int COLLABORATION_LEVEL = 4; private static final int COLLABORATION_LEVEL = 4;
@Nested
class TestSuccessfully {
@Captor @Captor
private ArgumentCaptor<PostfachNachricht> postfachNachrichtCaptor; private ArgumentCaptor<PostfachNachricht> postfachNachrichtCaptor;
...@@ -308,7 +318,7 @@ class CollaborationITCase { ...@@ -308,7 +318,7 @@ class CollaborationITCase {
verify(postfachRemoteService).sendMessage(postfachNachrichtCaptor.capture()); verify(postfachRemoteService).sendMessage(postfachNachrichtCaptor.capture());
assertThat(postfachNachrichtCaptor.getValue().getPostfachAddress()).extracting(PostfachAddress::getIdentifier) assertThat(postfachNachrichtCaptor.getValue().getPostfachAddress()).extracting(PostfachAddress::getIdentifier)
.hasToString(PostfachAddressTestFactory.STRING_BASED_IDENTIFIER_POSTFACH_ID_VALUE); .hasToString(MUK_POSTFACH_ID);
} }
@Test @Test
...@@ -318,7 +328,19 @@ class CollaborationITCase { ...@@ -318,7 +328,19 @@ class CollaborationITCase {
waitUntilCommandHasStatus(command.getId(), CommandStatus.ERROR); waitUntilCommandHasStatus(command.getId(), CommandStatus.ERROR);
assertThat(loadCollaborationRequest(vorgangId)).isEmpty(); await().atMost(70, TimeUnit.SECONDS).untilAsserted(() -> assertThat(loadCollaborationRequest(vorgangId)).isEmpty());
}
}
@Test
void shouldFailOnMissingFachstelle() {
ReflectionTestUtils.setField(collaborationService, "urlProvider", Optional.empty());
var command = commandService.createCommand(buildCreateCollaborationVorgangCommand(vorgangId, COLLABORATION_LEVEL));
waitUntilCommandHasStatus(command.getId(), CommandStatus.ERROR);
command = mongoOperations.findById(command.getId(), Command.class);
assertThat(command.getErrorMessage()).contains("Fachstelle not configured.");
} }
} }
......
...@@ -20,6 +20,10 @@ ozgcloud: ...@@ -20,6 +20,10 @@ ozgcloud:
notification: notification:
scheduling: scheduling:
enabled: false enabled: false
fachstelle:
host: fachstelle.test.de
vorgang-manager:
serviceAddress: vorgang-manager.by-test-test
mongock: mongock:
enabled: false enabled: false
......
...@@ -30,14 +30,15 @@ ...@@ -30,14 +30,15 @@
<parent> <parent>
<groupId>de.ozgcloud.common</groupId> <groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-dependencies</artifactId> <artifactId>ozgcloud-common-dependencies</artifactId>
<version>4.7.0-SNAPSHOT</version> <version>4.7.0</version>
<relativePath/> <relativePath/>
</parent> </parent>
<groupId>de.ozgcloud.vorgang</groupId> <groupId>de.ozgcloud.vorgang</groupId>
<artifactId>vorgang-manager-utils</artifactId> <artifactId>vorgang-manager-utils</artifactId>
<name>OZG-Cloud Vorgang Manager Utils</name> <name>OZG-Cloud Vorgang Manager Utils</name>
<version>2.19.0-SNAPSHOT</version> <version>2.20.0-SNAPSHOT</version>
<inceptionYear>2020</inceptionYear>
<properties> <properties>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
...@@ -211,32 +212,6 @@ ...@@ -211,32 +212,6 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<mapping>
<config>SCRIPT_STYLE</config>
</mapping>
<licenseSets>
<licenseSet>
<header>license/eupl_v1_2_de/header.txt</header>
<excludes>
<exclude>**/README</exclude>
<exclude>src/test/resources/**</exclude>
<exclude>src/main/resources/**</exclude>
</excludes>
</licenseSet>
</licenseSets>
</configuration>
<dependencies>
<dependency>
<groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-license</artifactId>
<version>${ozgcloud.license.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment