mirror of
https://github.com/google/nomulus.git
synced 2025-08-02 16:02:10 +02:00
Add LRP TLD states to Registry and *_tld tools
Also had to add an EnumParameter class to support List<T extends Enum<T>>, as these aren't natively supported by JCommander (although single Enum parameters are.) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=129464699
This commit is contained in:
parent
751df4b488
commit
1ef8716177
10 changed files with 259 additions and 2 deletions
|
@ -443,4 +443,21 @@ public class RegistryTest extends EntityTestCase {
|
|||
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.zero(EUR)))
|
||||
.build();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_lrpTldState_notInTransitions() {
|
||||
Registry registry = Registry.get("tld").asBuilder()
|
||||
.setTldStateTransitions(ImmutableSortedMap.<DateTime, TldState>naturalOrder()
|
||||
.put(START_OF_TIME, TldState.PREDELEGATION)
|
||||
.put(clock.nowUtc().plusMonths(1), TldState.SUNRISE)
|
||||
.put(clock.nowUtc().plusMonths(3), TldState.LANDRUSH)
|
||||
.put(clock.nowUtc().plusMonths(4), TldState.QUIET_PERIOD)
|
||||
.put(clock.nowUtc().plusMonths(5), TldState.GENERAL_AVAILABILITY)
|
||||
.build())
|
||||
.build();
|
||||
thrown.expect(
|
||||
IllegalArgumentException.class,
|
||||
"Cannot specify an LRP TLD state that is not part of the TLD state transitions.");
|
||||
registry.asBuilder().setLrpTldStates(ImmutableSet.of(TldState.SUNRUSH)).build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -683,6 +683,7 @@ class google.registry.model.registry.Registry {
|
|||
java.lang.String tldStr;
|
||||
java.lang.String tldUnicode;
|
||||
java.util.Set<com.googlecode.objectify.Key<google.registry.model.registry.label.ReservedList>> reservedLists;
|
||||
java.util.Set<google.registry.model.registry.Registry$TldState> lrpTldStates;
|
||||
java.util.Set<java.lang.String> allowedFullyQualifiedHostNames;
|
||||
java.util.Set<java.lang.String> allowedRegistrantContactIds;
|
||||
org.joda.money.CurrencyUnit currency;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue