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

    https://github.com/apache/incubator-brooklyn/pull/650#discussion_r30655960
  
    --- Diff: 
core/src/test/java/brooklyn/location/basic/ByonLocationResolverTest.java ---
    @@ -307,12 +308,41 @@ public void testEmptySpec() throws Exception {
                     "name", "foo",
                     "user", "myuser"
             );
    -        MachineProvisioningLocation<SshMachineLocation> provisioner = 
resolve(spec, flags);
    -        SshMachineLocation location1 = 
provisioner.obtain(ImmutableMap.of());
    +        MachineProvisioningLocation<MachineLocation> provisioner = 
resolve(spec, flags);
    +        SshMachineLocation location1 = 
(SshMachineLocation)provisioner.obtain(ImmutableMap.of());
             Assert.assertEquals("myuser", location1.getUser());
             Assert.assertEquals("1.1.1.1", 
location1.getAddress().getHostAddress());
         }
     
    +    @Test
    +    public void testWindowsMachines() throws Exception {
    +        brooklynProperties.put("brooklyn.location.byon.windows.username", 
"myuser");
    +        brooklynProperties.put("brooklyn.location.byon.windows.password", 
"mypassword");
    +        String spec = "byon";
    +        Map<String, ?> flags = ImmutableMap.of(
    +                "hosts", ImmutableList.of("1.1.1.1", "2.2.2.2"),
    +                "osfamily", "windows"
    +        );
    +        MachineProvisioningLocation<MachineLocation> provisioner = 
resolve(spec, flags);
    +        MachineLocation location = provisioner.obtain(ImmutableMap.of());
    +
    +        
assertEquals(location.config().get(WinRmMachineLocation.WINDOWS_USERNAME), 
"myuser");
    +        
assertEquals(location.config().get(WinRmMachineLocation.WINDOWS_PASSWORD), 
"mypassword");
    +        Assert.assertNotNull(provisioner);
    --- End diff --
    
    why assertNotNull here? We've already called methods on it. Suggest delete 
this line?


---
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