Remove per-domain nameserver restrictions in reserved lists

This also removes the related setting on the Registry entity. We never used
either of these, and keeping them around in our codebase just adds complexity
for no purpose. We already achieve the goals of this feature by restricting
nameservers on entire TLDs and by registry-locking important domain names.

This is also two fewer things we'll have to worry about carrying over to the new
schema in Registry 3.0.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243816241
This commit is contained in:
mcilwain 2019-04-16 08:57:07 -07:00 committed by jianglai
parent 3b1d38e1e6
commit 55f8e0efad
15 changed files with 24 additions and 794 deletions

View file

@ -398,30 +398,6 @@ public class UpdateTldCommandTest extends CommandTestCase<UpdateTldCommand> {
.containsExactly("ns2.example.com");
}
@Test
public void testSuccess_setTldToDomainCreateRestricted() throws Exception {
persistResource(
Registry.get("xn--q9jyb4c").asBuilder().setDomainCreateRestricted(false).build());
runCommandForced("--domain_create_restricted=true", "xn--q9jyb4c");
assertThat(Registry.get("xn--q9jyb4c").getDomainCreateRestricted()).isTrue();
}
@Test
public void testSuccess_unsetTldToDomainCreateRestricted() throws Exception {
persistResource(
Registry.get("xn--q9jyb4c").asBuilder().setDomainCreateRestricted(true).build());
runCommandForced("--domain_create_restricted=false", "xn--q9jyb4c");
assertThat(Registry.get("xn--q9jyb4c").getDomainCreateRestricted()).isFalse();
}
@Test
public void testSuccess_leaveDomainCreateRestrictedStatusUnchanged() throws Exception {
persistResource(
Registry.get("xn--q9jyb4c").asBuilder().setDomainCreateRestricted(true).build());
runCommandForced("xn--q9jyb4c");
assertThat(Registry.get("xn--q9jyb4c").getDomainCreateRestricted()).isTrue();
}
@Test
public void testFailure_invalidAddGracePeriod() {
IllegalArgumentException thrown =