From b427536834654c1a2e8677496657276e7b6f5ec0 Mon Sep 17 00:00:00 2001 From: "Kajur, Harish (vk250x)" Date: Wed, 11 Apr 2018 00:14:14 -0400 Subject: Fix the basic auth issue which got broken with spring boot Issue-ID: AAI-1020 Change-Id: If99add1e401284c505bfebccfe82a94694da1a4b Signed-off-by: Kajur, Harish (vk250x) --- aai-traversal/src/test/java/org/onap/aai/AAIGremlinQueryTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'aai-traversal/src/test') diff --git a/aai-traversal/src/test/java/org/onap/aai/AAIGremlinQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/AAIGremlinQueryTest.java index 2a7f2c6..a2be3d0 100644 --- a/aai-traversal/src/test/java/org/onap/aai/AAIGremlinQueryTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/AAIGremlinQueryTest.java @@ -38,10 +38,7 @@ import org.springframework.web.client.RestTemplate; import javax.ws.rs.core.Response; import java.io.UnsupportedEncodingException; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; +import java.util.*; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; @@ -105,6 +102,9 @@ public class AAIGremlinQueryTest { headers.add("X-FromAppId", "JUNIT"); headers.add("X-TransactionId", "JUNIT"); + String authorization = Base64.getEncoder().encodeToString("AAI:AAI".getBytes("UTF-8")); + headers.add("Authorization", "Basic " + authorization); + baseUrl = "https://localhost:" + randomPort; } -- cgit 1.2.3-korg