mirror of
https://github.com/google/nomulus
synced 2026-06-09 08:22:59 +00:00
Handle sunrise reservations properly during sunrise TLDs
We figure out the TLD state so that we properly check whether or not we can provision sunrise domains in that TLD. We also change the message slightly so that it's a bit more clear when we aren't in sunrise. Note: it is deliberate that NAME_COLLISION reservations are provisionable in sunrise. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=232742813
This commit is contained in:
@@ -170,16 +170,28 @@ public class DomainCheckFlowTest
|
||||
create(false, "collision.tld", "Cannot be delegated"),
|
||||
create(false, "reserved.tld", "Reserved"),
|
||||
create(false, "anchor.tld", "Reserved"),
|
||||
create(false, "allowedinsunrise.tld", "Reserved for non-sunrise"),
|
||||
create(false, "allowedinsunrise.tld", "Reserved"),
|
||||
create(false, "premiumcollision.tld", "Cannot be delegated"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_oneReserved() throws Exception {
|
||||
public void testSuccess_oneReservedInSunrise() throws Exception {
|
||||
createTld("tld", START_DATE_SUNRISE);
|
||||
persistResource(Registry.get("tld").asBuilder().setReservedLists(createReservedList()).build());
|
||||
setEppInput("domain_check_one_tld_reserved.xml");
|
||||
doCheckTest(
|
||||
create(false, "reserved.tld", "Reserved"),
|
||||
create(false, "allowedinsunrise.tld", "Reserved for non-sunrise"),
|
||||
create(true, "allowedinsunrise.tld", null),
|
||||
create(true, "example2.tld", null),
|
||||
create(true, "example3.tld", null));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_twoReservedOutsideSunrise() throws Exception {
|
||||
setEppInput("domain_check_one_tld_reserved.xml");
|
||||
doCheckTest(
|
||||
create(false, "reserved.tld", "Reserved"),
|
||||
create(false, "allowedinsunrise.tld", "Reserved"),
|
||||
create(true, "example2.tld", null),
|
||||
create(true, "example3.tld", null));
|
||||
}
|
||||
@@ -221,7 +233,7 @@ public class DomainCheckFlowTest
|
||||
setEppInput("domain_check_one_multipart_tld_reserved.xml");
|
||||
doCheckTest(
|
||||
create(false, "reserved.tld.foo", "Reserved"),
|
||||
create(false, "allowedinsunrise.tld.foo", "Reserved for non-sunrise"),
|
||||
create(false, "allowedinsunrise.tld.foo", "Reserved"),
|
||||
create(true, "example2.tld.foo", null),
|
||||
create(true, "example3.tld.foo", null));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user