mirror of
https://github.com/google/nomulus.git
synced 2025-06-28 23:33:36 +02:00
Enforce anchor tenant domain create period
This verifies anchor tenant creates by registrars are for exactly 2 years, to simplify billing down the line (anchor tenants get 2 years of free domain creates). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=193931858
This commit is contained in:
parent
139c8e190d
commit
f56355c9e8
4 changed files with 59 additions and 0 deletions
|
@ -65,6 +65,7 @@ import google.registry.flows.EppException.UnimplementedExtensionException;
|
|||
import google.registry.flows.EppRequestSource;
|
||||
import google.registry.flows.ExtensionManager.UndeclaredServiceExtensionException;
|
||||
import google.registry.flows.ResourceFlowTestCase;
|
||||
import google.registry.flows.domain.DomainCreateFlow.AnchorTenantCreatePeriodException;
|
||||
import google.registry.flows.domain.DomainCreateFlow.DomainHasOpenApplicationsException;
|
||||
import google.registry.flows.domain.DomainCreateFlow.MustHaveSignedMarksInCurrentPhaseException;
|
||||
import google.registry.flows.domain.DomainCreateFlow.NoGeneralRegistrationsInCurrentPhaseException;
|
||||
|
@ -1059,6 +1060,14 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_anchorTenantViaAuthCode_notTwoYearPeriod() throws Exception {
|
||||
setEppInput("domain_create_anchor_authcode_invalid_years.xml");
|
||||
persistContactsAndHosts();
|
||||
EppException thrown = assertThrows(AnchorTenantCreatePeriodException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_anchorTenantViaAuthCode_matchingLrpToken() throws Exception {
|
||||
// This is definitely a corner case, as (without superuser) anchor tenants may only register
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue