You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/03/15 08:04:49 UTC
[maven-resolver] 18/19: Add UT for wrong input values
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch MRESOLVER-241
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git
commit c2b4d586177e06ca3ac01110f91fccd99f7cbc03
Author: Tamas Cservenak <ta...@cservenak.net>
AuthorDate: Mon Mar 14 11:54:59 2022 +0100
Add UT for wrong input values
---
.../impl/Maven2RepositoryLayoutFactoryTest.java | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/Maven2RepositoryLayoutFactoryTest.java b/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/Maven2RepositoryLayoutFactoryTest.java
index c239165..0fc7a29 100644
--- a/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/Maven2RepositoryLayoutFactoryTest.java
+++ b/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/Maven2RepositoryLayoutFactoryTest.java
@@ -331,4 +331,21 @@ public class Maven2RepositoryLayoutFactoryTest
assertEquals( 0, checksums.size() );
}
+ @Test
+ public void testCustomChecksumsIgnored_IllegalInout()
+ throws Exception
+ {
+ session.setConfigProperty( Maven2RepositoryLayoutFactory.CONFIG_PROP_OMIT_CHECKSUMS_FOR_EXTENSIONS, ".asc,foo" );
+ try
+ {
+ layout = factory.newInstance( session, newRepo( "default" ) );
+ fail( "Should not get here" );
+ }
+ catch ( IllegalArgumentException e )
+ {
+ String message = e.getMessage();
+ assertTrue( message, message.contains( Maven2RepositoryLayoutFactory.CONFIG_PROP_OMIT_CHECKSUMS_FOR_EXTENSIONS ) );
+ }
+ }
+
}