Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/drc api 1.1/#21476 fixes #1 #2

Merged
merged 33 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
93b3c38
:zap: added url check for patch.
Jan 20, 2022
0956e08
:sparkle: added bestandsnaam validation unit test
Mar 8, 2022
07b4697
:zap: added version check during lock phase.
Mar 29, 2022
b288599
fixed $ issue
Jul 11, 2022
52b1aaa
:sparkle: added ut for empty strings
Jul 11, 2022
8dff0ca
🚧 updated all versions
Mar 21, 2023
d68d853
🚧 updated code to complete tests, still 19/49 failed.
Mar 21, 2023
c5d082d
🚧 still 13/49 to to fix
Mar 21, 2023
e979b3f
🚧 fixed bestandsomvang
Mar 21, 2023
0428a55
↩️ reverse back to open zaak 1.7.4
Mar 22, 2023
84c88dc
🐞 still 10/48 to go.
Mar 22, 2023
966b0d7
🚧 current tests are fixed
Apr 3, 2023
57b1b72
🚧 created tests todo
Apr 3, 2023
02636f7
⚗️ added test
Apr 3, 2023
d4648e8
🚧 added zoek tests
Apr 3, 2023
d4f32de
🚧 added EIO caching (ETag)
Apr 3, 2023
17eeddc
🚧 added gebruiksrechten cache
Apr 3, 2023
e77dab0
🚧 added oio caching
Apr 3, 2023
e93e9a5
🚧 added tests todo
Apr 3, 2023
0b19634
🚧 added some upload tests, not finished yet
Apr 3, 2023
c9414df
🚧 added more tests
Apr 4, 2023
70890f4
🚧 added more test scripts
Apr 5, 2023
fc0fd64
🚀 complete tests
Apr 5, 2023
60167cf
📘 updated readme
Apr 5, 2023
fd4e385
disabled unused import
Apr 5, 2023
ebe7e64
➕ validate status code
Apr 5, 2023
e129da3
⚙️ set token expires to 60 min
Apr 5, 2023
ad55a2f
➕ added 304 check for head
Apr 5, 2023
dc064f1
🧩 added custom upload
Apr 11, 2023
c24126c
🧩 added solr wait time
Apr 11, 2023
d8006d2
🧩 added bestandsdelen flow test
Apr 12, 2023
7a549aa
➕ added unit test update IOT
Apr 19, 2023
23226d9
disable test
Apr 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ bin
target
.m2/repository
*.log
*.DS_Store
*.DS_Store
/.apt_generated/
/.apt_generated_tests/
log*
91 changes: 91 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"workbench.iconTheme": "material-icon-theme",
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.wordWrap": "off",
"editor.wordWrapColumn": 180,
"editor.inlayHints.enabled": false,
"editor.fontSize": 14,
"prettier.printWidth": 180,
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"html.format.wrapAttributes": "force-aligned",
"html.format.enable": true,
"[javascript][javascriptreact][typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[json][jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[css][scss][less]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
},
"[ftl]": {
"editor.defaultFormatter": "AntonLilleby.xp-freemarker-formatter",
"editor.formatOnSave": false
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"java.configuration.updateBuildConfiguration": "automatic",
"[java]": {
"editor.defaultFormatter": "redhat.java",
"editor.wordWrap": "off",
"editor.wordWrapColumn": 200,
"editor.fontWeight": 500
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"maven.excludedFolders": [
"**/.*",
"**/node_modules",
"**/target",
"**/bin",
"**/test/test-projects"
],
"java.import.exclusions": [
"**/node_modules/**",
"**/.metadata/**",
"**/archetype-resources/**",
"**/META-INF/maven/**",
"**/test/test-projects/**"
],
"editor.lightbulb.enabled": false,
"java.checkstyle.configuration": "${workspaceFolder}/.vscode/java-checkstyle.xml",
"java.checkstyle.version": "10.3.4",
"git.inputValidation": "off",
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
},
"[ignore]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"java.compile.nullAnalysis.mode": "automatic",
"cSpell.words": [
"bestandsomvang",
"contezza",
"Enkelvoudig",
"enkelvoudiginformatieobject",
"Gebruiksrechten",
"Informatie",
"informatieobjecttype",
"inhoud",
"restassured",
"Zoek"
]
}
13 changes: 13 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "_clean install",
"type": "shell",
"command": "mvn clean install -U",
"options": {
"cwd": "${workspaceFolder}"
}
}
]
}
41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
# DRC Test Automation System

