osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] brooklyn-server pull request #963: disable jclouds authorizePublicKey for ex...


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

    https://github.com/apache/brooklyn-server/pull/963#discussion_r190597772
  
    --- Diff: locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/provider/AwsEc2LocationLiveTest.java ---
    @@ -68,4 +72,29 @@ public AwsEc2LocationLiveTest() {
     
         @Test(enabled = false)
         public void noop() { } /* just exists to let testNG IDE run the test */
    +    
    +    // outline of test which can be used to assert combos of keys etc
    +    // currently uses my (alex's) hardcoded keys and preexisting pair;
    +    // should refactor to generate keys and the keypair and make a real test,
    +    // but for now keeping it commented out as a template for people to do manual testing
    +//    @Test(groups = "Live")
    +//    public void testProvisionVmAndAuthPublicKey() {
    +//        String regionName = USEAST_REGION_NAME;
    +//        loc = (JcloudsLocation) mgmt().getLocationRegistry().getLocationManaged(provider + (regionName == null ? "" : ":" + regionName));
    +//        SshMachineLocation machine = obtainMachine(MutableMap.of(
    +//            JcloudsLocationConfig.KEY_PAIR, "alex-aws-2",
    +//            JcloudsLocationConfig.LOGIN_USER_PRIVATE_KEY_FILE, "~/.ssh/alex-aws-2-id_rsa",
    +//            
    +//            JcloudsLocationConfig.PRIVATE_KEY_FILE, "~/.ssh/aws-cloudera_rsa",
    +//            JcloudsLocationConfig.PUBLIC_KEY_FILE, "~/.ssh/aws-cloudera_rsa.pub",
    +//            JcloudsLocationConfig.EXTRA_PUBLIC_KEY_DATA_TO_AUTH,
    +//                aws-whirr
    +//                "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAw9R7FG0pOpZ7MR+KYty+UzHerEtW9NVBJj+NmznT4zg57klqDAxitahe6cJpj8Nbt0Rmp9G4TZQzAWuoSH5ZUJpFpcVP75tMYWOP6ZymH7MZ5hXLjLHTicNyQ/EB9H2eXSK2xLnq/8oDnzKgnhIXL7tbcC7hOY9Yzu25UrO+xQDbzM3nuwlr38JJwo1fLsIiEVI3uutZW9ANZgcZg0USlFFvxGcAA2KZ322tqtQtP3YYE0IogYUjTSFj5xexFDzIcN5V2Z2tHYKW+Jl/jR98EAsq4By1L+whoX142NJGZsB1GKm4zZTh3vjfzpeGNmxrrHDGp2TOCGFJjk2seHqyyw== alex@xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    +//            JcloudsLocationConfig.IMAGE_ID, "us-east-1/ami-5492ba3c"
    +//        ));
    +//        
    +//        log.info("Provisioned {} vm {}; checking if ssh'able", provider, machine);
    +//        assertTrue(machine.isSshable());
    +//    }
    --- End diff --
    
    nice!  i've added this and will merge as soon as it passes


---