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:
ctingue 2017-02-14 04:43:04 -08:00 committed by Ben McIlwain
parent 335b3f0cf8
commit 53262d82bb
14 changed files with 171 additions and 21 deletions

View file

@ -74,6 +74,7 @@ import google.registry.flows.domain.DomainFlowUtils.DomainLabelTooLongException;
import google.registry.flows.domain.DomainFlowUtils.DomainReservedException;
import google.registry.flows.domain.DomainFlowUtils.DuplicateContactForRoleException;
import google.registry.flows.domain.DomainFlowUtils.EmptyDomainNamePartException;
import google.registry.flows.domain.DomainFlowUtils.ExceedsMaxRegistrationYearsException;
import google.registry.flows.domain.DomainFlowUtils.ExpiredClaimException;
import google.registry.flows.domain.DomainFlowUtils.FeesMismatchException;
import google.registry.flows.domain.DomainFlowUtils.FeesRequiredForPremiumNameException;
@ -1575,6 +1576,16 @@ public class DomainApplicationCreateFlowTest
runFlow();
}
@Test
public void testFailure_max10Years() throws Exception {
createTld("tld", TldState.LANDRUSH);
setEppInput("domain_create_landrush_11_years.xml");
persistContactsAndHosts();
clock.advanceOneMilli();
thrown.expect(ExceedsMaxRegistrationYearsException.class);
runFlow();
}
/**
* There is special logic that disallows a failfast for domains in add grace period and sunrush
* add grace period, so make sure that they fail anyways in the actual flow.