Add a Nomulus command to set domain create restricted status

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150665065
This commit is contained in:
jianglai 2017-03-20 13:07:45 -07:00 committed by Ben McIlwain
parent 620d698479
commit a958d0a6c3
3 changed files with 43 additions and 0 deletions

View file

@ -67,6 +67,7 @@ public class CreateTldCommandTest extends CommandTestCase<CreateTldCommand> {
.isEqualTo(Registry.DEFAULT_REDEMPTION_GRACE_PERIOD);
assertThat(registry.getPendingDeleteLength()).isEqualTo(Registry.DEFAULT_PENDING_DELETE_LENGTH);
assertThat(registry.getCreationTime()).isIn(Range.closed(before, after));
assertThat(registry.getDomainCreateRestricted()).isFalse();
}
@Test
@ -324,6 +325,12 @@ public class CreateTldCommandTest extends CommandTestCase<CreateTldCommand> {
.containsExactly("ns1.example.com", "ns2.example.com");
}
@Test
public void testSuccess_setDomainCreateRestricted() throws Exception {
runCommandForced("--domain_create_restricted=true", "--roid_suffix=Q9JYB4C", "xn--q9jyb4c");
assertThat(Registry.get("xn--q9jyb4c").getDomainCreateRestricted()).isTrue();
}
@Test
public void testSuccess_setCommonReservedListOnTld() throws Exception {
runSuccessfulReservedListsTest("common_abuse");