mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 23:03:34 +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
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue