Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Test for JENKINS-29326.
Browse files Browse the repository at this point in the history
Marked as @ignore until
jenkinsci/git-plugin#372 is merged and
released, at which point we'll need to bump the git plugin version as well.
  • Loading branch information
abayer committed Dec 11, 2015
1 parent e1a8190 commit 2ff4882
Showing 1 changed file with 30 additions and 0 deletions.
Expand Up @@ -26,6 +26,7 @@

import hudson.model.Label;
import hudson.plugins.git.GitSCM;
import hudson.plugins.git.util.BuildData;
import hudson.scm.ChangeLogSet;
import hudson.scm.SCM;
import hudson.triggers.SCMTrigger;
Expand All @@ -36,8 +37,11 @@
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
import static org.junit.Assert.*;

import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;

public class GitStepTest {
Expand Down Expand Up @@ -162,4 +166,30 @@ public class GitStepTest {
assertFalse(iterator.hasNext());
}

// This test is currently disabled until the fix for JENKINS-29326 is released
// in the git plugin, in 2.4.1 or later.
@Ignore
@Issue("JENKINS-29326")
@Test
public void identicalGitSCMs() throws Exception {
otherRepo.git("init");
otherRepo.write("otherfile", "");
otherRepo.git("add", "otherfile");
otherRepo.git("commit", "--message=init");
WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "demo");
p.setDefinition(new CpsFlowDefinition(
"node {\n" +
" ws {\n" +
" dir('main') {\n" +
" git($/" + otherRepo + "/$)\n" +
" }\n" +
" dir('other') {\n" +
" git($/" + otherRepo + "/$)\n" +
" }\n" +
" archive '**'\n" +
" }\n" +
"}"));
WorkflowRun b = r.assertBuildStatusSuccess(p.scheduleBuild2(0));
assertEquals(1, b.getActions(BuildData.class).size());
}
}

0 comments on commit 2ff4882

Please sign in to comment.