Skip to content

Commit

Permalink
[JENKINS-53535] Make Bitbucket Server, Owner and repository environme…
Browse files Browse the repository at this point in the history
…nt variables for Bitbucket Team/Project based jobs

Fix unit tests.
  • Loading branch information
nfalco79 committed Jan 2, 2025
1 parent 7c1c340 commit aa9c5ca
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketHref;
import com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRepository;
import com.cloudbees.jenkins.plugins.bitbucket.endpoints.BitbucketCloudEndpoint;
import com.cloudbees.jenkins.plugins.bitbucket.impl.extension.BitbucketEnvVarExtension;
import com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient;
import com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey;
import com.cloudbees.plugins.credentials.CredentialsProvider;
Expand Down Expand Up @@ -137,7 +138,8 @@ public void buildWhenSetSSHCheckoutTraitThenEmptyAuthenticatorExtension() throws
assertThat(build.getExtensions(), containsInAnyOrder(
instanceOf(BuildChooserSetting.class),
instanceOf(GitSCMSourceDefaults.class),
instanceOf(GitClientAuthenticatorExtension.class))
instanceOf(GitClientAuthenticatorExtension.class),
instanceOf(BitbucketEnvVarExtension.class))
);

// Create a Pipeline with CpsScmFlowDefinition based of the GitSCM produced
Expand Down Expand Up @@ -192,7 +194,8 @@ public void buildBasicAuthThenAuthenticatorExtension() throws Exception {
assertThat(build.getExtensions(), containsInAnyOrder(
instanceOf(BuildChooserSetting.class),
instanceOf(GitSCMSourceDefaults.class),
instanceOf(GitClientAuthenticatorExtension.class)
instanceOf(GitClientAuthenticatorExtension.class),
instanceOf(BitbucketEnvVarExtension.class)
));

// Create a Pipeline with CpsScmFlowDefinition based of the GitSCM produced
Expand Down

0 comments on commit aa9c5ca

Please sign in to comment.