Skip to content
Permalink
Browse files

Test for JENKINS-29326.

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 2ff48824c9be593441339bda3d402136e2a73831
Showing with 30 additions and 0 deletions.
  1. +30 −0 aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/scm/GitStepTest.java
@@ -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;
@@ -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 {
@@ -162,4 +166,30 @@
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.
You can’t perform that action at this time.