From 6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Mon, 31 Dec 2018 17:21:27 +0200 Subject: Merge from ECOMP's repository Main Features -------------- - Async-Instantiation jobs mechanism major update; still WIP (package `org.onap.vid.job`) - New features in View/Edit: Activate fabric configuration; show related networks; soft delete - Support AAI service-tree traversal (`AAIServiceTree`) - In-memory cache for SDC models and certain A&AI queries (`CacheProviderWithLoadingCache`) - Upgrade TOSCA Parser and add parsing options; fix malformed TOSCA models - Resolve Cloud-Owner values for MSO - Pass X-ONAP headers to MSO Infrastructure -------------- - Remove codehaus' jackson mapper; use soley fasterxml 2.9.7 - Surefire invokes both TestNG and JUnit tests - Support Kotlin source files - AaiController2 which handles errors in a "Spring manner" - Inline generated-sources and remove jsonschema2pojo Quality -------- - Cumulative bug fixes (A&AI API, UI timeouts, and many more) - Many Sonar issues cleaned-up - Some unused classes removed - Minor changes in vid-automation project, allowing some API verification to run Hard Merges ------------ - HTTP Clients (MSO, A&AI, WebConfig, OutgoingRequestHeadersTest) - Moved `package org.onap.vid.controllers` to `controller`, without plural -- just to keep semantic sync with ECOMP. Reference commit in ECOMP: 3d1141625 Issue-ID: VID-378 Change-Id: I9c8d1e74caa41815891d441fc0760bb5f29c5788 Signed-off-by: Ittay Stern --- .../onap/vid/controllers/AaiControllerTest.java | 440 --------------------- 1 file changed, 440 deletions(-) delete mode 100644 vid-app-common/src/test/java/org/onap/vid/controllers/AaiControllerTest.java (limited to 'vid-app-common/src/test/java/org/onap/vid/controllers/AaiControllerTest.java') diff --git a/vid-app-common/src/test/java/org/onap/vid/controllers/AaiControllerTest.java b/vid-app-common/src/test/java/org/onap/vid/controllers/AaiControllerTest.java deleted file mode 100644 index 2a398b361..000000000 --- a/vid-app-common/src/test/java/org/onap/vid/controllers/AaiControllerTest.java +++ /dev/null @@ -1,440 +0,0 @@ -package org.onap.vid.controllers; - -import javax.servlet.http.HttpServletRequest; - -import org.json.simple.JSONObject; -import org.junit.Test; -import org.onap.vid.aai.AaiResponse; -import org.onap.vid.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList; -import org.onap.vid.controllers.AaiController; -import org.onap.vid.model.VersionByInvariantIdsRequest; -import org.springframework.http.ResponseEntity; -import org.springframework.web.servlet.ModelAndView; -import java.util.*; -import org.junit.Assert; - -public class AaiControllerTest { - - private AaiController createTestSubject() { - return new AaiController(); - } - - @Test - public void testWelcome() throws Exception { - AaiController testSubject; - HttpServletRequest request = null; - ModelAndView result; - - // default test - testSubject = createTestSubject(); - result = testSubject.welcome(request); - } - - @Test - public void testGetTargetProvStatus() throws Exception { - AaiController testSubject; - ResponseEntity result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getTargetProvStatus(); - } - - @Test - public void testViewEditGetTenantsFromServiceType() throws Exception { - AaiController testSubject; - HttpServletRequest request = null; - String globalCustomerId = ""; - String serviceType = ""; - ResponseEntity result; - - // default test - testSubject = createTestSubject(); - result = testSubject.viewEditGetTenantsFromServiceType(request, globalCustomerId, serviceType); - } - - - - - - @Test - public void testGetAicZones() throws Exception { - AaiController testSubject; - HttpServletRequest request = null; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getAicZones(request); - } catch (Exception e) { - } - } - - @Test - public void testGetAicZoneForPnf() throws Exception { - AaiController testSubject; - String globalCustomerId = ""; - String serviceType = ""; - String serviceId = ""; - HttpServletRequest request = null; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getAicZoneForPnf(globalCustomerId, serviceType, serviceId, request); - } catch (Exception e) { - } - } - - @Test - public void testGetUserID() throws Exception { - AaiController testSubject; - HttpServletRequest request = null; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getUserID(request); - } catch (Exception e) { - } - } - - @Test - public void testDoGetServices() throws Exception { - AaiController testSubject; - HttpServletRequest request = null; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.doGetServices(request); - } catch (Exception e) { - } - } - - @Test - public void testGetVersionByInvariantId() throws Exception { - AaiController testSubject; - HttpServletRequest request = null; - VersionByInvariantIdsRequest versions = null; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getVersionByInvariantId(request, versions); - } catch (Exception e) { - } - } - - // @Test - // public void testAaiResponseToResponseEntity() throws Exception { - // AaiController testSubject;AaiResponse aaiResponseData = null; - // ResponseEntity result; - // - // // default test - // } - - @Test - public void testDoGetServiceInstance() throws Exception { - AaiController testSubject; - String serviceInstanceId = ""; - String serviceInstanceType = ""; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.doGetServiceInstance(serviceInstanceId, serviceInstanceType); - } catch (Exception e) { - } - } - - @Test - public void testDoGetServices_1() throws Exception { - AaiController testSubject; - String globalCustomerId = ""; - String serviceSubscriptionId = ""; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.doGetServices(globalCustomerId, serviceSubscriptionId); - } catch (Exception e) { - } - } - - @Test - public void testDoGetSubscriberList() throws Exception { - AaiController testSubject; - HttpServletRequest request = null; - String fullSet = ""; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.doGetSubscriberList(request, fullSet); - } catch (Exception e) { - } - } - - @Test - public void testGetOperationalEnvironments() throws Exception { - AaiController testSubject; - String operationalEnvironmentType = ""; - String operationalEnvironmentStatus = ""; - AaiResponse result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getOperationalEnvironments(operationalEnvironmentType, operationalEnvironmentStatus); - } catch (Exception e) { - } - } - - @Test - public void testGetFullSubscriberList() throws Exception { - AaiController testSubject; - HttpServletRequest request = null; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getFullSubscriberList(request); - } catch (Exception e) { - } - } - - @Test - public void testGetVnfDataByGlobalIdAndServiceType() throws Exception { - AaiController testSubject; - HttpServletRequest request = null; - String globalCustomerId = ""; - String serviceType = ""; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getVnfDataByGlobalIdAndServiceType(request, globalCustomerId, serviceType); - } catch (Exception e) { - } - } - - @Test - public void testDoRefreshSubscriberList() throws Exception { - AaiController testSubject; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.doRefreshSubscriberList(); - } catch (Exception e) { - } - } - - @Test - public void testDoRefreshFullSubscriberList() throws Exception { - AaiController testSubject; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.doRefreshFullSubscriberList(); - } catch (Exception e) { - } - } - - @Test - public void testGetSubscriberDetails() throws Exception { - AaiController testSubject; - HttpServletRequest request = null; - String subscriberId = ""; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.GetSubscriberDetails(request, subscriberId); - } catch (Exception e) { - } - } - - @Test - public void testSearchServiceInstances() throws Exception { - AaiController testSubject; - HttpServletRequest request = null; - String subscriberId = ""; - String instanceIdentifier = ""; - List projects = null; - List owningEntities = null; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.SearchServiceInstances(request, subscriberId, instanceIdentifier, projects, - owningEntities); - } catch (Exception e) { - } - } - - @Test - public void testViewEditGetComponentList() throws Exception { - AaiController testSubject; - String namedQueryId = ""; - String globalCustomerId = ""; - String serviceType = ""; - String serviceInstance = ""; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.viewEditGetComponentList(namedQueryId, globalCustomerId, serviceType, serviceInstance); - } catch (Exception e) { - } - } - - @Test - public void testGetVnfData() throws Exception { - AaiController testSubject; - String globalCustomerId = ""; - String serviceType = ""; - String serviceInstanceId = ""; - AaiResponse result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getVnfData(globalCustomerId, serviceType, serviceInstanceId); - } catch (Exception e) { - } - } - - @Test - public void testViewEditGetComponentList_1() throws Exception { - AaiController testSubject; - String namedQueryId = ""; - String globalCustomerId = ""; - String serviceType = ""; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.viewEditGetComponentList(namedQueryId, globalCustomerId, serviceType); - } catch (Exception e) { - } - } - - @Test - public void testGetNodeTemplateInstances() throws Exception { - AaiController testSubject; - String globalCustomerId = ""; - String serviceType = ""; - String modelVersionId = ""; - String modelInvariantId = ""; - String cloudRegion = ""; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getNodeTemplateInstances(globalCustomerId, serviceType, modelVersionId, - modelInvariantId, cloudRegion); - } catch (Exception e) { - } - } - - @Test - public void testGetByUri() throws Exception { - AaiController testSubject; - HttpServletRequest request = null; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getByUri(request); - } catch (Exception e) { - } - } - - @Test - public void testGetSpecificConfiguration() throws Exception { - AaiController testSubject; - String configurationId = ""; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getSpecificConfiguration(configurationId); - } catch (Exception e) { - } - } - - @Test - public void testGetServiceInstanceAssociatedPnfs() throws Exception { - AaiController testSubject; - String globalCustomerId = ""; - String serviceType = ""; - String serviceInstanceId = ""; - List result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getServiceInstanceAssociatedPnfs(globalCustomerId, serviceType, serviceInstanceId); - } catch (Exception e) { - } - } - - @Test - public void testGetSpecificPnf() throws Exception { - AaiController testSubject; - String pnfId = ""; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getSpecificPnf(pnfId); - } catch (Exception e) { - } - } - - @Test - public void testGetPnfInstances() throws Exception { - AaiController testSubject; - String globalCustomerId = ""; - String serviceType = ""; - String modelVersionId = ""; - String modelInvariantId = ""; - String cloudRegion = ""; - String equipVendor = ""; - String equipModel = ""; - ResponseEntity result; - - // default test - try { - testSubject = createTestSubject(); - result = testSubject.getPnfInstances(globalCustomerId, serviceType, modelVersionId, modelInvariantId, - cloudRegion, equipVendor, equipModel); - } catch (Exception e) { - } - - } - -} \ No newline at end of file -- cgit 1.2.3-korg