summaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/test/java
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2018-10-26 08:46:00 -0500
committerJorge Hernandez <jorge.hernandez-herrero@att.com>2018-10-26 08:46:00 -0500
commitffb54325630df1550f76d72af9978186630db221 (patch)
tree485f5b7e48317a9585c6843bd6daeca1ab2de1e7 /policy-endpoints/src/test/java
parent90d0f3580cad4d2e3711e95088d6e01a2ba93728 (diff)
Detection of AAF enablement3.0.0-ONAP
Change-Id: I049e88bec2c83f6224ba1d1f24b93e0fb1aa807e Issue-ID: POLICY-1216 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'policy-endpoints/src/test/java')
-rw-r--r--policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java5
1 files changed, 5 insertions, 0 deletions
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);
}