mirror of
https://github.com/google/nomulus.git
synced 2025-06-04 11:37:25 +02:00
Statically import commonly used TldState enum values
Takes advantage of the fact that the default state of a TLD created in tests is GENERAL_AVAILABILITY. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228916164
This commit is contained in:
parent
eeb65b4610
commit
170980db2f
14 changed files with 62 additions and 63 deletions
|
@ -17,6 +17,7 @@ package google.registry.rde.imports;
|
|||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.model.registry.Registry.TldState.PREDELEGATION;
|
||||
import static google.registry.util.DateTimeUtils.END_OF_TIME;
|
||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
import static google.registry.util.PreconditionsUtils.checkArgumentPresent;
|
||||
|
@ -155,7 +156,7 @@ public class RdeImportUtils {
|
|||
Registry registry = Registry.get(tld);
|
||||
TldState currentState = registry.getTldState(clock.nowUtc());
|
||||
checkArgument(
|
||||
currentState == TldState.PREDELEGATION,
|
||||
currentState == PREDELEGATION,
|
||||
"TLD '%s' is in state %s and cannot be imported",
|
||||
tld,
|
||||
currentState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue