Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ jobs:

- name: Make FME Desktop dummy executable (for integration tests)
run: chmod +x /home/runner/work/extract/extract/extract/src/test/java/ch/asit_asso/extract/integration/taskplugins/FmeDesktopTest

- name: Make FME Desktop mock scripts executable (for functional tests)
run: chmod +x /home/runner/work/extract/extract/extract/src/test/java/ch/asit_asso/extract/functional/taskplugins/fme_scripts/*.sh

- name: Pull Docker images (with retry)
run: |
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Extract
======

-** DUMMY CHANGE **-

## Extract est une application qui facilite l’extraction et la livraison de vos géodonnées

L'application Extract **importe les commandes** de données déposées sur une plateforme ou magasin de données (comme les portails ASIT viageo.ch et plans-reseaux.ch), puis exécute une série de tâches préconfigurées afin d'**extraire la donnée demandée** , puis **renvoie le résultat** vers le client : avec ou sans intervention humaine, c'est vous qui le définissez !
Expand Down
26 changes: 25 additions & 1 deletion docker-compose-test-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
- /tmp/extract.war:/usr/local/tomcat/webapps/extract.war
- /tmp/log/extract:/var/log/extract
- /tmp/log/tomcat:/usr/local/tomcat/logs
- /tmp/extract:/var/extract
- /tmp/extract/orders:/var/extract/orders
environment:
- JAVA_OPTS=-Xms1G -Xmx2G -Duser.language=fr -Duser.region=CH
ports:
Expand Down Expand Up @@ -79,3 +79,27 @@ services:
- ./docker/ldap-ad/users.ldif:/ldap/users.ldif
ports:
- "10389:10389"

# FME Server Mock for testing FME Server V1 and V2 plugins
fme-server-mock:
build: ./docker/fme-server-mock
container_name: fme-server-mock
ports:
- "8888:8888"
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8888/health || exit 1
interval: 5s
timeout: 5s
retries: 3

# QGIS Server Mock for testing QGIS Print Atlas plugin
qgis-server-mock:
build: ./docker/qgis-server-mock
container_name: qgis-server-mock
ports:
- "8889:8889"
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8889/health || exit 1
interval: 5s
timeout: 5s
retries: 3
31 changes: 29 additions & 2 deletions docker-compose-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
- ./extract/target/extract##2.3.0.war:/usr/local/tomcat/webapps/extract.war
- /tmp/log/extract:/var/log/extract
- /tmp/log/tomcat:/usr/local/tomcat/logs
- /tmp/extract:/var/extract
- /tmp/extract/orders:/var/extract/orders
environment:
- JAVA_OPTS=-Xms1G -Xmx2G -Duser.language=fr -Duser.region=CH
ports:
Expand Down Expand Up @@ -79,7 +79,31 @@ services:
- ./docker/ldap-ad/users.ldif:/ldap/users.ldif
ports:
- "10389:10389"


# FME Server Mock for testing FME Server V1 and V2 plugins
fme-server-mock:
build: ./docker/fme-server-mock
container_name: fme-server-mock
ports:
- "8888:8888"
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8888/health || exit 1
interval: 5s
timeout: 5s
retries: 3

# QGIS Server Mock for testing QGIS Print Atlas plugin
qgis-server-mock:
build: ./docker/qgis-server-mock
container_name: qgis-server-mock
ports:
- "8889:8889"
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8889/health || exit 1
interval: 5s
timeout: 5s
retries: 3

# Service Maven pour exécuter les tests
maven-tests:
image: maven:3.8-openjdk-17
Expand All @@ -92,11 +116,14 @@ services:
- mailhog
- openldap
- ldap-ad
- fme-server-mock
- qgis-server-mock
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://pgsql:5432/extract
- SPRING_DATASOURCE_USERNAME=extractuser
- SPRING_DATASOURCE_PASSWORD=demopassword
- SPRING_PROFILES_ACTIVE=test
- LDAP_URL=ldap://openldap:389
command: mvn verify --batch-mode
profiles:
- test
15 changes: 15 additions & 0 deletions docker/fme-server-mock/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.11-slim

WORKDIR /app

# Install Flask
RUN pip install --no-cache-dir flask

# Copy the mock server script
COPY fme_server_mock.py .

# Expose port
EXPOSE 8888

# Run the server
CMD ["python", "fme_server_mock.py", "--port", "8888", "--host", "0.0.0.0"]
Loading
Loading