Search in sources :

Example 1 with RedisConfiguration

use of uk.gov.ida.hub.policy.configuration.RedisConfiguration in project verify-hub by alphagov.

the class PolicyConfigurationBuilder method build.

public PolicyConfiguration build() {
    SessionStoreConfiguration sessionStoreConfiguration = mock(SessionStoreConfiguration.class);
    when(sessionStoreConfiguration.getRedisConfiguration()).thenReturn(new RedisConfiguration() {

        @Override
        public Long getRecordTTL() {
            return 3600L;
        }

        @Override
        public RedisURI getUri() {
            return new RedisURI("localhost", redisPort, java.time.Duration.ofSeconds(1));
        }
    });
    return new TestPolicyConfiguration(new JerseyClientConfiguration(), serviceInfo, mock(ClientTrustStoreConfiguration.class), sessionStoreConfiguration, timeoutPeriod, Duration.minutes(1), Duration.minutes(15));
}
Also used : JerseyClientConfiguration(io.dropwizard.client.JerseyClientConfiguration) RedisURI(io.lettuce.core.RedisURI) SessionStoreConfiguration(uk.gov.ida.hub.policy.configuration.SessionStoreConfiguration) RedisConfiguration(uk.gov.ida.hub.policy.configuration.RedisConfiguration) ClientTrustStoreConfiguration(uk.gov.ida.truststore.ClientTrustStoreConfiguration)

Aggregations

JerseyClientConfiguration (io.dropwizard.client.JerseyClientConfiguration)1 RedisURI (io.lettuce.core.RedisURI)1 RedisConfiguration (uk.gov.ida.hub.policy.configuration.RedisConfiguration)1 SessionStoreConfiguration (uk.gov.ida.hub.policy.configuration.SessionStoreConfiguration)1 ClientTrustStoreConfiguration (uk.gov.ida.truststore.ClientTrustStoreConfiguration)1