mirror of
https://github.com/google/nomulus.git
synced 2025-07-02 17:23:32 +02:00
Use enum instead of boolean for TMCH CA mode
Also more narrowly scopes a catch block in TmchCertificateAuthority. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=144744847
This commit is contained in:
parent
0dbaa8e5bc
commit
a28e0b3ff7
13 changed files with 90 additions and 73 deletions
|
@ -22,6 +22,7 @@ import dagger.Module;
|
|||
import dagger.Provides;
|
||||
import dagger.Subcomponent;
|
||||
import google.registry.config.RegistryConfig.ConfigModule;
|
||||
import google.registry.config.RegistryConfig.ConfigModule.TmchCaMode;
|
||||
import google.registry.dns.DnsQueue;
|
||||
import google.registry.flows.custom.CustomLogicFactory;
|
||||
import google.registry.flows.custom.TestCustomLogicFactory;
|
||||
|
@ -61,14 +62,13 @@ interface EppTestComponent {
|
|||
final Sleeper sleeper;
|
||||
|
||||
FakesAndMocksModule() {
|
||||
this(new FakeClock(), true);
|
||||
this(new FakeClock(), TmchCaMode.PILOT);
|
||||
}
|
||||
|
||||
FakesAndMocksModule(FakeClock clock, boolean tmchCaTestingMode) {
|
||||
FakesAndMocksModule(FakeClock clock, TmchCaMode tmchCaMode) {
|
||||
this.clock = clock;
|
||||
this.domainFlowTmchUtils =
|
||||
new DomainFlowTmchUtils(
|
||||
new TmchXmlSignature(new TmchCertificateAuthority(tmchCaTestingMode)));
|
||||
new DomainFlowTmchUtils(new TmchXmlSignature(new TmchCertificateAuthority(tmchCaMode)));
|
||||
this.sleeper = new FakeSleeper(clock);
|
||||
this.dnsQueue = DnsQueue.create();
|
||||
this.metricBuilder = EppMetric.builderForRequest("request-id-1", clock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue