Github user sjcorbett commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/666#discussion_r31410385
  
    --- Diff: 
locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationResolverTest.java
 ---
    @@ -280,6 +285,50 @@ public void 
testResolvesJcloudsFromNamedOfNamedWithPropertiesOverriddenCorrectly
             assertEquals(l.config().getLocalBag().getStringKey("prop1"), "1");
         }
     
    +    @Test
    +    public void testResolvesListAndMapProperties() throws Exception {
    +        
brooklynProperties.put("brooklyn.location.jclouds.softlayer.prop1", "[ a, b ]");
    +        
brooklynProperties.put("brooklyn.location.jclouds.softlayer.prop2", "{ a: 1, b: 
2 }");
    +        brooklynProperties.put("brooklyn.location.named.foo", 
"jclouds:softlayer:ams01");
    +        
    +        JcloudsLocation l = resolve("named:foo");
    +        assertJcloudsEquals(l, "softlayer", "ams01");
    +        assertEquals(l.config().get(new SetConfigKey<String>(String.class, 
"prop1")), MutableSet.of("a", "b"));
    +        assertEquals(l.config().get(new MapConfigKey<String>(String.class, 
"prop2")), MutableMap.of("a", 1, "b", 2));
    +    }
    +    
    +    @Test
    +    public void 
testResolvesListAndMapPropertiesWithoutMergeOnInheritance() throws Exception {
    +        // when we have a yaml way to specify config we may wish to have 
different semantics;
    +        // it could depend on the collection config key whether to merge 
on inheritance
    +        
brooklynProperties.put("brooklyn.location.jclouds.softlayer.prop1", "[ a, b ]");
    +        
brooklynProperties.put("brooklyn.location.jclouds.softlayer.prop2", "{ a: 1, b: 
2 }");
    +        brooklynProperties.put("brooklyn.location.named.foo", 
"jclouds:softlayer:ams01");
    +        
    +        brooklynProperties.put("brooklyn.location.named.foo.prop1", "[ a: 
1, c: 3 ]");
    +        brooklynProperties.put("brooklyn.location.named.foo.prop2", "{ b: 
3, c: 3 }");
    +        brooklynProperties.put("brooklyn.location.named.bar", "named:foo");
    +        brooklynProperties.put("brooklyn.location.named.bar.prop2", "{ c: 
4, d: 4 }");
    +        
    +        // these do NOT affect the maps
    --- End diff --
    
    Mildly surprising.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to