Skip to content

Commit

Permalink
Merge pull request #104 from cloudsoft/brooklyn-0.9.0
Browse files Browse the repository at this point in the history
Brooklyn 0.9.0
  • Loading branch information
Sam Corbett committed Apr 21, 2016
2 parents 137b592 + d806625 commit 3480ebf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,24 +143,18 @@ public void testFullByonLocationDescription() throws Exception {

EntitySpec<?> vanillaEntity = Iterables.getOnlyElement(app.getChildren());
assertEquals(vanillaEntity.getLocationSpecs().size(), 1);
assertTrue(Iterables.getOnlyElement(vanillaEntity.getLocationSpecs())
instanceof LocationSpec);

LocationSpec<?> locationSpec = Iterables.getOnlyElement(vanillaEntity.getLocationSpecs());
Map<String, ?> configByon = locationSpec.getFlags();
assertEquals(configByon.get("user"), "brooklyn");
assertEquals(configByon.get("provider"), "byon");
assertTrue(configByon.get("machines") instanceof Collection);
assertEquals(((Collection) configByon.get("machines")).size(), 1);

Object machinesObj = configByon.get("machines");
assertNotNull(machinesObj, "machines");
List<?> machines = List.class.cast(machinesObj);
assertFalse(machines.isEmpty(), "expected value for machines key in " + configByon);
Object obj = machines.get(0);
assertEquals(obj.getClass(), SshMachineLocation.class);
SshMachineLocation sml = SshMachineLocation.class.cast(obj);
assertEquals(sml.getAddress().getHostAddress(), "192.168.0.18");

List<?> machineSpecs = (List) configByon.get("byon.machineSpecs");
assertNotNull(machineSpecs);
assertEquals(machineSpecs.size(), 1, "machineSpecs=" + Iterables.toString(machineSpecs));

LocationSpec<?> spec = (LocationSpec<?>) machineSpecs.get(0);
assertEquals(spec.getFlags().get("address"), "192.168.0.18");
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.apache.brooklyn</groupId>
<artifactId>brooklyn-downstream-parent</artifactId>
<version>0.9.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION -->
<version>0.9.0</version> <!-- BROOKLYN_VERSION -->
</parent>

<groupId>io.cloudsoft.brooklyn.tosca</groupId>
Expand Down

0 comments on commit 3480ebf

Please sign in to comment.