use of jetbrains.buildServer.vcs.CheckoutRules in project teamcity-git by JetBrains.
the class GitPatchTest method excluded_broken_submodule.
@TestFor(issues = "TW-49782")
@Test(dataProvider = "patchInSeparateProcess")
public void excluded_broken_submodule(boolean patchInSeparateProcess) throws Exception {
myConfigBuilder.setSeparateProcessForPatch(patchInSeparateProcess);
VcsRoot root = getRoot("reference-wrong-commit", true);
// 7253d358a2490321a1808a1c20561b4027d69f77 references wrong submodule commit, but it is excluded by checkout rules, patch should succeed
checkPatch(root, "excluded_broken_submodule", null, "7253d358a2490321a1808a1c20561b4027d69f77", new CheckoutRules("+:dir"));
}
use of jetbrains.buildServer.vcs.CheckoutRules in project teamcity-git by JetBrains.
the class GitPatchTest method submodules_and_checkout_rules2.
@TestFor(issues = "TW-50097")
@Test(dataProvider = "patchInSeparateProcess")
public void submodules_and_checkout_rules2(boolean patchInSeparateProcess) throws Exception {
myConfigBuilder.setSeparateProcessForPatch(patchInSeparateProcess);
VcsRoot root = getRoot("sub-submodule", true);
checkPatch(root, "submodules_and_checkout_rules2", null, "ce6044093939bb47283439d97a1c80f759669ff5", new CheckoutRules("+:first-level-submodule/sub-sub"));
}
use of jetbrains.buildServer.vcs.CheckoutRules in project teamcity-git by JetBrains.
the class DiffWithUpperLimitRevisionTest method no_error_if_upper_limit_revision_param_is_missing.
public void no_error_if_upper_limit_revision_param_is_missing() throws Exception {
String version = "465ad9f630e451b9f2b782ffb09804c6a98c4bb9";
AgentRunningBuild build = createBuild(version, null);
myVcsSupport.updateSources(myRoot, new CheckoutRules("+:dir"), version, myCheckoutDir, build, false);
}
use of jetbrains.buildServer.vcs.CheckoutRules in project teamcity-git by JetBrains.
the class DiffWithUpperLimitRevisionTest method can_be_disabled.
public void can_be_disabled() throws Exception {
String version = "ad4528ed5c84092fdbe9e0502163cf8d6e6141e7";
AgentRunningBuild build = createBuild(version, "465ad9f630e451b9f2b782ffb09804c6a98c4bb9", "teamcity.git.checkDiffWithUpperLimitRevision", "false");
myVcsSupport.updateSources(myRoot, new CheckoutRules("+:dir"), version, myCheckoutDir, build, false);
then(myBuildLogger.getErrors()).isEmpty();
}
use of jetbrains.buildServer.vcs.CheckoutRules in project teamcity-git by JetBrains.
the class AutoCheckoutTest method several_roots.
@TestFor(issues = "TW-49786")
@Test(dataProvider = "severalRootsSetups")
public void several_roots(@NotNull Setup setup) throws Exception {
myVcsSupport = vcsSupportWithRealGit();
VcsRoot root1 = vcsRoot().withId(1).withFetchUrl("http://some.org/repo1.git").withAgentGitPath(getGitPath()).build();
VcsRoot root2 = vcsRoot().withId(2).withFetchUrl("http://some.org/repo2.git").withAgentGitPath(getGitPath()).build();
AgentRunningBuild build = runningBuild().addRootEntry(root1, setup.getCheckoutRules1()).addRootEntry(root2, setup.getCheckoutRules2()).build();
AgentCheckoutAbility canCheckout1 = myVcsSupport.canCheckout(root1, new CheckoutRules(setup.getCheckoutRules1()), build);
AgentCheckoutAbility canCheckout2 = myVcsSupport.canCheckout(root2, new CheckoutRules(setup.getCheckoutRules2()), build);
if (setup.isShouldFail()) {
then(canCheckout1.getCanNotCheckoutReason().getDetails()).contains("Cannot checkout VCS root '" + root1.getName() + "' into the same directory as VCS root '" + root2.getName() + "'");
then(canCheckout2.getCanNotCheckoutReason().getDetails()).contains("Cannot checkout VCS root '" + root2.getName() + "' into the same directory as VCS root '" + root1.getName() + "'");
} else {
then(canCheckout1.getCanNotCheckoutReason()).isNull();
then(canCheckout2.getCanNotCheckoutReason()).isNull();
}
}
Aggregations