Add anchor tenant tests to DomainCreateFlowTest

Per a passing conversation with Corey, want to make sure that anchor tenants can still register during an active LRP period. No changes to the flows, just some explicit testing.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142181395
This commit is contained in:
ctingue 2016-12-15 13:34:38 -08:00 committed by Ben McIlwain
parent 669c3dc975
commit 8f9939cf56

View file

@ -956,10 +956,37 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
public void testSuccess_anchorTenantViaAuthCode() throws Exception { public void testSuccess_anchorTenantViaAuthCode() throws Exception {
setEppInput("domain_create_anchor_authcode.xml"); setEppInput("domain_create_anchor_authcode.xml");
persistContactsAndHosts(); persistContactsAndHosts();
runFlow(); runFlowAssertResponse(readFile("domain_create_anchor_response.xml"));
assertSuccessfulCreate("tld", true); assertSuccessfulCreate("tld", true);
assertNoLordn();
} }
@Test
public void testSuccess_anchorTenantViaAuthCode_duringLrp() throws Exception {
persistResource(Registry.get("tld").asBuilder()
.setLrpPeriod(new Interval(clock.nowUtc().minusDays(1), clock.nowUtc().plusDays(1)))
.build());
setEppInput("domain_create_anchor_authcode.xml");
persistContactsAndHosts();
runFlowAssertResponse(readFile("domain_create_anchor_response.xml"));
assertSuccessfulCreate("tld", true);
assertNoLordn();
}
@Test
public void testSuccess_anchorTenantViaExtension_duringLrp() throws Exception {
persistResource(Registry.get("tld").asBuilder()
.setLrpPeriod(new Interval(clock.nowUtc().minusDays(1), clock.nowUtc().plusDays(1)))
.build());
eppRequestSource = EppRequestSource.TOOL;
setEppInput("domain_create_anchor_tenant.xml");
persistContactsAndHosts();
runFlowAssertResponse(readFile("domain_create_response.xml"));
assertSuccessfulCreate("tld", true);
assertNoLordn();
}
@Test @Test
public void testSuccess_anchorTenantViaAuthCode_withClaims() throws Exception { public void testSuccess_anchorTenantViaAuthCode_withClaims() throws Exception {
persistResource(Registry.get("tld").asBuilder() persistResource(Registry.get("tld").asBuilder()