summaryrefslogtreecommitdiffstats
path: root/common/src/test/java/org/onap
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-02-22 17:51:42 -0500
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-02-22 17:51:56 -0500
commit57af0e334073b329ca9f48b353ab4cc3bd2027a8 (patch)
tree8df57e53bc98bec68b3fa12e7c0ab3694f71c994 /common/src/test/java/org/onap
parent3163cdda24894994dbfa834dbf530bea71e076ba (diff)
remove payload logging from metric/audit side
fixed unit test after changing how entities are read remove payload logging from metric/audit side Change-Id: Ibfe7cf96c76920926e9ae9ce5041389324d09b46 Issue-ID: SO-1564 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'common/src/test/java/org/onap')
-rw-r--r--common/src/test/java/org/onap/so/client/aai/AAIResourcesClientTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/common/src/test/java/org/onap/so/client/aai/AAIResourcesClientTest.java b/common/src/test/java/org/onap/so/client/aai/AAIResourcesClientTest.java
index a55fbc9517..73fbff6e4f 100644
--- a/common/src/test/java/org/onap/so/client/aai/AAIResourcesClientTest.java
+++ b/common/src/test/java/org/onap/so/client/aai/AAIResourcesClientTest.java
@@ -35,6 +35,7 @@ import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
+import javax.ws.rs.BadRequestException;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -207,6 +208,23 @@ public class AAIResourcesClientTest {
}
@Test
+ public void verifyFailedCallException() {
+ AAIResourceUri path = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test");
+ wireMockRule.stubFor(get(
+ urlPathEqualTo("/aai/" + AAIVersion.LATEST + path.build()))
+ .willReturn(
+ aResponse()
+ .withHeader("Content-Type", "text/plain")
+ .withBodyFile("aai/error-message.json")
+ .withStatus(400)));
+ AAIResourcesClient client= aaiClient;
+
+ thrown.expect(BadRequestException.class);
+ thrown.expectMessage(containsString("Invalid input performing PUT on url (msg=Precondition Required:resource-version not passed for update of url"));
+ AAIResultWrapper result = client.get(path);
+ }
+
+ @Test
public void buildRelationshipTest() {
AAIResourcesClient client = aaiClient;
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test");