Search in sources :

Example 1 with BitbucketCloudScmContentProvider

use of io.jenkins.blueocean.blueocean_bitbucket_pipeline.cloud.BitbucketCloudScmContentProvider in project blueocean-plugin by jenkinsci.

the class BitbucketServerScmContentProviderTest method checkScmProperties.

@Test
public void checkScmProperties() throws Exception {
    // ensure server provider works with server multibranch pipeline
    String credentialId = createCredential(BitbucketServerScm.ID, authenticatedUser);
    MultiBranchProject mbp = mockMbp(credentialId);
    ScmContentProvider provider = new BitbucketServerScmContentProvider();
    assertTrue(provider.support(mbp));
    assertEquals(provider.getScmId(), BitbucketServerScm.ID);
    assertEquals(provider.getApiUrl(mbp), apiUrl);
    // ensure cloud provider doesn't work with server multibranch pipeline
    provider = new BitbucketCloudScmContentProvider();
    assertFalse(provider.support(mbp));
}
Also used : BitbucketCloudScmContentProvider(io.jenkins.blueocean.blueocean_bitbucket_pipeline.cloud.BitbucketCloudScmContentProvider) BitbucketCloudScmContentProvider(io.jenkins.blueocean.blueocean_bitbucket_pipeline.cloud.BitbucketCloudScmContentProvider) ScmContentProvider(io.jenkins.blueocean.rest.impl.pipeline.ScmContentProvider) MultiBranchProject(jenkins.branch.MultiBranchProject) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

BitbucketCloudScmContentProvider (io.jenkins.blueocean.blueocean_bitbucket_pipeline.cloud.BitbucketCloudScmContentProvider)1 ScmContentProvider (io.jenkins.blueocean.rest.impl.pipeline.ScmContentProvider)1 MultiBranchProject (jenkins.branch.MultiBranchProject)1 Test (org.junit.Test)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1