From: BT2983 Date: Mon, 17 Sep 2018 03:30:20 +0000 (-0600) Subject: naming micro-service updates. X-Git-Tag: 0.4.2~160^2~106 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=e136000a5011ca71dd88bd81d5dd48d4c16224bc;p=ccsdk%2Fcds.git naming micro-service updates. More tests, changes for maria DB, support for UUID and timestamp etc. Change-Id: I17bdf3acbe970ef4104f2ec0d59d5777c0a9928e Issue-ID: CCSDK-342 Signed-off-by: BT2983 --- diff --git a/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java b/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java index 58f3ccc30..61b5c50ff 100644 --- a/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java +++ b/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java @@ -48,20 +48,36 @@ public class ControllerBluprintsApplicationTest { private HttpHeaders headers; private ResponseEntity entity; - @Before public void setUp(){ headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); entity = this.restTemplate .exchange("/api/v1/config-model/1", HttpMethod.GET, new HttpEntity<>(headers),ConfigModel.class); - + } @Test public void testConfigModel() { + + HttpHeaders headers = new HttpHeaders(); + headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); + ResponseEntity entity = this.restTemplate + .exchange("/api/v1/config-model/1", HttpMethod.GET, new HttpEntity<>(headers),ConfigModel.class); + assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); Assert.assertNotNull("failed to get response Config model",entity.getBody()); } + @Test + public void testConfigModelFailure() { + + HttpHeaders headers = new HttpHeaders(); + headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); + ResponseEntity entity = this.restTemplate + .exchange("/api/v1/config-model-not-found/1", HttpMethod.GET, new HttpEntity<>(headers),ConfigModel.class); + + assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); + Assert.assertNotNull("failed to get response Config model",entity.getBody()); + } }