Build fails when build host running web server 07/44007/1
authorliamfallon <liam.fallon@ericsson.com>
Fri, 20 Apr 2018 20:08:12 +0000 (21:08 +0100)
committerliamfallon <liam.fallon@ericsson.com>
Fri, 20 Apr 2018 20:14:46 +0000 (21:14 +0100)
If the host on which the policy engine is running a web server that
respoonds with a HTTP response on the URL "http://localhost", the build
fails because one of the tests in ONAP-XACML expects a ConnectException
on this URL. When the URL returns a valid respose the test fails causing
the buld to fail.

This fix changes the URL to "http://localhost:54287", which I guess could
also exist but is much less liekly to exist.

Change-Id: I2f80d12a80d29a9bc7b2067f35c286f01c4d9550
Issue-ID: POLICY-700
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java

index ed7db3b..cf293be 100644 (file)
@@ -111,7 +111,7 @@ public class StdPDPPolicyTest {
   public void negTestStream() throws URISyntaxException, IOException, PAPException {
     // Set up test data
     String value = "testVal";
-    URI uri = new URI("http://localhost/");
+    URI uri = new URI("http://localhost:54287");
     StdPDPPolicy policy = new StdPDPPolicy(value, true, value, uri, false, value, value, "1");
 
     // Negative test stream
@@ -122,7 +122,7 @@ public class StdPDPPolicyTest {
   public void negTestConstructor1() throws URISyntaxException, IOException {
     // Set up test data
     String value = "testVal";
-    URI uri = new URI("http://localhost/");
+    URI uri = new URI("http://localhost:54287");
 
     // Test constructor
     StdPDPPolicy policy = new StdPDPPolicy(value, true, value, uri);
@@ -133,7 +133,7 @@ public class StdPDPPolicyTest {
   public void negTestConstructor2() throws URISyntaxException, IOException {
     // Set up test data
     String value = "testVal";
-    URI uri = new URI("http://localhost/");
+    URI uri = new URI("http://localhost:54287");
     Properties props = new Properties();
 
     // Test constructor