mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Remove nearly all uses of ReferenceUnion
ReferenceUnion is a hack to work around the mismatch between how we store references (by roid) and how they are represented in EPP (by foreign key). If it ever needed to exist (not entirely clear...) it should have remained tightly scoped within the domain commands and resources. Instead it has leaked everywhere in the project, causing lots of boilerplate. This CL hides all of that behind standard Refs, and should be followed by work to remove ReferenceUnion completely. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=122424416
This commit is contained in:
parent
56c8bb0f2a
commit
9a2afc7a9b
59 changed files with 448 additions and 454 deletions
|
@ -58,7 +58,6 @@ import google.registry.flows.host.HostUpdateFlow.HostAlreadyExistsException;
|
|||
import google.registry.flows.host.HostUpdateFlow.RenameHostToExternalRemoveIpException;
|
||||
import google.registry.flows.host.HostUpdateFlow.RenameHostToSubordinateRequiresIpException;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.ReferenceUnion;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.model.index.ForeignKeyIndex;
|
||||
|
@ -162,7 +161,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
|
|||
persistResource(
|
||||
newDomainResource("test.xn--q9jyb4c").asBuilder()
|
||||
.setDeletionTime(END_OF_TIME)
|
||||
.setNameservers(ImmutableSet.of(ReferenceUnion.create(host)))
|
||||
.setNameservers(ImmutableSet.of(Ref.create(host)))
|
||||
.build());
|
||||
HostResource renamedHost = doSuccessfulTest();
|
||||
assertThat(renamedHost.getSuperordinateDomain()).isNull();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue