From c1f414d5b3592a0740c6c4e4e264a7e6ab35e12d Mon Sep 17 00:00:00 2001 From: "Kuleshov, Elena" Date: Thu, 16 Jul 2020 11:37:11 -0400 Subject: Implement mapping of requestorId to Implement mapping of requestorId to xOnapRequestorid in request to APPC. Issue-ID: SO-3072 Signed-off-by: Benjamin, Max (mb388a) Change-Id: Ia3b157b259f1f4f94b197bd07354157d1d5d86b7 --- .../ApplicationControllerTaskImplITTest.java | 1 + .../service/ApplicationControllerTaskImplTest.java | 37 +++++++++++----------- 2 files changed, 20 insertions(+), 18 deletions(-) (limited to 'adapters/so-appc-orchestrator/src/test') diff --git a/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskImplITTest.java b/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskImplITTest.java index 82b0695ed9..cac8e9e16a 100644 --- a/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskImplITTest.java +++ b/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskImplITTest.java @@ -63,6 +63,7 @@ public class ApplicationControllerTaskImplITTest { @Before public void setup() { request = new ApplicationControllerTaskRequest(); + request.setRequestorId("testRequestorId"); request.setBookName("testBookName"); request.setControllerType("testControllerType"); request.setFileParameters("testFileParams"); diff --git a/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskImplTest.java b/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskImplTest.java index ff979acf7b..fe2b4f84b5 100644 --- a/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskImplTest.java +++ b/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskImplTest.java @@ -52,6 +52,7 @@ public class ApplicationControllerTaskImplTest { request.setNewSoftwareVersion("2.0"); request.setExistingSoftwareVersion("1.0"); request.setOperationsTimeout("30"); + request.setRequestorId("testRequestorId"); Map reqConfigParams = new HashMap<>(); reqConfigParams.put("name1", "value1"); reqConfigParams.put("name2", "value2"); @@ -77,13 +78,13 @@ public class ApplicationControllerTaskImplTest { Mockito.when(applicationControllerClient.vnfCommand(Action.HealthCheck, "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener)).thenReturn(new Status()); + listener, "testRequestorId")).thenReturn(new Status()); Status status = applicationControllerTaskImpl.execute("testRequestId", request, listener); Mockito.verify(applicationControllerClient).vnfCommand(Action.HealthCheck, "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener); + listener, "testRequestorId"); } @@ -99,13 +100,13 @@ public class ApplicationControllerTaskImplTest { Mockito.when(applicationControllerClient.vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener)).thenReturn(new Status()); + listener, "testRequestorId")).thenReturn(new Status()); Status status = applicationControllerTaskImpl.execute("testRequestId", request, listener); Mockito.verify(applicationControllerClient).vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener); + listener, "testRequestorId"); } @Test @@ -118,13 +119,13 @@ public class ApplicationControllerTaskImplTest { Mockito.when(applicationControllerClient.vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener)).thenReturn(new Status()); + listener, "testRequestorId")).thenReturn(new Status()); Status status = applicationControllerTaskImpl.execute("testRequestId", request, listener); Mockito.verify(applicationControllerClient).vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener); + listener, "testRequestorId"); } @Test @@ -133,13 +134,13 @@ public class ApplicationControllerTaskImplTest { Mockito.when(applicationControllerClient.vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), Optional.empty(), - "testControllerType", listener)).thenReturn(new Status()); + "testControllerType", listener, "testRequestorId")).thenReturn(new Status()); Status status = applicationControllerTaskImpl.execute("testRequestId", request, listener); Mockito.verify(applicationControllerClient).vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), Optional.empty(), - "testControllerType", listener); + "testControllerType", listener, "testRequestorId"); } @Test @@ -154,13 +155,13 @@ public class ApplicationControllerTaskImplTest { Mockito.when(applicationControllerClient.vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener)).thenReturn(new Status()); + listener, "testRequestorId")).thenReturn(new Status()); Status status = applicationControllerTaskImpl.execute("testRequestId", request, listener); Mockito.verify(applicationControllerClient).vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener); + listener, "testRequestorId"); } @Test @@ -179,13 +180,13 @@ public class ApplicationControllerTaskImplTest { Mockito.when(applicationControllerClient.vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener)).thenReturn(new Status()); + listener, "testRequestorId")).thenReturn(new Status()); Status status = applicationControllerTaskImpl.execute("testRequestId", request, listener); Mockito.verify(applicationControllerClient).vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener); + listener, "testRequestorId"); } @Test @@ -204,13 +205,13 @@ public class ApplicationControllerTaskImplTest { Mockito.when(applicationControllerClient.vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener)).thenReturn(new Status()); + listener, "testRequestorId")).thenReturn(new Status()); Status status = applicationControllerTaskImpl.execute("testRequestId", request, listener); Mockito.verify(applicationControllerClient).vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener); + listener, "testRequestorId"); } @Test @@ -224,13 +225,13 @@ public class ApplicationControllerTaskImplTest { Mockito.when(applicationControllerClient.vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener)).thenReturn(new Status()); + listener, "testRequestorId")).thenReturn(new Status()); Status status = applicationControllerTaskImpl.execute("testRequestId", request, listener); Mockito.verify(applicationControllerClient).vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener); + listener, "testRequestorId"); } @Test @@ -251,13 +252,13 @@ public class ApplicationControllerTaskImplTest { Mockito.when(applicationControllerClient.vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener)).thenReturn(new Status()); + listener, "testRequestorId")).thenReturn(new Status()); Status status = applicationControllerTaskImpl.execute("testRequestId", request, listener); Mockito.verify(applicationControllerClient).vnfCommand(request.getAction(), "testRequestId", request.getApplicationControllerVnf().getVnfId(), Optional.empty(), payload, "testControllerType", - listener); + listener, "testRequestorId"); } @Test -- cgit 1.2.3-korg