Disable ssl.com staging unit tests

The ssl.com staging server's certificate seems to be unmonitored,
causing the acme4j build chain to break from time to time when their
certificate has expired. As this is blocking development, I have
decided to disable all related unit tests, and add a corresponding
note to the documentation.

The acme4j ssl.com provider is marked as experimental now, since it
is not fully covered by unit tests anymore.
This commit is contained in:
Richard Körber
2024-06-30 10:43:36 +02:00
parent a9ce33a921
commit ae60431a79
3 changed files with 26 additions and 7 deletions

View File

@@ -19,6 +19,7 @@ import static org.assertj.core.api.Assertions.assertThatNoException;
import java.net.MalformedURLException;
import java.net.URL;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.shredzone.acme4j.Session;
import org.shredzone.acme4j.connector.Resource;
@@ -67,7 +68,7 @@ public class ProviderIT {
}
/**
* Test ssl.com
* Test ssl.com, production
*/
@Test
public void testSslCom() throws AcmeException, MalformedURLException {
@@ -83,6 +84,18 @@ public class ProviderIT {
assertThat(sessionRsa.getMetadata().isExternalAccountRequired()).isTrue();
assertThat(sessionRsa.getMetadata().isAutoRenewalEnabled()).isFalse();
// If this test fails, the metadata has been fixed on server side. Then remove
// the patch at ZeroSSLAcmeProvider, and update the documentation.
var sessionEABCheck = new Session("https://acme.ssl.com/sslcom-dv-ecc");
assertThat(sessionEABCheck.getMetadata().isExternalAccountRequired()).isFalse();
}
/**
* Test ssl.com, staging server
*/
@Test
@Disabled("Instable due to frequent certificate expiration of acme-try.ssl.com")
public void testSslComStaging() throws AcmeException, MalformedURLException {
var sessionEccStage = new Session("acme://ssl.com/staging/ecc");
assertThat(sessionEccStage.getMetadata().getWebsite()).hasValue(new URL("https://www.ssl.com"));
assertThatNoException().isThrownBy(() -> sessionEccStage.resourceUrl(Resource.NEW_ACCOUNT));
@@ -95,10 +108,8 @@ public class ProviderIT {
assertThat(sessionRsaStage.getMetadata().isExternalAccountRequired()).isTrue();
assertThat(sessionRsaStage.getMetadata().isAutoRenewalEnabled()).isFalse();
// If these tests fail, the metadata have been fixed on server side. Then remove
// If this test fails, the metadata has been fixed on server side. Then remove
// the patch at ZeroSSLAcmeProvider, and update the documentation.
var sessionEABCheck = new Session("https://acme.ssl.com/sslcom-dv-ecc");
assertThat(sessionEABCheck.getMetadata().isExternalAccountRequired()).isFalse();
var sessionEABCheckStage = new Session("https://acme-try.ssl.com/sslcom-dv-ecc");
assertThat(sessionEABCheckStage.getMetadata().isExternalAccountRequired()).isFalse();
}