mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Remove domain create restriction check in non-create flows
Since domain create restriction only applies to closed TLDs, flows like domain application create and domain application update does not apply, as the TLD never goes through sunrise period. Removing checks for domain create restrictions in these flows. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=152260673
This commit is contained in:
parent
47870f98eb
commit
87a9d27299
9 changed files with 4 additions and 191 deletions
|
@ -40,7 +40,6 @@ import google.registry.flows.ResourceFlowUtils.ResourceNotOwnedException;
|
|||
import google.registry.flows.ResourceFlowUtils.StatusNotClientSettableException;
|
||||
import google.registry.flows.domain.DomainApplicationUpdateFlow.ApplicationStatusProhibitsUpdateException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.ApplicationDomainNameMismatchException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.DomainNotAllowedForTldWithCreateRestrictionException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.DuplicateContactForRoleException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.EmptySecDnsUpdateException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.FeesMismatchException;
|
||||
|
@ -787,22 +786,6 @@ public class DomainApplicationUpdateFlowTest
|
|||
doSuccessfulTest();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_domainCreateRestricted_addedNameserverAllowed() throws Exception {
|
||||
persistReferencedEntities();
|
||||
persistApplication();
|
||||
persistResource(
|
||||
Registry.get("tld")
|
||||
.asBuilder()
|
||||
.setDomainCreateRestricted(true)
|
||||
.setReservedLists(
|
||||
persistReservedList(
|
||||
"reserved", "example,NAMESERVER_RESTRICTED,ns1.example.tld:ns2.example.tld"))
|
||||
.build());
|
||||
clock.advanceOneMilli();
|
||||
doSuccessfulTest();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_addedNameserversAllowedInTldAndDomainNameserversWhitelists()
|
||||
throws Exception {
|
||||
|
@ -859,58 +842,6 @@ public class DomainApplicationUpdateFlowTest
|
|||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tldNameserversAllowed_domainCreateRestricted_domainNotReserved()
|
||||
throws Exception {
|
||||
persistReferencedEntities();
|
||||
persistApplication();
|
||||
persistResource(
|
||||
Registry.get("tld")
|
||||
.asBuilder()
|
||||
.setDomainCreateRestricted(true)
|
||||
.setAllowedFullyQualifiedHostNames(
|
||||
ImmutableSet.of("ns1.example.tld", "ns2.example.tld"))
|
||||
.setReservedLists(
|
||||
persistReservedList(
|
||||
"reserved", "lol,NAMESERVER_RESTRICTED,ns1.example.tld:ns2.example.tld"))
|
||||
.build());
|
||||
clock.advanceOneMilli();
|
||||
thrown.expect(DomainNotAllowedForTldWithCreateRestrictionException.class);
|
||||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_domainCreateRestricted_domainNotReserved() throws Exception {
|
||||
persistReferencedEntities();
|
||||
persistApplication();
|
||||
persistResource(
|
||||
Registry.get("tld")
|
||||
.asBuilder()
|
||||
.setDomainCreateRestricted(true)
|
||||
.setReservedLists(
|
||||
persistReservedList(
|
||||
"reserved", "lol,NAMESERVER_RESTRICTED,ns1.example.tld:ns2.example.tld"))
|
||||
.build());
|
||||
clock.advanceOneMilli();
|
||||
thrown.expect(DomainNotAllowedForTldWithCreateRestrictionException.class);
|
||||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_domainCreateNotRestricted_domainNotReserved() throws Exception {
|
||||
persistReferencedEntities();
|
||||
persistApplication();
|
||||
persistResource(
|
||||
Registry.get("tld")
|
||||
.asBuilder()
|
||||
.setReservedLists(
|
||||
persistReservedList(
|
||||
"reserved", "lol,NAMESERVER_RESTRICTED,ns1.example.tld:ns2.example.tld"))
|
||||
.build());
|
||||
clock.advanceOneMilli();
|
||||
doSuccessfulTest();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_customPricingLogic_feeMismatch() throws Exception {
|
||||
persistReferencedEntities();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue