mirror of
https://github.com/google/nomulus.git
synced 2025-05-28 16:30:12 +02:00
Notify registrars of async contact/host deletions
We now send PendingActionNotificationResponses in our poll messages upon completion of an asynchronous contact or host deletion. This is part 1 of 2, which begins logging Trid in all enqueued Host/Contact deletion flows for use in batch deletions, and optionally consuming the resultant Trid info to emit a Host/ContactPendingActionNotifcationResponse. Part 2 will make this response emission non-optional, which will happen once the queue is cleared of all non-Trid containing tasks. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=153084197
This commit is contained in:
parent
478c7576c6
commit
5047d568de
12 changed files with 240 additions and 66 deletions
|
@ -37,6 +37,7 @@ import google.registry.flows.host.HostFlowUtils.HostNameNotNormalizedException;
|
|||
import google.registry.flows.host.HostFlowUtils.HostNameNotPunyCodedException;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.eppcommon.Trid;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.model.registry.Registry;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
|
@ -68,7 +69,8 @@ public class HostDeleteFlowTest extends ResourceFlowTestCase<HostDeleteFlow, Hos
|
|||
runFlowAssertResponse(readFile("host_delete_response.xml"));
|
||||
HostResource deletedHost = reloadResourceByForeignKey();
|
||||
assertAboutHosts().that(deletedHost).hasStatusValue(StatusValue.PENDING_DELETE);
|
||||
assertAsyncDeletionTaskEnqueued(deletedHost, "TheRegistrar", false);
|
||||
assertAsyncDeletionTaskEnqueued(
|
||||
deletedHost, "TheRegistrar", Trid.create("ABC-12345", "server-trid"), false);
|
||||
assertAboutHosts().that(deletedHost)
|
||||
.hasOnlyOneHistoryEntryWhich()
|
||||
.hasType(HistoryEntry.Type.HOST_PENDING_DELETE);
|
||||
|
@ -134,7 +136,8 @@ public class HostDeleteFlowTest extends ResourceFlowTestCase<HostDeleteFlow, Hos
|
|||
CommitMode.LIVE, UserPrivileges.SUPERUSER, readFile("host_delete_response.xml"));
|
||||
HostResource deletedHost = reloadResourceByForeignKey();
|
||||
assertAboutHosts().that(deletedHost).hasStatusValue(StatusValue.PENDING_DELETE);
|
||||
assertAsyncDeletionTaskEnqueued(deletedHost, "NewRegistrar", true);
|
||||
assertAsyncDeletionTaskEnqueued(
|
||||
deletedHost, "NewRegistrar", Trid.create("ABC-12345", "server-trid"), true);
|
||||
assertAboutHosts().that(deletedHost)
|
||||
.hasOnlyOneHistoryEntryWhich()
|
||||
.hasType(HistoryEntry.Type.HOST_PENDING_DELETE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue