mirror of
https://github.com/google/nomulus.git
synced 2025-07-09 04:33:28 +02:00
Show locks in the case where you have an expired unlock request (#507)
* Show locks in the case where you have an expired unlock request
This commit is contained in:
parent
28d3af0ee9
commit
f83f8f92a3
5 changed files with 33 additions and 3 deletions
|
@ -108,7 +108,21 @@ public final class DomainLockUtilsTest {
|
|||
public void testSuccess_createLock_previousLockExpired() {
|
||||
domainLockUtils.saveNewRegistryLockRequest(DOMAIN_NAME, "TheRegistrar", POC_ID, false);
|
||||
clock.advanceBy(Duration.standardDays(1));
|
||||
domainLockUtils.saveNewRegistryLockRequest(DOMAIN_NAME, "TheRegistrar", POC_ID, false);
|
||||
RegistryLock lock =
|
||||
domainLockUtils.saveNewRegistryLockRequest(DOMAIN_NAME, "TheRegistrar", POC_ID, false);
|
||||
domainLockUtils.verifyAndApplyLock(lock.getVerificationCode(), false);
|
||||
verifyProperlyLockedDomain(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_createUnlock_previousUnlockRequestExpired() {
|
||||
domainLockUtils.administrativelyApplyLock(DOMAIN_NAME, "TheRegistrar", POC_ID, false);
|
||||
domainLockUtils.saveNewRegistryUnlockRequest(DOMAIN_NAME, "TheRegistrar", false);
|
||||
clock.advanceBy(Duration.standardDays(1));
|
||||
RegistryLock unlockRequest =
|
||||
domainLockUtils.saveNewRegistryUnlockRequest(DOMAIN_NAME, "TheRegistrar", false);
|
||||
domainLockUtils.verifyAndApplyUnlock(unlockRequest.getVerificationCode(), false);
|
||||
assertThat(reloadDomain().getStatusValues()).containsNoneIn(REGISTRY_LOCK_STATUSES);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -189,6 +189,14 @@ public final class RegistryLockGetActionTest {
|
|||
"TheRegistrar",
|
||||
"locks",
|
||||
ImmutableList.of(
|
||||
new ImmutableMap.Builder<>()
|
||||
.put("fullyQualifiedDomainName", "expiredunlock.test")
|
||||
.put("lockedTime", "2000-06-08T22:00:00.000Z")
|
||||
.put("lockedBy", "johndoe@theregistrar.com")
|
||||
.put("userCanUnlock", true)
|
||||
.put("isLockPending", false)
|
||||
.put("isUnlockPending", false)
|
||||
.build(),
|
||||
new ImmutableMap.Builder<>()
|
||||
.put("fullyQualifiedDomainName", "example.test")
|
||||
.put("lockedTime", "2000-06-09T22:00:00.000Z")
|
||||
|
|
|
@ -450,6 +450,13 @@ public class RegistrarConsoleScreenshotTest extends WebDriverTestCase {
|
|||
server.runInAppEngineEnvironment(
|
||||
() -> {
|
||||
createTld("tld");
|
||||
// expired unlock request
|
||||
DomainBase expiredUnlockRequestDomain = persistActiveDomain("expiredunlock.tld");
|
||||
saveRegistryLock(createRegistryLock(expiredUnlockRequestDomain)
|
||||
.asBuilder()
|
||||
.setLockCompletionTimestamp(START_OF_TIME.minusDays(1))
|
||||
.setUnlockRequestTimestamp(START_OF_TIME.minusDays(1))
|
||||
.build());
|
||||
DomainBase domain = persistActiveDomain("example.tld");
|
||||
saveRegistryLock(createRegistryLock(domain).asBuilder().isSuperuser(true).build());
|
||||
DomainBase otherDomain = persistActiveDomain("otherexample.tld");
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 69 KiB |
Loading…
Add table
Add a link
Reference in a new issue