brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geom...@apache.org
Subject [3/4] brooklyn-server git commit: Fix PolicyResourceTest.testGetConfigValue
Date Mon, 10 Jul 2017 13:11:52 GMT
Fix PolicyResourceTest.testGetConfigValue


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/829e495b
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/829e495b
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/829e495b

Branch: refs/heads/master
Commit: 829e495bbfeba6bb50a8e5d4ee9214324e6713fd
Parents: cfb0874
Author: Ivana Yovcheva <ivana.yovcheva@gmail.com>
Authored: Wed Jul 5 10:40:32 2017 +0300
Committer: Ivana Yovcheva <ivana.yovcheva@gmail.com>
Committed: Wed Jul 5 10:40:32 2017 +0300

----------------------------------------------------------------------
 .../org/apache/brooklyn/rest/resources/PolicyConfigResource.java   | 2 +-
 .../org/apache/brooklyn/rest/resources/PolicyResourceTest.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/829e495b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/PolicyConfigResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/PolicyConfigResource.java
b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/PolicyConfigResource.java
index 2f6e60d..b362223 100644
--- a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/PolicyConfigResource.java
+++ b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/PolicyConfigResource.java
@@ -66,7 +66,7 @@ public class PolicyConfigResource extends AbstractBrooklynRestResource implement
             ((BrooklynObjectInternal)policy).config().getInternalConfigMap().getAllConfigInheritedRawValuesIgnoringErrors()
).getAllConfig();
         Map<String, Object> result = Maps.newLinkedHashMap();
         for (Map.Entry<String, Object> ek : source.entrySet()) {
-            result.put(ek.getKey(), getStringValueForDisplay(brooklyn(), policy, ek.getValue()));
+            result.put(ek.getKey(), WebResourceUtils.getValueForDisplay(mapper(), getStringValueForDisplay(brooklyn(),
policy, ek.getValue()), true, true));
         }
         return result;
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/829e495b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/PolicyResourceTest.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/PolicyResourceTest.java
b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/PolicyResourceTest.java
index 534173b..61f60c5 100644
--- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/PolicyResourceTest.java
+++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/PolicyResourceTest.java
@@ -130,7 +130,7 @@ public class PolicyResourceTest extends BrooklynRestResourceTest {
     @Test(dependsOnMethods = "testReconfigureConfig")
     public void testGetConfigValue() throws Exception {
         String configName = RestMockSimplePolicy.SAMPLE_CONFIG.getName();
-        String expectedVal = "newval";
+        String expectedVal = (String) WebResourceUtils.getValueForDisplay(mapper(), "newval",
true, true);
         
         Map<String, Object> allState = client().path(ENDPOINT + policyId + "/config/current-state")
                 .get(new GenericType<Map<String, Object>>() {});


Mime
View raw message