mirror of
https://github.com/google/nomulus
synced 2026-01-03 03:35:42 +00:00
Refactor logic out of domain create flow tests (#2688)
This removes logic from an inner helper method so that it becomes more clear from callsites within each test exactly which behavior is expected from those test conditions.
This commit is contained in:
@@ -161,8 +161,6 @@ import google.registry.model.common.FeatureFlag;
|
|||||||
import google.registry.model.domain.Domain;
|
import google.registry.model.domain.Domain;
|
||||||
import google.registry.model.domain.DomainHistory;
|
import google.registry.model.domain.DomainHistory;
|
||||||
import google.registry.model.domain.GracePeriod;
|
import google.registry.model.domain.GracePeriod;
|
||||||
import google.registry.model.domain.fee.BaseFee.FeeType;
|
|
||||||
import google.registry.model.domain.fee.Fee;
|
|
||||||
import google.registry.model.domain.fee.FeeQueryCommandExtensionItem.CommandName;
|
import google.registry.model.domain.fee.FeeQueryCommandExtensionItem.CommandName;
|
||||||
import google.registry.model.domain.launch.LaunchNotice;
|
import google.registry.model.domain.launch.LaunchNotice;
|
||||||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||||
@@ -287,59 +285,45 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
persistContactsAndHosts("net"); // domain_create.xml uses hosts on "net".
|
persistContactsAndHosts("net"); // domain_create.xml uses hosts on "net".
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void assertSuccessfulCreate(String domainTld, ImmutableSet<Flag> expectedBillingFlags)
|
||||||
|
throws Exception {
|
||||||
|
assertSuccessfulCreate(domainTld, expectedBillingFlags, null, 24, null);
|
||||||
|
}
|
||||||
|
|
||||||
private void assertSuccessfulCreate(
|
private void assertSuccessfulCreate(
|
||||||
String domainTld, ImmutableSet<BillingBase.Flag> expectedBillingFlags) throws Exception {
|
String domainTld, ImmutableSet<Flag> expectedBillingFlags, double createCost)
|
||||||
assertSuccessfulCreate(domainTld, expectedBillingFlags, null);
|
throws Exception {
|
||||||
|
assertSuccessfulCreate(domainTld, expectedBillingFlags, null, createCost, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void assertSuccessfulCreate(
|
||||||
|
String domainTld, ImmutableSet<Flag> expectedBillingFlags, AllocationToken token)
|
||||||
|
throws Exception {
|
||||||
|
assertSuccessfulCreate(domainTld, expectedBillingFlags, token, 24, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void assertSuccessfulCreate(
|
private void assertSuccessfulCreate(
|
||||||
String domainTld,
|
String domainTld,
|
||||||
ImmutableSet<BillingBase.Flag> expectedBillingFlags,
|
ImmutableSet<Flag> expectedBillingFlags,
|
||||||
@Nullable AllocationToken allocationToken)
|
AllocationToken token,
|
||||||
|
double createCost)
|
||||||
|
throws Exception {
|
||||||
|
assertSuccessfulCreate(domainTld, expectedBillingFlags, token, createCost, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void assertSuccessfulCreate(
|
||||||
|
String domainTld,
|
||||||
|
ImmutableSet<Flag> expectedBillingFlags,
|
||||||
|
@Nullable AllocationToken token,
|
||||||
|
double createCost,
|
||||||
|
@Nullable Integer specifiedRenewCost)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
Domain domain = reloadResourceByForeignKey();
|
Domain domain = reloadResourceByForeignKey();
|
||||||
|
|
||||||
boolean isAnchorTenant = expectedBillingFlags.contains(ANCHOR_TENANT);
|
boolean isAnchorTenant = expectedBillingFlags.contains(ANCHOR_TENANT);
|
||||||
// Set up the creation cost.
|
// Set up the creation cost.
|
||||||
boolean isDomainPremium = isDomainPremium(getUniqueIdFromCommand(), clock.nowUtc());
|
boolean isDomainPremium = isDomainPremium(getUniqueIdFromCommand(), clock.nowUtc());
|
||||||
BigDecimal createCost = isDomainPremium ? BigDecimal.valueOf(200) : BigDecimal.valueOf(24);
|
|
||||||
if (isAnchorTenant) {
|
|
||||||
createCost = BigDecimal.ZERO;
|
|
||||||
}
|
|
||||||
if (expectedBillingFlags.contains(SUNRISE)) {
|
|
||||||
createCost =
|
|
||||||
createCost.multiply(
|
|
||||||
BigDecimal.valueOf(1 - RegistryConfig.getSunriseDomainCreateDiscount()));
|
|
||||||
}
|
|
||||||
if (allocationToken != null) {
|
|
||||||
if (allocationToken
|
|
||||||
.getRegistrationBehavior()
|
|
||||||
.equals(RegistrationBehavior.NONPREMIUM_CREATE)) {
|
|
||||||
createCost =
|
|
||||||
createCost.subtract(
|
|
||||||
BigDecimal.valueOf(isDomainPremium ? 87 : 0)); // premium is 100, standard 13
|
|
||||||
}
|
|
||||||
if (allocationToken.getRenewalPriceBehavior().equals(NONPREMIUM)) {
|
|
||||||
createCost =
|
|
||||||
createCost.subtract(
|
|
||||||
BigDecimal.valueOf(isDomainPremium ? 89 : 0)); // premium is 100, standard 11
|
|
||||||
}
|
|
||||||
if (allocationToken.getRenewalPriceBehavior().equals(SPECIFIED)) {
|
|
||||||
createCost =
|
|
||||||
createCost
|
|
||||||
.subtract(BigDecimal.valueOf(isDomainPremium ? 100 : 11))
|
|
||||||
.add(allocationToken.getRenewalPrice().get().getAmount());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FeesAndCredits feesAndCredits =
|
|
||||||
new FeesAndCredits.Builder()
|
|
||||||
.setCurrency(USD)
|
|
||||||
.addFeeOrCredit(
|
|
||||||
Fee.create(
|
|
||||||
createCost,
|
|
||||||
FeeType.CREATE,
|
|
||||||
isDomainPremium(getUniqueIdFromCommand(), clock.nowUtc())))
|
|
||||||
.build();
|
|
||||||
Money eapFee =
|
Money eapFee =
|
||||||
Money.of(
|
Money.of(
|
||||||
Tld.get(domainTld).getCurrency(),
|
Tld.get(domainTld).getCurrency(),
|
||||||
@@ -362,7 +346,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
RenewalPriceBehavior expectedRenewalPriceBehavior =
|
RenewalPriceBehavior expectedRenewalPriceBehavior =
|
||||||
isAnchorTenant
|
isAnchorTenant
|
||||||
? RenewalPriceBehavior.NONPREMIUM
|
? RenewalPriceBehavior.NONPREMIUM
|
||||||
: Optional.ofNullable(allocationToken)
|
: Optional.ofNullable(token)
|
||||||
.map(AllocationToken::getRenewalPriceBehavior)
|
.map(AllocationToken::getRenewalPriceBehavior)
|
||||||
.orElse(RenewalPriceBehavior.DEFAULT);
|
.orElse(RenewalPriceBehavior.DEFAULT);
|
||||||
// There should be one bill for the create and one for the recurrence autorenew event.
|
// There should be one bill for the create and one for the recurrence autorenew event.
|
||||||
@@ -371,13 +355,13 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
.setReason(Reason.CREATE)
|
.setReason(Reason.CREATE)
|
||||||
.setTargetId(getUniqueIdFromCommand())
|
.setTargetId(getUniqueIdFromCommand())
|
||||||
.setRegistrarId("TheRegistrar")
|
.setRegistrarId("TheRegistrar")
|
||||||
.setCost(feesAndCredits.getCreateCost())
|
.setCost(Money.of(USD, BigDecimal.valueOf(createCost)))
|
||||||
.setPeriodYears(2)
|
.setPeriodYears(2)
|
||||||
.setEventTime(clock.nowUtc())
|
.setEventTime(clock.nowUtc())
|
||||||
.setBillingTime(billingTime)
|
.setBillingTime(billingTime)
|
||||||
.setFlags(expectedBillingFlags)
|
.setFlags(expectedBillingFlags)
|
||||||
.setDomainHistory(historyEntry)
|
.setDomainHistory(historyEntry)
|
||||||
.setAllocationToken(allocationToken == null ? null : allocationToken.createVKey())
|
.setAllocationToken(Optional.ofNullable(token).map(t -> t.createVKey()).orElse(null))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
BillingRecurrence renewBillingEvent =
|
BillingRecurrence renewBillingEvent =
|
||||||
@@ -391,8 +375,8 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
.setDomainHistory(historyEntry)
|
.setDomainHistory(historyEntry)
|
||||||
.setRenewalPriceBehavior(expectedRenewalPriceBehavior)
|
.setRenewalPriceBehavior(expectedRenewalPriceBehavior)
|
||||||
.setRenewalPrice(
|
.setRenewalPrice(
|
||||||
Optional.ofNullable(allocationToken)
|
Optional.ofNullable(specifiedRenewCost)
|
||||||
.flatMap(AllocationToken::getRenewalPrice)
|
.map(r -> Money.of(USD, BigDecimal.valueOf(r)))
|
||||||
.orElse(null))
|
.orElse(null))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
@@ -480,7 +464,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
assertMutatingFlow(true);
|
assertMutatingFlow(true);
|
||||||
runFlowAssertResponse(
|
runFlowAssertResponse(
|
||||||
CommitMode.LIVE, userPrivileges, loadFile(responseXmlFile, substitutions));
|
CommitMode.LIVE, userPrivileges, loadFile(responseXmlFile, substitutions));
|
||||||
assertSuccessfulCreate(domainTld, ImmutableSet.of());
|
assertSuccessfulCreate(domainTld, ImmutableSet.of(), 24);
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -886,10 +870,14 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
clock.nowUtc().plusDays(1),
|
clock.nowUtc().plusDays(1),
|
||||||
Money.of(USD, 0)))
|
Money.of(USD, 0)))
|
||||||
.build());
|
.build());
|
||||||
doSuccessfulTest(
|
assertMutatingFlow(true);
|
||||||
"example",
|
runFlowAssertResponse(
|
||||||
"domain_create_response_premium_eap.xml",
|
CommitMode.LIVE,
|
||||||
ImmutableMap.of("DOMAIN", "rich.example"));
|
UserPrivileges.NORMAL,
|
||||||
|
loadFile(
|
||||||
|
"domain_create_response_premium_eap.xml", ImmutableMap.of("DOMAIN", "rich.example")));
|
||||||
|
assertSuccessfulCreate("example", ImmutableSet.of(), 200);
|
||||||
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1336,7 +1324,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
setEppInput("domain_create_anchor_allocationtoken.xml");
|
setEppInput("domain_create_anchor_allocationtoken.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken, 0);
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
assertAllocationTokenWasRedeemed("abcDEF23456");
|
assertAllocationTokenWasRedeemed("abcDEF23456");
|
||||||
}
|
}
|
||||||
@@ -1350,7 +1338,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
.setTokenType(SINGLE_USE)
|
.setTokenType(SINGLE_USE)
|
||||||
.setDomainName("resdom.tld")
|
.setDomainName("resdom.tld")
|
||||||
.setRenewalPriceBehavior(SPECIFIED)
|
.setRenewalPriceBehavior(SPECIFIED)
|
||||||
.setRenewalPrice(Money.of(USD, 0))
|
.setRenewalPrice(Money.of(USD, 1))
|
||||||
.build());
|
.build());
|
||||||
// Despite the domain being FULLY_BLOCKED, the non-superuser create succeeds the domain is also
|
// Despite the domain being FULLY_BLOCKED, the non-superuser create succeeds the domain is also
|
||||||
// RESERVED_FOR_SPECIFIC_USE and the correct allocation token is passed.
|
// RESERVED_FOR_SPECIFIC_USE and the correct allocation token is passed.
|
||||||
@@ -1359,7 +1347,8 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(
|
runFlowAssertResponse(
|
||||||
loadFile("domain_create_response.xml", ImmutableMap.of("DOMAIN", "resdom.tld")));
|
loadFile("domain_create_response.xml", ImmutableMap.of("DOMAIN", "resdom.tld")));
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(RESERVED), allocationToken);
|
// $13 for the first year plus $1 renewal for the second year =
|
||||||
|
assertSuccessfulCreate("tld", ImmutableSet.of(RESERVED), allocationToken, 14, 1);
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
assertAllocationTokenWasRedeemed("abc123");
|
assertAllocationTokenWasRedeemed("abc123");
|
||||||
}
|
}
|
||||||
@@ -1379,7 +1368,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
setEppInput("domain_create_anchor_allocationtoken.xml");
|
setEppInput("domain_create_anchor_allocationtoken.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken, 0);
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
assertAllocationTokenWasRedeemed("abcDEF23456");
|
assertAllocationTokenWasRedeemed("abcDEF23456");
|
||||||
}
|
}
|
||||||
@@ -1402,7 +1391,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
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", ImmutableSet.of(ANCHOR_TENANT), allocationToken);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken, 0);
|
||||||
assertDomainDnsRequests("example-one.tld");
|
assertDomainDnsRequests("example-one.tld");
|
||||||
assertClaimsLordn();
|
assertClaimsLordn();
|
||||||
assertAllocationTokenWasRedeemed("abcDEF23456");
|
assertAllocationTokenWasRedeemed("abcDEF23456");
|
||||||
@@ -1415,7 +1404,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(
|
runFlowAssertResponse(
|
||||||
loadFile("domain_create_response.xml", ImmutableMap.of("DOMAIN", "example.tld")));
|
loadFile("domain_create_response.xml", ImmutableMap.of("DOMAIN", "example.tld")));
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT));
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), 0);
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1450,7 +1439,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
SMD_VALID_TIME.toString(),
|
SMD_VALID_TIME.toString(),
|
||||||
"EXPIRATION_TIME",
|
"EXPIRATION_TIME",
|
||||||
SMD_VALID_TIME.plusYears(2).toString())));
|
SMD_VALID_TIME.plusYears(2).toString())));
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(SUNRISE, ANCHOR_TENANT));
|
assertSuccessfulCreate("tld", ImmutableSet.of(SUNRISE, ANCHOR_TENANT), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -1482,7 +1471,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
SMD_VALID_TIME.toString(),
|
SMD_VALID_TIME.toString(),
|
||||||
"EXPIRATION_TIME",
|
"EXPIRATION_TIME",
|
||||||
SMD_VALID_TIME.plusYears(2).toString())));
|
SMD_VALID_TIME.plusYears(2).toString())));
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT, SUNRISE), allocationToken);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT, SUNRISE), allocationToken, 0);
|
||||||
assertDomainDnsRequests("test-validate.tld");
|
assertDomainDnsRequests("test-validate.tld");
|
||||||
assertSunriseLordn();
|
assertSunriseLordn();
|
||||||
assertAllocationTokenWasRedeemed("abcDEF23456");
|
assertAllocationTokenWasRedeemed("abcDEF23456");
|
||||||
@@ -1505,7 +1494,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
setEppInput("domain_create_anchor_allocationtoken.xml");
|
setEppInput("domain_create_anchor_allocationtoken.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken, 0);
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
assertAllocationTokenWasRedeemed("abcDEF23456");
|
assertAllocationTokenWasRedeemed("abcDEF23456");
|
||||||
}
|
}
|
||||||
@@ -1929,7 +1918,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
loadFile(
|
loadFile(
|
||||||
"domain_create_response_premium.xml",
|
"domain_create_response_premium.xml",
|
||||||
ImmutableMap.of("EXDATE", "2001-04-03T22:00:00.0Z", "FEE", "200.00")));
|
ImmutableMap.of("EXDATE", "2001-04-03T22:00:00.0Z", "FEE", "200.00")));
|
||||||
assertSuccessfulCreate("example", ImmutableSet.of());
|
assertSuccessfulCreate("example", ImmutableSet.of(), 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
private BillingEvent runTest_defaultToken(String token) throws Exception {
|
private BillingEvent runTest_defaultToken(String token) throws Exception {
|
||||||
@@ -2148,7 +2137,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
loadFile(
|
loadFile(
|
||||||
"domain_create_response_premium.xml",
|
"domain_create_response_premium.xml",
|
||||||
ImmutableMap.of("EXDATE", "2001-04-03T22:00:00.0Z", "FEE", "200.00")));
|
ImmutableMap.of("EXDATE", "2001-04-03T22:00:00.0Z", "FEE", "200.00")));
|
||||||
assertSuccessfulCreate("example", ImmutableSet.of());
|
assertSuccessfulCreate("example", ImmutableSet.of(), 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -2572,7 +2561,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
persistBsaLabel("anchor");
|
persistBsaLabel("anchor");
|
||||||
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
|
runFlowAssertResponse(loadFile("domain_create_anchor_response.xml"));
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken, 0);
|
||||||
assertNoLordn();
|
assertNoLordn();
|
||||||
assertAllocationTokenWasRedeemed("abcDEF23456");
|
assertAllocationTokenWasRedeemed("abcDEF23456");
|
||||||
}
|
}
|
||||||
@@ -2738,7 +2727,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
SMD_VALID_TIME.toString(),
|
SMD_VALID_TIME.toString(),
|
||||||
"EXPIRATION_TIME",
|
"EXPIRATION_TIME",
|
||||||
SMD_VALID_TIME.plusYears(2).toString())));
|
SMD_VALID_TIME.plusYears(2).toString())));
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(SUNRISE));
|
assertSuccessfulCreate("tld", ImmutableSet.of(SUNRISE), 20.40);
|
||||||
assertSunriseLordn();
|
assertSunriseLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2761,7 +2750,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
SMD_VALID_TIME.toString(),
|
SMD_VALID_TIME.toString(),
|
||||||
"EXPIRATION_TIME",
|
"EXPIRATION_TIME",
|
||||||
SMD_VALID_TIME.plusYears(2).toString())));
|
SMD_VALID_TIME.plusYears(2).toString())));
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(SUNRISE));
|
assertSuccessfulCreate("tld", ImmutableSet.of(SUNRISE), 20.40);
|
||||||
assertSunriseLordn();
|
assertSunriseLordn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3245,7 +3234,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
"domain_create_allocationtoken.xml",
|
"domain_create_allocationtoken.xml",
|
||||||
ImmutableMap.of("DOMAIN", "example.tld", "YEARS", "2"));
|
ImmutableMap.of("DOMAIN", "example.tld", "YEARS", "2"));
|
||||||
runFlow();
|
runFlow();
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), token);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), token, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -3265,7 +3254,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
"domain_create_premium_allocationtoken.xml",
|
"domain_create_premium_allocationtoken.xml",
|
||||||
ImmutableMap.of("YEARS", "2", "FEE", "111.00"));
|
ImmutableMap.of("YEARS", "2", "FEE", "111.00"));
|
||||||
runFlow();
|
runFlow();
|
||||||
assertSuccessfulCreate("example", ImmutableSet.of(), token);
|
assertSuccessfulCreate("example", ImmutableSet.of(), token, 111);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -3286,7 +3275,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
"domain_create_premium_allocationtoken.xml",
|
"domain_create_premium_allocationtoken.xml",
|
||||||
ImmutableMap.of("YEARS", "2", "FEE", "101.00"));
|
ImmutableMap.of("YEARS", "2", "FEE", "101.00"));
|
||||||
runFlow();
|
runFlow();
|
||||||
assertSuccessfulCreate("example", ImmutableSet.of(), token);
|
assertSuccessfulCreate("example", ImmutableSet.of(), token, 101, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -3438,7 +3427,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
ImmutableMap.of("DOMAIN", "example.tld", "YEARS", "2"));
|
ImmutableMap.of("DOMAIN", "example.tld", "YEARS", "2"));
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlow();
|
runFlow();
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), token);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), token, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -3492,7 +3481,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
"domain_create_allocationtoken.xml",
|
"domain_create_allocationtoken.xml",
|
||||||
ImmutableMap.of("DOMAIN", "example.tld", "YEARS", "2"));
|
ImmutableMap.of("DOMAIN", "example.tld", "YEARS", "2"));
|
||||||
runFlow();
|
runFlow();
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), token);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), token, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -3510,7 +3499,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
.build());
|
.build());
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlow();
|
runFlow();
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(SUNRISE, ANCHOR_TENANT), allocationToken);
|
assertSuccessfulCreate("tld", ImmutableSet.of(SUNRISE, ANCHOR_TENANT), allocationToken, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -3572,7 +3561,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
"domain_create_allocationtoken.xml",
|
"domain_create_allocationtoken.xml",
|
||||||
ImmutableMap.of("DOMAIN", "example.tld", "YEARS", "2"));
|
ImmutableMap.of("DOMAIN", "example.tld", "YEARS", "2"));
|
||||||
runFlow();
|
runFlow();
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), token);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), token, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -3599,7 +3588,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
setEppInput("domain_create_allocationtoken_claims.xml");
|
setEppInput("domain_create_allocationtoken_claims.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlow();
|
runFlow();
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -3649,7 +3638,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
"domain_create_allocationtoken.xml",
|
"domain_create_allocationtoken.xml",
|
||||||
ImmutableMap.of("DOMAIN", "example.tld", "YEARS", "2"));
|
ImmutableMap.of("DOMAIN", "example.tld", "YEARS", "2"));
|
||||||
runFlow();
|
runFlow();
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), token);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), token, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -3663,7 +3652,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
|||||||
setEppInput("domain_create_allocationtoken_claims.xml");
|
setEppInput("domain_create_allocationtoken_claims.xml");
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
runFlow();
|
runFlow();
|
||||||
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken);
|
assertSuccessfulCreate("tld", ImmutableSet.of(ANCHOR_TENANT), allocationToken, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user