mirror of
https://github.com/google/nomulus
synced 2026-04-24 02:00:50 +00:00
Remove Tld.allowedRegistrantContactIds field (#2867)
We no longer need this now that no contacts can be applied to any domains at all. A follow-up PR in subsequent weeks will delete the column from the DB schema. BUG= http://b/448619572
This commit is contained in:
@@ -133,7 +133,6 @@ import google.registry.flows.domain.DomainFlowUtils.NameserversNotAllowedForTldE
|
||||
import google.registry.flows.domain.DomainFlowUtils.NameserversNotSpecifiedForTldWithNameserverAllowListException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.NotAuthorizedForTldException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.PremiumNameBlockedException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.RegistrantNotAllowedException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.RegistrantProhibitedException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.RegistrarMustBeActiveForThisOperationException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.TldDoesNotExistException;
|
||||
@@ -2839,20 +2838,6 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testFailure_registrantNotAllowListed() {
|
||||
persistActiveContact("someone");
|
||||
persistContactsAndHosts();
|
||||
persistResource(
|
||||
Tld.get("tld")
|
||||
.asBuilder()
|
||||
.setAllowedRegistrantContactIds(ImmutableSet.of("someone"))
|
||||
.build());
|
||||
RegistrantNotAllowedException thrown =
|
||||
assertThrows(RegistrantNotAllowedException.class, this::runFlow);
|
||||
assertThat(thrown).hasMessageThat().contains("jd1234");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testFailure_nameserverNotAllowListed() {
|
||||
persistContactsAndHosts();
|
||||
@@ -2881,19 +2866,6 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_nameserverAndRegistrantAllowListed() throws Exception {
|
||||
persistResource(
|
||||
Tld.get("tld")
|
||||
.asBuilder()
|
||||
.setAllowedRegistrantContactIds(ImmutableSet.of("jd1234"))
|
||||
.setAllowedFullyQualifiedHostNames(
|
||||
ImmutableSet.of("ns1.example.net", "ns2.example.net"))
|
||||
.build());
|
||||
persistContactsAndHosts();
|
||||
doSuccessfulTest();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testFailure_eapFee_combined() {
|
||||
setEppInput("domain_create_eap_combined_fee.xml", ImmutableMap.of("FEE_VERSION", "0.6"));
|
||||
|
||||
@@ -89,7 +89,6 @@ import google.registry.flows.domain.DomainFlowUtils.MissingTechnicalContactExcep
|
||||
import google.registry.flows.domain.DomainFlowUtils.NameserversNotAllowedForTldException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.NameserversNotSpecifiedForTldWithNameserverAllowListException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.NotAuthorizedForTldException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.RegistrantNotAllowedException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.RegistrantProhibitedException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.SecDnsAllUsageException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.TooManyDsRecordsException;
|
||||
@@ -1713,20 +1712,6 @@ class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow, Domain
|
||||
assertThat(thrown).hasMessageThat().contains("ns2.example.foo");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testFailure_newRegistrantNotAllowListed() throws Exception {
|
||||
persistReferencedEntities();
|
||||
persistDomain();
|
||||
persistResource(
|
||||
Tld.get("tld")
|
||||
.asBuilder()
|
||||
.setAllowedRegistrantContactIds(ImmutableSet.of("contact1234"))
|
||||
.build());
|
||||
clock.advanceOneMilli();
|
||||
EppException thrown = assertThrows(RegistrantNotAllowedException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testFailure_addedNameserverDisallowedInTld() throws Exception {
|
||||
persistReferencedEntities();
|
||||
@@ -1742,44 +1727,6 @@ class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow, Domain
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_newNameserverAllowListed() throws Exception {
|
||||
setEppInput("domain_update_add_nameserver.xml");
|
||||
persistReferencedEntities();
|
||||
persistDomain();
|
||||
// No registrant is given but both nameserver and registrant allow list exist.
|
||||
persistResource(
|
||||
Tld.get("tld")
|
||||
.asBuilder()
|
||||
.setAllowedRegistrantContactIds(ImmutableSet.of("sh8013"))
|
||||
.setAllowedFullyQualifiedHostNames(
|
||||
ImmutableSet.of("ns1.example.foo", "ns2.example.foo"))
|
||||
.build());
|
||||
assertThat(reloadResourceByForeignKey().getNameservers())
|
||||
.doesNotContain(
|
||||
loadResource(Host.class, "ns2.example.foo", clock.nowUtc()).get().createVKey());
|
||||
runFlow();
|
||||
assertThat(reloadResourceByForeignKey().getNameservers())
|
||||
.contains(loadResource(Host.class, "ns2.example.foo", clock.nowUtc()).get().createVKey());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_changeRegistrantAllowListed() throws Exception {
|
||||
setEppInput("domain_update_registrant.xml");
|
||||
persistReferencedEntities();
|
||||
persistDomain();
|
||||
// Only changes registrant, with both nameserver and registrant allow list on the TLD.
|
||||
persistResource(
|
||||
Tld.get("tld")
|
||||
.asBuilder()
|
||||
.setAllowedRegistrantContactIds(ImmutableSet.of("sh8013"))
|
||||
.setAllowedFullyQualifiedHostNames(ImmutableSet.of("ns1.example.foo"))
|
||||
.build());
|
||||
runFlow();
|
||||
assertThat(loadByKey(reloadResourceByForeignKey().getRegistrant().get()).getContactId())
|
||||
.isEqualTo("sh8013");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_changeContactsAndRegistrant() throws Exception {
|
||||
setEppInput("domain_update_contacts_and_registrant.xml");
|
||||
@@ -1805,19 +1752,6 @@ class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow, Domain
|
||||
.isEqualTo("sh8013");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_nameserverAndRegistrantAllowListed() throws Exception {
|
||||
persistReferencedEntities();
|
||||
persistDomain();
|
||||
persistResource(
|
||||
Tld.get("tld")
|
||||
.asBuilder()
|
||||
.setAllowedRegistrantContactIds(ImmutableSet.of("sh8013"))
|
||||
.setAllowedFullyQualifiedHostNames(ImmutableSet.of("ns2.example.foo"))
|
||||
.build());
|
||||
doSuccessfulTest();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSuccess_tldWithNameserverAllowList_removeNameserver() throws Exception {
|
||||
setEppInput("domain_update_remove_nameserver.xml");
|
||||
|
||||
@@ -186,7 +186,6 @@ public final class TldTest extends EntityTestCase {
|
||||
"dnsWriters",
|
||||
"idnTables",
|
||||
"reservedListNames",
|
||||
"allowedRegistrantContactIds",
|
||||
"allowedFullyQualifiedHostNames",
|
||||
"defaultPromoTokens");
|
||||
assertThat(constructedTld.getDnsWriters())
|
||||
@@ -194,8 +193,6 @@ public final class TldTest extends EntityTestCase {
|
||||
assertThat(constructedTld.getIdnTables()).containsExactlyElementsIn(existingTld.getIdnTables());
|
||||
assertThat(constructedTld.getReservedListNames())
|
||||
.containsExactlyElementsIn(existingTld.getReservedListNames());
|
||||
assertThat(constructedTld.getAllowedRegistrantContactIds())
|
||||
.containsExactlyElementsIn(existingTld.getAllowedRegistrantContactIds());
|
||||
assertThat(constructedTld.getAllowedFullyQualifiedHostNames())
|
||||
.containsExactlyElementsIn(existingTld.getAllowedFullyQualifiedHostNames());
|
||||
assertThat(constructedTld.getDefaultPromoTokens())
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
addGracePeriodLength: "PT432000S"
|
||||
allowedFullyQualifiedHostNames:
|
||||
- "foo"
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT3888000S"
|
||||
automaticTransferLength: "PT432000S"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
addGracePeriodLength: "PT2592000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT2592000S"
|
||||
automaticTransferLength: "PT2592000S"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
addGracePeriodLength: "PT2592000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT2592000S"
|
||||
automaticTransferLength: "PT2592000S"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
addGracePeriodLength: "PT2592000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT2592000S"
|
||||
automaticTransferLength: "PT2592000S"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
addGracePeriodLength: "PT432000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT3888000S"
|
||||
automaticTransferLength: "PT432000S"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
addGracePeriodLength: "PT2592000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT2592000S"
|
||||
automaticTransferLength: "PT2592000S"
|
||||
|
||||
@@ -4,7 +4,6 @@ allowedFullyQualifiedHostNames:
|
||||
- "beta"
|
||||
- "gamma"
|
||||
- "zeta"
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT3888000S"
|
||||
automaticTransferLength: "PT432000S"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
addGracePeriodLength: "PT432000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT3888000S"
|
||||
automaticTransferLength: "PT432000S"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
addGracePeriodLength: "PT2592000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
automaticTransferLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT2592000S"
|
||||
|
||||
@@ -46,7 +46,6 @@ renewBillingCostTransitions:
|
||||
amount: 11.00
|
||||
lordnUsername: null
|
||||
claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
|
||||
allowedRegistrantContactIds: null
|
||||
allowedFullyQualifiedHostNames: null
|
||||
defaultPromoTokens: null
|
||||
idnTables: null
|
||||
|
||||
@@ -42,7 +42,6 @@ renewBillingCostTransitions:
|
||||
amount: 11.00
|
||||
lordnUsername: null
|
||||
claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
|
||||
allowedRegistrantContactIds: []
|
||||
allowedFullyQualifiedHostNames: []
|
||||
defaultPromoTokens: []
|
||||
idnTables: []
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
addGracePeriodLength: "PT432000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT3888000S"
|
||||
automaticTransferLength: "PT432000S"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
addGracePeriodLength: "PT432000S"
|
||||
allowedFullyQualifiedHostNames: []
|
||||
allowedRegistrantContactIds: []
|
||||
anchorTenantAddGracePeriodLength: "PT2592000S"
|
||||
autoRenewGracePeriodLength: "PT3888000S"
|
||||
automaticTransferLength: "PT432000S"
|
||||
|
||||
@@ -46,7 +46,6 @@ renewBillingCostTransitions:
|
||||
amount: 11.00
|
||||
lordnUsername: null
|
||||
claimsPeriodEnd: "294247-01-10T04:00:54.775Z"
|
||||
allowedRegistrantContactIds: []
|
||||
allowedFullyQualifiedHostNames: []
|
||||
defaultPromoTokens: []
|
||||
idnTables: []
|
||||
|
||||
Reference in New Issue
Block a user