use of org.eclipse.che.plugin.docker.client.json.PortBinding in project che by eclipse.
the class DefaultServerEvaluationStrategyTest method setUp.
@BeforeMethod
public void setUp() {
serverConfs = new HashMap<>();
serverConfs.put("4301/tcp", new ServerConfImpl("sysServer1-tcp", "4301/tcp", "http", "/some/path1"));
serverConfs.put("4305/udp", new ServerConfImpl("devSysServer1-udp", "4305/udp", null, "some/path4"));
Map<String, List<PortBinding>> ports = new HashMap<>();
ports.put("4301/tcp", Collections.singletonList(new PortBinding().withHostIp(ALL_IP_ADDRESS).withHostPort("32100")));
ports.put("4305/udp", Collections.singletonList(new PortBinding().withHostIp(ALL_IP_ADDRESS).withHostPort("32103")));
when(containerInfo.getNetworkSettings()).thenReturn(networkSettings);
when(networkSettings.getPorts()).thenReturn(ports);
when(containerInfo.getConfig()).thenReturn(containerConfig);
when(containerConfig.getLabels()).thenReturn(Collections.emptyMap());
}
Aggregations