use of com.sequenceiq.cloudbreak.api.endpoint.v4.database.requests.DatabaseV4Request in project cloudbreak by hortonworks.
the class DatabaseV4RequestToRDSConfigConverterTest method rdsConfigConverterTestWhenValidMySQLJdbcUrl.
@Test
public void rdsConfigConverterTestWhenValidMySQLJdbcUrl() {
DatabaseV4Request rdsConfigRequest = rdsConfigRequest();
rdsConfigRequest.setConnectionURL("jdbc:mysql://test.eu-west-1.rds.amazonaws.com:5432/test");
RDSConfig rdsConfig = underTest.convert(rdsConfigRequest);
assertResult(rdsConfigRequest, rdsConfig, DatabaseVendor.MYSQL);
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.database.requests.DatabaseV4Request in project cloudbreak by hortonworks.
the class DatabaseV4RequestToRDSConfigConverterTest method postgresJdbcConverterTestWhenDatabaseCanBeDetectedThenShouldReturnPostgresVendorProperties.
@Test
public void postgresJdbcConverterTestWhenDatabaseCanBeDetectedThenShouldReturnPostgresVendorProperties() {
DatabaseV4Request rdsConfigRequest = rdsConfigRequest();
rdsConfigRequest.setConnectionURL("jdbc:postgresql://test.eu-west-1.rds.amazonaws.com:5432/test");
RDSConfig rdsConfig = underTest.convert(rdsConfigRequest);
assertResult(rdsConfigRequest, rdsConfig, DatabaseVendor.POSTGRES);
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.database.requests.DatabaseV4Request in project cloudbreak by hortonworks.
the class DatabaseV4RequestToRDSConfigConverterTest method rdsConfigConverterTestWhenValidPostgresJdbcUrl.
@Test
public void rdsConfigConverterTestWhenValidPostgresJdbcUrl() {
DatabaseV4Request rdsConfigRequest = rdsConfigRequest();
rdsConfigRequest.setConnectionURL("jdbc:postgresql://test.eu-west-1.rds.amazonaws.com:5432/test");
RDSConfig rdsConfig = underTest.convert(rdsConfigRequest);
assertResult(rdsConfigRequest, rdsConfig, DatabaseVendor.POSTGRES);
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.database.requests.DatabaseV4Request in project cloudbreak by hortonworks.
the class DatabaseV4RequestToRDSConfigConverterTest method rdsConfigRequest.
private DatabaseV4Request rdsConfigRequest() {
DatabaseV4Request rdsConfigRequest = new DatabaseV4Request();
rdsConfigRequest.setConnectionPassword("password");
rdsConfigRequest.setConnectionUserName("username");
rdsConfigRequest.setConnectionURL("jdbc:postgresql://test.eu-west-1.rds.amazonaws.com:5432/test");
rdsConfigRequest.setName("testname");
rdsConfigRequest.setType("HIVE");
return rdsConfigRequest;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.database.requests.DatabaseV4Request in project cloudbreak by hortonworks.
the class DatabaseVendorTest method rdsConfigRequest.
public static DatabaseV4Request rdsConfigRequest(String jdbcUrl, Optional<OracleParameters> oracleParameters) {
DatabaseV4Request rdsConfigRequest = new DatabaseV4Request();
rdsConfigRequest.setConnectionURL(jdbcUrl);
rdsConfigRequest.setOracle(oracleParameters.orElse(null));
return rdsConfigRequest;
}
Aggregations