Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-29066] reproduction testcate
  • Loading branch information
ndeloof committed Jun 29, 2015
1 parent e846330 commit 199f5e8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/java/hudson/plugins/git/GitSCMTest.java
Expand Up @@ -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();
Expand Down

0 comments on commit 199f5e8

Please sign in to comment.