mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +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
|
@ -17,7 +17,7 @@ package google.registry.tools;
|
|||
import static com.google.common.io.BaseEncoding.base16;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.newDomainResource;
|
||||
import static google.registry.testing.DatastoreHelper.newDomainBase;
|
||||
import static google.registry.testing.DatastoreHelper.newHostResource;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveDomain;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveHost;
|
||||
|
@ -32,7 +32,7 @@ import com.google.common.collect.ImmutableMap;
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.net.InetAddresses;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.DomainBase;
|
||||
import google.registry.model.domain.secdns.DelegationSignerData;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.host.HostResource;
|
||||
|
@ -70,7 +70,7 @@ public class GenerateDnsReportCommandTest extends CommandTestCase<GenerateDnsRep
|
|||
private HostResource nameserver2;
|
||||
private HostResource nameserver3;
|
||||
private HostResource nameserver4;
|
||||
private DomainResource domain1;
|
||||
private DomainBase domain1;
|
||||
|
||||
private static final ImmutableMap<String, ?> DOMAIN1_OUTPUT = ImmutableMap.of(
|
||||
"domain", "example.xn--q9jyb4c",
|
||||
|
@ -130,13 +130,13 @@ public class GenerateDnsReportCommandTest extends CommandTestCase<GenerateDnsRep
|
|||
.build());
|
||||
nameserver3 = persistActiveHost("ns1.google.com");
|
||||
nameserver4 = persistActiveHost("ns2.google.com");
|
||||
domain1 = persistResource(newDomainResource("example.xn--q9jyb4c").asBuilder()
|
||||
domain1 = persistResource(newDomainBase("example.xn--q9jyb4c").asBuilder()
|
||||
.setNameservers(ImmutableSet.of(Key.create(nameserver1), Key.create(nameserver2)))
|
||||
.setDsData(ImmutableSet.of(
|
||||
DelegationSignerData.create(12345, 3, 1, base16().decode("49FD46E6C4B45C55D4AC")),
|
||||
DelegationSignerData.create(56789, 2, 4, base16().decode("69FD46E6C4A45C55D4AC"))))
|
||||
.build());
|
||||
persistResource(newDomainResource("foobar.xn--q9jyb4c").asBuilder()
|
||||
persistResource(newDomainBase("foobar.xn--q9jyb4c").asBuilder()
|
||||
.setNameservers(ImmutableSet.of(Key.create(nameserver3), Key.create(nameserver4)))
|
||||
.build());
|
||||
// Persist a domain in a different tld that should be ignored.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue