aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test
diff options
context:
space:
mode:
authorEinat Vinouze <einat.vinouze@intl.att.com>2019-10-30 09:43:24 +0200
committerEylon Malin <eylon.malin@intl.att.com>2019-10-31 07:28:34 +0200
commit62f48357131b8b4cd7248a467e82c59b81956ef3 (patch)
tree89e92d8e4a4f0f29a255d38d298fb9647adbbb82 /vid-app-common/src/test
parentc638391d22999bd61243794a1981d7476bfdbd5f (diff)
add to AAI headers in request and metric log
Issue-ID: VID-253 Including API test + use VidMetricLogClientFilter Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com> Change-Id: I62980b3c88e941d1a47b03c75a1c837078e1988b
Diffstat (limited to 'vid-app-common/src/test')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/mso/rest/OutgoingRequestHeadersTest.java36
1 files changed, 0 insertions, 36 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/OutgoingRequestHeadersTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/OutgoingRequestHeadersTest.java
index fd66dab52..f03b89722 100644
--- a/vid-app-common/src/test/java/org/onap/vid/mso/rest/OutgoingRequestHeadersTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/OutgoingRequestHeadersTest.java
@@ -65,7 +65,6 @@ import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.onap.portalsdk.core.util.SystemProperties;
-import org.onap.vid.aai.util.AAIRestInterface;
import org.onap.vid.aai.util.HttpsAuthClient;
import org.onap.vid.aai.util.ServletRequestHelper;
import org.onap.vid.aai.util.SystemPropertyHelper;
@@ -77,7 +76,6 @@ import org.onap.vid.mso.RestMsoImplementation;
import org.onap.vid.testUtils.TestUtils;
import org.onap.vid.utils.Logging;
import org.onap.vid.utils.SystemPropertiesWrapper;
-import org.onap.vid.utils.Unchecked;
import org.springframework.http.HttpMethod;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.web.context.request.RequestContextHolder;
@@ -115,9 +113,6 @@ public class OutgoingRequestHeadersTest {
@Mock
SyncRestClient syncRestClient;
- @InjectMocks
- private AAIRestInterface aaiRestInterface;
-
@Captor
private ArgumentCaptor<MultivaluedMap<String, Object>> multivaluedMapArgumentCaptor;
@@ -217,37 +212,6 @@ public class OutgoingRequestHeadersTest {
return headersCapture;
}
- @DataProvider
- public Object[][] aaiMethods() {
- return Stream.<ThrowingConsumer<AAIRestInterface>>of(
-
- client -> client.RestGet("from app id", "some transId", Unchecked.toURI("/any path"), false),
- client -> client.RestPost("from app id", "/any path", "some payload", false),
- client -> client.doRest("from app id", "some transId", Unchecked.toURI("/any path"), "somebody", HttpMethod.GET, false, true),
- client -> client.RestPut("from app id", "/any path", "some payload", false, false)
-
- ).map(l -> ImmutableList.of(l).toArray()).collect(Collectors.toList()).toArray(new Object[][]{});
- }
-
- @Test(dataProvider = "aaiMethods")
- public void aai(Consumer<AAIRestInterface> f) throws Exception {
- //given
- final TestUtils.JavaxRsClientMocks mocks = setAndGetMocksInsideRestImpl(aaiRestInterface);
- //when
- f.accept(aaiRestInterface);
- //then
- HeadersVerifier headersVerifier = new HeadersVerifier().verifyFirstCall(mocks.getFakeBuilder());
-
- //verify requestId is same in next call but invocationId is different
- //given
- final TestUtils.JavaxRsClientMocks mocks2 = setAndGetMocksInsideRestImpl(aaiRestInterface);
- //when
- f.accept(aaiRestInterface);
- //then
- headersVerifier.verifySecondCall(mocks2.getFakeBuilder());
-
- }
-
// @Test(dataProvider = "schedulerMethods")
// public void scheduler(Consumer<AAIRestInterface> f) throws Exception {
//