Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-9904] Fixed so matrix jobs can use the plugin
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/test/java/hudson/plugins/lockedfilesreport/LockedFilesReporterIntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package hudson.plugins.lockedfilesreport; | ||
|
||
import hudson.matrix.Axis; | ||
import hudson.matrix.AxisList; | ||
import hudson.matrix.MatrixProject; | ||
import hudson.model.FreeStyleProject; | ||
import org.jvnet.hudson.test.Bug; | ||
import org.jvnet.hudson.test.HudsonTestCase; | ||
|
||
public class LockedFilesReporterIntegrationTest extends HudsonTestCase { | ||
@Bug(9904) | ||
public void testThatMatrixProjectCanUsePlugin() throws Exception { | ||
MatrixProject project = createMatrixProject(); | ||
AxisList axes = new AxisList(); | ||
axes.add(new Axis("direction","north","south")); | ||
project.setAxes(axes); | ||
LockedFilesReporter reporter = new LockedFilesReporter(); | ||
project.getPublishersList().add(reporter); | ||
assertBuildStatusSuccess(project.scheduleBuild2(0).get()); | ||
} | ||
|
||
public void testThatFreeStyleProjectCanUsePlugin() throws Exception { | ||
FreeStyleProject project = createFreeStyleProject(); | ||
project.getPublishersList().add(new LockedFilesReporter()); | ||
assertBuildStatusSuccess(project.scheduleBuild2(0).get()); | ||
} | ||
} |