Open yuranich opened 7 years ago
I've explored the issue myself and found that my problem lays here https://github.com/alien4cloud/alien4cloud/blob/develop/alien4cloud-tosca/src/main/java/alien4cloud/tosca/parser/ToscaArchiveParser.java
For every dependency new ToscaContext is created. If I remove "requiresNew = true" parameter, these tests work fine.
Thanks Yuri,
I will check if there are impacts related to that. There is probably indeed no good reasons for a new ToscaContext here but this may have impacts on other elements of alien (editor eventually) and I need to check that first.
Luc
Issue for alien4cloud-tosca module of @lucboutier team.
Test 1: Create test file with following content and use it as input to ToscaArchiveParser:
Here I imported CSAR with following file:
and here in import I have another csar with file:
After parsing I got this JSON:
Expected result: properties from type tosca.tests.nodes.ParentOfParentType must be in parsing result. Actual result: properties from type tosca.tests.nodes.ParentOfParentType not in parsing result.
But if I merge my-types and my-types-extended files together in one file everything will be OK.
Test 2: With data types: I created following file for input:
In import I have:
Normative types from here https://github.com/oasis-open/tosca-test-assertions/blob/master/Normative-types/normative-types.yml PortSpec type has some properties on it, but they is not coming to final result, even if I remove all constraints and leave only 'protocol' property. E.g:
In result I got:
Expected result: type_version and protocol properties displayed in the final result. Actual result: Only type_version property displayed.
This issue repeats for other types too. E. g. artifacts.