Aufgrund einer Störung des s3 Storage, könnten in nächster Zeit folgende GitLab Funktionen nicht zur Verfügung stehen: LFS, Container Registry, Job Artifacs, Uploads (Wiki, Bilder, Projekt-Exporte). Wir bitten um Verständnis. Es wird mit Hochdruck an der Behebung des Problems gearbeitet. Weitere Informationen zur Störung des Object Storage finden Sie hier: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/59-object-storage-pilot

Commit 25c75158 authored by TorbenD's avatar TorbenD
Browse files

compliance_tool_aasx: Use single file creation for example

parent 2b922187
Pipeline #350666 passed with stages
in 1 minute and 53 seconds
......@@ -124,9 +124,9 @@ def main():
cp.version = "2.0.1"
cp.title = "Test Title"
for identifiable in data:
if isinstance(identifiable, model.AssetAdministrationShell):
writer.write_aas(identifiable.identification, data, files, write_json=args.json)
writer.write_aas_objects("/aasx/data.json" if args.json else "/aasx/data.xml",
[obj.identification for obj in data], data, files,
write_json=args.json)
writer.write_core_properties(cp)
manager.set_step_status(Status.SUCCESS)
elif args.json:
......
......@@ -49,11 +49,20 @@ class ComplianceToolAASXTest(unittest.TestCase):
self.assertEqual(Status.SUCCESS, manager.steps[3].status)
manager.steps = []
file_path_3 = os.path.join(script_dir, 'files/test_demo_full_example_wrong_attribute.aasx')
file_path_3 = os.path.join(script_dir, 'files/test_demo_full_example2.aasx')
compliance_tool.check_aas_example(file_path_3, manager)
self.assertEqual(4, len(manager.steps))
self.assertEqual(Status.SUCCESS, manager.steps[0].status)
self.assertEqual(Status.SUCCESS, manager.steps[1].status)
self.assertEqual(Status.SUCCESS, manager.steps[2].status)
self.assertEqual(Status.SUCCESS, manager.steps[3].status)
manager.steps = []
file_path_4 = os.path.join(script_dir, 'files/test_demo_full_example_wrong_attribute.aasx')
compliance_tool.check_aas_example(file_path_4, manager)
self.assertEqual(4, len(manager.steps))
self.assertEqual(Status.SUCCESS, manager.steps[0].status)
self.assertEqual(Status.SUCCESS, manager.steps[1].status)
self.assertEqual(Status.FAILED, manager.steps[2].status)
self.assertIn('Attribute id_short of AssetAdministrationShell[Identifier(IRI=https://acplt.org/'
'Test_AssetAdministrationShell)] must be == TestAssetAdministrationShell',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment