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:
cgoldfeder 2016-06-20 08:27:15 -07:00 committed by Ben McIlwain
parent 757aed2d80
commit 116bf1f4d6
3 changed files with 2 additions and 34 deletions

View file

@ -29,7 +29,6 @@ import com.googlecode.objectify.Ref;
import google.registry.flows.EppException;
import google.registry.flows.EppException.AuthorizationErrorException;
import google.registry.flows.EppException.ObjectDoesNotExistException;
import google.registry.flows.EppException.RequiredParameterMissingException;
import google.registry.flows.EppException.StatusProhibitsOperationException;
import google.registry.model.billing.BillingEvent;
import google.registry.model.billing.BillingEvent.Flag;
@ -52,11 +51,9 @@ import google.registry.tmch.LordnTask;
/**
* An EPP flow that allocates a new domain resource from a domain application.
*
* @error {@link google.registry.flows.EppException.UnimplementedExtensionException}
* @error {@link google.registry.flows.ResourceCreateFlow.ResourceAlreadyExistsException}
* @error {@link google.registry.flows.domain.DomainFlowUtils.NotAuthorizedForTldException}
* @error {@link DomainAllocateFlow.HasFinalStatusException}
* @error {@link DomainAllocateFlow.MissingAllocateCreateExtensionException}
* @error {@link DomainAllocateFlow.MissingApplicationException}
* @error {@link DomainAllocateFlow.OnlySuperuserCanAllocateException}
*/
@ -76,9 +73,6 @@ public class DomainAllocateFlow extends DomainCreateOrAllocateFlow {
if (!isSuperuser) {
throw new OnlySuperuserCanAllocateException();
}
if (allocateCreate == null) {
throw new MissingAllocateCreateExtensionException();
}
String applicationRoid = allocateCreate.getApplicationRoid();
application = loadByUniqueId(DomainApplication.class, applicationRoid, now);
if (application == null) {
@ -199,13 +193,6 @@ public class DomainAllocateFlow extends DomainCreateOrAllocateFlow {
return HistoryEntry.Type.DOMAIN_ALLOCATE;
}
/** The allocate create extension is required to allocate a domain. */
static class MissingAllocateCreateExtensionException extends RequiredParameterMissingException {
public MissingAllocateCreateExtensionException() {
super("The allocate create extension is required to allocate a domain");
}
}
/** Domain application with specific ROID does not exist. */
static class MissingApplicationException extends ObjectDoesNotExistException {
public MissingApplicationException(String applicationRoid) {