Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>5.5</version>
<version>5.7</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -46,7 +46,7 @@
<!-- Pick up common dependencies for the selected LTS line: https://github.com/jenkinsci/bom#usage -->
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-${jenkins.baseline}.x</artifactId>
<version>3559.vb_5b_81183b_d23</version>
<version>4136.vca_c3202a_7fd1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
package io.jenkins.plugins.pipelinegraphview;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

import hudson.model.Result;
import io.jenkins.plugins.pipelinegraphview.utils.TestUtils;
import org.htmlunit.html.HtmlPage;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
import org.junit.Rule;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.junit.jupiter.WithJenkins;

public class PipelineGraphViewRebuildTest {
@Rule
public JenkinsRule j = new JenkinsRule();
@WithJenkins
class PipelineGraphViewRebuildTest {

@Issue("GH#330")
@Test
public void rebuildButtonStartsNewBuild() throws Exception {
void rebuildButtonStartsNewBuild(JenkinsRule j) throws Exception {
WorkflowRun run =
TestUtils.createAndRunJob(j, "hello_world", "helloWorldScriptedPipeline.jenkinsfile", Result.SUCCESS);

Expand All @@ -30,7 +29,7 @@ public void rebuildButtonStartsNewBuild() throws Exception {

@Issue("GH#330")
@Test
public void rebuildButtonRedirectsForParameterizedJob() throws Exception {
void rebuildButtonRedirectsForParameterizedJob(JenkinsRule j) throws Exception {
WorkflowRun run = TestUtils.createAndRunJob(
j, "echo_parameterized", "gh330_parameterizedBuild.jenkinsfile", Result.SUCCESS);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@
import java.util.List;
import net.sf.json.JSONObject;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
import org.junit.Rule;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.junit.jupiter.WithJenkins;

public class PipelineConsoleViewActionTest {
@Rule
public JenkinsRule j = new JenkinsRule();
@WithJenkins
class PipelineConsoleViewActionTest {

private static final String TEXT = "Hello, World!" + System.lineSeparator();

@Issue("GH#224")
@Test
public void getConsoleLogReturnLogText() throws Exception {
void getConsoleLogReturnLogText(JenkinsRule j) throws Exception {
WorkflowRun run = TestUtils.createAndRunJob(
j, "hello_world_scripted", "helloWorldScriptedPipeline.jenkinsfile", Result.SUCCESS);

Expand All @@ -43,7 +42,7 @@ public void getConsoleLogReturnLogText() throws Exception {

@Issue("GH#224")
@Test
public void getConsoleLogReturnsErrorText() throws Exception {
void getConsoleLogReturnsErrorText(JenkinsRule j) throws Exception {
WorkflowRun run =
TestUtils.createAndRunJob(j, "hello_world_scripted", "simpleError.jenkinsfile", Result.FAILURE);

Expand All @@ -61,7 +60,7 @@ public void getConsoleLogReturnsErrorText() throws Exception {

@Issue("GH#224")
@Test
public void getConsoleLogReturnLogTextWithOffset() throws Exception {
void getConsoleLogReturnLogTextWithOffset(JenkinsRule j) throws Exception {
WorkflowRun run = TestUtils.createAndRunJob(
j, "hello_world_scripted", "helloWorldScriptedPipeline.jenkinsfile", Result.SUCCESS);

Expand All @@ -80,7 +79,7 @@ public void getConsoleLogReturnLogTextWithOffset() throws Exception {

@Issue("GH#224")
@Test
public void getConsoleLogReturnLogTextWithNegativeOffset() throws Exception {
void getConsoleLogReturnLogTextWithNegativeOffset(JenkinsRule j) throws Exception {
WorkflowRun run = TestUtils.createAndRunJob(
j, "hello_world_scripted", "helloWorldScriptedPipeline.jenkinsfile", Result.SUCCESS);

Expand All @@ -101,7 +100,7 @@ public void getConsoleLogReturnLogTextWithNegativeOffset() throws Exception {

@Issue("GH#224")
@Test
public void getConsoleLogReturnLogTextWithLargeNegativeOffset() throws Exception {
void getConsoleLogReturnLogTextWithLargeNegativeOffset(JenkinsRule j) throws Exception {
WorkflowRun run = TestUtils.createAndRunJob(
j, "hello_world_scripted", "helloWorldScriptedPipeline.jenkinsfile", Result.SUCCESS);

Expand All @@ -120,7 +119,7 @@ public void getConsoleLogReturnLogTextWithLargeNegativeOffset() throws Exception

@Issue("GH#224")
@Test
public void getConsoleLogReturnLogTextWithLargeOffset() throws Exception {
void getConsoleLogReturnLogTextWithLargeOffset(JenkinsRule j) throws Exception {
WorkflowRun run = TestUtils.createAndRunJob(
j, "hello_world_scripted", "helloWorldScriptedPipeline.jenkinsfile", Result.SUCCESS);

Expand All @@ -137,7 +136,7 @@ public void getConsoleLogReturnLogTextWithLargeOffset() throws Exception {

@Issue("GH#224")
@Test
public void getConsoleLogOfStepWithOutputAndException() throws Exception {
void getConsoleLogOfStepWithOutputAndException(JenkinsRule j) throws Exception {
WorkflowRun run =
TestUtils.createAndRunJob(j, "exec_returns_error", "execStepReturnsError.jenkinsfile", Result.FAILURE);
PipelineNodeGraphAdapter builder = new PipelineNodeGraphAdapter(run);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@
import hudson.model.Result;
import java.util.List;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
import org.junit.Rule;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.junit.jupiter.WithJenkins;

public class PipelineGraphApiLegacyTest {

@Rule
public JenkinsRule j = new JenkinsRule();
@WithJenkins
class PipelineGraphApiLegacyTest {

@Test
public void createLegacyTree_unstableSmokes() throws Exception {
void createLegacyTree_unstableSmokes(JenkinsRule j) throws Exception {
WorkflowRun run = TestUtils.createAndRunJob(j, "unstableSmokes", "unstableSmokes.jenkinsfile", Result.FAILURE);
PipelineGraphApi api = new PipelineGraphApi(run);
PipelineGraph graph = api.createLegacyTree();
Expand Down Expand Up @@ -56,7 +54,7 @@ public void createLegacyTree_unstableSmokes() throws Exception {
}

@Test
public void createLegacyTree_complexSmokes() throws Exception {
void createLegacyTree_complexSmokes(JenkinsRule j) throws Exception {
WorkflowRun run = TestUtils.createAndRunJob(j, "complexSmokes", "complexSmokes.jenkinsfile", Result.SUCCESS);
PipelineGraphApi api = new PipelineGraphApi(run);
PipelineGraph graph = api.createLegacyTree();
Expand All @@ -82,7 +80,7 @@ public void createLegacyTree_complexSmokes() throws Exception {
}

@Test
public void createLegacyTree_scriptedParallel() throws Exception {
void createLegacyTree_scriptedParallel(JenkinsRule j) throws Exception {
WorkflowRun run =
TestUtils.createAndRunJob(j, "scriptedParallel", "scriptedParallel.jenkinsfile", Result.SUCCESS);
PipelineGraphApi api = new PipelineGraphApi(run);
Expand All @@ -102,7 +100,7 @@ public void createLegacyTree_scriptedParallel() throws Exception {

@Issue("GH#85")
@Test
public void createLegacyTree_syntheticStages() throws Exception {
void createLegacyTree_syntheticStages(JenkinsRule j) throws Exception {
WorkflowRun run =
TestUtils.createAndRunJob(j, "syntheticStages", "syntheticStages.jenkinsfile", Result.SUCCESS);
PipelineGraphApi api = new PipelineGraphApi(run);
Expand Down Expand Up @@ -131,7 +129,7 @@ public void createLegacyTree_syntheticStages() throws Exception {

@Issue("GH#87")
@Test
public void createLegacyTree_skippedParallel() throws Exception {
void createLegacyTree_skippedParallel(JenkinsRule j) throws Exception {
WorkflowRun run =
TestUtils.createAndRunJob(j, "skippedParallel", "skippedParallel.jenkinsfile", Result.SUCCESS);
PipelineGraphApi api = new PipelineGraphApi(run);
Expand Down
Loading
Loading