mirror of
https://github.com/google/nomulus.git
synced 2025-07-20 17:56:08 +02:00
Fix a bad assumption in DomainAllocateFlowTest.
Despite the comment, DomainAllocateFlow is absolutely registered in FlowPicker. It gets picked if there's a domain create epp command that also specifies the allocate extension. Remove the explicit setting of flowClass, and remove two tests that now fail because DomainCreateFlow gets loaded - which is the desired behavior. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=125339191
This commit is contained in:
parent
757aed2d80
commit
116bf1f4d6
3 changed files with 2 additions and 34 deletions
|
@ -42,11 +42,9 @@ import com.google.common.collect.ImmutableSet;
|
|||
|
||||
import com.googlecode.objectify.Ref;
|
||||
|
||||
import google.registry.flows.EppException.UnimplementedExtensionException;
|
||||
import google.registry.flows.ResourceCreateFlow.ResourceAlreadyExistsException;
|
||||
import google.registry.flows.ResourceFlowTestCase;
|
||||
import google.registry.flows.domain.DomainAllocateFlow.HasFinalStatusException;
|
||||
import google.registry.flows.domain.DomainAllocateFlow.MissingAllocateCreateExtensionException;
|
||||
import google.registry.flows.domain.DomainAllocateFlow.MissingApplicationException;
|
||||
import google.registry.flows.domain.DomainAllocateFlow.OnlySuperuserCanAllocateException;
|
||||
import google.registry.flows.domain.DomainFlowUtils.NotAuthorizedForTldException;
|
||||
|
@ -101,8 +99,6 @@ public class DomainAllocateFlowTest
|
|||
public void initAllocateTest() throws Exception {
|
||||
setEppInput("domain_allocate.xml", ImmutableMap.of("APPLICATIONID", "2-TLD"));
|
||||
clock.setTo(APPLICATION_TIME);
|
||||
// We must manually set the flow class since this flow is not registered in the flow picker.
|
||||
flowClass = DomainAllocateFlow.class;
|
||||
}
|
||||
|
||||
private void setupDomainApplication(String tld, TldState tldState) throws Exception {
|
||||
|
@ -484,14 +480,6 @@ public class DomainAllocateFlowTest
|
|||
runFlowAsSuperuser();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_launchExtension() throws Exception {
|
||||
setupDomainApplication("tld", TldState.QUIET_PERIOD);
|
||||
setEppInput("domain_create_claim_notice.xml");
|
||||
thrown.expect(UnimplementedExtensionException.class);
|
||||
runFlowAsSuperuser();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_applicationDoesNotExist() throws Exception {
|
||||
setupDomainApplication("tld", TldState.QUIET_PERIOD);
|
||||
|
@ -500,14 +488,6 @@ public class DomainAllocateFlowTest
|
|||
runFlowAsSuperuser();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_missingAllocateCreateExtension() throws Exception {
|
||||
setupDomainApplication("tld", TldState.QUIET_PERIOD);
|
||||
setEppInput("domain_create.xml");
|
||||
thrown.expect(MissingAllocateCreateExtensionException.class);
|
||||
runFlowAsSuperuser();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_notAuthorizedForTld() throws Exception {
|
||||
thrown.expect(NotAuthorizedForTldException.class);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue