mirror of
https://github.com/google/nomulus.git
synced 2025-08-06 01:35:17 +02: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:
parent
3e0eaecc9b
commit
37aa1d1815
33 changed files with 81 additions and 257 deletions
|
@ -656,20 +656,9 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_premium() throws Exception {
|
||||
createTld("example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
|
||||
setEppInput("domain_create_premium.xml");
|
||||
persistContactsAndHosts("net");
|
||||
doSuccessfulTest(
|
||||
"example", "domain_create_response_premium.xml", ImmutableMap.of("DOMAIN", "rich.example"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_premiumAndEap() throws Exception {
|
||||
createTld("example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(true).build());
|
||||
setEppInput("domain_create_premium_eap.xml");
|
||||
persistContactsAndHosts("net");
|
||||
persistResource(
|
||||
|
@ -1258,7 +1247,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
@Test
|
||||
public void testSuccess_superuserOverridesPremiumNameBlock() throws Exception {
|
||||
createTld("example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
|
||||
setEppInput("domain_create_premium.xml");
|
||||
persistContactsAndHosts("net");
|
||||
// Modify the Registrar to block premium names.
|
||||
|
@ -1421,7 +1409,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
@Test
|
||||
public void testFailure_premiumBlocked() {
|
||||
createTld("example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
|
||||
setEppInput("domain_create_premium.xml");
|
||||
persistContactsAndHosts("net");
|
||||
// Modify the Registrar to block premium names.
|
||||
|
@ -1431,34 +1418,9 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_premiumNotAcked_byRegistryRequiringAcking() {
|
||||
public void testFailure_premiumNotAcked() {
|
||||
createTld("example");
|
||||
assertThat(Registry.get("example").getPremiumPriceAckRequired()).isTrue();
|
||||
setEppInput("domain_create_premium.xml");
|
||||
persistContactsAndHosts("net");
|
||||
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_premiumNotAcked_byRegistrarRequiringAcking() {
|
||||
createTld("example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
|
||||
persistResource(
|
||||
loadRegistrar("TheRegistrar").asBuilder().setPremiumPriceAckRequired(true).build());
|
||||
setEppInput("domain_create_premium.xml");
|
||||
persistContactsAndHosts("net");
|
||||
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_premiumNotAcked_whenRegistrarAndRegistryRequireAcking() {
|
||||
createTld("example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(true).build());
|
||||
persistResource(
|
||||
loadRegistrar("TheRegistrar").asBuilder().setPremiumPriceAckRequired(true).build());
|
||||
setEppInput("domain_create_premium.xml");
|
||||
setEppInput("domain_create.xml", ImmutableMap.of("DOMAIN", "rich.example"));
|
||||
persistContactsAndHosts("net");
|
||||
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
|
|
|
@ -715,21 +715,8 @@ public class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, D
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_registryRequiresAcking_feeNotProvidedOnPremiumName() throws Exception {
|
||||
public void testFailure_feeNotProvidedOnPremiumName() throws Exception {
|
||||
createTld("example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(true).build());
|
||||
setEppInput("domain_renew_premium.xml");
|
||||
persistDomain();
|
||||
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_registrarRequiresAcking_feeNotProvidedOnPremiumName() throws Exception {
|
||||
createTld("example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
|
||||
persistResource(
|
||||
loadRegistrar("TheRegistrar").asBuilder().setPremiumPriceAckRequired(true).build());
|
||||
setEppInput("domain_renew_premium.xml");
|
||||
persistDomain();
|
||||
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
|
||||
|
|
|
@ -88,7 +88,7 @@ public class DomainRestoreRequestFlowTest
|
|||
@Before
|
||||
public void initDomainTest() {
|
||||
createTld("tld");
|
||||
setEppInput("domain_update_restore_request.xml");
|
||||
setEppInput("domain_update_restore_request.xml", ImmutableMap.of("DOMAIN", "example.tld"));
|
||||
}
|
||||
|
||||
void persistPendingDeleteDomain() throws Exception {
|
||||
|
@ -123,14 +123,14 @@ public class DomainRestoreRequestFlowTest
|
|||
|
||||
@Test
|
||||
public void testDryRun() throws Exception {
|
||||
setEppInput("domain_update_restore_request.xml");
|
||||
setEppInput("domain_update_restore_request.xml", ImmutableMap.of("DOMAIN", "example.tld"));
|
||||
persistPendingDeleteDomain();
|
||||
dryRunFlowAssertResponse(loadFile("generic_success_response.xml"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess() throws Exception {
|
||||
setEppInput("domain_update_restore_request.xml");
|
||||
setEppInput("domain_update_restore_request.xml", ImmutableMap.of("DOMAIN", "example.tld"));
|
||||
persistPendingDeleteDomain();
|
||||
assertTransactionalFlow(true);
|
||||
// Double check that we see a poll message in the future for when the delete happens.
|
||||
|
@ -321,10 +321,9 @@ public class DomainRestoreRequestFlowTest
|
|||
@Test
|
||||
public void testSuccess_premiumNotBlocked() throws Exception {
|
||||
createTld("example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
|
||||
setEppInput("domain_update_restore_request_premium.xml");
|
||||
persistPendingDeleteDomain();
|
||||
runFlow();
|
||||
runFlowAssertResponse(loadFile("domain_update_restore_request_response_premium.xml"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -342,13 +341,14 @@ public class DomainRestoreRequestFlowTest
|
|||
@Test
|
||||
public void testSuccess_superuserOverridesPremiumNameBlock() throws Exception {
|
||||
createTld("example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
|
||||
setEppInput("domain_update_restore_request_premium.xml");
|
||||
persistPendingDeleteDomain();
|
||||
// Modify the Registrar to block premium names.
|
||||
persistResource(loadRegistrar("TheRegistrar").asBuilder().setBlockPremiumNames(true).build());
|
||||
runFlowAssertResponse(
|
||||
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
|
||||
CommitMode.LIVE,
|
||||
UserPrivileges.SUPERUSER,
|
||||
loadFile("domain_update_restore_request_response_premium.xml"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -591,21 +591,9 @@ public class DomainRestoreRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_premiumNotAcked_whenRegistryRequiresFeeAcking() throws Exception {
|
||||
public void testFailure_premiumNotAcked() throws Exception {
|
||||
createTld("example");
|
||||
setEppInput("domain_update_restore_request_premium.xml");
|
||||
persistPendingDeleteDomain();
|
||||
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_premiumNotAcked_whenRegistrarRequiresFeeAcking() throws Exception {
|
||||
createTld("example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
|
||||
persistResource(
|
||||
loadRegistrar("TheRegistrar").asBuilder().setPremiumPriceAckRequired(true).build());
|
||||
setEppInput("domain_update_restore_request_premium.xml");
|
||||
setEppInput("domain_update_restore_request.xml", ImmutableMap.of("DOMAIN", "rich.example"));
|
||||
persistPendingDeleteDomain();
|
||||
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<command>
|
||||
<create>
|
||||
<domain:create
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>rich.example</domain:name>
|
||||
<domain:period unit="y">2</domain:period>
|
||||
<domain:ns>
|
||||
|
@ -17,6 +17,12 @@
|
|||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<fee:create xmlns:fee="urn:ietf:params:xml:ns:fee-0.12">
|
||||
<fee:currency>USD</fee:currency>
|
||||
<fee:fee>200.00</fee:fee>
|
||||
</fee:create>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
|
|
|
@ -11,6 +11,12 @@
|
|||
<domain:exDate>2001-04-03T22:00:00.0Z</domain:exDate>
|
||||
</domain:creData>
|
||||
</resData>
|
||||
<extension>
|
||||
<fee:creData xmlns:fee="urn:ietf:params:xml:ns:fee-0.12">
|
||||
<fee:currency>USD</fee:currency>
|
||||
<fee:fee description="create">200.00</fee:fee>
|
||||
</fee:creData>
|
||||
</extension>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
<svTRID>server-trid</svTRID>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<update>
|
||||
<domain:update
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
<domain:name>%DOMAIN%</domain:name>
|
||||
<domain:chg/>
|
||||
</domain:update>
|
||||
</update>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<command>
|
||||
<update>
|
||||
<domain:update
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>rich.example</domain:name>
|
||||
<domain:chg/>
|
||||
</domain:update>
|
||||
|
@ -11,6 +11,15 @@
|
|||
<rgp:update xmlns:rgp="urn:ietf:params:xml:ns:rgp-1.0">
|
||||
<rgp:restore op="request"/>
|
||||
</rgp:update>
|
||||
<fee:update xmlns:fee="urn:ietf:params:xml:ns:fee-0.12">
|
||||
<fee:currency>USD</fee:currency>
|
||||
<fee:fee description="renew" refundable="true" grace-period="P0D" applied="immediate">
|
||||
100.00
|
||||
</fee:fee>
|
||||
<fee:fee description="restore" refundable="true" grace-period="P0D" applied="immediate">
|
||||
17.00
|
||||
</fee:fee>
|
||||
</fee:update>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<response>
|
||||
<result code="1000">
|
||||
<msg>Command completed successfully</msg>
|
||||
</result>
|
||||
<extension>
|
||||
<fee:updData xmlns:fee="urn:ietf:params:xml:ns:fee-0.12">
|
||||
<fee:currency>USD</fee:currency>
|
||||
<fee:fee description="restore">17.00</fee:fee>
|
||||
<fee:fee description="renew">100.00</fee:fee>
|
||||
</fee:updData>
|
||||
</extension>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
<svTRID>server-trid</svTRID>
|
||||
</trID>
|
||||
</response>
|
||||
</epp>
|
|
@ -98,7 +98,6 @@ public class RegistrarTest extends EntityTestCase {
|
|||
.setBillingAccountMap(
|
||||
ImmutableMap.of(CurrencyUnit.USD, "abc123", CurrencyUnit.JPY, "789xyz"))
|
||||
.setPhonePasscode("01234")
|
||||
.setPremiumPriceAckRequired(true)
|
||||
.build());
|
||||
persistResource(registrar);
|
||||
abuseAdminContact =
|
||||
|
|
|
@ -409,7 +409,6 @@ class google.registry.model.registrar.Registrar {
|
|||
@Parent com.googlecode.objectify.Key<google.registry.model.common.EntityGroupRoot> parent;
|
||||
boolean blockPremiumNames;
|
||||
boolean contactsRequireSyncing;
|
||||
boolean premiumPriceAckRequired;
|
||||
google.registry.model.CreateAutoTimestamp creationTime;
|
||||
google.registry.model.UpdateAutoTimestamp lastUpdateTime;
|
||||
google.registry.model.registrar.Registrar$State state;
|
||||
|
@ -491,7 +490,6 @@ class google.registry.model.registry.Registry {
|
|||
boolean dnsPaused;
|
||||
boolean domainCreateRestricted;
|
||||
boolean escrowEnabled;
|
||||
boolean premiumPriceAckRequired;
|
||||
com.googlecode.objectify.Key<google.registry.model.registry.label.PremiumList> premiumList;
|
||||
google.registry.model.CreateAutoTimestamp creationTime;
|
||||
google.registry.model.common.TimedTransitionProperty<google.registry.model.registry.Registry$TldState, google.registry.model.registry.Registry$TldStateTransition> tldStateTransitions;
|
||||
|
|
|
@ -88,7 +88,6 @@ public class CreateRegistrarCommandTest extends CommandTestCase<CreateRegistrarC
|
|||
assertThat(registrar.getCreationTime()).isIn(Range.closed(before, after));
|
||||
assertThat(registrar.getLastUpdateTime()).isEqualTo(registrar.getCreationTime());
|
||||
assertThat(registrar.getBlockPremiumNames()).isFalse();
|
||||
assertThat(registrar.getPremiumPriceAckRequired()).isFalse();
|
||||
assertThat(registrar.getPoNumber()).isEmpty();
|
||||
|
||||
verify(connection)
|
||||
|
@ -787,28 +786,6 @@ public class CreateRegistrarCommandTest extends CommandTestCase<CreateRegistrarC
|
|||
assertThat(registrar.get().getFaxNumber()).isEqualTo("+1.2125556342");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_premiumPriceAckRequired() throws Exception {
|
||||
runCommandForced(
|
||||
"--name=blobio",
|
||||
"--password=some_password",
|
||||
"--registrar_type=REAL",
|
||||
"--iana_id=8",
|
||||
"--passcode=01234",
|
||||
"--icann_referral_email=foo@bar.test",
|
||||
"--street=\"123 Fake St\"",
|
||||
"--city Fakington",
|
||||
"--state MA",
|
||||
"--zip 00351",
|
||||
"--cc US",
|
||||
"--premium_price_ack_required=true",
|
||||
"clientz");
|
||||
|
||||
Optional<Registrar> registrar = Registrar.loadByClientId("clientz");
|
||||
assertThat(registrar).isPresent();
|
||||
assertThat(registrar.get().getPremiumPriceAckRequired()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_missingRegistrarType() {
|
||||
IllegalArgumentException thrown =
|
||||
|
|
|
@ -275,16 +275,6 @@ public class CreateTldCommandTest extends CommandTestCase<CreateTldCommand> {
|
|||
.containsExactly("xn--q9jyb4c_abuse", "common_abuse");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_setPremiumPriceAckRequired() throws Exception {
|
||||
runCommandForced(
|
||||
"--premium_price_ack_required=true",
|
||||
"--roid_suffix=Q9JYB4C",
|
||||
"--dns_writers=VoidDnsWriter",
|
||||
"xn--q9jyb4c");
|
||||
assertThat(Registry.get("xn--q9jyb4c").getPremiumPriceAckRequired()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidAddGracePeriod() {
|
||||
IllegalArgumentException thrown =
|
||||
|
|
|
@ -312,28 +312,12 @@ public class UpdateRegistrarCommandTest extends CommandTestCase<UpdateRegistrarC
|
|||
assertThat(loadRegistrar("NewRegistrar").getBlockPremiumNames()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_premiumPriceAckRequired() throws Exception {
|
||||
assertThat(loadRegistrar("NewRegistrar").getPremiumPriceAckRequired()).isFalse();
|
||||
runCommandForced("--premium_price_ack_required=true", "NewRegistrar");
|
||||
assertThat(loadRegistrar("NewRegistrar").getPremiumPriceAckRequired()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_resetPremiumPriceAckRequired() throws Exception {
|
||||
persistResource(
|
||||
loadRegistrar("NewRegistrar").asBuilder().setPremiumPriceAckRequired(true).build());
|
||||
runCommandForced("--premium_price_ack_required=false", "NewRegistrar");
|
||||
assertThat(loadRegistrar("NewRegistrar").getPremiumPriceAckRequired()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_unspecifiedBooleansArentChanged() throws Exception {
|
||||
persistResource(
|
||||
loadRegistrar("NewRegistrar")
|
||||
.asBuilder()
|
||||
.setBlockPremiumNames(true)
|
||||
.setPremiumPriceAckRequired(true)
|
||||
.setContactsRequireSyncing(true)
|
||||
.build());
|
||||
// Make some unrelated change where we don't specify the flags for the booleans.
|
||||
|
@ -341,7 +325,6 @@ public class UpdateRegistrarCommandTest extends CommandTestCase<UpdateRegistrarC
|
|||
// Make sure that the boolean fields didn't get reset back to false.
|
||||
Registrar reloadedRegistrar = loadRegistrar("NewRegistrar");
|
||||
assertThat(reloadedRegistrar.getBlockPremiumNames()).isTrue();
|
||||
assertThat(reloadedRegistrar.getPremiumPriceAckRequired()).isTrue();
|
||||
assertThat(reloadedRegistrar.getContactsRequireSyncing()).isTrue();
|
||||
}
|
||||
|
||||
|
|
|
@ -229,19 +229,6 @@ public class UpdateTldCommandTest extends CommandTestCase<UpdateTldCommand> {
|
|||
.isEqualTo(Money.ofMajor(JPY, 101112));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_setPremiumPriceAckRequired() throws Exception {
|
||||
runCommandForced("--premium_price_ack_required=true", "xn--q9jyb4c");
|
||||
assertThat(Registry.get("xn--q9jyb4c").getPremiumPriceAckRequired()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_clearPremiumPriceAckRequired() throws Exception {
|
||||
persistResource(Registry.get("xn--q9jyb4c").asBuilder().setPremiumPriceAckRequired(true).build());
|
||||
runCommandForced("--premium_price_ack_required=false", "xn--q9jyb4c");
|
||||
assertThat(Registry.get("xn--q9jyb4c").getPremiumPriceAckRequired()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_setLordnUsername() throws Exception {
|
||||
runCommandForced("--lordn_username=lordn000", "xn--q9jyb4c");
|
||||
|
|
|
@ -115,7 +115,6 @@ function testNavToResources() {
|
|||
path: 'resources',
|
||||
xsrfToken: test.testXsrfToken,
|
||||
technicalDocsUrl: 'http://example.com/techdocs',
|
||||
premiumPriceAckRequired: false,
|
||||
readonly: true,
|
||||
});
|
||||
const xhr = goog.testing.net.XhrIo.getSendInstances().pop();
|
||||
|
|
|
@ -345,15 +345,6 @@ public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase
|
|||
CLIENT_ID, "update", allExceptCorrectRoles.toString(), "ERROR: ForbiddenException");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdate_premiumPriceAck() {
|
||||
doTestUpdate(
|
||||
Role.OWNER,
|
||||
Registrar::getPremiumPriceAckRequired,
|
||||
true,
|
||||
Registrar.Builder::setPremiumPriceAckRequired);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdate_whoisServer() {
|
||||
doTestUpdate(
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
The following changes were made to the registrar:
|
||||
premiumPriceAckRequired: false -> true
|
Loading…
Add table
Add a link
Reference in a new issue