Example usage for org.springframework.ide.eclipse.boot.dash.cloudfoundry.client SshHost getPort

List of usage examples for org.springframework.ide.eclipse.boot.dash.cloudfoundry.client SshHost getPort

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.boot.dash.cloudfoundry.client SshHost getPort.

Prototype

public int getPort() 

Source Link

Usage

From source file:org.springframework.ide.eclipse.boot.dash.test.CloudFoundryClientTest.java

@Test
public void testSshSupport() throws Exception {
    String appName = appHarness.randomAppName();

    CFPushArguments params = new CFPushArguments();
    params.setAppName(appName);//  ww  w .j a  v a 2s  . com
    params.setApplicationData(getTestZip("testapp"));
    params.setBuildpack("staticfile_buildpack");
    push(params);

    SshClientSupport sshSupport = client.getSshClientSupport();
    SshHost sshHost = sshSupport.getSshHost();
    System.out.println(sshHost);
    assertEquals(getExpectedSshHost(), sshHost.getHost());
    assertEquals(2222, sshHost.getPort());
    assertTrue(StringUtil.hasText(sshHost.getFingerPrint()));

    assertTrue(StringUtil.hasText(sshSupport.getSshCode()));
    UUID appGuid = client.getApplication(appName).getGuid();
    String sshUser = sshSupport.getSshUser(appGuid, 0);
    System.out.println("sshUser = " + sshUser);
    assertTrue(StringUtil.hasText(sshUser));

    String code = sshSupport.getSshCode();
    System.out.println("sshCode = " + code);
    assertTrue(StringUtil.hasText(code));
}