mirror of
https://github.com/google/nomulus
synced 2026-09-10 18:16:24 +00:00
Fix URS check in BackfillRegistryLocksCommand (#1315)
* Fix URS check in BackfillRegistryLocksCommand "reason" can be null
This commit is contained in:
+11
-3
@@ -127,7 +127,7 @@ class BackfillRegistryLocksCommandTest extends CommandTestCase<BackfillRegistryL
|
||||
void testBackfill_usesUrsTime_ifExists() throws Exception {
|
||||
DateTime ursTime = fakeClock.nowUtc();
|
||||
DomainBase ursDomain = persistLockedDomain("urs.tld");
|
||||
HistoryEntry historyEntry =
|
||||
persistResource(
|
||||
new DomainHistory.Builder()
|
||||
.setBySuperuser(true)
|
||||
.setClientId("adminreg")
|
||||
@@ -136,9 +136,17 @@ class BackfillRegistryLocksCommandTest extends CommandTestCase<BackfillRegistryL
|
||||
.setReason("Uniform Rapid Suspension")
|
||||
.setType(HistoryEntry.Type.DOMAIN_UPDATE)
|
||||
.setRequestedByRegistrar(false)
|
||||
.build();
|
||||
persistResource(historyEntry);
|
||||
.build());
|
||||
DomainBase nonUrsDomain = persistLockedDomain("nonurs.tld");
|
||||
persistResource(
|
||||
new DomainHistory.Builder()
|
||||
.setBySuperuser(true)
|
||||
.setClientId("adminreg")
|
||||
.setDomain(nonUrsDomain)
|
||||
.setType(HistoryEntry.Type.DOMAIN_UPDATE)
|
||||
.setRequestedByRegistrar(false)
|
||||
.setModificationTime(ursTime)
|
||||
.build());
|
||||
|
||||
fakeClock.advanceBy(Duration.standardDays(10));
|
||||
runCommandForced(
|
||||
|
||||
Reference in New Issue
Block a user