Skip to content

Commit

Permalink
Delete checkstyle-result.xml after build.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Oct 16, 2024
1 parent 1b20774 commit fffcc04
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.jenkins.plugins.analysis.warnings.steps;

import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -159,16 +160,16 @@ void shouldCreateResultWithDifferentNameAndId() {
* Runs the CheckStyle parser without specifying a pattern: the default pattern should be used.
*/
@Test
void shouldUseDefaultFileNamePattern() {
FreeStyleProject project = createFreeStyleProject();
copySingleFileToWorkspace(project, "checkstyle.xml");
var checkStyle = new CheckStyle();
checkStyle.setPattern("**/checkstyle.xml");
enableWarnings(project, createTool(checkStyle, StringUtils.EMPTY));
void shouldUseDefaultFileNamePattern() throws IOException, InterruptedException {
var project = createFreeStyleProject();
var report = "checkstyle-result.xml";
copySingleFileToWorkspace(project, "checkstyle.xml", report);
enableWarnings(project, createTool(new CheckStyle(), StringUtils.EMPTY));

AnalysisResult result = scheduleBuildAndAssertStatus(project, Result.SUCCESS);
var result = scheduleBuildAndAssertStatus(project, Result.SUCCESS);

assertThat(result).hasTotalSize(6);
getWorkspace(project).child(report).delete();
}

/**
Expand Down

0 comments on commit fffcc04

Please sign in to comment.