use of jenkins.branch.DefaultBranchPropertyStrategy in project blueocean-plugin by jenkinsci.
the class MultiBranchTest method startMultiBranchPipelineRuns.
@Test
public void startMultiBranchPipelineRuns() throws Exception {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false), new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
WorkflowJob p = scheduleAndFindBranchProject(mp, "feature%2Fux-1");
j.waitUntilNoActivity();
Map resp = post("/organizations/jenkins/pipelines/p/branches/" + Util.rawEncode("feature%2Fux-1") + "/runs/", Collections.EMPTY_MAP);
String id = (String) resp.get("id");
String link = getHrefFromLinks(resp, "self");
Assert.assertEquals("/blue/rest/organizations/jenkins/pipelines/p/branches/feature%252Fux-1/runs/" + id + "/", link);
}
Aggregations