mirror of
https://github.com/google/nomulus
synced 2026-09-17 21:44:30 +00: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:
@@ -32,6 +32,7 @@ import google.registry.model.EppResource;
|
||||
import google.registry.model.EppResourceUtils;
|
||||
import google.registry.model.domain.DomainApplication;
|
||||
import google.registry.model.domain.launch.ApplicationIdTargetExtension;
|
||||
import google.registry.model.eppcommon.Trid;
|
||||
import google.registry.model.eppinput.EppInput.ResourceCommandWrapper;
|
||||
import google.registry.model.eppinput.ResourceCommand;
|
||||
import google.registry.model.index.EppResourceIndex;
|
||||
@@ -155,11 +156,16 @@ public abstract class ResourceFlowTestCase<F extends Flow, R extends EppResource
|
||||
|
||||
/** Asserts the presence of a single enqueued async contact or host deletion */
|
||||
protected static <T extends EppResource> void assertAsyncDeletionTaskEnqueued(
|
||||
T resource, String requestingClientId, boolean isSuperuser) throws Exception {
|
||||
T resource, String requestingClientId, Trid trid, boolean isSuperuser) throws Exception {
|
||||
String expectedPayload =
|
||||
String.format(
|
||||
"resourceKey=%s&requestingClientId=%s&isSuperuser=%s",
|
||||
Key.create(resource).getString(), requestingClientId, Boolean.toString(isSuperuser));
|
||||
"resourceKey=%s&requestingClientId=%s&clientTransactionId=%s&"
|
||||
+ "serverTransactionId=%s&isSuperuser=%s",
|
||||
Key.create(resource).getString(),
|
||||
requestingClientId,
|
||||
trid.getClientTransactionId(),
|
||||
trid.getServerTransactionId(),
|
||||
Boolean.toString(isSuperuser));
|
||||
assertTasksEnqueued(
|
||||
"async-delete-pull",
|
||||
new TaskMatcher()
|
||||
|
||||
Reference in New Issue
Block a user