mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Fix recurring expansion when handling transferred or deleted domains
The recurring billing event expansion fails when handling domains that are transferred or deleted before the initial renew. Quietly ignore these recurring events. (This one is distinct from [] in that this bug occurs when domains currently exist under new ownership.) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=143594317
This commit is contained in:
parent
8252e97dfb
commit
0cf62be403
2 changed files with 15 additions and 1 deletions
|
@ -392,6 +392,18 @@ public class ExpandRecurringBillingEventsActionTest
|
|||
assertCursorAt(beginningOfTest);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_expandSingleEvent_recurrenceEndBeforeEvent() throws Exception {
|
||||
// This can occur when a domain is transferred or deleted before a domain comes up for renewal.
|
||||
recurring = persistResource(recurring.asBuilder()
|
||||
.setRecurrenceEndTime(recurring.getEventTime().minusDays(5))
|
||||
.build());
|
||||
action.cursorTimeParam = Optional.of(START_OF_TIME);
|
||||
runMapreduce();
|
||||
assertBillingEventsForResource(domain, recurring);
|
||||
assertCursorAt(beginningOfTest);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_expandSingleEvent_dryRun() throws Exception {
|
||||
persistResource(recurring);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue