Github user nakomis commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/151#discussion_r64203063
--- 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 --
The name of the util class is ok, but line 86 of
`EmptySoftwareProcessYamlTest` (the line I commented on) would be clearer if it
read `Assert.assertEquals(templateOptions, ImmutableMap.of("overrideLoginUser",
"testUser", "testKey", "testValue"));`
---
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.
---