Search in sources :

Example 1 with SshUriProperties

use of org.springframework.cloud.config.server.ssh.SshUriProperties in project spring-cloud-config by spring-cloud.

the class TransportConfigurationTest method fileBasedSshTransportCallbackCreated.

@Test
public void fileBasedSshTransportCallbackCreated() throws Exception {
    SshUriProperties dontIgnoreLocalSettings = SshUri.builder().uri("user@gitrepo.com:proj/repo").ignoreLocalSshSettings(false).build();
    TransportConfiguration transportConfiguration = new TransportConfiguration();
    TransportConfigCallback transportConfigCallback = transportConfiguration.propertiesBasedSshTransportCallback(dontIgnoreLocalSettings);
    assertThat(transportConfigCallback, is(instanceOf(TransportConfiguration.FileBasedSshTransportConfigCallback.class)));
}
Also used : TransportConfigCallback(org.eclipse.jgit.api.TransportConfigCallback) SshUriProperties(org.springframework.cloud.config.server.ssh.SshUriProperties) Test(org.junit.Test)

Example 2 with SshUriProperties

use of org.springframework.cloud.config.server.ssh.SshUriProperties in project spring-cloud-config by spring-cloud.

the class TransportConfigurationTest method propertiesBasedSshTransportCallbackCreated.

@Test
public void propertiesBasedSshTransportCallbackCreated() throws Exception {
    SshUriProperties ignoreLocalSettings = SshUri.builder().uri("user@gitrepo.com:proj/repo").ignoreLocalSshSettings(true).build();
    TransportConfiguration transportConfiguration = new TransportConfiguration();
    TransportConfigCallback transportConfigCallback = transportConfiguration.propertiesBasedSshTransportCallback(ignoreLocalSettings);
    assertThat(transportConfigCallback, is(instanceOf(TransportConfiguration.PropertiesBasedSshTransportConfigCallback.class)));
}
Also used : TransportConfigCallback(org.eclipse.jgit.api.TransportConfigCallback) SshUriProperties(org.springframework.cloud.config.server.ssh.SshUriProperties) Test(org.junit.Test)

Aggregations

TransportConfigCallback (org.eclipse.jgit.api.TransportConfigCallback)2 Test (org.junit.Test)2 SshUriProperties (org.springframework.cloud.config.server.ssh.SshUriProperties)2