Skip to content

Commit

Permalink
Merge pull request #673 from basil/gitlab
Browse files Browse the repository at this point in the history
Adapt tests to the presence of `gitlab-branch-source` on the test classpath
  • Loading branch information
jglick authored Mar 25, 2023
2 parents 00cc818 + ca5d889 commit d5a2b29
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ public void given__configuredInstance__when__uninstantiating__then__deprecatedFi
recreated.setIncludes("i*");
recreated.setExcludes("production");
recreated.setScanCredentialsId("foo");
String trust;
if (r.jenkins.getPlugin("gitlab-branch-source") != null) {
trust =
"org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustPermission";
} else {
trust = "TrustPermission";
}
assertThat(
DescribableModel.uninstantiate2_(recreated).toString(),
is(
Expand All @@ -82,7 +89,9 @@ public void given__configuredInstance__when__uninstantiating__then__deprecatedFi
+ "@gitHubPullRequestDiscovery$OriginPullRequestDiscoveryTrait(strategyId=1), "
+ "@gitHubForkDiscovery$ForkPullRequestDiscoveryTrait("
+ "strategyId=2,"
+ "trust=@gitHubTrustPermissions$TrustPermission()), "
+ "trust=@gitHubTrustPermissions$"
+ trust
+ "()), "
+ "@headWildcardFilter$WildcardSCMHeadFilterTrait(excludes=production,includes=i*)])"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ unclassified:
strategyId: 2
- gitHubForkDiscovery:
strategyId: 3
trust: "trustPermission"
trust: "gitHubTrustPermissions"

0 comments on commit d5a2b29

Please sign in to comment.