diff --git a/pom.xml b/pom.xml index ba536f7..12b0ca4 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.jenkins-ci.plugins plugin - 5.27 + 5.28 diff --git a/src/test/java/hudson/plugins/plot/PlotBuilderTest.java b/src/test/java/hudson/plugins/plot/PlotBuilderTest.java index 6c921c0..623e5ae 100644 --- a/src/test/java/hudson/plugins/plot/PlotBuilderTest.java +++ b/src/test/java/hudson/plugins/plot/PlotBuilderTest.java @@ -12,22 +12,19 @@ class PlotBuilderTest { @Test void testWithMinimalPipelineArgs(JenkinsRule r) throws Exception { WorkflowJob p = r.createProject(WorkflowJob.class, "projectUnderTest"); - p.setDefinition(new CpsFlowDefinition( - """ + p.setDefinition(new CpsFlowDefinition(""" node { \s plot csvFileName: 'plot-minimal.csv', group: 'My Data', style: 'line' - }""", - true)); + }""", true)); r.buildAndAssertSuccess(p); } @Test void testWithXML(JenkinsRule r) throws Exception { WorkflowJob p = r.createProject(WorkflowJob.class, "projectUnderTest"); - p.setDefinition(new CpsFlowDefinition( - """ + p.setDefinition(new CpsFlowDefinition(""" node { \s def content = '' content += '' @@ -44,16 +41,14 @@ void testWithXML(JenkinsRule r) throws Exception { nodeType: 'NODESET', xpath: 'my_data/test/@*'] ] - }""", - true)); + }""", true)); r.buildAndAssertSuccess(p); } @Test void testWithCSV(JenkinsRule r) throws Exception { WorkflowJob p = r.createProject(WorkflowJob.class, "projectUnderTest"); - p.setDefinition(new CpsFlowDefinition( - """ + p.setDefinition(new CpsFlowDefinition(""" node { \s def content = 'Avg,Median,90,min,max,samples,errors,error %' content += '515.33,196,1117,2,16550,97560,360,0.37' @@ -64,16 +59,14 @@ void testWithCSV(JenkinsRule r) throws Exception { style: 'line', yaxis: 'arbitrary', csvSeries: [[file: 'data.csv']] - }""", - true)); + }""", true)); r.buildAndAssertSuccess(p); } @Test void testWithProperties(JenkinsRule r) throws Exception { WorkflowJob p = r.createProject(WorkflowJob.class, "projectUnderTest"); - p.setDefinition(new CpsFlowDefinition( - """ + p.setDefinition(new CpsFlowDefinition(""" node { \s def content = 'YVALUE=1' writeFile file: 'data.properties', text: content @@ -86,8 +79,7 @@ void testWithProperties(JenkinsRule r) throws Exception { [file: 'data.properties', label: 'My Label'] ] - }""", - true)); + }""", true)); r.buildAndAssertSuccess(p); } }