use of org.eclipse.che.api.core.model.workspace.config.ServerConfig in project che-server by eclipse-che.
the class ServerConfigImplTest method testCreateFromEndpointDevfileEndpointAttributeNotSetWhenDefault.
@Test
public void testCreateFromEndpointDevfileEndpointAttributeNotSetWhenDefault() {
ServerConfig serverConfig = ServerConfigImpl.createFromEndpoint(new EndpointImpl("name", 123, new HashMap<>()));
assertFalse(serverConfig.getAttributes().containsKey(REQUIRE_SUBDOMAIN));
}
use of org.eclipse.che.api.core.model.workspace.config.ServerConfig in project che-server by eclipse-che.
the class ServerConfigImplTest method testStoreEndpointNameIntoAttributes.
@Test
public void testStoreEndpointNameIntoAttributes() {
ServerConfig serverConfig = ServerConfigImpl.createFromEndpoint(new EndpointImpl("blabol", 123, emptyMap()));
assertEquals(serverConfig.getAttributes().get(SERVER_NAME_ATTRIBUTE), "blabol");
}
use of org.eclipse.che.api.core.model.workspace.config.ServerConfig in project che-server by eclipse-che.
the class ServerConfigImplTest method testCreateFromEndpointTranslateProtocol.
@Test
public void testCreateFromEndpointTranslateProtocol() {
ServerConfig serverConfig = ServerConfigImpl.createFromEndpoint(new EndpointImpl("name", 123, singletonMap("protocol", "hello")));
assertEquals(serverConfig.getProtocol(), "hello");
}
use of org.eclipse.che.api.core.model.workspace.config.ServerConfig in project che-server by eclipse-che.
the class ServerConfigImplTest method testCreateFromEndpointTranslatePublicFalse.
@Test
public void testCreateFromEndpointTranslatePublicFalse() {
ServerConfig serverConfig = ServerConfigImpl.createFromEndpoint(new EndpointImpl("name", 123, singletonMap("public", "false")));
assertFalse(serverConfig.getAttributes().isEmpty());
assertEquals(serverConfig.getAttributes().get(INTERNAL_SERVER_ATTRIBUTE), Boolean.TRUE.toString());
}
use of org.eclipse.che.api.core.model.workspace.config.ServerConfig in project che-server by eclipse-che.
the class ServerConfigImplTest method testCreateFromEndpointTranslatePublicTrue.
@Test
public void testCreateFromEndpointTranslatePublicTrue() {
ServerConfig serverConfig = ServerConfigImpl.createFromEndpoint(new EndpointImpl("name", 123, singletonMap("public", "true")));
assertFalse(serverConfig.isInternal());
}
Aggregations