mirror of
https://github.com/google/nomulus
synced 2026-02-09 22:40:55 +00:00
Add necessary fields to the AllocationToken schema
See https://docs.google.com/document/d/1SSWrILRpx0Mtr4sdvlYwz9I8wJp5Gu_o4qlml3iJDKI This is just the base for now--we don't actually do anything with it. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=243265164
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.SINGLE_USE;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
@@ -129,7 +130,10 @@ public class DeleteAllocationTokensCommandTest
|
||||
private static AllocationToken persistToken(
|
||||
String token, @Nullable String domainName, boolean redeemed) {
|
||||
AllocationToken.Builder builder =
|
||||
new AllocationToken.Builder().setToken(token).setDomainName(domainName);
|
||||
new AllocationToken.Builder()
|
||||
.setToken(token)
|
||||
.setTokenType(SINGLE_USE)
|
||||
.setDomainName(domainName);
|
||||
if (redeemed) {
|
||||
builder.setRedemptionHistoryEntry(Key.create(HistoryEntry.class, 1051L));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user