diff options
author | Sambasiva K <sambasiva.kokkirala@verizon.com> | 2020-02-27 16:42:36 +0530 |
---|---|---|
committer | sambasiva k <sambasiva.kokkirala@verizon.com> | 2020-02-27 16:42:36 +0530 |
commit | 2363c37d07e37317252e843c28f410519f83588d (patch) | |
tree | d195a14bfea9104732861042aa31e7b39c1ca59b /adapters/mso-requests-db-adapter/src/test | |
parent | 8151f09eb4db8bf30b96722d710c952bb5a43445 (diff) |
Modification of VFC adapter code to make it SOL005 compliant
Change-Id: Ife06298197bed8c1e3766083c7bec39132610f84
Issue-ID: SO-1579
Signed-Off-by: Sambasiva K<sambasiva.kokkirala@verizon.com>
Diffstat (limited to 'adapters/mso-requests-db-adapter/src/test')
-rw-r--r-- | adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java index fef9dbc22c..9ded5b4b79 100644 --- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java @@ -39,8 +39,10 @@ import org.onap.so.adapters.requestsdb.exceptions.MsoRequestsDbException; import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.db.request.beans.OperationStatus; import org.onap.so.db.request.beans.ResourceOperationStatus; +import org.onap.so.db.request.beans.InstanceNfvoMapping; import org.onap.so.db.request.data.repository.OperationStatusRepository; import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository; +import org.onap.so.db.request.data.repository.InstanceNfvoMappingRepository; import org.onap.so.requestsdb.RequestsDbConstant; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.server.LocalServerPort; @@ -58,6 +60,9 @@ public class MSORequestDBImplTest extends RequestsAdapterBase { @Autowired private ResourceOperationStatusRepository resourceOperationStatusRepo; + @Autowired + private InstanceNfvoMappingRepository instanceNfvoMappingRepository; + @Rule public ExpectedException thrown = ExpectedException.none(); @@ -257,6 +262,29 @@ public class MSORequestDBImplTest extends RequestsAdapterBase { } @Test + public void setInstanceNfvoMappingRepository() throws MsoRequestsDbException { + InstanceNfvoMapping instanceNfvoMapping = new InstanceNfvoMapping(); + String instanceId = "9b9f02c0-298b-458a-bc9c-be3692e4f354"; + String nfvoName = "testNFVO"; + String endpoint = "http://127.0.0.1:80/"; + String username = "admin"; + String password = "admin"; + String apiRoot = "v1"; + + instanceNfvoMapping.setApiRoot(apiRoot); + instanceNfvoMapping.setEndpoint(endpoint); + instanceNfvoMapping.setInstanceId(instanceId); + instanceNfvoMapping.setNfvoName(nfvoName); + instanceNfvoMapping.setUsername(username); + instanceNfvoMapping.setPassword(password); + + dbAdapter.setInstanceNfvoMappingRepository(instanceId, nfvoName, endpoint, username, password, apiRoot); + InstanceNfvoMapping dbInstNfvoMap = dbAdapter.getInstanceNfvoMapping(instanceId); + assertThat(dbInstNfvoMap, sameBeanAs(instanceNfvoMapping)); + } + + + @Test public void updateServiceOperation() throws MsoRequestsDbException { String serviceId = "serviceid"; String operationId = "operationid"; |