brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #680: Adds JcloudsLocationCustomizer hook to al...
Date Mon, 15 May 2017 12:08:59 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/680#discussion_r116472546
  
    --- Diff: locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsSshMachineLocationStubbedTest.java
---
    @@ -118,4 +123,17 @@ public void testWinrmConfigPassedToMachine() throws Exception {
             assertEquals(machine.config().get(WinRmMachineLocation.COPY_FILE_CHUNK_SIZE_BYTES),
Integer.valueOf(123));
             assertEquals(machine.config().get(WinRmTool.PROP_EXEC_TRIES), Integer.valueOf(456));
         }
    +
    +    @Test
    +    public void testNodeSetupCustomizer() throws Exception {
    +        final String testMetadata = "test-metadata";
    +        obtainMachine(ImmutableMap.of(JCLOUDS_LOCATION_CUSTOMIZERS, ImmutableList.of(new
BasicJcloudsLocationCustomizer(){
    +            @Override
    +            public void customize(JcloudsLocation location, NodeMetadata node, ConfigBag
setup) {
    +                setup.configure(ADDITIONAL_CONNECTION_METADATA, testMetadata);
    --- End diff --
    
    Let's also assert that `node` is not null (given it will be, based on the bug I spotted
(I believe)).
    And might as well also assert that `location` is equal to the object we expect.


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