mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Add proper flagging for start-date sunrise billing
This will allow us to check in actual SUNRISE billing policies per launch (15% discount), instead of relying on ad-hoc timestamps. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=200077926
This commit is contained in:
parent
5fdd7a15ca
commit
446617e4e5
2 changed files with 42 additions and 37 deletions
|
@ -310,7 +310,7 @@ public class DomainCreateFlow implements TransactionalFlow {
|
||||||
// Bill for the create.
|
// Bill for the create.
|
||||||
BillingEvent.OneTime createBillingEvent =
|
BillingEvent.OneTime createBillingEvent =
|
||||||
createOneTimeBillingEvent(
|
createOneTimeBillingEvent(
|
||||||
registry, isAnchorTenant, years, feesAndCredits, historyEntry, now);
|
registry, isAnchorTenant, isSunriseCreate, years, feesAndCredits, historyEntry, now);
|
||||||
// Create a new autorenew billing event and poll message starting at the expiration time.
|
// Create a new autorenew billing event and poll message starting at the expiration time.
|
||||||
BillingEvent.Recurring autorenewBillingEvent =
|
BillingEvent.Recurring autorenewBillingEvent =
|
||||||
createAutorenewBillingEvent(historyEntry, registrationExpirationTime);
|
createAutorenewBillingEvent(historyEntry, registrationExpirationTime);
|
||||||
|
@ -502,10 +502,19 @@ public class DomainCreateFlow implements TransactionalFlow {
|
||||||
private OneTime createOneTimeBillingEvent(
|
private OneTime createOneTimeBillingEvent(
|
||||||
Registry registry,
|
Registry registry,
|
||||||
boolean isAnchorTenant,
|
boolean isAnchorTenant,
|
||||||
|
boolean isSunriseCreate,
|
||||||
int years,
|
int years,
|
||||||
FeesAndCredits feesAndCredits,
|
FeesAndCredits feesAndCredits,
|
||||||
HistoryEntry historyEntry,
|
HistoryEntry historyEntry,
|
||||||
DateTime now) {
|
DateTime now) {
|
||||||
|
ImmutableSet.Builder<Flag> flagsBuilder = new ImmutableSet.Builder<>();
|
||||||
|
// Sunrise and anchor tenancy are orthogonal tags and thus both can be present together.
|
||||||
|
if (isSunriseCreate) {
|
||||||
|
flagsBuilder.add(Flag.SUNRISE);
|
||||||
|
}
|
||||||
|
if (isAnchorTenant) {
|
||||||
|
flagsBuilder.add(Flag.ANCHOR_TENANT);
|
||||||
|
}
|
||||||
return new BillingEvent.OneTime.Builder()
|
return new BillingEvent.OneTime.Builder()
|
||||||
.setReason(Reason.CREATE)
|
.setReason(Reason.CREATE)
|
||||||
.setTargetId(targetId)
|
.setTargetId(targetId)
|
||||||
|
@ -518,10 +527,7 @@ public class DomainCreateFlow implements TransactionalFlow {
|
||||||
isAnchorTenant
|
isAnchorTenant
|
||||||
? registry.getAnchorTenantAddGracePeriodLength()
|
? registry.getAnchorTenantAddGracePeriodLength()
|
||||||
: registry.getAddGracePeriodLength()))
|
: registry.getAddGracePeriodLength()))
|
||||||
.setFlags(
|
.setFlags(flagsBuilder.build())
|
||||||
isAnchorTenant
|
|
||||||
? ImmutableSet.of(BillingEvent.Flag.ANCHOR_TENANT)
|
|
||||||
: ImmutableSet.of())
|
|
||||||
.setParent(historyEntry)
|
.setParent(historyEntry)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,7 +203,8 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
persistContactsAndHosts("net"); // domain_create.xml uses hosts on "net".
|
persistContactsAndHosts("net"); // domain_create.xml uses hosts on "net".
|
||||||
}
|
}
|
||||||
|
|
||||||
private void assertSuccessfulCreate(String domainTld, boolean isAnchorTenant) throws Exception {
|
private void assertSuccessfulCreate(
|
||||||
|
String domainTld, ImmutableSet<BillingEvent.Flag> expectedBillingFlags) throws Exception {
|
||||||
DomainResource domain = reloadResourceByForeignKey();
|
DomainResource domain = reloadResourceByForeignKey();
|
||||||
|
|
||||||
// Calculate the total cost.
|
// Calculate the total cost.
|
||||||
|
@ -215,13 +216,11 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
Money.of(
|
Money.of(
|
||||||
Registry.get(domainTld).getCurrency(),
|
Registry.get(domainTld).getCurrency(),
|
||||||
Registry.get(domainTld).getEapFeeFor(clock.nowUtc()).getCost());
|
Registry.get(domainTld).getEapFeeFor(clock.nowUtc()).getCost());
|
||||||
|
boolean isAnchorTenant = expectedBillingFlags.contains(Flag.ANCHOR_TENANT);
|
||||||
DateTime billingTime =
|
DateTime billingTime =
|
||||||
isAnchorTenant
|
isAnchorTenant
|
||||||
? clock.nowUtc().plus(Registry.get(domainTld).getAnchorTenantAddGracePeriodLength())
|
? clock.nowUtc().plus(Registry.get(domainTld).getAnchorTenantAddGracePeriodLength())
|
||||||
: clock.nowUtc().plus(Registry.get(domainTld).getAddGracePeriodLength());
|
: clock.nowUtc().plus(Registry.get(domainTld).getAddGracePeriodLength());
|
||||||
ImmutableSet<BillingEvent.Flag> billingFlags =
|
|
||||||
isAnchorTenant ? ImmutableSet.of(BillingEvent.Flag.ANCHOR_TENANT) : ImmutableSet.of();
|
|
||||||
HistoryEntry historyEntry = getHistoryEntries(domain).get(0);
|
HistoryEntry historyEntry = getHistoryEntries(domain).get(0);
|
||||||
assertAboutDomains()
|
assertAboutDomains()
|
||||||
.that(domain)
|
.that(domain)
|
||||||
|
@ -242,7 +241,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
.setPeriodYears(2)
|
.setPeriodYears(2)
|
||||||
.setEventTime(clock.nowUtc())
|
.setEventTime(clock.nowUtc())
|
||||||
.setBillingTime(billingTime)
|
.setBillingTime(billingTime)
|
||||||
.setFlags(billingFlags)
|
.setFlags(expectedBillingFlags)
|
||||||
.setParent(historyEntry)
|
.setParent(historyEntry)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
@ -271,7 +270,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
.setCost(eapFee)
|
.setCost(eapFee)
|
||||||
.setEventTime(clock.nowUtc())
|
.setEventTime(clock.nowUtc())
|
||||||
.setBillingTime(billingTime)
|
.setBillingTime(billingTime)
|
||||||
.setFlags(billingFlags)
|
.setFlags(expectedBillingFlags)
|
||||||
.setParent(historyEntry)
|
.setParent(historyEntry)
|
||||||
.build();
|
.build();
|
||||||
expectedBillingEvents.add(eapBillingEvent);
|
expectedBillingEvents.add(eapBillingEvent);
|
||||||
|
@ -353,7 +352,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
assertTransactionalFlow(true);
|
assertTransactionalFlow(true);
|
||||||
runFlowAssertResponse(
|
runFlowAssertResponse(
|
||||||
CommitMode.LIVE, userPrivileges, loadFile(responseXmlFile, substitutions));
|
CommitMode.LIVE, userPrivileges, loadFile(responseXmlFile, substitutions));
|
||||||
assertSuccessfulCreate(domainTld, false);
|
assertSuccessfulCreate(domainTld, ImmutableSet.of());
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,7 +440,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
loadFile(
|
loadFile(
|
||||||
"domain_create_response_wildcard.xml", ImmutableMap.of("DOMAIN", "example.foo.tld"));
|
"domain_create_response_wildcard.xml", ImmutableMap.of("DOMAIN", "example.foo.tld"));
|
||||||
runFlowAssertResponse(CommitMode.LIVE, UserPrivileges.NORMAL, expectedResponseXml);
|
runFlowAssertResponse(CommitMode.LIVE, UserPrivileges.NORMAL, expectedResponseXml);
|
||||||
assertSuccessfulCreate("foo.tld", false);
|
assertSuccessfulCreate("foo.tld", ImmutableSet.of());
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,7 +468,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
setEppInput("domain_create_anchor_tenant.xml");
|
setEppInput("domain_create_anchor_tenant.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,7 +489,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
setEppInput("domain_create_lrp.xml");
|
setEppInput("domain_create_lrp.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
||||||
assertSuccessfulCreate("tld", false);
|
assertSuccessfulCreate("tld", ImmutableSet.of());
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
assertThat(ofy().load().entity(token).now().getRedemptionHistoryEntry()).isNotNull();
|
assertThat(ofy().load().entity(token).now().getRedemptionHistoryEntry()).isNotNull();
|
||||||
}
|
}
|
||||||
|
@ -515,7 +514,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
setEppInput("domain_create_lrp.xml");
|
setEppInput("domain_create_lrp.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
||||||
assertSuccessfulCreate("tld", false);
|
assertSuccessfulCreate("tld", ImmutableSet.of());
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
assertThat(ofy().load().entity(token).now().getRedemptionHistoryEntry()).isNull();
|
assertThat(ofy().load().entity(token).now().getRedemptionHistoryEntry()).isNull();
|
||||||
}
|
}
|
||||||
|
@ -829,7 +828,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
setEppInput("domain_create_idn_minna.xml");
|
setEppInput("domain_create_idn_minna.xml");
|
||||||
persistContactsAndHosts("net");
|
persistContactsAndHosts("net");
|
||||||
runFlowAssertResponse(loadFile("domain_create_response_idn_minna.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response_idn_minna.xml"));
|
||||||
assertSuccessfulCreate("xn--q9jyb4c", false);
|
assertSuccessfulCreate("xn--q9jyb4c", ImmutableSet.of());
|
||||||
assertDnsTasksEnqueued("xn--abc-873b2e7eb1k8a4lpjvv.xn--q9jyb4c");
|
assertDnsTasksEnqueued("xn--abc-873b2e7eb1k8a4lpjvv.xn--q9jyb4c");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -868,7 +867,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
setEppInput("domain_create_claim_notice.xml");
|
setEppInput("domain_create_claim_notice.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
||||||
assertSuccessfulCreate("tld", false);
|
assertSuccessfulCreate("tld", ImmutableSet.of());
|
||||||
assertDnsTasksEnqueued("example-one.tld");
|
assertDnsTasksEnqueued("example-one.tld");
|
||||||
assertClaimsLordn();
|
assertClaimsLordn();
|
||||||
}
|
}
|
||||||
|
@ -880,7 +879,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
persistResource(Registry.get("tld").asBuilder().setClaimsPeriodEnd(clock.nowUtc()).build());
|
persistResource(Registry.get("tld").asBuilder().setClaimsPeriodEnd(clock.nowUtc()).build());
|
||||||
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
||||||
assertSuccessfulCreate("tld", false);
|
assertSuccessfulCreate("tld", ImmutableSet.of());
|
||||||
assertDnsTasksEnqueued("example.tld");
|
assertDnsTasksEnqueued("example.tld");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1086,7 +1085,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(
|
runFlowAssertResponse(
|
||||||
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_create_anchor_response.xml"));
|
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_create_anchor_response.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
// Token should not be marked as used, since interpreting the authcode as anchor tenant should
|
// Token should not be marked as used, since interpreting the authcode as anchor tenant should
|
||||||
// take precedence.
|
// take precedence.
|
||||||
assertThat(ofy().load().entity(token).now().getRedemptionHistoryEntry()).isNull();
|
assertThat(ofy().load().entity(token).now().getRedemptionHistoryEntry()).isNull();
|
||||||
|
@ -1097,7 +1096,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
setEppInput("domain_create_anchor_authcode.xml");
|
setEppInput("domain_create_anchor_authcode.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1111,7 +1110,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
setEppInput("domain_create_anchor_authcode.xml");
|
setEppInput("domain_create_anchor_authcode.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1126,7 +1125,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
setEppInput("domain_create_anchor_tenant.xml");
|
setEppInput("domain_create_anchor_tenant.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1143,7 +1142,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
clock.setTo(DateTime.parse("2009-08-16T09:00:00.0Z"));
|
clock.setTo(DateTime.parse("2009-08-16T09:00:00.0Z"));
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
assertDnsTasksEnqueued("example-one.tld");
|
assertDnsTasksEnqueued("example-one.tld");
|
||||||
assertClaimsLordn();
|
assertClaimsLordn();
|
||||||
}
|
}
|
||||||
|
@ -1154,7 +1153,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(
|
runFlowAssertResponse(
|
||||||
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_create_reserved_response.xml"));
|
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_create_reserved_response.xml"));
|
||||||
assertSuccessfulCreate("tld", false);
|
assertSuccessfulCreate("tld", ImmutableSet.of());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -1337,7 +1336,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
persistResource(loadRegistrar("TheRegistrar").asBuilder().setBlockPremiumNames(true).build());
|
persistResource(loadRegistrar("TheRegistrar").asBuilder().setBlockPremiumNames(true).build());
|
||||||
runFlowAssertResponse(
|
runFlowAssertResponse(
|
||||||
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_create_response_premium.xml"));
|
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_create_response_premium.xml"));
|
||||||
assertSuccessfulCreate("example", false);
|
assertSuccessfulCreate("example", ImmutableSet.of());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -1728,7 +1727,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1740,7 +1739,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response_encoded_signed_mark_name.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response_encoded_signed_mark_name.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT, Flag.SUNRISE));
|
||||||
assertSunriseLordn();
|
assertSunriseLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1752,7 +1751,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
assertClaimsLordn();
|
assertClaimsLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1781,7 +1780,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1794,7 +1793,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
ImmutableMap.of("NAME", "test-validate.tld", "PHASE", "sunrise"));
|
ImmutableMap.of("NAME", "test-validate.tld", "PHASE", "sunrise"));
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response_encoded_signed_mark_name.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response_encoded_signed_mark_name.xml"));
|
||||||
assertSuccessfulCreate("tld", false);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.SUNRISE));
|
||||||
assertSunriseLordn();
|
assertSunriseLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1812,7 +1811,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
setEppInput("domain_create_sunrise_encoded_signed_mark_no_type.xml");
|
setEppInput("domain_create_sunrise_encoded_signed_mark_no_type.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response_encoded_signed_mark_name.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response_encoded_signed_mark_name.xml"));
|
||||||
assertSuccessfulCreate("tld", false);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.SUNRISE));
|
||||||
assertSunriseLordn();
|
assertSunriseLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1918,7 +1917,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1930,7 +1929,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response_encoded_signed_mark_name.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response_encoded_signed_mark_name.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT, Flag.SUNRISE));
|
||||||
assertSunriseLordn();
|
assertSunriseLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1942,7 +1941,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
assertClaimsLordn();
|
assertClaimsLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1971,7 +1970,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1995,7 +1994,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||||
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
runFlowAssertResponse(loadFile("domain_create_response_claims.xml"));
|
||||||
assertSuccessfulCreate("tld", true);
|
assertSuccessfulCreate("tld", ImmutableSet.of(Flag.ANCHOR_TENANT));
|
||||||
assertClaimsLordn();
|
assertClaimsLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue