Skip to content

Commit

Permalink
Merge branch 'master' into automate_soapUI_e2e_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Meric Akgul committed Nov 3, 2023
2 parents b571ae6 + 2fdaf89 commit a9300b2
Show file tree
Hide file tree
Showing 7 changed files with 500 additions and 48 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
[![conventional commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org) [![semantic versioning](https://img.shields.io/badge/semantic%20versioning-2.0.0-green.svg)](https://semver.org)

## [1.13.12](https://github.com/wearefrank/zaakbrug/compare/v1.13.11...v1.13.12) (2023-11-02)


### ✅ Tests

* lock openzaak to 1.9.0 in test docker-compose ([4a573d7](https://github.com/wearefrank/zaakbrug/commit/4a573d78b6287e656b4aff6d6c21af671e4761d0))

## [1.13.11](https://github.com/wearefrank/zaakbrug/compare/v1.13.10...v1.13.11) (2023-11-02)


### 🔥 Performance Improvements

* updateDocument with old and new state large documents performance improvement ([3287e8b](https://github.com/wearefrank/zaakbrug/commit/3287e8b4ab6906447540481ed135a49366c94a5a))


### ✅ Tests

* add updateDocument large documents performance test ([f5f0ba4](https://github.com/wearefrank/zaakbrug/commit/f5f0ba48467d445e9f69b92fe3df13dbbb40ed7d))

## [1.13.10](https://github.com/wearefrank/zaakbrug/compare/v1.13.9...v1.13.10) (2023-10-31)


Expand Down
6 changes: 3 additions & 3 deletions docker-compose.openzaak.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- 5432

open-zaak:
image: openzaak/open-zaak:latest
image: openzaak/open-zaak:1.9.0
container_name: open-zaak.dev
environment: &open-zaak-env
- DJANGO_SETTINGS_MODULE=openzaak.conf.docker
Expand Down Expand Up @@ -62,7 +62,7 @@ services:
- open-zaak-redis

open-zaak-celery:
image: openzaak/open-zaak:latest
image: openzaak/open-zaak:1.9.0
environment: *open-zaak-env
command: /celery_worker.sh
volumes: *open-zaak-volumes
Expand All @@ -73,7 +73,7 @@ services:
- open-zaak-redis

open-zaak-celery-flower:
image: openzaak/open-zaak:latest
image: openzaak/open-zaak:1.9.0
environment: *open-zaak-env
command: /celery_flower.sh
networks:
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.zaakbrug.staging.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- 5432

zaakbrug-staging:
image: openzaak/open-zaak:latest
image: openzaak/open-zaak:1.9.0
container_name: zaakbrug.staging.dev
environment: &zaakbrug-staging-env
- DJANGO_SETTINGS_MODULE=openzaak.conf.docker
Expand Down Expand Up @@ -61,7 +61,7 @@ services:
- zaakbrug-staging-redis

zaakbrug-staging-celery:
image: openzaak/open-zaak:latest
image: openzaak/open-zaak:1.9.0
environment: *zaakbrug-staging-env
command: /celery_worker.sh
volumes: *zaakbrug-staging-volumes
Expand All @@ -72,7 +72,7 @@ services:
- zaakbrug-staging-redis

zaakbrug-staging-celery-flower:
image: openzaak/open-zaak:latest
image: openzaak/open-zaak:1.9.0
environment: *zaakbrug-staging-env
command: /celery_flower.sh
networks:
Expand Down
401 changes: 399 additions & 2 deletions e2e/SoapUI/zaakbrug-e2e-soapui-project.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
active="${SoapEndpointRouter_BeantwoordVraag.Active}"
description="">

<!--
Never use "originalMessage" in this adapter. Use "SafeOriginalMessage" instead.
This is due "originalMessage" potentially containing very large document base64.
"SafeOriginalMessage" has the base64 already stored to disk and removed from the message.
-->

<Receiver name="SoapEndpointRouter_BeantwoordVraag">
<WebServiceListener name="SoapEndpointRouter_BeantwoordVraag" address="${zaakbrug.soap.beantwoord-vraag.endpoint}" soap="false"/>
<JdbcErrorStorage
Expand All @@ -17,6 +23,11 @@
<Exit name="EXCEPTION" state="ERROR"/>
</Exits>

<!--
Dont touch the input message before this pipe. Especially no xslt/xpath.
It can potentially contain very large document base64 still.
This pipe stores it to disk and removes it from the message.
-->
<EchoPipe
name="StoreInhoud"
elementToMove="inhoud"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
active="${SoapEndpointRouter_OntvangAsynchroon.Active}"
description="">

<!--
Never use "originalMessage" in this adapter. Use "SafeOriginalMessage" instead.
This is due "originalMessage" potentially containing very large document base64.
"SafeOriginalMessage" has the base64 already stored to disk and removed from the message.
-->

<Receiver name="SoapEndpointRouter_OntvangAsynchroon">
<WebServiceListener name="SoapEndpointRouter_OntvangAsynchroon" address="${zaakbrug.soap.ontvang-asynchroon.endpoint}" soap="false"/>
<JdbcErrorStorage
Expand All @@ -17,6 +23,11 @@
<Exit name="EXCEPTION" state="ERROR"/>
</Exits>

<!--
Dont touch the input message before this pipe. Especially no xslt/xpath.
It can potentially contain very large document base64 still.
This pipe stores it to disk and removes it from the message.
-->
<EchoPipe
name="StoreInhoud"
elementToMove="inhoud"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
active="${SoapEndpointRouter_VrijeBerichten.Active}"
description="">

<!--
Never use "originalMessage" in this adapter. Use "SafeOriginalMessage" instead.
This is due "originalMessage" potentially containing very large document base64.
"SafeOriginalMessage" has the base64 already stored to disk and removed from the message.
-->

<Receiver name="SoapEndpointRouter_VrijeBerichten">
<WebServiceListener name="SoapEndpointRouter_VrijeBerichten" address="${zaakbrug.soap.vrije-berichten.endpoint}" soap="false"/>
<JdbcErrorStorage
Expand All @@ -17,56 +23,56 @@
<Exit name="EXCEPTION" state="ERROR"/>
</Exits>

<SoapWrapperPipe
name="UnwrapOriginalMessage"
direction="UNWRAP"
removeOutputNamespaces="true"
storeResultInSessionKey="UnwrapOriginalMessage"
>
<Forward name="success" path="CheckInputDocumentObjectCount"/>
<Forward name="exception" path="BackEndError"/>
</SoapWrapperPipe>

<XmlIfPipe name="CheckInputDocumentObjectCount"
xpathExpression="count(//object) = 2"
>
<Forward name="then" path="StoreZdsWordtZaak_1"/>
<Forward name="else" path="StoreZdsWordtZaak_2"/>
</XmlIfPipe>

<PutInSessionPipe
name="StoreZdsWordtZaak_1">
<Param name="ZdsWordtZaak" xpathExpression="//object[2]" type="DOMDOC">
<Param name="originalMessage" sessionKey="originalMessage" type="DOMDOC"/>
</Param>
<Forward name="success" path="StoreInhoud" />
</PutInSessionPipe>

<PutInSessionPipe
name="StoreZdsWordtZaak_2">
<Param name="ZdsWordtZaak" xpathExpression="//object[1]" type="DOMDOC">
<Param name="originalMessage" sessionKey="originalMessage" type="DOMDOC"/>
</Param>
<Forward name="success" path="StoreInhoud" />
</PutInSessionPipe>


<!--
Dont touch the input message before this pipe. Especially no xslt/xpath.
It can potentially contain very large document base64 still.
This pipe stores it to disk and removes it from the message.
-->
<EchoPipe
name="StoreInhoud"
elementToMove="inhoud"
getInputFromSessionKey="ZdsWordtZaak"
removeCompactMsgNamespaces="false"
>
<Forward name="success" path="ReplaceInhoudRefWithBase64EncodedRef" />
<Forward name="success" path="CheckInputDocumentObjectCount" />
</EchoPipe>

<!--
In the rare case of the new base64 AND the old base64 of a document being present during an updateDocument action, the elementsToMove will make a
ref_inhoud# sessionKey for both "inhoud" elements. Normally there is only one because there is only 1 inhoud element with the NEW base64.
Only in this scenario "ref_inhoud" will be the OLD base64 and "ref_inhoud2" will be the NEW base64. We are only interested in the NEW base64,
so we are overwriting the "ref_inhoud" sessionkey with the content of "ref_inhoud2" and replace "{sessionKey:ref_inhoud2} with "{sessionKey:ref_inhoud}".
-->
<XmlIfPipe name="CheckInputDocumentObjectCount"
xpathExpression="count(//*:inhoud) = 2"
preserveInput="true"
>
<Forward name="then" path="OverwriteRefInhoudWithRefInhoud2"/>
<Forward name="else" path="ReplaceInhoudRefWithBase64EncodedRef"/>
</XmlIfPipe>

<PutInSessionPipe
name="OverwriteRefInhoudWithRefInhoud2"
>
<Param name="ref_inhoud" sessionKey="ref_inhoud2" />
<Forward name="success" path="ReplaceInhoudRefWithBase64EncodedRef"/>
<Forward name="exception" path="BackEndError"/>
</PutInSessionPipe>

<ReplacerPipe
name="ReplaceInhoudRefWithBase64EncodedRef"
getInputFromSessionKey="originalMessage"
storeResultInSessionKey="SafeOriginalMessage"
find="{sessionKey:ref_inhoud}"
replace="e3Nlc3Npb25LZXk6cmVmX2luaG91ZH0="
>
<Forward name="success" path="ReplaceInhoudRef2WithBase64EncodedRef" />
</ReplacerPipe>

<ReplacerPipe
name="ReplaceInhoudRef2WithBase64EncodedRef"
storeResultInSessionKey="SafeOriginalMessage"
find="{sessionKey:ref_inhoud2}"
replace="e3Nlc3Npb25LZXk6cmVmX2luaG91ZH0="
>
<Forward name="success" path="ValidateInput" />
</ReplacerPipe>

Expand All @@ -76,7 +82,7 @@
outputFormat="XML"
autoFormat="false"
>
<Forward name="success" path="StoreResponeContextSessionKeys"/>
<Forward name="success" path="UnwrapOriginalMessage"/>
<Forward name="failure" path="WsdlValidationSoftFailForwarder"/>
</WsdlXmlValidatorPipe>

Expand All @@ -85,13 +91,21 @@
xpathExpression="$SoftFail = true()"
>
<Param name="SoftFail" value="${zaakbrug.soap.vrije-berichten.validation-soft-fail}" type="BOOLEAN"/>
<Forward name="true" path="StoreResponeContextSessionKeys" />
<Forward name="true" path="UnwrapOriginalMessage" />
<Forward name="false" path="InvalidXml" />
</XmlSwitchPipe>

<SoapWrapperPipe
name="UnwrapOriginalMessage"
direction="UNWRAP"
removeOutputNamespaces="true"
>
<Forward name="success" path="StoreResponeContextSessionKeys"/>
<Forward name="exception" path="BackEndError"/>
</SoapWrapperPipe>

<PutInSessionPipe
name="StoreResponeContextSessionKeys"
getInputFromSessionKey="UnwrapOriginalMessage"
>
<Param name="Stuurgegevens" xpathExpression="/*/stuurgegevens" defaultValue="&lt;stuurgegevens/&gt;" type="DOMDOC" />
<Param name="Parameters" xpathExpression="/*/parameters" defaultValue="&lt;parameters/&gt;" type="DOMDOC" />
Expand Down

0 comments on commit a9300b2

Please sign in to comment.