mirror of
https://github.com/google/nomulus.git
synced 2025-06-05 03:57:29 +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
|
@ -18,7 +18,7 @@ import static com.google.common.io.BaseEncoding.base16;
|
|||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assert_;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
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;
|
||||
|
@ -37,7 +37,7 @@ import com.google.common.collect.ImmutableList;
|
|||
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;
|
||||
|
@ -102,7 +102,7 @@ public class DnsUpdateWriterTest {
|
|||
public void testPublishDomainCreate_publishesNameServers() throws Exception {
|
||||
HostResource host1 = persistActiveHost("ns1.example.tld");
|
||||
HostResource host2 = persistActiveHost("ns2.example.tld");
|
||||
DomainResource domain =
|
||||
DomainBase domain =
|
||||
persistActiveDomain("example.tld")
|
||||
.asBuilder()
|
||||
.setNameservers(ImmutableSet.of(Key.create(host1), Key.create(host2)))
|
||||
|
@ -123,7 +123,7 @@ public class DnsUpdateWriterTest {
|
|||
@Test
|
||||
public void testPublishAtomic_noCommit() {
|
||||
HostResource host1 = persistActiveHost("ns.example1.tld");
|
||||
DomainResource domain1 =
|
||||
DomainBase domain1 =
|
||||
persistActiveDomain("example1.tld")
|
||||
.asBuilder()
|
||||
.setNameservers(ImmutableSet.of(Key.create(host1)))
|
||||
|
@ -131,7 +131,7 @@ public class DnsUpdateWriterTest {
|
|||
persistResource(domain1);
|
||||
|
||||
HostResource host2 = persistActiveHost("ns.example2.tld");
|
||||
DomainResource domain2 =
|
||||
DomainBase domain2 =
|
||||
persistActiveDomain("example2.tld")
|
||||
.asBuilder()
|
||||
.setNameservers(ImmutableSet.of(Key.create(host2)))
|
||||
|
@ -147,7 +147,7 @@ public class DnsUpdateWriterTest {
|
|||
@Test
|
||||
public void testPublishAtomic_oneUpdate() throws Exception {
|
||||
HostResource host1 = persistActiveHost("ns.example1.tld");
|
||||
DomainResource domain1 =
|
||||
DomainBase domain1 =
|
||||
persistActiveDomain("example1.tld")
|
||||
.asBuilder()
|
||||
.setNameservers(ImmutableSet.of(Key.create(host1)))
|
||||
|
@ -155,7 +155,7 @@ public class DnsUpdateWriterTest {
|
|||
persistResource(domain1);
|
||||
|
||||
HostResource host2 = persistActiveHost("ns.example2.tld");
|
||||
DomainResource domain2 =
|
||||
DomainBase domain2 =
|
||||
persistActiveDomain("example2.tld")
|
||||
.asBuilder()
|
||||
.setNameservers(ImmutableSet.of(Key.create(host2)))
|
||||
|
@ -178,7 +178,7 @@ public class DnsUpdateWriterTest {
|
|||
|
||||
@Test
|
||||
public void testPublishDomainCreate_publishesDelegationSigner() throws Exception {
|
||||
DomainResource domain =
|
||||
DomainBase domain =
|
||||
persistActiveDomain("example.tld")
|
||||
.asBuilder()
|
||||
.setNameservers(ImmutableSet.of(Key.create(persistActiveHost("ns1.example.tld"))))
|
||||
|
@ -202,7 +202,7 @@ public class DnsUpdateWriterTest {
|
|||
|
||||
@Test
|
||||
public void testPublishDomainWhenNotActive_removesDnsRecords() throws Exception {
|
||||
DomainResource domain =
|
||||
DomainBase domain =
|
||||
persistActiveDomain("example.tld")
|
||||
.asBuilder()
|
||||
.addStatusValue(StatusValue.SERVER_HOLD)
|
||||
|
@ -247,7 +247,7 @@ public class DnsUpdateWriterTest {
|
|||
InetAddresses.forString("fd0e:a5c8:6dfb:6a5e:0:0:0:1")))
|
||||
.build());
|
||||
persistResource(
|
||||
newDomainResource("example.tld")
|
||||
newDomainBase("example.tld")
|
||||
.asBuilder()
|
||||
.addSubordinateHost("ns1.example.tld")
|
||||
.addNameserver(Key.create(host))
|
||||
|
@ -319,7 +319,7 @@ public class DnsUpdateWriterTest {
|
|||
.build());
|
||||
|
||||
persistResource(
|
||||
newDomainResource("example.tld")
|
||||
newDomainBase("example.tld")
|
||||
.asBuilder()
|
||||
.addSubordinateHost("ns1.example.tld")
|
||||
.addNameservers(
|
||||
|
@ -354,7 +354,7 @@ public class DnsUpdateWriterTest {
|
|||
.build());
|
||||
|
||||
persistResource(
|
||||
newDomainResource("example.tld")
|
||||
newDomainBase("example.tld")
|
||||
.asBuilder()
|
||||
.addSubordinateHost("ns1.example.tld")
|
||||
.addSubordinateHost("foo.example.tld")
|
||||
|
@ -378,7 +378,7 @@ public class DnsUpdateWriterTest {
|
|||
|
||||
@Test
|
||||
public void testPublishDomainFails_whenDnsUpdateReturnsError() throws Exception {
|
||||
DomainResource domain =
|
||||
DomainBase domain =
|
||||
persistActiveDomain("example.tld")
|
||||
.asBuilder()
|
||||
.setNameservers(ImmutableSet.of(Key.create(persistActiveHost("ns1.example.tld"))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue