Search in sources :

Example 11 with AgentCheckoutAbility

use of jetbrains.buildServer.agent.vcs.AgentCheckoutAbility in project teamcity-git by JetBrains.

the class AutoCheckoutTest method include_rule_with_mapping_is_used_without_sparse_checkout.

public void include_rule_with_mapping_is_used_without_sparse_checkout() throws IOException, VcsException {
    myVcsSupport = vcsSupportWithFakeGitOfVersion(GIT_WITH_SPARSE_CHECKOUT);
    VcsRoot vcsRoot = vcsRootWithAgentGitPath();
    AgentRunningBuild build = runningBuild().sharedConfigParams(PluginConfigImpl.USE_SPARSE_CHECKOUT, "false").addRootEntry(vcsRoot, "+:a/b/c => d").build();
    AgentCheckoutAbility canCheckout = myVcsSupport.canCheckout(vcsRoot, new CheckoutRules("+:a/b/c => d"), build);
    then(canCheckout.getCanNotCheckoutReason().getType()).isEqualTo(AgentCanNotCheckoutReason.NOT_SUPPORTED_CHECKOUT_RULES);
    then(canCheckout.getCanNotCheckoutReason().getDetails()).contains("Unsupported rules for agent-side checkout: +:a/b/c => d");
}
Also used : AgentRunningBuild(jetbrains.buildServer.agent.AgentRunningBuild) AgentCheckoutAbility(jetbrains.buildServer.agent.vcs.AgentCheckoutAbility) CheckoutRules(jetbrains.buildServer.vcs.CheckoutRules) VcsRoot(jetbrains.buildServer.vcs.VcsRoot)

Aggregations

AgentCheckoutAbility (jetbrains.buildServer.agent.vcs.AgentCheckoutAbility)11 VcsRoot (jetbrains.buildServer.vcs.VcsRoot)10 AgentRunningBuild (jetbrains.buildServer.agent.AgentRunningBuild)8 CheckoutRules (jetbrains.buildServer.vcs.CheckoutRules)7 TestFor (jetbrains.buildServer.util.TestFor)3 GitVersion (jetbrains.buildServer.buildTriggers.vcs.git.GitVersion)2 BuildAgentConfiguration (jetbrains.buildServer.agent.BuildAgentConfiguration)1 GitDetector (jetbrains.buildServer.buildTriggers.vcs.git.agent.GitDetector)1 GitExec (jetbrains.buildServer.buildTriggers.vcs.git.command.GitExec)1 VcsException (jetbrains.buildServer.vcs.VcsException)1 VcsRootImpl (jetbrains.buildServer.vcs.impl.VcsRootImpl)1 NotNull (org.jetbrains.annotations.NotNull)1 Test (org.testng.annotations.Test)1