PDP-X guard url is retrieved incorrectly. 25/88025/2
authorjhh <jorge.hernandez-herrero@att.com>
Fri, 17 May 2019 19:04:48 +0000 (14:04 -0500)
committerjhh <jorge.hernandez-herrero@att.com>
Fri, 17 May 2019 20:01:12 +0000 (15:01 -0500)
Change-Id: Ibf3df9288268ca7c8edfc9007e15c31802a4e5e1
Issue-ID: POLICY-1780
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java
controlloop/common/guard/src/main/java/org/onap/policy/guard/Util.java
controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardXacmlHelperTest.java

index 8ff226f..fc9a243 100644 (file)
@@ -50,7 +50,7 @@ public class PolicyGuardXacmlHelper {
      *  Constructor.
      */
     public PolicyGuardXacmlHelper() {
-        this.url = PolicyEngine.manager.getEnvironmentProperty("pdpx.host");
+        this.url = PolicyEngine.manager.getEnvironmentProperty("guard.url");
         this.user = PolicyEngine.manager.getEnvironmentProperty("pdpx.username");
         this.pwd = PolicyEngine.manager.getEnvironmentProperty("pdpx.password");
     }
index e378b61..d859fbe 100644 (file)
@@ -39,7 +39,7 @@ public final class Util {
     /*
      * Keys for guard properties
      */
-    public static final String PROP_GUARD_URL = "pdpx.host";
+    public static final String PROP_GUARD_URL = "guard.url";
     public static final String PROP_GUARD_USER = "pdpx.username";
     public static final String PROP_GUARD_PASS = "pdpx.password";
     public static final String PROP_GUARD_DISABLED = "guard.disabled";
index 25d602f..2418ac6 100644 (file)
@@ -45,6 +45,7 @@ public class PolicyGuardXacmlHelperTest {
         LoggerUtil.setLevel("ROOT", "INFO");
         LoggerUtil.setLevel("org.eclipse.jetty", "WARN");
         try {
+            HttpServletServer.factory.destroy();
             org.onap.policy.simulators.Util.buildGuardSim();
         } catch (Exception e) {
             fail(e.getMessage());