mirror of https://github.com/shred/acme4j
Use java.net.HttpURLConnection as category class for tests that require a network connection.
parent
7097f23a2d
commit
f88bdf7e5f
|
@ -28,21 +28,6 @@
|
|||
<name>acme4j Let's Encrypt</name>
|
||||
<description>Let's Encrypt service provider for acme4j</description>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.19</version>
|
||||
<configuration>
|
||||
<parallel>classes</parallel>
|
||||
<threadCount>10</threadCount>
|
||||
<excludedGroups>org.shredzone.acme4j.provider.LetsEncryptAcmeClientProviderTest$RequiresNetwork</excludedGroups>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.shredzone.acme4j</groupId>
|
||||
|
|
|
@ -36,8 +36,6 @@ import org.shredzone.acme4j.AcmeClient;
|
|||
*/
|
||||
public class LetsEncryptAcmeClientProviderTest {
|
||||
|
||||
public interface RequiresNetwork {}
|
||||
|
||||
private static final String V01_DIRECTORY_URI = "https://acme-v01.api.letsencrypt.org/directory";
|
||||
private static final String STAGING_DIRECTORY_URI = "https://acme-staging.api.letsencrypt.org/directory";
|
||||
|
||||
|
@ -111,9 +109,12 @@ public class LetsEncryptAcmeClientProviderTest {
|
|||
/**
|
||||
* Test if the {@link LetsEncryptAcmeClientProvider#openConnection(URI)} accepts only
|
||||
* the Let's Encrypt certificate.
|
||||
* <p>
|
||||
* This test requires a network connection. It should be excluded from automated
|
||||
* builds.
|
||||
*/
|
||||
@Test
|
||||
@Category(RequiresNetwork.class)
|
||||
@Category(HttpURLConnection.class)
|
||||
public void testCertificate() throws IOException, URISyntaxException {
|
||||
LetsEncryptAcmeClientProvider provider = new LetsEncryptAcmeClientProvider();
|
||||
|
||||
|
|
10
pom.xml
10
pom.xml
|
@ -75,6 +75,16 @@
|
|||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.19</version>
|
||||
<configuration>
|
||||
<parallel>classes</parallel>
|
||||
<threadCount>10</threadCount>
|
||||
<excludedGroups>java.net.HttpURLConnection</excludedGroups>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
|
|
Loading…
Reference in New Issue