mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Fix confusing "now" parameters on persist deleted helper methods
They were taking a DateTime "now", which would seem like it would be the time of when the resource was deleted, but it was actually the time by which the resource was deleted, with the actual deletion time being hardcoded to a day prior. The confusion was evident because a fair number of tests were passing the wrong thing. I renamed the parameter "deletionTime" to make it exactly clear what it's doing and fixed up some callsites where necessary. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=134818032
This commit is contained in:
parent
35d5307706
commit
c517c98d17
23 changed files with 63 additions and 53 deletions
|
@ -234,7 +234,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
.build();
|
||||
}
|
||||
assertBillingEvents(billingEvents);
|
||||
|
||||
|
||||
assertGracePeriods(
|
||||
domain.getGracePeriods(),
|
||||
ImmutableMap.of(
|
||||
|
@ -523,7 +523,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
@Test
|
||||
public void testSuccess_existedButWasDeleted() throws Exception {
|
||||
persistContactsAndHosts();
|
||||
persistDeletedDomain(getUniqueIdFromCommand(), clock.nowUtc());
|
||||
persistDeletedDomain(getUniqueIdFromCommand(), clock.nowUtc().minusDays(1));
|
||||
clock.advanceOneMilli();
|
||||
doSuccessfulTest();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue