aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test/java/org/onap
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-10-06 12:58:38 +0300
committerIttay Stern <ittay.stern@att.com>2019-10-06 12:59:37 +0300
commit4617855cbc9c83289062c17d3be5a39a4ead48ff (patch)
tree271488ab6a61e8f4183a1f7f38882bb12c0f0d02 /vid-app-common/src/test/java/org/onap
parent69257dc9c6f3e04b677eecffbf8f3ebb535b0be1 (diff)
Add partner-name header sending to SDC
Issue-ID: VID-253 Change-Id: I471ceea513b62f5bc83f8496e15b647f7d888926 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/test/java/org/onap')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/asdc/rest/SdcRestClientITTest.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/rest/SdcRestClientITTest.java b/vid-app-common/src/test/java/org/onap/vid/asdc/rest/SdcRestClientITTest.java
index fd946ebde..7cbf0805b 100644
--- a/vid-app-common/src/test/java/org/onap/vid/asdc/rest/SdcRestClientITTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/asdc/rest/SdcRestClientITTest.java
@@ -24,10 +24,14 @@ import static com.xebialabs.restito.semantics.Action.ok;
import static com.xebialabs.restito.semantics.Action.stringContent;
import static org.apache.http.client.config.RequestConfig.custom;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.hasItems;
+import static org.hamcrest.Matchers.allOf;
+import static org.hamcrest.Matchers.equalToIgnoringCase;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.matchesPattern;
import static org.hamcrest.collection.IsIterableContainingInOrder.contains;
+import static org.hamcrest.collection.IsMapContaining.hasEntry;
+import static org.hamcrest.collection.IsMapContaining.hasKey;
+import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.onap.vid.client.SyncRestClientInterface.HEADERS.X_ECOMP_INSTANCE_ID;
@@ -125,10 +129,12 @@ public class SdcRestClientITTest {
assertTrue(first.isPresent());
- assertThat(first.get().getHeaders().keySet(),
- hasItems(X_ECOMP_INSTANCE_ID.toLowerCase(), REQUEST_ID_HEADER_KEY.toLowerCase()));
- assertThat(first.get().getHeaders().get(REQUEST_ID_HEADER_KEY.toLowerCase()).get(0),
- matchesPattern(UUID_REGEX));
+ assertThat(first.get().getHeaders(),
+ allOf(
+ hasEntry(equalToIgnoringCase(REQUEST_ID_HEADER_KEY), contains(matchesPattern(UUID_REGEX))),
+ hasKey(equalToIgnoringCase(X_ECOMP_INSTANCE_ID)),
+ hasEntry(equalToIgnoringCase("x-onap-partnerName"), contains(equalTo("VID.VID")))
+ ));
}
private Service getExpectedService(String stringId) {