Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-21486] Merged #2172: enforce plugin dependencies.
- Loading branch information
Showing
9 changed files
with
201 additions
and
12 deletions.
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
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
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
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
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
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,26 @@ | ||
package hudson; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class PluginWrapperTest { | ||
|
||
@Test | ||
public void dependencyTest() { | ||
String version = "plugin:0.0.2"; | ||
PluginWrapper.Dependency dependency = new PluginWrapper.Dependency(version); | ||
assertEquals("plugin", dependency.shortName); | ||
assertEquals("0.0.2", dependency.version); | ||
assertEquals(false, dependency.optional); | ||
} | ||
|
||
@Test | ||
public void optionalDependencyTest() { | ||
String version = "plugin:0.0.2;resolution:=optional"; | ||
PluginWrapper.Dependency dependency = new PluginWrapper.Dependency(version); | ||
assertEquals("plugin", dependency.shortName); | ||
assertEquals("0.0.2", dependency.version); | ||
assertEquals(true, dependency.optional); | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.