mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Require that DNS writer be set on Registry entities
We ran into a bunch of prober deployment issues this past week when attempting to spin up a new cluster because the newly created prober TLDs had null values for the dnsWriter field. Given that VoidDnsWriter exists, we can require that dnsWriter always be set, and have people use that if DNS publishing is not required. Also cleans up a bunch of related inconsistent exception messages and tests not verifying said exception messages properly. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=154325830
This commit is contained in:
parent
d7da112c19
commit
d30f9411d8
11 changed files with 332 additions and 115 deletions
|
@ -30,7 +30,9 @@ public abstract class TransitionListParameter<V> extends KeyValueMapParameter<Da
|
|||
private static final DateTimeParameter DATE_TIME_CONVERTER = new DateTimeParameter();
|
||||
|
||||
public TransitionListParameter() {
|
||||
super("Not formatted correctly or has transition times out of order.");
|
||||
// This is not sentence-capitalized like most exception messages because it is appended to the
|
||||
// end of the toString() of the transition map in rendering a full exception message.
|
||||
super("not formatted correctly or has transition times out of order");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -40,10 +42,10 @@ public abstract class TransitionListParameter<V> extends KeyValueMapParameter<Da
|
|||
|
||||
@Override
|
||||
protected final ImmutableSortedMap<DateTime, V> processMap(ImmutableMap<DateTime, V> map) {
|
||||
checkArgument(Ordering.natural().isOrdered(map.keySet()), "Transition times out of order.");
|
||||
checkArgument(Ordering.natural().isOrdered(map.keySet()), "Transition times out of order");
|
||||
return ImmutableSortedMap.copyOf(map);
|
||||
}
|
||||
|
||||
|
||||
/** Converter-validator for TLD state transitions. */
|
||||
public static class TldStateTransitions extends TransitionListParameter<TldState> {
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue