-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
11 changed files
with
70 additions
and
180 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
37 changes: 0 additions & 37 deletions
37
...main/java/org/jenkins/tools/test/model/plugin_metadata/LegacyPluginMetadataExtractor.java
This file was deleted.
Oops, something went wrong.
51 changes: 0 additions & 51 deletions
51
...main/java/org/jenkins/tools/test/model/plugin_metadata/ModernPluginMetadataExtractor.java
This file was deleted.
Oops, something went wrong.
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
52 changes: 0 additions & 52 deletions
52
.../java/org/jenkins/tools/test/model/plugin_metadata/ModernPluginMetadataExtractorTest.java
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
src/test/java/org/jenkins/tools/test/model/plugin_metadata/PluginMetadataExtractorTest.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,34 @@ | ||
package org.jenkins.tools.test.model.plugin_metadata; | ||
|
||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.Matchers.allOf; | ||
import static org.hamcrest.Matchers.hasProperty; | ||
import static org.hamcrest.Matchers.is; | ||
import static org.hamcrest.Matchers.startsWith; | ||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
import java.io.InputStream; | ||
import java.util.jar.Manifest; | ||
import org.junit.jupiter.api.Test; | ||
|
||
class PluginMetadataExtractorTest { | ||
|
||
@Test | ||
void extractMetadata() throws Exception { | ||
try (InputStream resourceAsStream = | ||
PluginMetadataExtractorTest.class.getResourceAsStream("PluginMetadataExtractorTest/MANIFEST.MF")) { | ||
assertNotNull(resourceAsStream); | ||
Manifest manifest = new Manifest(resourceAsStream); | ||
Plugin plugin = PluginMetadataExtractor.extractMetadata("aws-java-sdk-ec2", manifest, null); | ||
assertThat( | ||
plugin, | ||
allOf( | ||
hasProperty("pluginId", is("aws-java-sdk-ec2")), | ||
hasProperty("gitUrl", is("https://github.com/jenkinsci/aws-java-sdk-plugin.git")), | ||
hasProperty("module", is(":aws-java-sdk-ec2")), | ||
hasProperty("gitHash", is("938ad577f750694635f3c0160ac2110db5d6eb98")), | ||
hasProperty("name", is("Amazon Web Services SDK :: EC2")), | ||
hasProperty("version", startsWith("1.12.406-373.v59d2b_d41281b_")))); | ||
} | ||
} | ||
} |
20 changes: 0 additions & 20 deletions
20
...ins/tools/test/model/plugin_metadata/ModernPluginMetadataExtractorTest/legacy/MANIFEST.MF
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.