Search in sources :

Example 6 with PluginConfigImpl

use of jetbrains.buildServer.buildTriggers.vcs.git.PluginConfigImpl in project teamcity-git by JetBrains.

the class ServerPluginConfigTest method should_correct_negative_stream_threshold.

public void should_correct_negative_stream_threshold() {
    System.setProperty("teamcity.git.stream.file.threshold.mb", "-1");
    ServerPluginConfig config = new PluginConfigImpl(myServerPaths);
    assertTrue(config.getStreamFileThresholdMb() > 0);
}
Also used : PluginConfigImpl(jetbrains.buildServer.buildTriggers.vcs.git.PluginConfigImpl) ServerPluginConfig(jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig)

Example 7 with PluginConfigImpl

use of jetbrains.buildServer.buildTriggers.vcs.git.PluginConfigImpl in project teamcity-git by JetBrains.

the class ServerPluginConfigTest method should_correct_zero_stream_threshold.

public void should_correct_zero_stream_threshold() {
    System.setProperty("teamcity.git.stream.file.threshold.mb", "0");
    ServerPluginConfig config = new PluginConfigImpl(myServerPaths);
    assertTrue(config.getStreamFileThresholdMb() > 0);
}
Also used : PluginConfigImpl(jetbrains.buildServer.buildTriggers.vcs.git.PluginConfigImpl) ServerPluginConfig(jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig)

Example 8 with PluginConfigImpl

use of jetbrains.buildServer.buildTriggers.vcs.git.PluginConfigImpl in project teamcity-git by JetBrains.

the class ServerPluginConfigTest method test_modern_proxy_settings.

@TestFor(issues = "TW-57178")
public void test_modern_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("teamcity.http.proxyHost", httpProxyHost);
    System.setProperty("teamcity.http.proxyPort", httpProxyPort);
    System.setProperty("teamcity.http.nonProxyHosts", httpNonProxyHosts);
    System.setProperty("teamcity.https.proxyHost", httpsProxyHost);
    System.setProperty("teamcity.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());
}
Also used : PluginConfigImpl(jetbrains.buildServer.buildTriggers.vcs.git.PluginConfigImpl) ServerPluginConfig(jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig) TestFor(jetbrains.buildServer.util.TestFor)

Aggregations

PluginConfigImpl (jetbrains.buildServer.buildTriggers.vcs.git.PluginConfigImpl)8 ServerPluginConfig (jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig)8 TestFor (jetbrains.buildServer.util.TestFor)2 Proxy (com.jcraft.jsch.Proxy)1 ProxyHTTP (com.jcraft.jsch.ProxyHTTP)1