diff options
author | waqas.ikram <waqas.ikram@est.tech> | 2019-08-08 15:57:14 +0000 |
---|---|---|
committer | Waqas Ikram <waqas.ikram@est.tech> | 2019-08-08 15:57:30 +0000 |
commit | c44a753af3693cc67de62f8fea2c93cf17c070dc (patch) | |
tree | 355bf85f70c168633c6437c70346266208ed0b85 /plans/so/integration-etsi-testing/so-simulators/aai-simulator/src/test | |
parent | 1b878eb83fa02ce13c3391ba2ccdaba42111e667 (diff) |
Adding correct user in aai simulator
Plus Fixing belows issues
- NullpointerException in aai simulator
- Service Type update in catalogdb
- OutputRequest format in sdnc simulator
Change-Id: I87c8b814e93cf9bc83b62e90b868c603a15a5560
Issue-ID: SO-1953
Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
Diffstat (limited to 'plans/so/integration-etsi-testing/so-simulators/aai-simulator/src/test')
-rw-r--r-- | plans/so/integration-etsi-testing/so-simulators/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/BusinessControllerTest.java | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/plans/so/integration-etsi-testing/so-simulators/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/BusinessControllerTest.java b/plans/so/integration-etsi-testing/so-simulators/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/BusinessControllerTest.java index ef49716a..e7d07859 100644 --- a/plans/so/integration-etsi-testing/so-simulators/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/BusinessControllerTest.java +++ b/plans/so/integration-etsi-testing/so-simulators/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/BusinessControllerTest.java @@ -192,7 +192,7 @@ public class BusinessControllerTest { invokeHttpPut(url, getServiceInstance()); final String serviceInstanceUrl = getCustomerEndPointUrl() + SERVICE_SUBSCRIPTIONS_URL + SERVICE_INSTANCES_URL - + "?service-instance-name=" + SERVICE_NAME; + + "?depth=2&service-instance-name=" + SERVICE_NAME; final ResponseEntity<ServiceInstances> actual = restTemplate.exchange(serviceInstanceUrl, HttpMethod.GET, new HttpEntity<>(getHttpHeaders()), ServiceInstances.class); @@ -208,6 +208,28 @@ public class BusinessControllerTest { } @Test + public void test_getSericeInstance_usingServiceInstanceName_returnRequestErrorIfnoServiceInstanceFound() + throws Exception { + + + final ResponseEntity<Void> response = invokeHttpPut(getCustomerEndPointUrl(), getCustomer()); + + assertEquals(HttpStatus.ACCEPTED, response.getStatusCode()); + + final String serviceInstanceUrl = getCustomerEndPointUrl() + SERVICE_SUBSCRIPTIONS_URL + SERVICE_INSTANCES_URL + + "?depth=2&service-instance-name=" + SERVICE_NAME; + + final ResponseEntity<RequestError> actual = restTemplate.exchange(serviceInstanceUrl, HttpMethod.GET, + new HttpEntity<>(getHttpHeaders()), RequestError.class); + + assertEquals(HttpStatus.NOT_FOUND, actual.getStatusCode()); + assertTrue(actual.hasBody()); + + assertNotNull(actual.getBody().getServiceException()); + + } + + @Test public void test_getSericeInstance_usingServiceInstanceId_ableToRetrieveServiceInstanceFromCache() throws Exception { |