use of org.eclipse.linuxtools.internal.docker.core.DefaultDockerConnectionSettingsFinder in project linuxtools by eclipse.
the class DockerConnectionManagerTest method testExtensionPointProvidedConnections.
@Test
public void testExtensionPointProvidedConnections() {
DefaultDockerConnectionSettingsFinder finder = new DefaultDockerConnectionSettingsFinder();
List<IDockerConnectionSettings> settings = finder.getKnownConnectionSettings();
assertTrue(settings.size() > 0);
for (IDockerConnectionSettings s : settings) {
if (s instanceof TCPConnectionSettings) {
TCPConnectionSettings t = (TCPConnectionSettings) s;
assertThat(t.getType()).isEqualTo(BindingType.TCP_CONNECTION);
assertThat(t.getHost()).isEqualTo("https://1.2.3.4:5678");
assertThat(t.getPathToCertificates()).isEqualTo("/foo/bar/baz/certs");
assertThat(t.getName()).isEqualTo("https://1.2.3.4:5678");
} else if (s instanceof UnixSocketConnectionSettings) {
UnixSocketConnectionSettings t = (UnixSocketConnectionSettings) s;
// skip if this is the Linux native or Docker for Mac daemon
if (t.getPath().equals("unix:///var/run/docker.sock")) {
continue;
}
assertThat(t.getType()).isEqualTo(BindingType.UNIX_SOCKET_CONNECTION);
assertThat(t.getPath()).isEqualTo("unix:///foo/bar/baz/docker.sock");
assertThat(t.getName()).isEqualTo("unix:///foo/bar/baz/docker.sock");
} else {
fail("Docker Connection Settings does not match a known type");
}
}
}
use of org.eclipse.linuxtools.internal.docker.core.DefaultDockerConnectionSettingsFinder in project linuxtools by eclipse.
the class ClearConnectionManagerRule method after.
@Override
protected void after() {
removeAllConnections(DockerConnectionManager.getInstance());
DockerConnectionManagerUtils.configureConnectionManager();
DockerConnectionManager.getInstance().setConnectionSettingsFinder(new DefaultDockerConnectionSettingsFinder());
}
Aggregations