use of jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig 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);
}
use of jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig 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);
}
use of jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig 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());
}
use of jetbrains.buildServer.buildTriggers.vcs.git.ServerPluginConfig in project teamcity-git by JetBrains.
the class RevisionsCacheTest method should_contain_last_n_revisions.
@Test(dataProvider = "true,false")
public void should_contain_last_n_revisions(boolean afterRestart) throws Exception {
int cacheSize = 10;
myConfigBuilder.setMapFullPathRevisionCacheSize(cacheSize);
ServerPluginConfig config = myConfigBuilder.build();
myCache = new RevisionsCache(config);
File repo = repository("1");
RepositoryRevisionCache repoCache = myCache.getRepositoryCache(repo, RevisionCacheType.COMMIT_CACHE);
for (int i = 0; i < 100; i++) {
repoCache.saveRevision("v" + i, true, repoCache.getResetCounter());
}
if (afterRestart) {
myCache = new RevisionsCache(config);
repoCache = myCache.getRepositoryCache(repo, RevisionCacheType.COMMIT_CACHE);
}
for (int i = 100 - cacheSize; i < 100; i++) {
then(repoCache.hasRevision("v" + i)).overridingErrorMessage("Doesn't contain entry for revision v" + i).isTrue();
}
}
Aggregations