AbstractPipelineImpl extends BluePipeline { @Override public String getFullName(){ return getFullName(organization, job); } protected  AbstractPipelineImpl(BlueOrganization organization, Job job); @Override String getOrganizationName(); @Override @Nonnull BlueOrganization getOrganization(); @Override String getName(); @Override String getDisplayName(); @Override Integer getWeatherScore(); @Override BlueRun getLatestRun(); @Override Long getEstimatedDurationInMillis(); @Override BlueRunContainer getRuns(); @Override Collection<BlueActionProxy> getActions(); @Override @Navigable BlueQueueContainer getQueue(); @WebMethod(name="") @DELETE void delete(); @Override BlueFavorite favorite(@JsonBody BlueFavoriteAction favoriteAction); @Override String getFullName(); @Override String getFullDisplayName(); @Override @SuppressFBWarnings(value = "NP_BOOLEAN_RETURN_NULL", justification = "isDisabled will return null if the job type doesn't support it") Boolean getDisabled(); @Override void enable(); @Override void disable(); static String getFullDisplayName(@Nullable BlueOrganization org, @Nonnull Item item); static String getFullName(@Nullable BlueOrganization org, @Nonnull Item item); static ItemGroup<?> getBaseGroup(BlueOrganization org); @Override Link getLink(); static String getRecursivePathFromFullName(BluePipeline pipeline); @Override List<Object> getParameters(); static List<Object> getParameterDefinitions(Job job); Job getJob(); @Override Map<String, Boolean> getPermissions(); @Override BluePipelineScm getScm(); @Override BlueTrendContainer getTrends(); static Map<String, Boolean> getPermissions(AbstractItem item); boolean isFavorite(); static final Predicate<Run> isRunning; }
@Test public void testFreestyle() throws Exception { Job job = j.createFreeStyleProject("freestyle"); login(); Assert.assertEquals( get("/organizations/jenkins/pipelines/" + job.getFullName() + "/").get("disabled"), false ); put("/organizations/jenkins/pipelines/" + job.getFullName() + "/disable", "{}"); Assert.assertEquals( get("/organizations/jenkins/pipelines/" + job.getFullName() + "/").get("disabled"), true ); put("/organizations/jenkins/pipelines/" + job.getFullName() + "/enable", "{}"); Assert.assertEquals( get("/organizations/jenkins/pipelines/" + job.getFullName() + "/").get("disabled"), false ); }
@Test public void testWorkflowPipieline() throws Exception { Job job = j.createProject(WorkflowJob.class, "multibranch"); login(); Assert.assertEquals( get("/organizations/jenkins/pipelines/" + job.getFullName() + "/").get("disabled"), false ); put("/organizations/jenkins/pipelines/" + job.getFullName() + "/disable", "{}"); Assert.assertEquals( get("/organizations/jenkins/pipelines/" + job.getFullName() + "/").get("disabled"), true ); put("/organizations/jenkins/pipelines/" + job.getFullName() + "/enable", "{}"); Assert.assertEquals( get("/organizations/jenkins/pipelines/" + job.getFullName() + "/").get("disabled"), false ); }