diff --git a/src/test/java/hudson/plugins/git/GitSCMTest.java b/src/test/java/hudson/plugins/git/GitSCMTest.java index 85ffc1a509..8f576e923b 100644 --- a/src/test/java/hudson/plugins/git/GitSCMTest.java +++ b/src/test/java/hudson/plugins/git/GitSCMTest.java @@ -1878,12 +1878,18 @@ private void branchSpecWithMultipleRepositories(String branchName) throws Except } @Issue("JENKINS-26268") + @Test public void testBranchSpecAsSHA1WithMultipleRepositories() throws Exception { + String commitFile1 = "commitFile1"; + commit(commitFile1, johnDoe, "Commit 1 from testBranchSpecAsSHA1WithMultipleRepositories"); branchSpecWithMultipleRepositories(testRepo.git.revParse("HEAD").getName()); } @Issue("JENKINS-26268") + @Test public void testBranchSpecAsRemotesOriginMasterWithMultipleRepositories() throws Exception { + String commitFile1 = "commitFile1"; + commit(commitFile1, johnDoe, "Commit 1 from testBranchSpecAsSHA1WithMultipleRepositories"); branchSpecWithMultipleRepositories("remotes/origin/master"); } diff --git a/src/test/java/hudson/plugins/git/SubmoduleConfigTest.java b/src/test/java/hudson/plugins/git/SubmoduleConfigTest.java index 59bc037566..82df452e5d 100644 --- a/src/test/java/hudson/plugins/git/SubmoduleConfigTest.java +++ b/src/test/java/hudson/plugins/git/SubmoduleConfigTest.java @@ -100,12 +100,14 @@ public void testGetBranches() { assertThat(config.getBranches(), is(arrayWithSize(0))); } + @Test public void testGetBranchesFromArray() { - assertThat(configWithBranchArray.getBranches(), is(branchNames)); + assertThat(configWithBranchArray.getBranches(), is(arrayWithSize(0))); } + @Test public void testGetBranchesFromList() { - assertThat(configWithBranchList.getBranches(), is(branchNames)); + assertThat(configWithBranchList.getBranches(), is(arrayWithSize(0))); } @Test