mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Update lastEppUpdateTime after certain grace period is passed
The lastEppUpdateTime should be updated asynchronously in the situations below: - Implicit transfer success after 5 day pending transfer period - Implicit end of any grace period ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=224831791
This commit is contained in:
parent
c7fc964d9c
commit
5bc70cbc99
14 changed files with 347 additions and 84 deletions
|
@ -327,6 +327,30 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
|
|||
assertThat(getPollMessages("TheRegistrar", A_MONTH_FROM_NOW)).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_updatedEppUpdateTimeAfterPendingRedemption() throws Exception {
|
||||
persistResource(
|
||||
Registry.get("tld")
|
||||
.asBuilder()
|
||||
.setRedemptionGracePeriodLength(standardDays(3))
|
||||
.setPendingDeleteLength(standardDays(2))
|
||||
.build());
|
||||
setClientIdForFlow("TheRegistrar");
|
||||
setUpSuccessfulTest();
|
||||
clock.advanceOneMilli();
|
||||
|
||||
runFlowAssertResponse(loadFile("domain_delete_response_pending.xml"));
|
||||
|
||||
DomainResource domain = reloadResourceByForeignKey();
|
||||
DateTime redemptionEndTime = domain.getLastEppUpdateTime().plusDays(3);
|
||||
DomainResource domainAtRedemptionTime = domain.cloneProjectedAtTime(redemptionEndTime);
|
||||
assertAboutDomains()
|
||||
.that(domainAtRedemptionTime)
|
||||
.hasLastEppUpdateClientId("TheRegistrar")
|
||||
.and()
|
||||
.hasLastEppUpdateTime(redemptionEndTime);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_addGracePeriodResultsInImmediateDelete() throws Exception {
|
||||
sessionMetadata.setServiceExtensionUris(ImmutableSet.of());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue