mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Add extra flow logic hooks for info and update
This CL adds the hooks necessary to implement TLD-specific flow info and update flow logic. Usage of the hooks follows in a separate CL. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=130108832
This commit is contained in:
parent
e55ed209c5
commit
0066a03709
18 changed files with 397 additions and 16 deletions
|
@ -17,6 +17,7 @@ package google.registry.flows.domain;
|
|||
import static com.google.common.io.BaseEncoding.base16;
|
||||
import static google.registry.testing.DatastoreHelper.assertNoBillingEvents;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.newDomainResource;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveContact;
|
||||
import static google.registry.testing.DatastoreHelper.persistActiveHost;
|
||||
|
@ -42,6 +43,7 @@ import google.registry.model.domain.DesignatedContact.Type;
|
|||
import google.registry.model.domain.DomainAuthInfo;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.GracePeriod;
|
||||
import google.registry.model.domain.TestExtraLogicManager;
|
||||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||
import google.registry.model.domain.secdns.DelegationSignerData;
|
||||
import google.registry.model.eppcommon.AuthInfo.PasswordAuth;
|
||||
|
@ -67,9 +69,11 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
|
|||
setEppInput("domain_info.xml");
|
||||
sessionMetadata.setClientId("NewRegistrar");
|
||||
clock.setTo(DateTime.parse("2005-03-03T22:00:00.000Z"));
|
||||
createTld("tld");
|
||||
createTlds("tld", "flags");
|
||||
persistResource(
|
||||
AppEngineRule.makeRegistrar1().asBuilder().setClientIdentifier("ClientZ").build());
|
||||
// For flags extension tests.
|
||||
RegistryExtraFlowLogicProxy.setOverride("flags", TestExtraLogicManager.class);
|
||||
}
|
||||
|
||||
private void persistTestEntities(String domainName, boolean inactive) {
|
||||
|
@ -613,4 +617,20 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
|
|||
persistTestEntities(false);
|
||||
runFlow();
|
||||
}
|
||||
|
||||
/** Test registry extra logic manager with no flags. */
|
||||
@Test
|
||||
public void testExtraLogicManager_noFlags() throws Exception {
|
||||
setEppInput("domain_info_flags_none.xml");
|
||||
persistTestEntities("domain.flags", false);
|
||||
doSuccessfulTest("domain_info_response_flags_none.xml", false);
|
||||
}
|
||||
|
||||
/** Test registry extra logic manager with two flags. */
|
||||
@Test
|
||||
public void testExtraLogicManager_twoFlags() throws Exception {
|
||||
setEppInput("domain_info_flags_two.xml");
|
||||
persistTestEntities("domain-flag1-flag2.flags", false);
|
||||
doSuccessfulTest("domain_info_response_flags_two.xml", false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue