mirror of
https://github.com/google/nomulus
synced 2026-09-20 06:54:43 +00:00
Add domain name support to AllocationToken entities
The design doc is at [] The next step will be to tie this into the domain create flow, and if the domain name is on a reserved list, allow it to be created if the token is specified that has the given domain name on it. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=207884521
This commit is contained in:
@@ -36,6 +36,7 @@ public class AllocationTokenTest extends EntityTestCase {
|
||||
new AllocationToken.Builder()
|
||||
.setToken("abc123")
|
||||
.setRedemptionHistoryEntry(Key.create(HistoryEntry.class, 1L))
|
||||
.setDomainName("foo.example")
|
||||
.setCreationTime(DateTime.parse("2010-11-12T05:00:00Z"))
|
||||
.build());
|
||||
assertThat(ofy().load().entity(token).now()).isEqualTo(token);
|
||||
@@ -44,11 +45,14 @@ public class AllocationTokenTest extends EntityTestCase {
|
||||
@Test
|
||||
public void testIndexing() throws Exception {
|
||||
verifyIndexing(
|
||||
new AllocationToken.Builder()
|
||||
.setToken("abc123")
|
||||
.setCreationTime(DateTime.parse("2010-11-12T05:00:00Z"))
|
||||
.build(),
|
||||
"token");
|
||||
persistResource(
|
||||
new AllocationToken.Builder()
|
||||
.setToken("abc123")
|
||||
.setDomainName("blahdomain.fake")
|
||||
.setCreationTime(DateTime.parse("2010-11-12T05:00:00Z"))
|
||||
.build()),
|
||||
"token",
|
||||
"domainName");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user