From ffb54325630df1550f76d72af9978186630db221 Mon Sep 17 00:00:00 2001 From: Jorge Hernandez Date: Fri, 26 Oct 2018 08:46:00 -0500 Subject: Detection of AAF enablement Change-Id: I049e88bec2c83f6224ba1d1f24b93e0fb1aa807e Issue-ID: POLICY-1216 Signed-off-by: Jorge Hernandez --- .../policy/common/endpoints/http/server/test/HttpServerTest.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java') diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java index 4552109d..084847ce 100644 --- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java +++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java @@ -21,6 +21,7 @@ package org.onap.policy.common.endpoints.http.server.test; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.io.BufferedReader; @@ -56,6 +57,7 @@ public class HttpServerTest { server.waitedStart(5000); assertTrue(HttpServletServer.factory.get(5678).isAlive()); + assertFalse(HttpServletServer.factory.get(5678).isAaf()); String response = http(HttpServletServer.factory.get(5678), "http://localhost:5678/junit/echo/hello"); assertTrue("hello".equals(response)); @@ -74,6 +76,9 @@ public class HttpServerTest { assertTrue(HttpServletServer.factory.get(5678).isAlive()); assertTrue(HttpServletServer.factory.inventory().size() == 1); + server.setAafAuthentication("/*"); + assertTrue(HttpServletServer.factory.get(5678).isAaf()); + HttpServletServer.factory.destroy(5678); assertTrue(HttpServletServer.factory.inventory().size() == 0); } -- cgit 1.2.3-korg