mirror of
https://github.com/google/nomulus
synced 2026-09-20 06:54:43 +00: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:
@@ -34,7 +34,6 @@ import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import google.registry.flows.SessionMetadata.SessionSource;
|
||||
import google.registry.flows.picker.FlowPicker;
|
||||
import google.registry.model.billing.BillingEvent;
|
||||
import google.registry.model.domain.GracePeriod;
|
||||
@@ -92,13 +91,13 @@ public abstract class FlowTestCase<F extends Flow> {
|
||||
protected SessionMetadata sessionMetadata;
|
||||
protected FakeClock clock = new FakeClock(DateTime.now(UTC));
|
||||
protected TransportCredentials credentials = new PasswordOnlyTransportCredentials();
|
||||
protected EppRequestSource eppRequestSource = EppRequestSource.UNIT_TEST;
|
||||
|
||||
@Before
|
||||
public void init() throws Exception {
|
||||
sessionMetadata = new TestSessionMetadata();
|
||||
sessionMetadata.setClientId("TheRegistrar");
|
||||
sessionMetadata.setServiceExtensionUris(ProtocolDefinition.getVisibleServiceExtensionUris());
|
||||
sessionMetadata.setSessionSource(SessionSource.NONE);
|
||||
ofy().saveWithoutBackup().entity(new ClaimsListSingleton()).now();
|
||||
inject.setStaticField(Ofy.class, "clock", clock); // For transactional flows.
|
||||
}
|
||||
@@ -133,6 +132,7 @@ public abstract class FlowTestCase<F extends Flow> {
|
||||
getTrid(),
|
||||
sessionMetadata,
|
||||
credentials,
|
||||
eppRequestSource,
|
||||
commitMode.equals(CommitMode.DRY_RUN),
|
||||
userPrivileges.equals(UserPrivileges.SUPERUSER),
|
||||
"<xml></xml>".getBytes(),
|
||||
|
||||
Reference in New Issue
Block a user