Remove dependency on tosca simple model 28/142628/5
authordanielhanrahan <daniel.hanrahan@est.tech>
Tue, 2 Dec 2025 18:41:35 +0000 (18:41 +0000)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Wed, 3 Dec 2025 10:28:09 +0000 (10:28 +0000)
This is needed before copying the tosca package from
policy/models to avoid code coverage issues.

Issue-ID: POLICY-5494
Change-Id: I8ad58d6fb4fded355932ac1f603c61320686739b
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java
runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/main/utils/EncryptionUtilTest.java

index 2d10e2c..eb12ad0 100644 (file)
@@ -54,6 +54,7 @@ import org.onap.policy.clamp.models.acm.concepts.LockState;
 import org.onap.policy.clamp.models.acm.concepts.MigrationState;
 import org.onap.policy.clamp.models.acm.concepts.StateChangeResult;
 import org.onap.policy.clamp.models.acm.concepts.SubState;
+import org.onap.policy.clamp.models.acm.document.concepts.DocToscaServiceTemplate;
 import org.onap.policy.clamp.models.acm.messages.rest.instantiation.AcInstanceStateUpdate;
 import org.onap.policy.clamp.models.acm.messages.rest.instantiation.DeployOrder;
 import org.onap.policy.clamp.models.acm.messages.rest.instantiation.LockOrder;
@@ -67,7 +68,6 @@ import org.onap.policy.clamp.models.acm.persistence.provider.ProviderUtils;
 import org.onap.policy.clamp.models.acm.utils.AcmStateUtils;
 import org.onap.policy.models.base.PfModelRuntimeException;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
-import org.onap.policy.models.tosca.simple.concepts.JpaToscaServiceTemplate;
 import org.springframework.data.domain.Pageable;
 
 /**
@@ -105,11 +105,11 @@ class AutomationCompositionInstantiationProviderTest {
     @BeforeAll
     static void setUpBeforeClass() {
         var st = InstantiationUtils.getToscaServiceTemplate(TOSCA_SERVICE_TEMPLATE_YAML);
-        var jpa = ProviderUtils.getJpaAndValidate(st, JpaToscaServiceTemplate::new, "toscaServiceTemplate");
+        var jpa = ProviderUtils.getJpaAndValidate(st, DocToscaServiceTemplate::new, "toscaServiceTemplate");
         serviceTemplate = jpa.toAuthorative();
 
         st = InstantiationUtils.getToscaServiceTemplate(MIGRATION_SERVICE_TEMPLATE_YAML);
-        jpa = ProviderUtils.getJpaAndValidate(st, JpaToscaServiceTemplate::new, "migrationServiceTemplate");
+        jpa = ProviderUtils.getJpaAndValidate(st, DocToscaServiceTemplate::new, "migrationServiceTemplate");
         serviceTemplateMigration = jpa.toAuthorative();
     }
 
index 49fb33c..06409c9 100644 (file)
@@ -35,8 +35,8 @@ import org.onap.policy.clamp.acm.runtime.util.CommonTestData;
 import org.onap.policy.clamp.common.acm.exception.AutomationCompositionRuntimeException;
 import org.onap.policy.clamp.models.acm.concepts.AcTypeState;
 import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionDefinition;
+import org.onap.policy.clamp.models.acm.document.concepts.DocToscaServiceTemplate;
 import org.onap.policy.clamp.models.acm.persistence.provider.ProviderUtils;
-import org.onap.policy.models.tosca.simple.concepts.JpaToscaServiceTemplate;
 
 class EncryptionUtilTest {
 
@@ -47,7 +47,7 @@ class EncryptionUtilTest {
     @BeforeAll
     static void setUpBeforeClass() {
         var serviceTemplateEncrypt = InstantiationUtils.getToscaServiceTemplate(TOSCA_TEMPLATE_YAML);
-        var jpa2 = ProviderUtils.getJpaAndValidate(serviceTemplateEncrypt, JpaToscaServiceTemplate::new,
+        var jpa2 = ProviderUtils.getJpaAndValidate(serviceTemplateEncrypt, DocToscaServiceTemplate::new,
                 "toscaServiceTemplate");
         serviceTemplateEncrypt = jpa2.toAuthorative();
         acDefinition = CommonTestData.createAcDefinition(serviceTemplateEncrypt, AcTypeState.PRIMED);