Add test that anchor tenants can be created in quiet period

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=250752454
This commit is contained in:
mcilwain 2019-05-30 13:40:23 -07:00 committed by Ben McIlwain
parent 987a648296
commit 7bdbd89e4d

View file

@ -1108,6 +1108,27 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
assertAllocationTokenWasRedeemed("abcDEF23456");
}
@Test
public void testSuccess_anchorTenant_duringQuietPeriodBeforeSunrise() throws Exception {
persistResource(
Registry.get("tld")
.asBuilder()
.setTldStateTransitions(
ImmutableSortedMap.of(
START_OF_TIME, PREDELEGATION,
DateTime.parse("1999-01-01T00:00:00Z"), QUIET_PERIOD,
// The anchor tenant is created here, on 1999-04-03
DateTime.parse("1999-07-01T00:00:00Z"), START_DATE_SUNRISE,
DateTime.parse("2000-01-01T00:00:00Z"), GENERAL_AVAILABILITY))
.build());
setEppInput("domain_create_anchor_allocationtoken.xml");
persistContactsAndHosts();
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken);
assertNoLordn();
assertAllocationTokenWasRedeemed("abcDEF23456");
}
@Test
public void testSuccess_reservedDomain_viaAllocationTokenExtension() throws Exception {
allocationToken =