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
1 change: 0 additions & 1 deletion .github/workflows/run-integration-tests-basex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
push:
branches:
- '**'
- '!main'
pull_request:
branches:
- 'main'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/run-integration-tests-postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
push:
branches:
- '**'
- '!main'
pull_request:
branches:
- 'main'
Expand Down
28 changes: 25 additions & 3 deletions compas/docker-compose-basex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:
scl-data-service:
labels:
compas: true
image: "lfenergy/compas-scl-data-service:0.9.0-basex"
image: "lfenergy/compas-scl-data-service:0.9.1-basex"
environment:
- BASEX_HOST=basex
- BASEX_PORT=1984
Expand Down Expand Up @@ -67,7 +67,7 @@ services:
cim-mapping:
labels:
compas: true
image: "lfenergy/compas-cim-mapping:0.7.6"
image: "lfenergy/compas-cim-mapping:0.7.7"
environment:
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
- JWT_VERIFY_ISSUER=http://${COMPAS_HOSTNAME}/auth/realms/compas
Expand All @@ -86,10 +86,32 @@ services:
depends_on:
- keycloak

scl-auto-alignment:
labels:
compas: true
image: "lfenergy/compas-scl-auto-alignment:0.0.2"
environment:
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
- JWT_VERIFY_ISSUER=http://${COMPAS_HOSTNAME}/auth/realms/compas
- JWT_VERIFY_CLIENT_ID=scl-auto-alignment
- JWT_GROUPS_PATH=resource_access/scl-auto-alignment/roles
- USERINFO_WHO_CLAIMNAME=name
deploy:
restart_policy:
condition: on-failure
max_attempts: 3
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/compas-scl-auto-alignment/q/health/ready"]
interval: 15s
timeout: 10s
retries: 5
depends_on:
- keycloak

open-scd:
labels:
compas: true
image: "lfenergy/compas-open-scd:v0.7.1-compas-4"
image: "lfenergy/compas-open-scd:v0.8.0-compas-1"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
interval: 30s
Expand Down
28 changes: 25 additions & 3 deletions compas/docker-compose-postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ services:
scl-data-service:
labels:
compas: true
image: "lfenergy/compas-scl-data-service:0.9.0-postgresql"
image: "lfenergy/compas-scl-data-service:0.9.1-postgresql"
environment:
- POSTGRESQL_HOST=postgresql
- POSTGRESQL_DB=compas
Expand Down Expand Up @@ -74,7 +74,7 @@ services:
cim-mapping:
labels:
compas: true
image: "lfenergy/compas-cim-mapping:0.7.6"
image: "lfenergy/compas-cim-mapping:0.7.7"
environment:
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
- JWT_VERIFY_ISSUER=http://${COMPAS_HOSTNAME}/auth/realms/compas
Expand All @@ -93,10 +93,32 @@ services:
depends_on:
- keycloak

scl-auto-alignment:
labels:
compas: true
image: "lfenergy/compas-scl-auto-alignment:0.0.2"
environment:
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
- JWT_VERIFY_ISSUER=http://${COMPAS_HOSTNAME}/auth/realms/compas
- JWT_VERIFY_CLIENT_ID=scl-auto-alignment
- JWT_GROUPS_PATH=resource_access/scl-auto-alignment/roles
- USERINFO_WHO_CLAIMNAME=name
deploy:
restart_policy:
condition: on-failure
max_attempts: 3
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/compas-scl-auto-alignment/q/health/ready"]
interval: 15s
timeout: 10s
retries: 5
depends_on:
- keycloak

open-scd:
labels:
compas: true
image: "lfenergy/compas-open-scd:v0.7.1-compas-4"
image: "lfenergy/compas-open-scd:v0.8.0-compas-1"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
interval: 30s
Expand Down
20 changes: 20 additions & 0 deletions compas/reverse-proxy/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,26 @@ http {
proxy_redirect off;
}

# Forwarding to the SCL Auto Alignment Service container.
location /compas-scl-auto-alignment/ {
include /etc/nginx/include/authenticate.include;

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header Authorization "Bearer ${access_token}";

# Added Header back to browser to get JWT Content for Debugging, should not do this in production.
add_header X-Debug-Bearer "Bearer ${access_token}" always;

proxy_pass http://scl-auto-alignment:8080/compas-scl-auto-alignment/;

proxy_set_header Host $http_host;
proxy_cache_bypass $http_upgrade;
proxy_redirect off;
}

