Skip to content
Permalink
Browse files
[JENKINS-26268] test checkout of remotes/origin/master with two repos…
… defined
  • Loading branch information
MarkEWaite committed Jun 5, 2016
1 parent 88ef3e6 commit b0a4057298808407801d86550b73ec5614dc5683
Showing 1 changed file with 12 additions and 5 deletions.
@@ -904,8 +904,7 @@ public void testFetchFromMultipleRepositories() throws Exception {
assertFalse("scm polling should not detect any more changes after build", project.poll(listener).hasChanges());
}

@Issue("JENKINS-26268")
public void testBranchSpecAsSHA1WithMultipleRepositories() throws Exception {
private void branchSpecWithMultipleRepositories(String branchName) throws Exception {
FreeStyleProject project = setupSimpleProject("master");

TestGitRepo secondTestRepo = new TestGitRepo("second", tempFolder.newFolder(), listener);
@@ -917,11 +916,9 @@ public void testBranchSpecAsSHA1WithMultipleRepositories() throws Exception {
final String commitFile1 = "commitFile1";
commit(commitFile1, johnDoe, "Commit number 1");

String sha1 = testRepo.git.revParse("HEAD").getName();

project.setScm(new GitSCM(
remotes,
Collections.singletonList(new BranchSpec(sha1)),
Collections.singletonList(new BranchSpec(branchName)),
false, Collections.<SubmoduleConfig>emptyList(),
null, null,
Collections.<GitSCMExtension>emptyList()));
@@ -930,6 +927,16 @@ public void testBranchSpecAsSHA1WithMultipleRepositories() throws Exception {
rule.assertBuildStatusSuccess(build);
}

@Issue("JENKINS-26268")
public void testBranchSpecAsSHA1WithMultipleRepositories() throws Exception {
branchSpecWithMultipleRepositories(testRepo.git.revParse("HEAD").getName());
}

@Issue("JENKINS-26268")
public void testBranchSpecAsRemotesOriginMasterWithMultipleRepositories() throws Exception {
branchSpecWithMultipleRepositories("remotes/origin/master");
}

@Issue("JENKINS-25639")
@Test
public void testCommitDetectedOnlyOnceInMultipleRepositories() throws Exception {

0 comments on commit b0a4057

Please sign in to comment.