diff options
author | Liam Fallon <liam.fallon@est.tech> | 2022-12-20 09:55:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-12-20 09:55:45 +0000 |
commit | e70bf5c909a4d5abcbc7adcbb4aa120c2e045660 (patch) | |
tree | 2622919eb5c86d6400cab8ff35795bd8c75cd730 /runtime-acm/src/test/java/org/onap | |
parent | ba5988ab370f3dc5e5214823046e897d25aba0bf (diff) | |
parent | e18a523f4fc8075dc5022871fa96ca8754c2c979 (diff) |
Merge "Refactor instanceId as primary key in JpaAutomationComposition"
Diffstat (limited to 'runtime-acm/src/test/java/org/onap')
2 files changed, 6 insertions, 6 deletions
diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java index 0657c7e0c..c14d64069 100644 --- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java +++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java @@ -109,10 +109,10 @@ class AutomationCompositionInstantiationProviderTest { verify(acProvider).createAutomationComposition(automationCompositionCreate); - when(acProvider.getAutomationCompositions(automationCompositionCreate.getName(), + when(acProvider.getAutomationCompositions(compositionId, automationCompositionCreate.getName(), automationCompositionCreate.getVersion())).thenReturn(List.of(automationCompositionCreate)); - var automationCompositionsGet = instantiationProvider.getAutomationCompositions( + var automationCompositionsGet = instantiationProvider.getAutomationCompositions(compositionId, automationCompositionCreate.getName(), automationCompositionCreate.getVersion()); assertThat(automationCompositionCreate) .isEqualTo(automationCompositionsGet.getAutomationCompositionList().get(0)); diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/rest/InstantiationControllerTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/rest/InstantiationControllerTest.java index 47d465c32..9bc29d9ce 100644 --- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/rest/InstantiationControllerTest.java +++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/rest/InstantiationControllerTest.java @@ -240,7 +240,7 @@ class InstantiationControllerTest extends CommonRestController { var instResponse = resp.readEntity(InstantiationResponse.class); InstantiationUtils.assertInstantiationResponse(instResponse, automationComposition); - var automationCompositionsFromDb = instantiationProvider.getAutomationCompositions( + var automationCompositionsFromDb = instantiationProvider.getAutomationCompositions(compositionId, automationComposition.getKey().getName(), automationComposition.getKey().getVersion()); assertNotNull(automationCompositionsFromDb); @@ -263,7 +263,7 @@ class InstantiationControllerTest extends CommonRestController { instResponse = resp.readEntity(InstantiationResponse.class); InstantiationUtils.assertInstantiationResponse(instResponse, automationCompositionFromRsc); - var automationCompositionsFromDb = instantiationProvider.getAutomationCompositions( + var automationCompositionsFromDb = instantiationProvider.getAutomationCompositions(compositionId, automationCompositionFromRsc.getKey().getName(), automationCompositionFromRsc.getKey().getVersion()); assertThat(automationCompositionsFromDb.getAutomationCompositionList()).isEmpty(); } @@ -332,8 +332,8 @@ class InstantiationControllerTest extends CommonRestController { // check passive state on DB var toscaConceptIdentifier = instResponse.getAffectedAutomationComposition(); - var automationCompositionsGet = instantiationProvider - .getAutomationCompositions(toscaConceptIdentifier.getName(), toscaConceptIdentifier.getVersion()); + var automationCompositionsGet = instantiationProvider.getAutomationCompositions(compositionId, + toscaConceptIdentifier.getName(), toscaConceptIdentifier.getVersion()); assertThat(automationCompositionsGet.getAutomationCompositionList()).hasSize(1); assertEquals(command.getOrderedState(), automationCompositionsGet.getAutomationCompositionList().get(0).getOrderedState()); |