diff options
author | Plummer, Brittany <brittany.plummer@att.com> | 2020-10-21 11:29:18 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2020-10-21 11:29:19 -0400 |
commit | 7a2c68f4a2a0d297749bda79d2697de468c9cf6d (patch) | |
tree | cd196cb4d877d22831b71b1ef4ddab7256f2ac1a /mso-api-handlers/mso-api-handler-infra/src/test | |
parent | 623dbe5cf31cec13c3c6eec7b74791682eb3b731 (diff) |
so does not capture the vnf name
Add requestid to return headers to audit filter
Added catch for exceptions from validators
Removed unused test file
Updated validation unit test
Updated transactionId header assertion in failing test
Updated assertion as validator order changes
Updated assertions to check for requestId
Issue-ID: SO-3325
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I246d9e371346639b4c4ea2b99add1d891af96b8e
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test')
2 files changed, 5 insertions, 1 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java index 33d86a2cc6..d43bbb6ea0 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java @@ -1498,6 +1498,8 @@ public class ServiceInstancesTest extends BaseTest { sendRequest(inputStream("/VfModuleNoModelType.json"), uri, HttpMethod.POST, headers); // ActualRecord assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value()); + assertEquals("32807a28-1a14-4b88-b7b3-2950918aa76d", + response.getHeaders().get(ONAPLogConstants.Headers.REQUEST_ID).get(0)); } @Test diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java index 1917ee592f..db9f45e3ac 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java @@ -31,6 +31,7 @@ import javax.ws.rs.core.MediaType; import org.apache.http.HttpStatus; import org.junit.Before; import org.junit.Test; +import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.onap.so.apihandlerinfra.BaseTest; import org.onap.so.db.request.beans.InfraActiveRequests; import org.springframework.http.HttpEntity; @@ -212,6 +213,7 @@ public class CloudResourcesOrchestrationTest extends BaseTest { .withStatus(HttpStatus.SC_OK))); headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); + headers.set(ONAPLogConstants.Headers.REQUEST_ID, "e0e0e749-c9e2-48c3-8c4c-d51bf65a86c9"); HttpEntity<String> entity = new HttpEntity<>("", headers); UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1"); @@ -226,7 +228,7 @@ public class CloudResourcesOrchestrationTest extends BaseTest { assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0)); assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0)); assertEquals("1.0.0", response.getHeaders().get("X-LatestVersion").get(0)); - assertEquals("90c56827-1c78-4827-bc4d-6afcdb37a51f", response.getHeaders().get("X-TransactionID").get(0)); + assertEquals("e0e0e749-c9e2-48c3-8c4c-d51bf65a86c9", response.getHeaders().get("X-TransactionID").get(0)); } @Test |