Skip to content
Permalink
Browse files

[JENKINS-29066] reproduction testcate

  • Loading branch information...
ndeloof committed Jun 26, 2015
1 parent e846330 commit 199f5e8b175d134942b2b8415f299d52ed92e756
Showing with 23 additions and 0 deletions.
  1. +23 −0 src/test/java/hudson/plugins/git/GitSCMTest.java
@@ -1428,6 +1428,29 @@ public void testPolling_environmentValueInBranchSpec() throws Exception {
assertFalse("No changes to git since last build, thus no new build is expected", project.poll(listener).hasChanges());
}

@Issue("JENKINS-29066")
public void testPolling_parentHead() throws Exception {
// create parameterized project with environment value in branch specification
FreeStyleProject project = createFreeStyleProject();
GitSCM scm = new GitSCM(
createRemoteRepositories(),
Collections.singletonList(new BranchSpec("**")),
false, Collections.<SubmoduleConfig>emptyList(),
null, null,
Collections.<GitSCMExtension>emptyList());
project.setScm(scm);

// commit something in order to create an initial base version in git
commit("toto/commitFile1", johnDoe, "Commit number 1");
git.branch("someBranch");
commit("toto/commitFile2", johnDoe, "Commit number 2");

// build the project
build(project, Result.SUCCESS);

assertFalse("polling should not detect changes",project.poll(listener).hasChanges());
}

public void testPollingAfterManualBuildWithParametrizedBranchSpec() throws Exception {
// create parameterized project with environment value in branch specification
FreeStyleProject project = createFreeStyleProject();

0 comments on commit 199f5e8

Please sign in to comment.
You can’t perform that action at this time.