use of io.jenkins.blueocean.rest.impl.pipeline.scm.ScmFile in project blueocean-plugin by jenkinsci.
the class BitbucketCloudScmContentProviderTest method getContent.
@Test
public void getContent() throws UnirestException, IOException {
String credentialId = createCredential(BitbucketCloudScm.ID);
StaplerRequest staplerRequest = mockStapler();
MultiBranchProject mbp = mockMbp(credentialId);
ScmFile<GitContent> content = (ScmFile<GitContent>) new BitbucketCloudScmContentProvider().getContent(staplerRequest, mbp);
assertEquals("Jenkinsfile", content.getContent().getName());
assertEquals("04553981a05754d4bffef56a59d9d996d500301c", content.getContent().getCommitId());
assertEquals("demo1", content.getContent().getRepo());
assertEquals("vivekp7", content.getContent().getOwner());
}
use of io.jenkins.blueocean.rest.impl.pipeline.scm.ScmFile in project blueocean-plugin by jenkinsci.
the class BitbucketServerScmContentProviderTest method getContent.
@Test
public void getContent() throws UnirestException, IOException {
String credentialId = createCredential(BitbucketServerScm.ID);
StaplerRequest staplerRequest = mockStapler();
MultiBranchProject mbp = mockMbp(credentialId);
ScmFile<GitContent> content = (ScmFile<GitContent>) new BitbucketServerScmContentProvider().getContent(staplerRequest, mbp);
assertEquals("Jenkinsfile", content.getContent().getName());
assertEquals("0bae0ddbed2e897d3b44abc3aca9ba26e2f61710", content.getContent().getCommitId());
assertEquals("pipeline-demo-test", content.getContent().getRepo());
assertEquals("TESTP", content.getContent().getOwner());
}
Aggregations