Add Buypass provider

This commit is contained in:
Richard Körber
2024-09-22 16:54:17 +02:00
parent beec5156c2
commit 87bbb9efbf
8 changed files with 208 additions and 3 deletions

View File

@@ -37,6 +37,26 @@ import org.shredzone.acme4j.exception.AcmeException;
*/
public class ProviderIT {
/**
* Test Buypass
*/
@Test
public void testBuypass() throws AcmeException, MalformedURLException {
var session = new Session("acme://buypass.com");
assertThat(session.getMetadata().getWebsite()).hasValue(new URL("https://buypass.com/"));
assertThatNoException().isThrownBy(() -> session.resourceUrl(Resource.NEW_ACCOUNT));
assertThat(session.getMetadata().isExternalAccountRequired()).isFalse();
assertThat(session.getMetadata().isAutoRenewalEnabled()).isFalse();
assertThat(session.resourceUrlOptional(Resource.RENEWAL_INFO)).isNotEmpty();
var sessionStage = new Session("acme://buypass.com/staging");
assertThat(sessionStage.getMetadata().getWebsite()).hasValue(new URL("https://buypass.com/"));
assertThatNoException().isThrownBy(() -> sessionStage.resourceUrl(Resource.NEW_ACCOUNT));
assertThat(sessionStage.getMetadata().isExternalAccountRequired()).isFalse();
assertThat(sessionStage.getMetadata().isAutoRenewalEnabled()).isFalse();
assertThat(sessionStage.resourceUrlOptional(Resource.RENEWAL_INFO)).isNotEmpty();
}
/**
* Test Google CA
*/