mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Break SessionSource out of SessionMetadata and rename it EppRequestSource.
The "SessionSource" has nothing to do with sessions (and it's often used in sessionless contexts). What it does indicate is the endpoint used to make the request. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=125295224
This commit is contained in:
parent
fd6c4888db
commit
2a3a3fbc30
25 changed files with 94 additions and 95 deletions
|
@ -42,6 +42,7 @@ import com.googlecode.objectify.Key;
|
|||
import com.googlecode.objectify.Ref;
|
||||
|
||||
import google.registry.flows.EppException.UnimplementedExtensionException;
|
||||
import google.registry.flows.EppRequestSource;
|
||||
import google.registry.flows.ResourceCreateOrMutateFlow.OnlyToolCanPassMetadataException;
|
||||
import google.registry.flows.ResourceFlowTestCase;
|
||||
import google.registry.flows.ResourceFlowUtils.ResourceNotOwnedException;
|
||||
|
@ -49,7 +50,6 @@ import google.registry.flows.ResourceMutateFlow.ResourceToMutateDoesNotExistExce
|
|||
import google.registry.flows.ResourceUpdateFlow.AddRemoveSameValueEppException;
|
||||
import google.registry.flows.ResourceUpdateFlow.ResourceHasClientUpdateProhibitedException;
|
||||
import google.registry.flows.ResourceUpdateFlow.StatusNotClientSettableException;
|
||||
import google.registry.flows.SessionMetadata.SessionSource;
|
||||
import google.registry.flows.SingleResourceFlow.ResourceStatusProhibitsOperationException;
|
||||
import google.registry.flows.domain.BaseDomainUpdateFlow.EmptySecDnsUpdateException;
|
||||
import google.registry.flows.domain.BaseDomainUpdateFlow.MaxSigLifeChangeNotSupportedException;
|
||||
|
@ -411,7 +411,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
|
|||
|
||||
@Test
|
||||
public void testSuccess_metadata() throws Exception {
|
||||
sessionMetadata.setSessionSource(SessionSource.TOOL);
|
||||
eppRequestSource = EppRequestSource.TOOL;
|
||||
setEppInput("domain_update_metadata.xml");
|
||||
persistReferencedEntities();
|
||||
persistDomain();
|
||||
|
@ -664,7 +664,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
|
|||
|
||||
@Test
|
||||
public void testSuccess_addServerStatusBillingEvent() throws Exception {
|
||||
sessionMetadata.setSessionSource(SessionSource.TOOL);
|
||||
eppRequestSource = EppRequestSource.TOOL;
|
||||
persistReferencedEntities();
|
||||
persistDomain();
|
||||
doServerStatusBillingTest("domain_update_add_server_status.xml", true);
|
||||
|
@ -672,7 +672,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
|
|||
|
||||
@Test
|
||||
public void testSuccess_noBillingOnPreExistingServerStatus() throws Exception {
|
||||
sessionMetadata.setSessionSource(SessionSource.TOOL);
|
||||
eppRequestSource = EppRequestSource.TOOL;
|
||||
DomainResource addStatusDomain = persistActiveDomain(getUniqueIdFromCommand());
|
||||
persistResource(
|
||||
addStatusDomain.asBuilder()
|
||||
|
@ -683,7 +683,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
|
|||
|
||||
@Test
|
||||
public void testSuccess_removeServerStatusBillingEvent() throws Exception {
|
||||
sessionMetadata.setSessionSource(SessionSource.TOOL);
|
||||
eppRequestSource = EppRequestSource.TOOL;
|
||||
persistReferencedEntities();
|
||||
DomainResource removeStatusDomain = persistDomain();
|
||||
persistResource(
|
||||
|
@ -695,7 +695,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
|
|||
|
||||
@Test
|
||||
public void testSuccess_changeServerStatusBillingEvent() throws Exception {
|
||||
sessionMetadata.setSessionSource(SessionSource.TOOL);
|
||||
eppRequestSource = EppRequestSource.TOOL;
|
||||
persistReferencedEntities();
|
||||
DomainResource changeStatusDomain = persistDomain();
|
||||
persistResource(
|
||||
|
@ -719,7 +719,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
|
|||
|
||||
@Test
|
||||
public void testSuccess_noBillingEventOnServerStatusChangeNotFromRegistrar() throws Exception {
|
||||
sessionMetadata.setSessionSource(SessionSource.TOOL);
|
||||
eppRequestSource = EppRequestSource.TOOL;
|
||||
persistActiveDomain(getUniqueIdFromCommand());
|
||||
doServerStatusBillingTest("domain_update_add_server_status_non_registrar.xml", false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue