brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nakomis <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request: Merge Map values in config
Date Mon, 23 May 2016 10:03:42 GMT
Github user nakomis commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/151#discussion_r64197284
  
    --- Diff: camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/EmptySoftwareProcessYamlTest.java
---
    @@ -60,6 +62,31 @@ public void testProvisioningProperties() throws Exception {
         }
     
         @Test(groups="Integration")
    +    public void testProvisioningPropertiesOverrideValues() throws Exception {
    +        Entity app = createAndStartApplication(
    +                "location:",
    +                "  localhost:",
    +                "    templateOptions:",
    +                "      test: test",
    +                "services:",
    +                "- type: "+EmptySoftwareProcess.class.getName(),
    +                "  provisioning.properties:",
    +                "    minRam: 16384",
    +                "    templateOptions:",
    +                "      overrideLoginUser: test");
    +        waitForApplicationTasks(app);
    +
    +        log.info("App started:");
    +        Entities.dumpInfo(app);
    +
    +        EmptySoftwareProcess entity = (EmptySoftwareProcess) app.getChildren().iterator().next();
    +        Map<String, Object> pp = entity.getConfig(EmptySoftwareProcess.PROVISIONING_PROPERTIES);
    +        Assert.assertEquals(pp.get("minRam"), 16384);
    +        Map<String, Object> templateOptions = entity.getLocations().iterator().next().getConfig(JcloudsLocationConfig.TEMPLATE_OPTIONS);
    +        Assert.assertEquals(templateOptions, ImmutableMap.of("overrideLoginUser", "test",
"test", "test"));
    --- End diff --
    
    A minor point (shouldn't hold up this PR), but `testKey`, `testValue`, and `testUser`
would be clearer here


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message