From 1414f938b6fb86e6a15f3dfb9080f90f5d78b292 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Thu, 14 Mar 2019 21:06:49 -0400 Subject: Saved vnfOperationalEnvironmentId to be used later Removed unnecessary lines in junit test class. Saved vnfOperationalEnvironmentId to the model table to be used for AAI status update call later. Change-Id: I812d21d483d716bb5135c408369a160e4600efc2 Issue-ID: SO-1662 Signed-off-by: Benjamin, Max (mb388a) --- .../org/onap/so/db/request/OperationalEnvServiceModelStatusTest.java | 3 +++ .../mso-requests-db-repositories/src/test/resources/schema.sql | 1 + 2 files changed, 4 insertions(+) (limited to 'mso-api-handlers/mso-requests-db-repositories/src') diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/OperationalEnvServiceModelStatusTest.java b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/OperationalEnvServiceModelStatusTest.java index 9eec860cc9..f1f26fa7cc 100644 --- a/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/OperationalEnvServiceModelStatusTest.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/OperationalEnvServiceModelStatusTest.java @@ -51,12 +51,14 @@ public class OperationalEnvServiceModelStatusTest { status.setRequestId("request-id-1"); status.setOperationalEnvId("oper-env-id-1"); status.setServiceModelVersionId("service-model-ver-id-1"); + status.setVnfOperationalEnvId("vnf-oper-env-id-1"); status.setRetryCount(0); repository.saveAndFlush(status); OperationalEnvServiceModelStatus status2 = repository.findOneByOperationalEnvIdAndServiceModelVersionIdAndRequestId("oper-env-id-1", "service-model-ver-id-1", "request-id-1"); status2.setRetryCount(1); assertEquals("request-id-1", status2.getRequestId()); + assertEquals("vnf-oper-env-id-1", status2.getVnfOperationalEnvId()); repository.saveAndFlush(status2); @@ -65,6 +67,7 @@ public class OperationalEnvServiceModelStatusTest { status3.setRequestId("request-id-2"); status3.setOperationalEnvId("oper-env-id-1"); status3.setServiceModelVersionId("service-model-ver-id-2"); + status3.setVnfOperationalEnvId("vnf-oper-env-id-2"); status3.setRetryCount(2); repository.saveAndFlush(status3); diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql index 4ff7025dee..2bd9936b3a 100644 --- a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql @@ -9,6 +9,7 @@ create table ACTIVATE_OPERATIONAL_ENV_SERVICE_MODEL_DISTRIBUTION_STATUS ( WORKLOAD_CONTEXT varchar(255), CREATE_TIME datetime, MODIFY_TIME datetime, + VNF_OPERATIONAL_ENV_ID varchar(255) not null, primary key (REQUEST_ID,OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID) ); -- cgit 1.2.3-korg