Skip to content

Commit

Permalink
Merge pull request #771 from catenax-ng/feature/#416_fix-tavern-and-c…
Browse files Browse the repository at this point in the history
…ucumber-tests

Feature/416 adjusted tavern and cucumber tests
  • Loading branch information
ds-alexander-bulgakov authored Feb 15, 2024
2 parents bac5f9a + 5395d31 commit 48c093c
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 114 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"submodels": [
{
"identification": "urn:uuid:06564726-8032-417f-9583-5385632c980e",
"identification": "urn:uuid:662f3a1b-de56-4cbb-8fb4-51779643126d",
"aspectType": "urn:bamm:io.catenax.traction_battery_code:1.0.0#TractionBatteryCode",
"contractAgreementId": null,
"payload": {
"tractionBatteryCode": "X12MCPM27KLPCLX2M2382320",
"subcomponents": [
Expand All @@ -15,8 +16,9 @@
}
},
{
"identification": "urn:uuid:2dc2f65e-e2e5-4939-9624-3d2be4c76884",
"identification": "urn:uuid:73068d1b-e846-4a22-a0ae-b6310f5b0a36",
"aspectType": "urn:bamm:io.catenax.traction_battery_code:1.0.0#TractionBatteryCode",
"contractAgreementId": null,
"payload": {
"tractionBatteryCode": "X12MCPM27KLPCLX2M2382320",
"subcomponents": [
Expand All @@ -29,8 +31,9 @@
}
},
{
"identification": "urn:uuid:76fe719c-cfc9-4247-9882-4460fe0166f0",
"identification": "urn:uuid:b5933d6b-f005-4a9a-996e-a55501b2d651",
"aspectType": "urn:bamm:io.catenax.traction_battery_code:1.0.0#TractionBatteryCode",
"contractAgreementId": null,
"payload": {
"tractionBatteryCode": "X12MCPM27KLPCLX2M2382320",
"subcomponents": [
Expand All @@ -43,8 +46,9 @@
}
},
{
"identification": "urn:uuid:edb31207-09b1-4570-b5d4-f753d8463915",
"identification": "urn:uuid:ab703fb6-7869-439b-aedf-43c3f21f8060",
"aspectType": "urn:bamm:io.catenax.traction_battery_code:1.0.0#TractionBatteryCode",
"contractAgreementId": null,
"payload": {
"tractionBatteryCode": "X12MCPM27KLPCLX2M2382320",
"subcomponents": [
Expand All @@ -57,8 +61,9 @@
}
},
{
"identification": "urn:uuid:987c584b-afa7-4ace-9a00-d63867a781e9",
"identification": "urn:uuid:26aa986b-a443-4b8d-aec5-bc0da9757cbe",
"aspectType": "urn:bamm:io.catenax.traction_battery_code:1.0.0#TractionBatteryCode",
"contractAgreementId": null,
"payload": {
"tractionBatteryCode": "X12MCPM27KLPCLX2M2382320",
"subcomponents": [
Expand All @@ -71,8 +76,24 @@
}
},
{
"identification": "urn:uuid:003c7b24-5860-4b47-87f9-bb5366c237c0",
"identification": "urn:uuid:1753b174-8212-429d-9f37-cfa2e0d6a07c",
"aspectType": "urn:bamm:io.catenax.traction_battery_code:1.0.0#TractionBatteryCode",
"contractAgreementId": null,
"payload": {
"tractionBatteryCode": "X12MCPM27KLPCLX2M2382320",
"subcomponents": [
{
"tractionBatteryCode": "X12MCPM27KLPCLX2M2382320",
"productType": "module"
}
],
"productType": "module"
}
},
{
"identification": "urn:uuid:6e6f7237-982e-4359-accf-e3b9c0fb4f0e",
"aspectType": "urn:bamm:io.catenax.traction_battery_code:1.0.0#TractionBatteryCode",
"contractAgreementId": null,
"payload": {
"tractionBatteryCode": "X12MCPM27KLPCLX2M2382320",
"subcomponents": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,6 @@
},
"aspectType": "SingleLevelBomAsBuilt",
"bpn": "BPNL00000003AYRE"
},
{
"catenaXId": "urn:uuid:d57a0374-45bc-4d9e-b44c-e6e75cfe84c0",
"linkedItem": {
"quantity": {
"quantityNumber": 0.1908,
"measurementUnit": {
"datatypeURI": null,
"lexicalValue": "unit:kilogram"
}
},
"lifecycleContext": "asBuilt",
"assembledOn": "2022-02-03T14:48:54.709Z",
"lastModifiedOn": "2022-02-03T14:48:54.709Z",
"childCatenaXId": "urn:uuid:6cae0932-05e2-467d-98d0-7d580938a23e",
"hasAlternatives": true
},
"aspectType": "SingleLevelBomAsBuilt",
"bpn": "BPNL00000003B0Q0"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"submodels" : [
{
"identification": "urn:uuid:7a3ba22d-a6e1-4096-b34a-f2afc42fe17f",
"identification": "urn:uuid:5fbf0548-8119-4550-852e-3c58eac4a36c",
"aspectType": "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling",
"contractAgreementId": null,
"payload": {
"component": [
{
Expand Down Expand Up @@ -40,88 +41,6 @@
}
]
}
},
{
"identification": "urn:uuid:8178ed3b-9c23-4dea-b252-d37338934eb4",
"aspectType": "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling",
"payload": {
"materialName": "Engineering Plastics",
"materialClass": "5.1",
"component": [
{
"materialName": "PA66",
"recycledContent": 33,
"materialClass": "5.1",
"quantity": {
"unit": "unit:percent",
"value": 70
},
"aggregateState": "solid",
"materialAbbreviation": "PA66"
},
{
"materialName": "GF-Faser",
"recycledContent": 20,
"materialClass": "5.1",
"quantity": {
"unit": "unit:percent",
"value": 30
},
"aggregateState": "solid",
"materialAbbreviation": "GF30"
}
]
}
},
{
"identification": "urn:uuid:b24ed803-9cf0-4b5c-bbea-5e518f2764cb",
"aspectType": "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling",
"payload": {
"materialName": "NTIER Product",
"materialClass": "5.5",
"component": [
{
"materialName": "Aluminium oxide",
"recycledContent": 83,
"materialClass": "5.5.1",
"quantity": {
"unit": "unit:percent",
"value": 60
},
"aggregateState": "solid",
"materialAbbreviation": ""
},
{
"materialName": "Other",
"recycledContent": 4,
"materialClass": "5.5.2",
"quantity": {
"unit": "unit:percent",
"value": 40
},
"aggregateState": "solid",
"materialAbbreviation": ""
}
]
}
},
{
"identification": "urn:uuid:07bddbb1-df63-4a25-81c0-f1d6d7a4273c",
"aspectType": "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling",
"payload": {
"component": [
{
"materialName": "Glue",
"materialClass": "6.2",
"quantity": {
"unit": "unit:kilogram",
"value": 2.5
},
"weight": "0.2341",
"materialAbbreviation": "GL338"
}
]
}
}
]
}
6 changes: 3 additions & 3 deletions local/testing/api-tests/irs-api-tests.tavern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1569,13 +1569,13 @@ stages:
url: "{tavern.env_vars.IRS_HOST}/irs/jobs"
json:
key:
globalAssetId: "urn:uuid:334cce52-1f52-4bc9-9dd1-410bbe497bbc"
bpn: "BPNL00000003B2OM"
globalAssetId: "urn:uuid:397b63ae-89d7-4131-b45a-575e840dc5c5"
bpn: "BPNL00000003AVTH"
aspects:
- Batch
collectAspects: true
bomLifecycle: "asBuilt"
depth: 2
depth: 10
method: POST
headers:
content-type: application/json
Expand Down
5 changes: 2 additions & 3 deletions local/testing/api-tests/tavern_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def ESS_job_parameter_are_as_requested(response):
assert parameter.get('depth') == 1
assert parameter.get('direction') == 'downward'
assert parameter.get('lookupBPNs') is False
#assert parameter.get('callbackUrl') == 'https://www.check123.com'
aspects_list = parameter.get("aspects")
assert 'PartSiteInformationAsPlanned' in aspects_list
assert 'PartAsPlanned' in aspects_list
Expand Down Expand Up @@ -135,7 +134,7 @@ def submodelDescriptors_in_shells_are_empty(response):
shells = response.json().get("shells")
print("shells ", shells)
for i in shells:
assert len(i.get("submodelDescriptors")) == 0
assert len(i.get("payload").get("submodelDescriptors")) == 0


def aspects_in_job_parameter_are_empty(response):
Expand All @@ -162,7 +161,7 @@ def errors_for_unknown_globalAssetId_are_correct(response):
print("RetryCounter: ", processingErrorRetryCounter)
assert 'urn:uuid:cce14502-958a-42e1-8bb7-f4f41aaaaaaa' in catenaXId
assert 'DigitalTwinRequest' in processingErrorStep
#assert 'Shell for identifier urn:uuid:cce14502-958a-42e1-8bb7-f4f41aaaaaaa not found' in processingErrorDetail ##commented out since this error message is not possible currently after DTR changes
#assert 'Shell for identifier urn:uuid:cce14502-958a-42e1-8bb7-f4f41aaaaaaa not found' in processingErrorDetail #commented out since this error message is not possible currently after DTR changes
assert processingErrorLastAttempt is not None
assert 3 is processingErrorRetryCounter

Expand Down

0 comments on commit 48c093c

Please sign in to comment.