use of org.springframework.cloud.service.common.PostgresqlServiceInfo in project spring-cloud-connectors by spring-cloud.
the class LocalConfigConnectorPostgresqlServiceTest method serviceCreation.
@Test
public void serviceCreation() {
List<ServiceInfo> services = connector.getServiceInfos();
ServiceInfo service = getServiceInfo(services, "ingres");
assertNotNull(service);
assertTrue(service instanceof PostgresqlServiceInfo);
assertUriParameters((PostgresqlServiceInfo) service);
}
use of org.springframework.cloud.service.common.PostgresqlServiceInfo in project spring-cloud-connectors by spring-cloud.
the class HerokuConnectorPostgresqlServiceTest method assertPostgresServiceCreated.
private void assertPostgresServiceCreated(String envVarName, String serviceInstanceName) {
Map<String, String> env = new HashMap<String, String>();
String postgresUrl = getRelationalServiceUrl("db");
env.put(envVarName, postgresUrl);
when(mockEnvironment.getEnv()).thenReturn(env);
List<ServiceInfo> serviceInfos = testCloudConnector.getServiceInfos();
ServiceInfo serviceInfo = getServiceInfo(serviceInfos, serviceInstanceName);
assertNotNull(serviceInfo);
assertTrue(serviceInfo instanceof PostgresqlServiceInfo);
assertReleationServiceInfo((PostgresqlServiceInfo) serviceInfo, "db");
}
Aggregations