Remove deprecated extra flow logic and TLD-specific pricing proxy

This also adds a domain update pricing hook to DomainPricingCustomLogic.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142286755
This commit is contained in:
mcilwain 2016-12-16 12:31:08 -08:00 committed by Ben McIlwain
parent 348cea9d8d
commit f44557f34f
41 changed files with 494 additions and 1744 deletions

View file

@ -37,7 +37,6 @@ import google.registry.model.domain.DesignatedContact;
import google.registry.model.domain.DesignatedContact.Type;
import google.registry.model.domain.DomainApplication;
import google.registry.model.domain.DomainAuthInfo;
import google.registry.model.domain.TestExtraLogicManager;
import google.registry.model.domain.launch.ApplicationStatus;
import google.registry.model.domain.launch.LaunchCreateExtension;
import google.registry.model.domain.launch.LaunchPhase;
@ -71,9 +70,6 @@ public class DomainApplicationInfoFlowTest
setEppInput("domain_info_sunrise.xml");
sessionMetadata.setClientId("NewRegistrar");
createTld("tld", TldState.SUNRUSH);
createTld("flags", TldState.SUNRUSH);
// For flags extension tests.
RegistryExtraFlowLogicProxy.setOverride("flags", TestExtraLogicManager.class);
}
private void persistTestEntities(HostsState hostsState, MarksState marksState) throws Exception {
@ -110,33 +106,6 @@ public class DomainApplicationInfoFlowTest
.build());
}
private void persistFlagsTestEntities(String domainName, HostsState hostsState) throws Exception {
registrant = persistActiveContact("jd1234");
contact = persistActiveContact("sh8013");
host1 = persistActiveHost("ns1.example.net");
host2 = persistActiveHost("ns1.example.tld");
application = persistResource(new DomainApplication.Builder()
.setRepoId("123-TLD")
.setFullyQualifiedDomainName(domainName)
.setPhase(LaunchPhase.SUNRUSH)
.setCurrentSponsorClientId("NewRegistrar")
.setCreationClientId("TheRegistrar")
.setLastEppUpdateClientId("NewRegistrar")
.setCreationTimeForTest(DateTime.parse("1999-04-03T22:00:00.0Z"))
.setLastEppUpdateTime(DateTime.parse("1999-12-03T09:00:00.0Z"))
.setRegistrant(Key.create(registrant))
.setContacts(ImmutableSet.of(
DesignatedContact.create(Type.ADMIN, Key.create(contact)),
DesignatedContact.create(Type.TECH, Key.create(contact))))
.setNameservers(hostsState.equals(HostsState.HOSTS_EXIST) ? ImmutableSet.of(
Key.create(host1), Key.create(host2)) : null)
.setAuthInfo(DomainAuthInfo.create(PasswordAuth.create("2fooBAR")))
.addStatusValue(StatusValue.PENDING_CREATE)
.setApplicationStatus(ApplicationStatus.PENDING_VALIDATION)
.setEncodedSignedMarks(null)
.build());
}
private void doSuccessfulTest(String expectedXmlFilename, HostsState hostsState)
throws Exception {
assertTransactionalFlow(false);
@ -348,21 +317,4 @@ public class DomainApplicationInfoFlowTest
thrown.expect(ApplicationLaunchPhaseMismatchException.class);
runFlow();
}
/** Test registry extra logic manager with no flags. */
@Test
public void testExtraLogicManager_noFlags() throws Exception {
setEppInput("domain_info_sunrise_flags_none.xml");
persistFlagsTestEntities("domain.flags", HostsState.NO_HOSTS_EXIST);
doSuccessfulTest("domain_info_response_sunrise_flags_none.xml", HostsState.NO_HOSTS_EXIST);
}
/** Test registry extra logic manager with two flags. */
@Test
public void testExtraLogicManager_twoFlags() throws Exception {
setEppInput("domain_info_sunrise_flags_two.xml");
persistFlagsTestEntities("domain-flag1-flag2.flags", HostsState.NO_HOSTS_EXIST);
doSuccessfulTest("domain_info_response_sunrise_flags_two.xml", HostsState.NO_HOSTS_EXIST);
}
}