diff --git a/.github/workflows/run-integration-tests-postgresql.yml b/.github/workflows/run-integration-tests-postgresql.yml index 21aa1e6..5656810 100644 --- a/.github/workflows/run-integration-tests-postgresql.yml +++ b/.github/workflows/run-integration-tests-postgresql.yml @@ -32,9 +32,9 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Start containers - run: docker-compose -f "compas/docker-compose-postgresql.yml" up -d --build + run: docker compose -f "compas/docker-compose-postgresql.yml" up -d --build env: - COMPAS_HOSTNAME: compas_reverse-proxy_1 + COMPAS_HOSTNAME: compas-reverse-proxy-1 CONFIGURATION_LOCATION: /nginx.conf - name: Wait until containers started @@ -45,11 +45,11 @@ jobs: - name: Execute integration tests (firefox) # Using the Docker Image from ppodgorsek (https://github.com/ppodgorsek/docker-robot-framework) # to run the Robot Framework Test Scripts. - # To connect with the Docker Compose and use http://compas_reverse-proxy_1/ as URL we are + # To connect with the Docker Compose and use http://compas-reverse-proxy-1/ as URL we are # connecting to the same network "compas_default" that's started bij Docker Compose. run: | docker run --rm -e BROWSER=firefox \ - -e ROBOT_OPTIONS="-v url:http://compas_reverse-proxy_1/" \ + -e ROBOT_OPTIONS="-v url:http://compas-reverse-proxy-1/" \ -v $(pwd)/target/firefox:/opt/robotframework/reports:Z \ -v $(pwd)/integration-testing:/opt/robotframework/tests:Z \ --user $(id -u):$(id -g) \ @@ -61,11 +61,11 @@ jobs: - name: Execute integration tests (chromium) # Using the Docker Image from ppodgorsek (https://github.com/ppodgorsek/docker-robot-framework) # to run the Robot Framework Test Scripts. - # To connect with the Docker Compose and use http://compas_reverse-proxy_1/ as URL we are + # To connect with the Docker Compose and use http://compas-reverse-proxy-1/ as URL we are # connecting to the same network "compas_default" that's started bij Docker Compose. run: | docker run --rm -e BROWSER=chromium \ - -e ROBOT_OPTIONS="-v url:http://compas_reverse-proxy_1/" \ + -e ROBOT_OPTIONS="-v url:http://compas-reverse-proxy-1/" \ -v $(pwd)/target/firefox:/opt/robotframework/reports:Z \ -v $(pwd)/integration-testing:/opt/robotframework/tests:Z \ --user $(id -u):$(id -g) \ @@ -84,4 +84,4 @@ jobs: - name: Stop containers if: always() - run: docker-compose -f "compas/docker-compose-postgresql.yml" down -v + run: docker compose -f "compas/docker-compose-postgresql.yml" down -v diff --git a/compas/docker-compose-postgresql.yml b/compas/docker-compose-postgresql.yml index e449890..3bcf452 100644 --- a/compas/docker-compose-postgresql.yml +++ b/compas/docker-compose-postgresql.yml @@ -33,10 +33,10 @@ services: ports: - "8089:8080" environment: - - KEYCLOAK_FRONTEND_URL=http://${COMPAS_HOSTNAME}/auth/ - - KEYCLOAK_HOSTNAME=${COMPAS_HOSTNAME} - - KEYCLOAK_HTTP_PORT=80 - - PROXY_ADDRESS_FORWARDING=true + - KC_HOSTNAME=http://${COMPAS_HOSTNAME}/auth/ + - KC_HTTP_RELATIVE_PATH=auth + - KC_HTTP_ENABLED=true + - KC_PROXY_HEADERS=xforwarded healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/auth/"] interval: 30s diff --git a/compas/keycloak/Dockerfile b/compas/keycloak/Dockerfile index f8c3c82..a3bc146 100644 --- a/compas/keycloak/Dockerfile +++ b/compas/keycloak/Dockerfile @@ -2,20 +2,16 @@ # # SPDX-License-Identifier: Apache-2.0 -FROM jboss/keycloak:latest +FROM quay.io/keycloak/keycloak:latest ARG COMPAS_HOSTNAME -# Copy the demo realm configuration to /tmp/ inside the container, so it can be used afterwards -COPY --chown=jboss:jboss keycloak_compas_realm.json /tmp/keycloak_compas_realm.json -RUN sed -i "s/##COMPAS_HOSTNAME##/${COMPAS_HOSTNAME}/g" /tmp/keycloak_compas_realm.json +# Copy the demo realm configuration to /opt/keycloak/data/import inside the container, this is the default import path +COPY --chown=keycloak:keycloak keycloak_compas_realm.json /opt/keycloak/data/import/keycloak_compas_realm.json +RUN sed -i "s/##COMPAS_HOSTNAME##/${COMPAS_HOSTNAME}/g" /opt/keycloak/data/import/keycloak_compas_realm.json # Creating an Admin account -ENV KEYCLOAK_USER admin -ENV KEYCLOAK_PASSWORD admin +ENV KC_DB_USERNAME admin +ENV KC_DB_PASSWORD admin -# Choosing h2 database -ENV DB_VENDOR h2 - -# Import the configuration we just copied -ENV KEYCLOAK_IMPORT /tmp/keycloak_compas_realm.json \ No newline at end of file +ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start-dev", "--import-realm"] diff --git a/integration-testing/TestSuite003-cim-mapping.robot b/integration-testing/TestSuite003-cim-mapping.robot index 0683e8c..d57c1de 100644 --- a/integration-testing/TestSuite003-cim-mapping.robot +++ b/integration-testing/TestSuite003-cim-mapping.robot @@ -28,11 +28,11 @@ TestCase003-01 Open Project from CIM ${sclname} ${scltype} Select Tab Substation - Get Text ${substation-editor-selector} section > h1:has-text("Sub1") + Get Text ${substation-editor-selector} section > h1:has-text("af9a4ae3-ba2e-4c34-8e47-5af894ee20f4 - Sub1") TestCase003-02 - [Documentation] Trying to create a project from Invalid CIM Filename skip + [Documentation] Trying to create a project from Invalid CIM Filename Set Test Variable ${sclname} MiniGridTestConfiguration_Invalid_XML ${promise}= Promise To Upload File ${CURDIR}/test-files/${sclname}.xml