mirror of
https://github.com/google/nomulus.git
synced 2025-07-08 20:23:24 +02:00
Restore symmetric VKey referenced by BillingEvent.Cancellation (#928)
This commit is contained in:
parent
f669e3ca59
commit
56e384aa4f
9 changed files with 181 additions and 108 deletions
|
@ -318,13 +318,8 @@ public class BillingEventTest extends EntityTestCase {
|
|||
historyEntry2,
|
||||
"foo.tld");
|
||||
// Set ID to be the same to ignore for the purposes of comparison.
|
||||
newCancellation = newCancellation.asBuilder().setId(cancellationOneTime.getId()).build();
|
||||
|
||||
// TODO(b/168537779): Remove setRecurringEventKey after symmetric VKey can be reconstructed
|
||||
// correctly.
|
||||
assertThat(newCancellation)
|
||||
.isEqualTo(
|
||||
cancellationOneTime.asBuilder().setOneTimeEventKey(oneTime.createVKey()).build());
|
||||
assertThat(newCancellation.asBuilder().setId(cancellationOneTime.getId()).build())
|
||||
.isEqualTo(cancellationOneTime);
|
||||
}
|
||||
|
||||
@TestOfyAndSql
|
||||
|
@ -340,13 +335,8 @@ public class BillingEventTest extends EntityTestCase {
|
|||
historyEntry2,
|
||||
"foo.tld");
|
||||
// Set ID to be the same to ignore for the purposes of comparison.
|
||||
newCancellation = newCancellation.asBuilder().setId(cancellationRecurring.getId()).build();
|
||||
|
||||
// TODO(b/168537779): Remove setRecurringEventKey after symmetric VKey can be reconstructed
|
||||
// correctly.
|
||||
assertThat(newCancellation)
|
||||
.isEqualTo(
|
||||
cancellationRecurring.asBuilder().setRecurringEventKey(recurring.createVKey()).build());
|
||||
assertThat(newCancellation.asBuilder().setId(cancellationRecurring.getId()).build())
|
||||
.isEqualTo(cancellationRecurring);
|
||||
}
|
||||
|
||||
@TestOfyAndSql
|
||||
|
|
|
@ -8,8 +8,8 @@ class google.registry.model.billing.BillingEvent$Cancellation {
|
|||
@Id java.lang.Long id;
|
||||
@Parent com.googlecode.objectify.Key<google.registry.model.reporting.HistoryEntry> parent;
|
||||
google.registry.model.billing.BillingEvent$Reason reason;
|
||||
google.registry.persistence.VKey<google.registry.model.billing.BillingEvent$OneTime> refOneTime;
|
||||
google.registry.persistence.VKey<google.registry.model.billing.BillingEvent$Recurring> refRecurring;
|
||||
google.registry.persistence.BillingVKey$BillingEventVKey refOneTime;
|
||||
google.registry.persistence.BillingVKey$BillingRecurrenceVKey refRecurring;
|
||||
java.lang.String clientId;
|
||||
java.lang.String targetId;
|
||||
java.util.Set<google.registry.model.billing.BillingEvent$Flag> flags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue