Skip to content

Commit afe92fd

Browse files
committed
[JENKINS-73791] Adap test for Branch exclude merge scenario
1 parent 611ea6a commit afe92fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/test/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSourceTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,11 @@ public boolean isHead(@NonNull Probe probe, @NonNull TaskListener listener) thro
375375

376376
@Test
377377
public void fetchSmokes_badUser() throws Exception {
378+
source.setTraits(Arrays.asList(
379+
new BranchDiscoveryTrait(true, false),
380+
new ForkPullRequestDiscoveryTrait(
381+
EnumSet.of(ChangeRequestCheckoutStrategy.MERGE),
382+
new ForkPullRequestDiscoveryTrait.TrustContributors())));
378383
// make it so PR-2 returns a file not found for user
379384
githubApi.stubFor(get(urlMatching("(/api/v3)?/repos/cloudbeers/yolo/pulls/2"))
380385
.inScenario("Pull Request Merge Hash")

0 commit comments

Comments
 (0)