Skip to content

Commit a309097

Browse files
committed
Merge branch 'refs/heads/main' into dependabot/npm_and_yarn/frontend/socket.io-4.7.5
2 parents e7074e2 + 1d4c652 commit a309097

File tree

39 files changed

+1083
-1212
lines changed

39 files changed

+1083
-1212
lines changed

.github/workflows/argo.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,9 @@ jobs:
417417
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://tracex-int-b-submodel-server.int.demo.catena-x.net -edc https://trace-x-edc-int-b.int.demo.catena-x.net -a https://trace-x-registry-int-b.int.demo.catena-x.net/semantics/registry/api/v3 -d https://trace-x-edc-int-b-dataplane.int.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_INT_B }} --aas3 --edcBPN BPNL00000003CNKC --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV
418418
sleep 10
419419
elif [ "${{ github.event.inputs.environment }}" == "association int-a/int-b" ]; then
420-
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://tracex-int-a-submodel-server.int.catena-x.net -edc https://trace-x-edc-int-a.int.catena-x.net -a https://trace-x-registry-int-a.int.catena-x.net/semantics/registry/api/v3 -d https://trace-x-edc-int-a-dataplane.int.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_ASSOCIATION_INT }} --aas3 --edcBPN BPNL000000000UKM --allowedBPNs BPNL000000000UKM BPNL000000000DWF BPNL00000003AZQP BPNL00000003CSGV
420+
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://tracex-int-a-submodel-server.int.catena-x.net -edc https://trace-x-edc-int-a.int.catena-x.net -a https://trace-x-registry-int-a.int.catena-x.net/semantics/registry/api/v3 -d https://trace-x-edc-int-a-dataplane.int.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_ASSOCIATION_INT }} --aas3 --edcBPN BPNL000000000UKM --allowedBPNs BPNL000000000UKM BPNL000000000DWF BPNL000000000EVQ BPNL00000003CSGV
421421
sleep 10
422-
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://tracex-int-b-submodel-server.int.catena-x.net -edc https://trace-x-edc-int-b.int.catena-x.net -a https://trace-x-registry-int-b.int.catena-x.net/semantics/registry/api/v3 -d https://trace-x-edc-int-b-dataplane.int.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_ASSOCIATION_INT }} --aas3 --edcBPN BPNL000000000DWF --allowedBPNs BPNL000000000DWF BPNL000000000UKM BPNL00000003AZQP BPNL00000003CSGV
422+
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://tracex-int-b-submodel-server.int.catena-x.net -edc https://trace-x-edc-int-b.int.catena-x.net -a https://trace-x-registry-int-b.int.catena-x.net/semantics/registry/api/v3 -d https://trace-x-edc-int-b-dataplane.int.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_ASSOCIATION_INT }} --aas3 --edcBPN BPNL000000000DWF --allowedBPNs BPNL000000000DWF BPNL000000000UKM BPNL000000000EVQ BPNL00000003CSGV
423423
sleep 10
424424
fi
425425
elif [ "${{ github.event.inputs.testdata_upload }}" == "false" ]; then
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Copyright (c) 2024 Contributors to the Eclipse Foundation
2+
#
3+
# See the NOTICE file(s) distributed with this work for additional
4+
# information regarding copyright ownership.
5+
#
6+
# This program and the accompanying materials are made available under the
7+
# terms of the Apache License, Version 2.0 which is available at
8+
# https://www.apache.org/licenses/LICENSE-2.0.
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
# License for the specific language governing permissions and limitations
14+
# under the License.
15+
#
16+
# SPDX-License-Identifier: Apache-2.0
17+
18+
name: "[BE][TEST][E2E] Cucumber - Association"
19+
20+
on:
21+
workflow_dispatch: # Trigger manually
22+
schedule:
23+
- cron: "0 0 * * *"
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Set up JDK 17
33+
uses: actions/setup-java@v4
34+
with:
35+
java-version: '17'
36+
distribution: 'temurin'
37+
38+
- name: Cache maven packages
39+
uses: actions/cache@v4
40+
with:
41+
path: ~/.m2
42+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
43+
restore-keys: ${{ runner.os }}-m2
44+
45+
- name: Download Feature Files
46+
id: download
47+
env:
48+
JIRA_USERNAME: ${{ secrets.ASSOCIATION_TX_JIRA_USERNAME }}
49+
JIRA_PASSWORD: ${{ secrets.ASSOCIATION_TX_JIRA_PASSWORD }}
50+
# JIRA filter 11349: project = "[TR] FOSS - Open Source (Impl.)" AND issuetype = Test AND "Test Type" = Cucumber AND status = Ready AND labels = INTEGRATION_TEST AND (environment ~ DEV OR environment ~ "INT")
51+
# Downloads all feature files of cucumber tests inside TRI project
52+
run: |
53+
token=$(curl -H "Content-Type: application/json" -X POST \
54+
--data "{ \"client_id\": \"$JIRA_USERNAME\",\"client_secret\": \"$JIRA_PASSWORD\" }" \
55+
https://xray.cloud.getxray.app/api/v2/authenticate | tr -d '"')
56+
57+
export HTTP_RESULT=$(curl -s --show-error -w "%{http_code}" --header "Authorization: Bearer $token" \
58+
"https://xray.cloud.getxray.app/api/v2/export/cucumber?filter=10005&fz=true" -o features.zip)
59+
60+
[[ $HTTP_RESULT == 200 || $HTTP_RESULT == 400 ]]
61+
echo "::set-output name=http_response::$HTTP_RESULT"
62+
63+
- name: install tx-models
64+
run: mvn install -pl tx-models
65+
66+
# Required step due to fact that jira will name feature files differently with each feature added and that will cause duplicate test runs
67+
- name: Cleanup repository feature files
68+
if: ${{ steps.download.outputs.http_response == '200' }}
69+
#working-directory: tx-cucumber-tests
70+
run: |
71+
rm -r tx-cucumber-tests/src/test/resources/features/*
72+
73+
- name: Build with Maven
74+
if: ${{ steps.download.outputs.http_response == '200' }}
75+
env:
76+
KEYCLOAK_HOST: ${{ secrets.ASSOCIATION_KEYCLOAK_HOST }}
77+
SUPERVISOR_CLIENT_ID: ${{ secrets.ASSOCIATION_SUPERVISOR_CLIENT_ID }}
78+
SUPERVISOR_PASSWORD: ${{ secrets.ASSOCIATION_SUPERVISOR_PASSWORD }}
79+
E2E_TXA_HOST: ${{ secrets.ASSOCIATION_E2E_TXA_HOST }}
80+
E2E_TXB_HOST: ${{ secrets.ASSOCIATION_E2E_TXB_HOST }}
81+
#working-directory: tx-cucumber-tests
82+
run: |
83+
unzip -o tx-cucumber-tests/features.zip -d tx-cucumber-tests/src/test/resources/features
84+
mvn -pl tx-models,tx-cucumber-tests --batch-mode clean install -D"cucumber.filter.tags"="@trace-x-automated" -P association
85+
86+
- name: Submit results to Xray
87+
if: ${{ always() && steps.download.outputs.http_response == '200' }}
88+
env:
89+
JIRA_USERNAME: ${{ secrets.ASSOCIATION_TX_JIRA_USERNAME }}
90+
JIRA_PASSWORD: ${{ secrets.ASSOCIATION_TX_JIRA_PASSWORD }}
91+
run: |
92+
token=$(curl -H "Content-Type: application/json" -X POST \
93+
--data "{ \"client_id\": \"$JIRA_USERNAME\",\"client_secret\": \"$JIRA_PASSWORD\" }" \
94+
https://xray.cloud.getxray.app/api/v2/authenticate | tr -d '"')
95+
96+
curl --request POST \
97+
--header 'Content-Type: application/json' \
98+
--header "Authorization: Bearer $token" \
99+
--data-binary '@tx-cucumber-tests/report.json' \
100+
"https://xray.cloud.getxray.app/api/v2/import/execution/cucumber"

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha
2828
- XXXX added workflow to import testdata
2929

3030
### Changed
31+
- #1108 Rework of data sov documentation
3132
- #1070 Correct semantic model in dev/README.md
3233
- #1070 Update documentation artefacts according to TRG 1 - Documentation
3334
- #1070 Convert png to svg according to TRG 1.04 - Diagrams as code / Editable static files

dev/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.12.json -s http
8080
Sample invocation (ASSOCIATION INT A)
8181

8282
```
83-
python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.12.json -s https://traceability-int-a.int.catena-x.net/api/submodel -edc https://trace-x-edc-int-a.int.catena-x.net -a https://trace-x-registry-int-a.int.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-a-dataplane.int.catena-x.net -p id-3.0-trace -k <apiKey> --aas3 --edcBPN BPNL000000000UKM BPNL000000000DWF BPNL00000003AZQP BPNL00000003CSGV --allowedBPNs BPNL000000000UKM BPNL000000000DWF BPNL00000003AZQP BPNL00000003CSGV
83+
python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.12.json -s https://traceability-int-a.int.catena-x.net/api/submodel -edc https://trace-x-edc-int-a.int.catena-x.net -a https://trace-x-registry-int-a.int.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-a-dataplane.int.catena-x.net -p id-3.0-trace -k <apiKey> --aas3 --edcBPN BPNL000000000UKM BPNL000000000DWF BPNL000000000EVQ BPNL00000003CSGV --allowedBPNs BPNL000000000UKM BPNL000000000DWF BPNL00000003AZQP BPNL00000003CSGV
8484
```
8585

8686
Sample invocation (ASSOCIATION INT B)
8787

8888
```
89-
python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.12.json -s https://traceability-int-b.int.catena-x.net/api/submodel -edc https://trace-x-edc-int-b.int.catena-x.net -a https://trace-x-registry-int-b.int.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-b-dataplane.int.catena-x.net -p id-3.0-trace -k <apiKey> --aas3 --edcBPN BPNL000000000UKM BPNL000000000DWF BPNL00000003AZQP BPNL00000003CSGV --allowedBPNs BPNL000000000UKM BPNL000000000DWF BPNL00000003AZQP BPNL00000003CSGV
89+
python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.12.json -s https://traceability-int-b.int.catena-x.net/api/submodel -edc https://trace-x-edc-int-b.int.catena-x.net -a https://trace-x-registry-int-b.int.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-b-dataplane.int.catena-x.net -p id-3.0-trace -k <apiKey> --aas3 --edcBPN BPNL000000000UKM BPNL000000000DWF BPNL000000000EVQ BPNL00000003CSGV --allowedBPNs BPNL000000000UKM BPNL000000000DWF BPNL00000003AZQP BPNL00000003CSGV
9090
```
9191

9292
where:

docs/concept/#638-contractagreement-admin-view/get-all-contracts-sequenceflow.puml

Lines changed: 0 additions & 50 deletions
This file was deleted.

docs/concept/#638-contractagreement-admin-view/get-all-contracts-sequenceflow.svg

Lines changed: 1 addition & 48 deletions
Loading
Lines changed: 46 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,54 @@
11
@startuml
22
title
3-
==GET api/contracts/{tx-assetId}
3+
== Request ContractResponse (Contract Agreements)
44
end title
55

66
autonumber "<B>[00]"
7-
8-
participant "Trace-X Frontend" as FE order 0
9-
participant "Trace-X Backend" as BE order 1
10-
participant "Trace-X Database" as DB order 2
11-
participant "EDC" as TXEDC order 3
12-
13-
FE -> BE: GET api/contracts/{tx-assetId}
14-
15-
activate BE
16-
BE -> DB: Take contractAgreementId for tx-assetId
17-
activate DB
18-
autonumber stop
19-
DB --> BE: contractAgreementId
20-
autonumber resume
21-
deactivate DB
22-
23-
BE -> TXEDC: GET tx-edc/management/v2/contractagreements/{contractAgreementId}
24-
activate TXEDC
25-
autonumber stop
26-
TXEDC --> BE: JSON response
27-
autonumber resume
28-
deactivate TXEDC
29-
BE -> BE: Extract contractSigningDate, policy
30-
activate BE
7+
skinparam monochrome true
8+
skinparam shadowing false
9+
skinparam defaultFontName "Architects daughter"
10+
skinparam linetype ortho
11+
12+
participant "Trace-X \n Frontend" as FE order 0
13+
participant "Trace-X \n Backend" as BE order 1
14+
participant "Trace-X \n Database" as DB order 2
15+
participant "EDC \n ManagementAPI" as TXEDC order 3
16+
17+
FE -> BE: Request for ContractResponse
18+
note left
19+
GET /contracts by filterExpression
20+
end note
21+
22+
loop for each contract agreement
23+
activate BE
24+
BE -> DB: Query contractAgreementId for assetId
25+
activate DB
26+
DB --> BE: result contractAgreementId
27+
deactivate DB
28+
29+
BE -> TXEDC: GET contractagreements
30+
note left
31+
GET edc/management/v2/contractagreements/{contractAgreementId}
32+
end note
33+
activate TXEDC
34+
TXEDC --> BE: return contract agreements
35+
deactivate TXEDC
36+
BE -> BE: Extract contractSigningDate, policy
37+
activate BE
38+
deactivate BE
39+
40+
BE -> TXEDC: GET edc/management/v2/contractagreements/{contractAgreementId}/negotiation
41+
activate TXEDC
42+
TXEDC --> BE: Gets a contract negotiation with the given contract agreement ID
43+
deactivate TXEDC
44+
BE -> BE: Extract id, counterPartyAddress, state
45+
activate BE
46+
BE -> BE : Create ContractResponse
47+
deactivate BE
48+
49+
end loop
50+
51+
BE --> FE: List of ContractResponses for filterExpression
3152
deactivate BE
32-
33-
BE -> TXEDC: GET tx-edc/management/v2/contractagreements/{contractAgreementId}/negotiation
34-
activate TXEDC
35-
autonumber stop
36-
TXEDC --> BE: JSON response
37-
autonumber resume
38-
deactivate TXEDC
39-
BE -> BE: Extract id, counterPartyAddress, state
40-
activate BE
41-
deactivate BE
42-
4353
autonumber stop
44-
BE --> FE: JSON response
45-
deactivate BE
46-
4754
@enduml

0 commit comments

Comments
 (0)