This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-gpg-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 5906c37 Cleanup tests (#310)
5906c37 is described below
commit 5906c372d584c0a405cd22f65d92e0f804f4b43c
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sun Dec 21 14:57:18 2025 +0100
Cleanup tests (#310)
Co-authored-by: Moderne <[email protected]>
---
.../java/org/apache/maven/plugins/gpg/BcSignerTest.java | 14 ++++++--------
.../apache/maven/plugins/gpg/GpgVersionConsumerTest.java | 4 +---
.../java/org/apache/maven/plugins/gpg/GpgVersionTest.java | 4 ++--
.../org/apache/maven/plugins/gpg/it/BcSignArtifactIT.java | 2 +-
.../org/apache/maven/plugins/gpg/it/GpgSignArtifactIT.java | 4 ++--
.../apache/maven/plugins/gpg/it/GpgSignAttachedMojoIT.java | 4 ++--
6 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/src/test/java/org/apache/maven/plugins/gpg/BcSignerTest.java
b/src/test/java/org/apache/maven/plugins/gpg/BcSignerTest.java
index ffa13fd..b4f1773 100644
--- a/src/test/java/org/apache/maven/plugins/gpg/BcSignerTest.java
+++ b/src/test/java/org/apache/maven/plugins/gpg/BcSignerTest.java
@@ -20,13 +20,11 @@ package org.apache.maven.plugins.gpg;
import java.io.File;
-import org.apache.maven.plugin.MojoFailureException;
import org.bouncycastle.bcpg.PublicKeyAlgorithmTags;
import org.eclipse.aether.DefaultRepositorySystemSession;
import org.eclipse.aether.internal.impl.DefaultLocalPathComposer;
import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
import org.eclipse.aether.repository.LocalRepository;
-import org.eclipse.aether.repository.NoLocalRepositoryManagerException;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -55,7 +53,7 @@ class BcSignerTest {
*/
@Disabled
@Test
- void testAgent() throws Exception {
+ void agent() throws Exception {
DefaultRepositorySystemSession session = new
DefaultRepositorySystemSession();
session.setLocalRepositoryManager(new
SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer())
.newInstance(session, new
LocalRepository("target/local-repo")));
@@ -85,7 +83,7 @@ class BcSignerTest {
}
@Test
- void testSingleKeyAscViaSubkeyFingerprint() throws
NoLocalRepositoryManagerException, MojoFailureException {
+ void singleKeyAscViaSubkeyFingerprint() throws Exception {
DefaultRepositorySystemSession session = new
DefaultRepositorySystemSession();
session.setLocalRepositoryManager(new
SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer())
.newInstance(session, new
LocalRepository("target/local-repo")));
@@ -107,7 +105,7 @@ class BcSignerTest {
}
@Test
- void testPrimaryKeyAsc() throws NoLocalRepositoryManagerException,
MojoFailureException {
+ void primaryKeyAsc() throws Exception {
DefaultRepositorySystemSession session = new
DefaultRepositorySystemSession();
session.setLocalRepositoryManager(new
SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer())
.newInstance(session, new
LocalRepository("target/local-repo")));
@@ -127,7 +125,7 @@ class BcSignerTest {
}
@Test
- void testFirstSubkeyFromAsc() throws NoLocalRepositoryManagerException,
MojoFailureException {
+ void firstSubkeyFromAsc() throws Exception {
DefaultRepositorySystemSession session = new
DefaultRepositorySystemSession();
session.setLocalRepositoryManager(new
SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer())
.newInstance(session, new
LocalRepository("target/local-repo")));
@@ -149,7 +147,7 @@ class BcSignerTest {
}
@Test
- void testSecondSubkeyFromAsc() throws NoLocalRepositoryManagerException,
MojoFailureException {
+ void secondSubkeyFromAsc() throws Exception {
DefaultRepositorySystemSession session = new
DefaultRepositorySystemSession();
session.setLocalRepositoryManager(new
SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer())
.newInstance(session, new
LocalRepository("target/local-repo")));
@@ -171,7 +169,7 @@ class BcSignerTest {
}
@Test
- void testKeyFromKeyringFromConf() throws
NoLocalRepositoryManagerException, MojoFailureException {
+ void keyFromKeyringFromConf() throws Exception {
DefaultRepositorySystemSession session = new
DefaultRepositorySystemSession();
session.setLocalRepositoryManager(new
SimpleLocalRepositoryManagerFactory(new DefaultLocalPathComposer())
.newInstance(session, new
LocalRepository("target/local-repo")));
diff --git
a/src/test/java/org/apache/maven/plugins/gpg/GpgVersionConsumerTest.java
b/src/test/java/org/apache/maven/plugins/gpg/GpgVersionConsumerTest.java
index 030110f..212afbe 100644
--- a/src/test/java/org/apache/maven/plugins/gpg/GpgVersionConsumerTest.java
+++ b/src/test/java/org/apache/maven/plugins/gpg/GpgVersionConsumerTest.java
@@ -18,8 +18,6 @@
*/
package org.apache.maven.plugins.gpg;
-import java.io.IOException;
-
import org.apache.maven.plugins.gpg.GpgVersionParser.GpgVersionConsumer;
import org.junit.jupiter.api.Test;
@@ -27,7 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
class GpgVersionConsumerTest {
@Test
- void test() throws IOException {
+ void test() throws Exception {
GpgVersionConsumer consumer = new GpgVersionConsumer();
consumer.consumeLine("gpg (GnuPG/MacGPG2) 2.2.10");
diff --git a/src/test/java/org/apache/maven/plugins/gpg/GpgVersionTest.java
b/src/test/java/org/apache/maven/plugins/gpg/GpgVersionTest.java
index 8e4eb17..53891e0 100644
--- a/src/test/java/org/apache/maven/plugins/gpg/GpgVersionTest.java
+++ b/src/test/java/org/apache/maven/plugins/gpg/GpgVersionTest.java
@@ -38,7 +38,7 @@ class GpgVersionTest {
}
@Test
- void testOpposite() {
+ void opposite() {
assertFalse(GpgVersion.parse("gpg (GnuPG)
2.2.1").isBefore(GpgVersion.parse("gpg (GnuPG) 2.2.1")));
assertFalse(GpgVersion.parse("gpg (GnuPG)
2.2.1").isBefore(GpgVersion.parse("2.1")));
assertFalse(GpgVersion.parse("gpg (GnuPG/MacGPG2)
2.2.10").isBefore(GpgVersion.parse("2.2.10")));
@@ -46,7 +46,7 @@ class GpgVersionTest {
}
@Test
- void testEquality() {
+ void equality() {
assertEquals(GpgVersion.parse("gpg (GnuPG) 2.2.1"),
GpgVersion.parse("gpg (GnuPG) 2.2.1"));
assertEquals(GpgVersion.parse("gpg (GnuPG) 2.2.1"),
GpgVersion.parse("2.2.1"));
assertEquals(GpgVersion.parse("gpg (GnuPG/MacGPG2) 2.2.10"),
GpgVersion.parse("2.2.10"));
diff --git
a/src/test/java/org/apache/maven/plugins/gpg/it/BcSignArtifactIT.java
b/src/test/java/org/apache/maven/plugins/gpg/it/BcSignArtifactIT.java
index c4c5aff..ead604e 100644
--- a/src/test/java/org/apache/maven/plugins/gpg/it/BcSignArtifactIT.java
+++ b/src/test/java/org/apache/maven/plugins/gpg/it/BcSignArtifactIT.java
@@ -58,7 +58,7 @@ public class BcSignArtifactIT extends ITSupport {
@MethodSource("data")
@ParameterizedTest
- void testPlacementOfArtifactInOutputDirectory(String pomPath, String
expectedFileLocation, String[] expectedFiles)
+ void placementOfArtifactInOutputDirectory(String pomPath, String
expectedFileLocation, String[] expectedFiles)
throws Exception {
// given
final File pomFile = InvokerTestUtils.getTestResource(pomPath);
diff --git
a/src/test/java/org/apache/maven/plugins/gpg/it/GpgSignArtifactIT.java
b/src/test/java/org/apache/maven/plugins/gpg/it/GpgSignArtifactIT.java
index 0a71c02..03c2743 100644
--- a/src/test/java/org/apache/maven/plugins/gpg/it/GpgSignArtifactIT.java
+++ b/src/test/java/org/apache/maven/plugins/gpg/it/GpgSignArtifactIT.java
@@ -59,7 +59,7 @@ public class GpgSignArtifactIT extends ITSupport {
@MethodSource("data")
@ParameterizedTest
- void testPlacementOfArtifactInOutputDirectory(String pomPath, String
expectedFileLocation, String[] expectedFiles)
+ void placementOfArtifactInOutputDirectory(String pomPath, String
expectedFileLocation, String[] expectedFiles)
throws Exception {
// given
final File pomFile = InvokerTestUtils.getTestResource(pomPath);
@@ -83,7 +83,7 @@ public class GpgSignArtifactIT extends ITSupport {
}
@Test
- void testWorstPracticesStillWork() throws Exception {
+ void worstPracticesStillWork() throws Exception {
// given
final File pomFile =
InvokerTestUtils.getTestResource("/it/sign-release-in-same-dir/pom.xml");
final InvocationRequest request =
diff --git
a/src/test/java/org/apache/maven/plugins/gpg/it/GpgSignAttachedMojoIT.java
b/src/test/java/org/apache/maven/plugins/gpg/it/GpgSignAttachedMojoIT.java
index c13e1c1..67c9563 100644
--- a/src/test/java/org/apache/maven/plugins/gpg/it/GpgSignAttachedMojoIT.java
+++ b/src/test/java/org/apache/maven/plugins/gpg/it/GpgSignAttachedMojoIT.java
@@ -28,9 +28,9 @@ import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
-public class GpgSignAttachedMojoIT extends ITSupport {
+class GpgSignAttachedMojoIT extends ITSupport {
@Test
- void testInteractiveWithoutPassphrase() throws Exception {
+ void interactiveWithoutPassphrase() throws Exception {
// given
final File pomFile =
InvokerTestUtils.getTestResource("/it/sign-release-without-passphrase-interactive/pom.xml");