use of org.springframework.cloud.service.common.RedisServiceInfo in project spring-cloud-connectors by spring-cloud.
the class RedisServiceConnectorCreatorTest method cloudRedisCreationSecureConnection.
@Test
public void cloudRedisCreationSecureConnection() {
RedisServiceInfo serviceInfo = createServiceInfo(RedisServiceInfo.REDISS_SCHEME);
RedisConnectionFactory dataSource = testCreator.create(serviceInfo, null);
assertConnectorProperties(serviceInfo, dataSource, true);
}
use of org.springframework.cloud.service.common.RedisServiceInfo in project spring-cloud-connectors by spring-cloud.
the class SpringData1RedisServiceConnectorCreatorTest method cloudRedisCreationNoConfig.
@Test
public void cloudRedisCreationNoConfig() throws Exception {
RedisServiceInfo serviceInfo = createServiceInfo();
RedisConnectionFactory dataSource = testCreator.create(serviceInfo, null);
assertConnectorProperties(serviceInfo, dataSource);
}
use of org.springframework.cloud.service.common.RedisServiceInfo in project spring-cloud-connectors by spring-cloud.
the class LocalConfigConnectorRedisServiceTest method serviceCreation.
@Test
public void serviceCreation() {
List<ServiceInfo> services = connector.getServiceInfos();
ServiceInfo service = getServiceInfo(services, "blue");
assertNotNull(service);
assertTrue(service instanceof RedisServiceInfo);
assertUriParameters((RedisServiceInfo) service);
}
use of org.springframework.cloud.service.common.RedisServiceInfo in project spring-cloud-connectors by spring-cloud.
the class HerokuConnectorRedisServiceTest method redisServiceCreation.
@Test
public void redisServiceCreation() {
for (String redisEnv : new String[] { "REDISTOGO_URL", "REDISCLOUD_URL", "OPENREDIS_URL", "REDISGREEN_URL", "REDIS_URL" }) {
Map<String, String> env = new HashMap<String, String>();
String redisUrl = getRedisServiceUrl();
env.put(redisEnv, redisUrl);
when(mockEnvironment.getEnv()).thenReturn(env);
List<ServiceInfo> serviceInfos = testCloudConnector.getServiceInfos();
ServiceInfo serviceInfo = getServiceInfo(serviceInfos, redisEnv.substring(0, redisEnv.length() - 4));
assertNotNull(serviceInfo);
assertTrue(serviceInfo instanceof RedisServiceInfo);
assertRedisServiceInfo((RedisServiceInfo) serviceInfo);
}
}
use of org.springframework.cloud.service.common.RedisServiceInfo in project spring-cloud-connectors by spring-cloud.
the class RedisServiceConnectorCreatorTest method cloudRedisCreationNoConfig.
@Test
public void cloudRedisCreationNoConfig() {
RedisServiceInfo serviceInfo = createServiceInfo(RedisServiceInfo.REDIS_SCHEME);
RedisConnectionFactory dataSource = testCreator.create(serviceInfo, null);
assertConnectorProperties(serviceInfo, dataSource, false);
}
Aggregations