mirror of
https://github.com/google/nomulus
synced 2026-09-26 01:44:23 +00:00
Add period restriction to domain flows
Specifically, Domain[Create,Allocate,ApplicationCreate]Flow ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=147458283
This commit is contained in:
@@ -45,6 +45,7 @@ import google.registry.flows.ResourceFlowTestCase;
|
||||
import google.registry.flows.domain.DomainAllocateFlow.HasFinalStatusException;
|
||||
import google.registry.flows.domain.DomainAllocateFlow.MissingApplicationException;
|
||||
import google.registry.flows.domain.DomainAllocateFlow.OnlySuperuserCanAllocateException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.ExceedsMaxRegistrationYearsException;
|
||||
import google.registry.flows.exceptions.ResourceAlreadyExistsException;
|
||||
import google.registry.model.billing.BillingEvent;
|
||||
import google.registry.model.billing.BillingEvent.Flag;
|
||||
@@ -484,4 +485,12 @@ public class DomainAllocateFlowTest
|
||||
thrown.expect(OnlySuperuserCanAllocateException.class);
|
||||
runFlow(CommitMode.LIVE, UserPrivileges.NORMAL);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_max10Years() throws Exception {
|
||||
setupDomainApplication("tld", TldState.QUIET_PERIOD);
|
||||
setEppInput("domain_allocate_11_years.xml");
|
||||
thrown.expect(ExceedsMaxRegistrationYearsException.class);
|
||||
runFlowAsSuperuser();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user