mirror of
https://github.com/google/nomulus
synced 2026-09-29 11:15:45 +00:00
Always require acknowledgment of premium fees
This removes the configuration ability on both Registry and Registrar entities to allow operations on premium domains to succeed without acking the fees using the fee extension. We only ever used this ability during the minna launch, and it was a fiasco. We have no intention of ever allowing creation, renewal, transfer, restoring, etc. of premium domains without acking the fees ever again, and haven't done so since 2013, so removing this ability allows us to simplify our code, data model, and tests. Note that all TLDs in our production system currently require price ACKing anyway, so from an external partner perspective this commit is a noop. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=229423650
This commit is contained in:
@@ -1150,21 +1150,35 @@ public class DomainTransferRequestFlowTest
|
||||
@Test
|
||||
public void testSuccess_premiumNotBlocked() throws Exception {
|
||||
setupDomain("rich", "example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
|
||||
clock.advanceOneMilli();
|
||||
// We don't verify the results; just check that the flow doesn't fail.
|
||||
runTest("domain_transfer_request_premium.xml", UserPrivileges.NORMAL);
|
||||
runTest(
|
||||
"domain_transfer_request_fee.xml",
|
||||
UserPrivileges.NORMAL,
|
||||
ImmutableMap.of(
|
||||
"DOMAIN", "rich.example",
|
||||
"YEARS", "1",
|
||||
"AMOUNT", "100.00",
|
||||
"FEE_VERSION", "0.12",
|
||||
"FEE_NS", "fee12"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_premiumNotBlockedInSuperuserMode() throws Exception {
|
||||
setupDomain("rich", "example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
|
||||
clock.advanceOneMilli();
|
||||
// Modify the Registrar to block premium names.
|
||||
persistResource(loadRegistrar("NewRegistrar").asBuilder().setBlockPremiumNames(true).build());
|
||||
// We don't verify the results; just check that the flow doesn't fail.
|
||||
runTest("domain_transfer_request_premium.xml", UserPrivileges.SUPERUSER);
|
||||
runTest(
|
||||
"domain_transfer_request_fee.xml",
|
||||
UserPrivileges.SUPERUSER,
|
||||
ImmutableMap.of(
|
||||
"DOMAIN", "rich.example",
|
||||
"YEARS", "1",
|
||||
"AMOUNT", "100.00",
|
||||
"FEE_VERSION", "0.12",
|
||||
"FEE_NS", "fee12"));
|
||||
}
|
||||
|
||||
private void runWrongCurrencyTest(Map<String, String> substitutions) {
|
||||
@@ -1275,7 +1289,7 @@ public class DomainTransferRequestFlowTest
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_registryRequiresAcking_feeNotProvidedOnPremiumName() {
|
||||
public void testFailure_feeNotProvidedOnPremiumName() {
|
||||
setupDomain("rich", "example");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
@@ -1284,20 +1298,6 @@ public class DomainTransferRequestFlowTest
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_registrarRequiresAcking_feeNotProvidedOnPremiumName() {
|
||||
setupDomain("rich", "example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
|
||||
persistResource(
|
||||
loadRegistrar("NewRegistrar").asBuilder().setPremiumPriceAckRequired(true).build());
|
||||
clock.advanceOneMilli();
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
FeesRequiredForPremiumNameException.class,
|
||||
() -> doFailingTest("domain_transfer_request_premium.xml"));
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_noAuthInfo() {
|
||||
setupDomain("example", "tld");
|
||||
|
||||
Reference in New Issue
Block a user