mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Merge DomainResource into DomainBase
This eliminates the use of Objectify polymorphism for EPP resources entirely (yay!), which makes the Registry 3.0 database migration easier. It is unfortunate that the naming parallelism of EppResources is lost between ContactResource, HostResource, and DomainResource, but the actual type as far as Datastore was concerned was DomainBase all along, and it would be a much more substantial data migration to allow us to continue using the class name DomainResource now that we're no longer using Objectify polymorphism. This simply isn't worth it. This also removes the polymorphic Datastore indexes (which will no longer function as of this change). The non-polymorphic replacement indexes were added in [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=230930546
This commit is contained in:
parent
97c2049669
commit
e2528875b2
166 changed files with 1525 additions and 1666 deletions
|
@ -76,7 +76,7 @@ public class FlowReporterTest extends ShardableTestCase {
|
|||
|
||||
@Test
|
||||
public void testRecordToLogs_metadata_basic() throws Exception {
|
||||
when(flowReporter.eppInput.isDomainResourceType()).thenReturn(true);
|
||||
when(flowReporter.eppInput.isDomainType()).thenReturn(true);
|
||||
when(flowReporter.eppInput.getResourceType()).thenReturn(Optional.of("domain"));
|
||||
flowReporter.recordToLogs();
|
||||
assertThat(parseJsonMap(findFirstLogMessageByPrefix(handler, "FLOW-LOG-SIGNATURE-METADATA: ")))
|
||||
|
@ -114,7 +114,7 @@ public class FlowReporterTest extends ShardableTestCase {
|
|||
|
||||
@Test
|
||||
public void testRecordToLogs_metadata_notResourceFlow_noResourceTypeOrTld() throws Exception {
|
||||
when(flowReporter.eppInput.isDomainResourceType()).thenReturn(false);
|
||||
when(flowReporter.eppInput.isDomainType()).thenReturn(false);
|
||||
when(flowReporter.eppInput.getResourceType()).thenReturn(Optional.empty());
|
||||
flowReporter.recordToLogs();
|
||||
Map<String, Object> json =
|
||||
|
@ -127,7 +127,7 @@ public class FlowReporterTest extends ShardableTestCase {
|
|||
|
||||
@Test
|
||||
public void testRecordToLogs_metadata_notDomainFlow_noTld() throws Exception {
|
||||
when(flowReporter.eppInput.isDomainResourceType()).thenReturn(false);
|
||||
when(flowReporter.eppInput.isDomainType()).thenReturn(false);
|
||||
when(flowReporter.eppInput.getResourceType()).thenReturn(Optional.of("contact"));
|
||||
flowReporter.recordToLogs();
|
||||
Map<String, Object> json =
|
||||
|
@ -139,7 +139,7 @@ public class FlowReporterTest extends ShardableTestCase {
|
|||
|
||||
@Test
|
||||
public void testRecordToLogs_metadata_multipartDomainName_multipartTld() throws Exception {
|
||||
when(flowReporter.eppInput.isDomainResourceType()).thenReturn(true);
|
||||
when(flowReporter.eppInput.isDomainType()).thenReturn(true);
|
||||
when(flowReporter.eppInput.getResourceType()).thenReturn(Optional.of("domain"));
|
||||
when(flowReporter.eppInput.getSingleTargetId()).thenReturn(Optional.of("target.co.uk"));
|
||||
when(flowReporter.eppInput.getTargetIds()).thenReturn(ImmutableList.of("target.co.uk"));
|
||||
|
@ -154,7 +154,7 @@ public class FlowReporterTest extends ShardableTestCase {
|
|||
|
||||
@Test
|
||||
public void testRecordToLogs_metadata_multipleTargetIds_uniqueTldSet() throws Exception {
|
||||
when(flowReporter.eppInput.isDomainResourceType()).thenReturn(true);
|
||||
when(flowReporter.eppInput.isDomainType()).thenReturn(true);
|
||||
when(flowReporter.eppInput.getSingleTargetId()).thenReturn(Optional.empty());
|
||||
when(flowReporter.eppInput.getTargetIds())
|
||||
.thenReturn(ImmutableList.of("target.co.uk", "foo.uk", "bar.uk", "baz.com"));
|
||||
|
@ -170,7 +170,7 @@ public class FlowReporterTest extends ShardableTestCase {
|
|||
|
||||
@Test
|
||||
public void testRecordToLogs_metadata_uppercaseDomainName_lowercaseTld() throws Exception {
|
||||
when(flowReporter.eppInput.isDomainResourceType()).thenReturn(true);
|
||||
when(flowReporter.eppInput.isDomainType()).thenReturn(true);
|
||||
when(flowReporter.eppInput.getSingleTargetId()).thenReturn(Optional.of("TARGET.FOO"));
|
||||
when(flowReporter.eppInput.getTargetIds()).thenReturn(ImmutableList.of("TARGET.FOO"));
|
||||
flowReporter.recordToLogs();
|
||||
|
@ -184,7 +184,7 @@ public class FlowReporterTest extends ShardableTestCase {
|
|||
|
||||
@Test
|
||||
public void testRecordToLogs_metadata_invalidDomainName_stillGuessesTld() throws Exception {
|
||||
when(flowReporter.eppInput.isDomainResourceType()).thenReturn(true);
|
||||
when(flowReporter.eppInput.isDomainType()).thenReturn(true);
|
||||
when(flowReporter.eppInput.getSingleTargetId()).thenReturn(Optional.of("<foo@bar.com>"));
|
||||
when(flowReporter.eppInput.getTargetIds()).thenReturn(ImmutableList.of("<foo@bar.com>"));
|
||||
flowReporter.recordToLogs();
|
||||
|
@ -198,7 +198,7 @@ public class FlowReporterTest extends ShardableTestCase {
|
|||
|
||||
@Test
|
||||
public void testRecordToLogs_metadata_domainWithoutPeriod_noTld() throws Exception {
|
||||
when(flowReporter.eppInput.isDomainResourceType()).thenReturn(true);
|
||||
when(flowReporter.eppInput.isDomainType()).thenReturn(true);
|
||||
when(flowReporter.eppInput.getSingleTargetId()).thenReturn(Optional.of("target,foo"));
|
||||
when(flowReporter.eppInput.getTargetIds()).thenReturn(ImmutableList.of("target,foo"));
|
||||
flowReporter.recordToLogs();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue