diff options
author | William Reehil <william.reehil@att.com> | 2021-08-24 15:19:12 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-08-24 15:19:12 +0000 |
commit | 8fee89a23ace47c64f2a49dfe078d3def93d995c (patch) | |
tree | d6169225d7c7d05933e2473a929525b92347c848 /aai-traversal/src/test | |
parent | 326f7ec066ed555b6c320e4cbee23fd186887201 (diff) | |
parent | 9897b61766f53cf02d92d5debd9ec2457fb2750d (diff) |
Merge "[AAI] Integrate Micrometer to identify slow APIs (Making aai_uri tag configurable)"
Diffstat (limited to 'aai-traversal/src/test')
-rw-r--r-- | aai-traversal/src/test/java/org/onap/aai/rest/ConfigurationTest.java | 5 | ||||
-rw-r--r-- | aai-traversal/src/test/resources/application-test.properties | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/aai-traversal/src/test/java/org/onap/aai/rest/ConfigurationTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/ConfigurationTest.java index 891956d..5294f24 100644 --- a/aai-traversal/src/test/java/org/onap/aai/rest/ConfigurationTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/rest/ConfigurationTest.java @@ -40,6 +40,7 @@ import java.util.Collections; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertFalse; /** * Test REST requests against configuration resource @@ -86,9 +87,11 @@ public class ConfigurationTest extends AbstractSpringRestTest { responseEntity = restTemplate.exchange(actuatorurl + "/actuator/prometheus", HttpMethod.GET, httpEntity, String.class); responseBody = (String) responseEntity.getBody(); assertEquals(HttpStatus.OK, responseEntity.getStatusCode()); - assertTrue(responseBody.contains("app_id")); + System.out.println("responseBody---------" + responseBody); + assertFalse(responseBody.contains("aai_uri")); assertTrue(responseBody.contains("group_id")); + //Set Accept as MediaType.APPLICATION_JSON in order to get access of endpoint "/actuator/info" and "/actuator/health" headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); httpEntity = new HttpEntity<String>(headers); diff --git a/aai-traversal/src/test/resources/application-test.properties b/aai-traversal/src/test/resources/application-test.properties index 2e333ae..3fa141f 100644 --- a/aai-traversal/src/test/resources/application-test.properties +++ b/aai-traversal/src/test/resources/application-test.properties @@ -86,4 +86,5 @@ schema.translator.list=config management.server.port=0 management.endpoints.enabled-by-default=true management.endpoints.web.exposure.include=info, health, prometheus -management.metrics.web.server.auto-time-requests=false
\ No newline at end of file +management.metrics.web.server.auto-time-requests=false +scrape.uri.metrics=true
\ No newline at end of file |