diff options
author | 2019-05-31 11:48:34 -0400 | |
---|---|---|
committer | 2019-05-31 11:48:47 -0400 | |
commit | a5af334f3b70d927565c33390807d5c49593822e (patch) | |
tree | 460d2272b7c3f53c7182344f9cdf28f6a3e8f615 /mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java | |
parent | ec71f01963e4c5c70d11f41842c7cd9cfd38316d (diff) |
apih to populate original request id
Updated schema.sql to fix failing tests
Added constants for request parameters
Added originalRequestId to be saved on resume request
Added originalRequestId to orchestrationRequests response
Change-Id: If2b86d233ee3db9bbe0e1185d92874bca2b3a07a
Issue-ID: SO-1960
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java')
-rw-r--r-- | mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java index e80fd9e690..b9d9974701 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java @@ -40,6 +40,7 @@ public class RequestHandlerUtilsUnitTest { private RequestHandlerUtils requestHandler; private static final String CURRENT_REQUEST_ID = "eca3a1b1-43ab-457e-ab1c-367263d148b4"; + private static final String RESUMED_REQUEST_ID = "59c7247f-839f-4923-90c3-05faa3ab354d"; private static final String SERVICE_INSTANCE_ID = "00032ab7-na18-42e5-965d-8ea592502018"; private final Timestamp startTimeStamp = new Timestamp(System.currentTimeMillis()); private String requestUri = @@ -88,6 +89,7 @@ public class RequestHandlerUtilsUnitTest { currentActiveRequest.setRequestUrl(requestUri); currentActiveRequest.setRequestorId("xxxxxx"); currentActiveRequest.setProgress(new Long(5)); + currentActiveRequest.setOriginalRequestId(RESUMED_REQUEST_ID); } private void setCurrentActiveRequestNullInfraActive() throws IOException { @@ -99,20 +101,21 @@ public class RequestHandlerUtilsUnitTest { currentActiveRequestIARNull.setRequestUrl(requestUri); currentActiveRequestIARNull.setRequestorId("xxxxxx"); currentActiveRequestIARNull.setProgress(new Long(5)); + currentActiveRequestIARNull.setOriginalRequestId(RESUMED_REQUEST_ID); } @Test public void createNewRecordCopyFromInfraActiveRequestTest() { InfraActiveRequests result = requestHandler.createNewRecordCopyFromInfraActiveRequest(infraActiveRequest, - CURRENT_REQUEST_ID, startTimeStamp, "VID", requestUri, "xxxxxx"); + CURRENT_REQUEST_ID, startTimeStamp, "VID", requestUri, "xxxxxx", RESUMED_REQUEST_ID); assertThat(currentActiveRequest, sameBeanAs(result)); } @Test public void createNewRecordCopyFromInfraActiveRequestNullIARTest() { InfraActiveRequests result = requestHandler.createNewRecordCopyFromInfraActiveRequest(null, CURRENT_REQUEST_ID, - startTimeStamp, "VID", requestUri, "xxxxxx"); + startTimeStamp, "VID", requestUri, "xxxxxx", RESUMED_REQUEST_ID); assertThat(currentActiveRequestIARNull, sameBeanAs(result)); } } |