Document registration component (DRC) **T**est **A**utomation **S**ystem (TAS) **RESTAPI** is the project used for testing the DRC API according to reference implementation of VNG Realisatie. The unit tests described in this project are translated [python](https://www.python.org) tests from the [documenten api](https://github.com/VNG-Realisatie/documenten-api/tree/stable/1.0.x/src/drc/api/tests) repository.
Document registration component (DRC) **T**est **A**utomation **S**ystem (TAS) **RESTAPI** is the project used for testing the DRC API according to reference implementation of VNG Realisatie. The unit tests described in this project are translated [python](https://www.python.org) tests from the [documenten api](https://github.com/VNG-Realisatie/documenten-api/tree/1.3.0/src/drc/tests) repository.

The following components are used in this project:

* [RestAssured](https://rest-assured.io);
* [TestNG](https://testng.org);
* [Lombok](https://projectlombok.org).
- [RestAssured](https://rest-assured.io);
- [TestNG](https://testng.org);
- [Lombok](https://projectlombok.org).

If using Eclipse install Lombok (Help -> Install New Software -> https://projectlombok.org/p2). Visit [project Lombok site](https://projectlombok.org/setup/eclipse) for more information.

## Tests

Overview of the unit tests as described on [documenten api](https://github.com/VNG-Realisatie/documenten-api/tree/stable/1.0.x/src/drc/api/tests) repository.

  ✔ [test_enkelvoudiginformatieobject.py](https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.0.x/src/drc/api/tests/test_enkelvoudiginformatieobject.py) (25) \
  ✔ [test_auth.py](https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.0.x/src/drc/api/tests/test_auth.py) (9)
Overview of the unit tests as described on [documenten api](https://github.com/VNG-Realisatie/documenten-api/tree/1.3.0/src/drc/tests) repository. The following unit tests are available:

  ✔ [EnkelvoudigInformatieObjectCachingTest](src/test/java/nl/contezza/drc/tests/EnkelvoudigInformatieObjectCachingTest.java) \
  ✔ [EnkelvoudigInformatieObjectPaginationTest](src/test/java/nl/contezza/drc/tests/EnkelvoudigInformatieObjectPaginationTest.java) \
  ✔ [EnkelvoudigInformatieObjectTest](src/test/java/nl/contezza/drc/tests/EnkelvoudigInformatieObjectTest.java) \
  ✔ [EnkelvoudigInformatieObjectTest](src/test/java/nl/contezza/drc/tests/EnkelvoudigInformatieObjectTest.java) \
  ✔ [EnkelvoudigInformatieObjectVersionHistoryTest](src/test/java/nl/contezza/drc/tests/EnkelvoudigInformatieObjectVersionHistoryTest.java) \
  ✔ [EnkelvoudigInformatieObjectZoekTest](src/test/java/nl/contezza/drc/tests/EnkelvoudigInformatieObjectZoekTest.java) \
  ✔ [GebruiksrechtenCachingTest](src/test/java/nl/contezza/drc/tests/GebruiksrechtenCachingTest.java) \
  ✔ [GebruiksrechtenReadTest](src/test/java/nl/contezza/drc/tests/GebruiksrechtenReadTest.java) \
  ✔ [InformatieObjectReadCorrectScopeTest](src/test/java/nl/contezza/drc/tests/InformatieObjectReadCorrectScopeTest.java) \
  ✔ [InformatieObjectScopeForbiddenTest](src/test/java/nl/contezza/drc/tests/InformatieObjectScopeForbiddenTest.java) \
  ✔ [OioCachingTest](src/test/java/nl/contezza/drc/tests/OioCachingTest.java) \
  ✔ [OioReadTest](src/test/java/nl/contezza/drc/tests/OioReadTest.java) \
  ✔ [UploadTest](src/test/java/nl/contezza/drc/tests/UploadTest.java) \
  ✔ [VerzendingTest](src/test/java/nl/contezza/drc/tests/VerzendingTest.java)

There are also some [custom unit tests](src/test/java/nl/contezza/drc/tests/custom) described that are not available in the python tests.

## Docker

Expand All @@ -31,10 +45,11 @@ cd docker
docker-compose -f docker-compose.yml -f docker-compose.alfresco.yml up -d
```

* http://localhost:8000 (open-zaak)
* http://localhost:8001 (open-notificaties)
* http://localhost:8002 (drc-gemma)
* http://localhost:8080 (alfresco)
- http://localhost:8000 (open-zaak)
- http://localhost:8001 (open-notificaties)
- http://localhost:8002 (drc-gemma)
- http://localhost:8080/alfresco (alfresco)
- http://localhost:8081/share (share client)

Login: admin/admin

Expand Down Expand Up @@ -82,4 +97,4 @@ target/surefire-reports/index.html

## License

Licensed under the [EUPL](LICENSE.md)
Licensed under the [EUPL](LICENSE.md)
50 changes: 25 additions & 25 deletions docker/docker-compose.alfresco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@ version: "3.8"

services:
drc-docker-platform.local:
image: hub.contezza.nl/projecten/utrecht/drc/platform:latest
image: harbor.contezza.nl/utrecht/drc/platform:latest
environment:
TZ: Europe/Amsterdam
JAVA_TOOL_OPTIONS: "
-Dencryption.keystore.type=JCEKS
-Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding
-Dencryption.keyAlgorithm=DESede
-Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore
-Dmetadata-keystore.password=mp6yc0UD9e
-Dmetadata-keystore.aliases=metadata
-Dmetadata-keystore.metadata.password=oKIWzVdEdA
-Dmetadata-keystore.metadata.algorithm=DESede
-Dmail.poller.enabled=true
"
JAVA_OPTS: "
-Ddb.url=jdbc:postgresql://db:5432/alfresco
-Dalfresco.host=drc-docker-platform.local
Expand Down Expand Up @@ -45,55 +56,46 @@ services:
aliases:
- drc-docker-platform.local

# drc-docker-share:
# image: hub.contezza.nl/projecten/utrecht/drc/share:latest
# environment:
# REPO_HOST: "drc-docker-platform.local"
# REPO_PORT: "8080"
# ports:
# - "8081:8080"
drc-docker-share:
image: harbor.contezza.nl/utrecht/drc/share:latest
environment:
REPO_HOST: "drc-docker-platform.local"
REPO_PORT: "8080"
ports:
- "8081:8080"

drc-docker-platform-ass:
image: alfresco/alfresco-search-services:1.4.1.2
image: harbor.contezza.nl/base/alfresco-search-services:2.0.6
environment:
TZ: Europe/Amsterdam
SOLR_ALFRESCO_HOST: drc-docker-platform.local
SOLR_ALFRESCO_PORT: "8080"
SOLR_SOLR_HOST: drc-docker-platform-ass
SOLR_SOLR_PORT: "8983"
SOLR_CREATE_ALFRESCO_DEFAULTS: alfresco,archive
ALFRESCO_SECURE_COMMS: none
ports:
- "8983:8983"
JAVA_TOOL_OPTIONS: "-Dalfresco.secureComms=secret -Dalfresco.secureComms.secret=secret"
volumes:
- vol_drc-docker-platform_solr_data:/opt/alfresco-search-services/data
networks:
- dev_network

drc-docker-platform-activemq:
image: alfresco/alfresco-activemq:5.15.8
ports:
- 8161:8161 # Web Console
- 5672:5672 # AMQP
- 61616:61616 # OpenWire
- 61613:61613 # STOMP
image: harbor.contezza.nl/docker.io/alfresco/alfresco-activemq:5.16.1
networks:
- dev_network

transform-router:
image: hub.contezza.nl/projecten/utrecht/alfresco-transform-router:1.2.0
image: harbor.contezza.nl/quay.io/alfresco/alfresco-transform-router:1.2.0
environment:
JAVA_OPTS: " -Xms256m -Xmx512m"
ACTIVEMQ_URL: nio://drc-docker-platform-activemq:61616
CORE_AIO_URL: http://transform-core-aio:8090
FILE_STORE_URL: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file
ports:
- 8095:8095
networks:
- dev_network

transform-core-aio:
image: alfresco/alfresco-transform-core-aio:2.2.2
image: harbor.contezza.nl/quay.io/alfresco/alfresco-transform-core-aio:2.6.0
environment:
JAVA_OPTS: "
-Xms700m -Xmx700m
Expand All @@ -102,11 +104,9 @@ services:
FILE_STORE_URL: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file
networks:
- dev_network
# ports:
# - 8090:8090

shared-file-store:
image: alfresco/alfresco-shared-file-store:0.5.3
image: harbor.contezza.nl/quay.io/alfresco/alfresco-shared-file-store:1.5.3
environment:
JAVA_OPTS: " -Xms256m -Xmx512m"
scheduler.content.age.millis: "86400000"
Expand Down
Loading