use of jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig in project teamcity-git by JetBrains.
the class ServerPluginConfigTest method test_default_idle_timeout.
public void test_default_idle_timeout() {
ServerPluginConfig config = new PluginConfigImpl(myServerPaths);
assertEquals(PluginConfig.DEFAULT_IDLE_TIMEOUT, config.getIdleTimeoutSeconds());
}
use of jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig in project teamcity-git by JetBrains.
the class ServerPluginConfigTest method test_idle_timeout.
public void test_idle_timeout() {
System.setProperty("teamcity.git.idle.timeout.seconds", "60");
ServerPluginConfig config = new PluginConfigImpl(myServerPaths);
assertEquals(60, config.getIdleTimeoutSeconds());
}
use of jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig in project teamcity-git by JetBrains.
the class ServerPluginConfigTest method ssh_proxy_settings.
@TestFor(issues = "TW-26507")
public void ssh_proxy_settings() {
final String sshProxyHost = "acme.org";
final String sshProxyPort = "3128";
final String sshProxyType = "http";
System.setProperty("teamcity.git.sshProxyType", sshProxyType);
System.setProperty("teamcity.git.sshProxyHost", sshProxyHost);
System.setProperty("teamcity.git.sshProxyPort", sshProxyPort);
ServerPluginConfig config = new PluginConfigImpl();
Proxy sshProxy = config.getJschProxy();
assertNotNull(sshProxy);
assertTrue(sshProxy instanceof ProxyHTTP);
List<String> separateProcessOptions = config.getOptionsForSeparateProcess();
assertThat(separateProcessOptions, hasItem("-Dteamcity.git.sshProxyType=" + sshProxyType));
assertThat(separateProcessOptions, hasItem("-Dteamcity.git.sshProxyHost=" + sshProxyHost));
assertThat(separateProcessOptions, hasItem("-Dteamcity.git.sshProxyPort=" + sshProxyPort));
}
use of jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig in project teamcity-git by JetBrains.
the class ServerPluginConfigTest method test_proxy_settings.
public void test_proxy_settings() {
final String httpProxyHost = "some.org";
final String httpProxyPort = "3128";
final String httpNonProxyHosts = "localhost|*.mydomain.com";
final String httpsProxyPort = "3129";
final String httpsProxyHost = "other.org";
System.setProperty("http.proxyHost", httpProxyHost);
System.setProperty("http.proxyPort", httpProxyPort);
System.setProperty("http.nonProxyHosts", httpNonProxyHosts);
System.setProperty("https.proxyHost", httpsProxyHost);
System.setProperty("https.proxyPort", httpsProxyPort);
ServerPluginConfig config = new PluginConfigImpl(myServerPaths);
assertEquals(asList("-Dhttp.proxyHost=" + httpProxyHost, "-Dhttp.proxyPort=" + httpProxyPort, SystemInfo.isUnix ? "-Dhttp.nonProxyHosts=" + httpNonProxyHosts : "-Dhttp.nonProxyHosts=\"" + httpNonProxyHosts + "\"", "-Dhttps.proxyHost=" + httpsProxyHost, "-Dhttps.proxyPort=" + httpsProxyPort), config.getOptionsForSeparateProcess());
assertNull(config.getJschProxy());
}
use of jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig in project teamcity-git by JetBrains.
the class ServerPluginConfigTest method amazon_hosts.
public void amazon_hosts() {
ServerPluginConfig config = new PluginConfigImpl();
assertTrue(config.getAmazonHosts().isEmpty());
System.setProperty(Constants.AMAZON_HOSTS, "host1");
assertThat(config.getAmazonHosts(), hasItems("host1"));
System.setProperty(Constants.AMAZON_HOSTS, "host1,host2");
assertThat(config.getAmazonHosts(), hasItems("host1", "host2"));
}
Aggregations