From 6de5a0c9e2acf3a799f53c9fedf8a40861b6ddbe Mon Sep 17 00:00:00 2001 From: "pramod.jamkhedkar" Date: Wed, 13 Nov 2019 13:21:16 -0500 Subject: Removing Named Query. Removing all the related files and necessary modifications for removing named query. The code now only supports Custom Query Issue-ID: POLICY-2125 Change-Id: Ifa5ccb74142aa424359c0dea85b90bbcf70147cb Signed-off-by: pramod.jamkhedkar --- .../actor/vfc/VfcActorServiceProviderTest.java | 49 ---------------------- 1 file changed, 49 deletions(-) (limited to 'models-interactions/model-actors/actor.vfc/src/test') diff --git a/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java b/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java index 300cd29f0..db224b065 100644 --- a/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java +++ b/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java @@ -35,7 +35,6 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.onap.policy.aai.AaiCqResponse; -import org.onap.policy.aai.AaiGetVnfResponse; import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance; import org.onap.policy.controlloop.ControlLoopOperation; import org.onap.policy.controlloop.VirtualControlLoopEvent; @@ -45,7 +44,6 @@ import org.onap.policy.vfc.VfcRequest; public class VfcActorServiceProviderTest { - private static final String LOCAL_URL = "http://localhost:6666"; private static final String DOROTHY_GALE_1939 = "dorothy.gale.1939"; private static final String CQ_RESPONSE_JSON = "aai/AaiCqResponse.json"; private static final String RESTART = "Restart"; @@ -64,53 +62,6 @@ public class VfcActorServiceProviderTest { HttpServletServerFactoryInstance.getServerFactory().destroy(); } - @Test - public void testConstructRequest() { - VirtualControlLoopEvent onset = new VirtualControlLoopEvent(); - ControlLoopOperation operation = new ControlLoopOperation(); - - Policy policy = new Policy(); - policy.setRecipe("GoToOz"); - - assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, null, null, null)); - - onset.getAai().put("generic-vnf.vnf-id", DOROTHY_GALE_1939); - assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, null, null, null)); - - assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, LOCAL_URL, - "AAI", "AAI")); - - UUID requestId = UUID.randomUUID(); - onset.setRequestId(requestId); - assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, LOCAL_URL, - "AAI", "AAI")); - - onset.getAai().put("generic-vnf.vnf-name", "Dorothy"); - assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, LOCAL_URL, - "AAI", null)); - - assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, LOCAL_URL, - "AAI", "AAI")); - - onset.getAai().put("service-instance.service-instance-id", ""); - assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, LOCAL_URL, - "AAI", "AAI")); - - assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse(), - LOCAL_URL, "AAI", "AAI")); - - policy.setRecipe(RESTART); - assertNotNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse(), - LOCAL_URL, "AAI", "AAI")); - - VfcRequest request = VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse(), - LOCAL_URL, "AAI", "AAI"); - - assertEquals(requestId, Objects.requireNonNull(request).getRequestId()); - assertEquals(DOROTHY_GALE_1939, request.getHealRequest().getVnfInstanceId()); - assertEquals("restartvm", request.getHealRequest().getAdditionalParams().getAction()); - } - @Test public void testMethods() { VfcActorServiceProvider sp = new VfcActorServiceProvider(); -- cgit 1.2.3-korg