# redirect server error pages to the static page /40x.html
error_page 404 /404.html;
location = /40x.html {
Expand Down
12 changes: 6 additions & 6 deletions integration-testing/TestSuite001-basic-compas.robot
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ TestCase001-01
Open local file ${sclname} ${scltype}

Select Tab Substation
Get Text ${substation-editor-selector} div#header > h1:has-text("Sub1")
Get Text ${substation-editor-selector} section > h1:has-text("Sub1")

TestCase001-02
[Documentation] Open project from Local File and Add to CoMPAS
Expand All @@ -33,10 +33,10 @@ TestCase001-02
Set Test Variable ${scltype} CID

Open Menu Save project
Add to CoMPAS ${sclname} ${scltype} 1.0.0
Add to CoMPAS MiniGrid.scd ${sclname} ${scltype} 1.0.0

Select Tab Substation
Get Text ${substation-editor-selector} div#header > h1:has-text("Sub1")
Get Text ${substation-editor-selector} section > h1:has-text("Sub1")

TestCase001-03
[Documentation] Open project from CoMPAS
Expand All @@ -51,7 +51,7 @@ TestCase001-03
Set Test Variable ${scltype} CID

Open Menu Save project
Add to CoMPAS ${sclname} ${scltype} 1.0.0
Add to CoMPAS MiniGrid.scd ${sclname} ${scltype} 1.0.0

Close OpenSCD
Open OpenSCD and Login
Expand All @@ -60,7 +60,7 @@ TestCase001-03
Open from CoMPAS ${sclname} ${scltype} 1.0.0

Select Tab Substation
Get Text ${substation-editor-selector} div#header > h1:has-text("Sub1")
Get Text ${substation-editor-selector} section > h1:has-text("Sub1")

TestCase001-04
[Documentation] Open project from CoMPAS and Save to Local File
Expand All @@ -75,7 +75,7 @@ TestCase001-04
Set Test Variable ${scltype} CID

Open Menu Save project
Add to CoMPAS ${sclname} ${scltype} 1.0.0
Add to CoMPAS MiniGrid.scd ${sclname} ${scltype} 1.0.0

Open Menu Save project
Save to local file ${sclname} ${scltype}
6 changes: 3 additions & 3 deletions integration-testing/TestSuite002-versions-compas.robot
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Initialize Versions
Set Test Variable ${scltype} CID

Open Menu Save project
Add to CoMPAS ${sclname} ${scltype} 1.0.0
Add to CoMPAS MiniGrid.scd ${sclname} ${scltype} 1.0.0

Select Tab CoMPAS Versions
Get Element Count ${compas-versions-editor-selector} mwc-list > mwc-check-list-item == 1
Expand All @@ -48,9 +48,9 @@ Initialize Versions
Delete first substation
Select Tab Substation
# Got to the Substation tab and remove the first substation (Sub1), next the first substation should be Sub2.
Get Text ${substation-editor-selector} div#header > h1:has-text("Sub1")
Get Text ${substation-editor-selector} section > h1:has-text("Sub1")
Click ${substation-editor-selector} > abbr[title="Remove"] > mwc-icon-button[icon="delete"]
Get Text ${substation-editor-selector} div#header > h1:has-text("Sub2")
Get Text ${substation-editor-selector} section > h1:has-text("Sub2")


*** Test Cases ***
Expand Down
2 changes: 1 addition & 1 deletion integration-testing/TestSuite003-cim-mapping.robot
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ TestCase003-01
Open Project from CIM ${sclname} ${scltype}

Select Tab Substation
Get Text ${substation-editor-selector} div#header > h1:has-text("Sub1")
Get Text ${substation-editor-selector} section > h1:has-text("Sub1")
4 changes: 3 additions & 1 deletion integration-testing/include/general-compas.robot
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ Open from CoMPAS
Close Menu

Add to CoMPAS
[Arguments] ${name} ${type} ${expectedVersion}
[Arguments] ${initialValue} ${name} ${type} ${expectedVersion}
# Make sure the initial value is entered. so we can continue.
Get Text ${dialog-selector} compas-save mwc-textfield#name input == ${initialValue}
Fill Text ${dialog-selector} compas-save mwc-textfield#name input ${name}-${current-date}
Click ${dialog-selector} compas-save compas-scltype-radiogroup mwc-list > mwc-radio-list-item[value="${type.upper()}"]
Click ${dialog-selector} mwc-button[slot="primaryAction"] > button
Expand Down
2 changes: 1 addition & 1 deletion integration-testing/include/general-openscd.robot
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Resource ./general-config.robot
# Variables of Selectors commonly used.
${menu-selector} mwc-drawer[id="menu"]
${dialog-selector} wizard-dialog
${substation-editor-selector} substation-editor:first-child > editor-container
${substation-editor-selector} substation-editor:first-child > action-pane

*** Keywords ***
Initialize and Start OpenSCD
Expand Down