mirror of
https://github.com/google/nomulus.git
synced 2025-05-19 02:39:34 +02:00
Allow registrars to be completely DISABLED
Disabled registrar cannot perform any actions via EPP and cannot log in to the registrar web console. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=239606389
This commit is contained in:
parent
e4ac18ec31
commit
d7306652eb
15 changed files with 138 additions and 46 deletions
|
@ -393,24 +393,25 @@ public class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, D
|
|||
|
||||
@Test
|
||||
public void testFailure_suspendedRegistrarCantRenewDomain() {
|
||||
persistResource(
|
||||
Registrar.loadByClientId("TheRegistrar")
|
||||
.get()
|
||||
.asBuilder()
|
||||
.setState(State.SUSPENDED)
|
||||
.build());
|
||||
EppException thrown =
|
||||
assertThrows(RegistrarMustBeActiveForThisOperationException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
doFailingTest_invalidRegistrarState(State.SUSPENDED);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_pendingRegistrarCantRenewDomain() {
|
||||
doFailingTest_invalidRegistrarState(State.PENDING);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_disabledRegistrarCantRenewDomain() {
|
||||
doFailingTest_invalidRegistrarState(State.DISABLED);
|
||||
}
|
||||
|
||||
private void doFailingTest_invalidRegistrarState(State registrarState) {
|
||||
persistResource(
|
||||
Registrar.loadByClientId("TheRegistrar")
|
||||
.get()
|
||||
.asBuilder()
|
||||
.setState(State.PENDING)
|
||||
.setState(registrarState)
|
||||
.build());
|
||||
EppException thrown =
|
||||
assertThrows(RegistrarMustBeActiveForThisOperationException.class, this::runFlow);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue