use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HiveMetastoreConfigProviderTest method getServiceConfigsTestDatalakeAndNoLdap.
@Test
void getServiceConfigsTestDatalakeAndNoLdap() {
TemplatePreparationObject tpo = new TemplatePreparationObject.Builder().withRdsConfigs(Set.of(createRdsConfig(null))).withProductDetails(generateCmRepo(CMRepositoryVersionUtil.CLOUDERAMANAGER_VERSION_7_2_2), null).withStackType(StackType.DATALAKE).build();
List<ApiClusterTemplateConfig> result = underTest.getServiceConfigs(templateProcessor, tpo);
verifyDbOnlyMinimalResult(result);
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HiveMetastoreConfigProviderTest method getServiceConfigsTestDatahubCm711.
@Test
void getServiceConfigsTestDatahubCm711() {
TemplatePreparationObject tpo = new TemplatePreparationObject.Builder().withRdsConfigs(Set.of(createRdsConfig(null))).withProductDetails(generateCmRepo(CMRepositoryVersionUtil.CLOUDERAMANAGER_VERSION_7_1_1), null).withStackType(StackType.WORKLOAD).build();
List<ApiClusterTemplateConfig> result = underTest.getServiceConfigs(templateProcessor, tpo);
Map<String, String> configNameToValueMap = getConfigNameToValueMap(result);
assertThat(configNameToValueMap).containsOnly(entry(HIVE_METASTORE_DATABASE_HOST, "10.1.1.1"), entry(HIVE_METASTORE_DATABASE_NAME, "hive"), entry(HIVE_METASTORE_DATABASE_PASSWORD, "iamsoosecure"), entry(HIVE_METASTORE_DATABASE_PORT, "5432"), entry(HIVE_METASTORE_DATABASE_TYPE, "postgresql"), entry(HIVE_METASTORE_DATABASE_USER, "heyitsme"), entry(HIVE_COMPACTOR_INITIATOR_ON, "false"));
Map<String, String> configNameToVariableNameMap = getConfigNameToVariableNameMap(result);
assertThat(configNameToVariableNameMap).isEmpty();
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HiveMetastoreConfigProviderTest method getServiceConfigsTestDatalakeWithLdap.
@Test
void getServiceConfigsTestDatalakeWithLdap() {
TemplatePreparationObject tpo = new TemplatePreparationObject.Builder().withRdsConfigs(Set.of(createRdsConfig(null))).withProductDetails(generateCmRepo(CMRepositoryVersionUtil.CLOUDERAMANAGER_VERSION_7_2_2), null).withStackType(StackType.DATALAKE).withLdapConfig(ldapConfig()).build();
List<ApiClusterTemplateConfig> result = underTest.getServiceConfigs(templateProcessor, tpo);
Map<String, String> configNameToValueMap = getConfigNameToValueMap(result);
assertThat(configNameToValueMap).containsOnly(entry(HIVE_METASTORE_DATABASE_HOST, "10.1.1.1"), entry(HIVE_METASTORE_DATABASE_NAME, "hive"), entry(HIVE_METASTORE_DATABASE_PASSWORD, "iamsoosecure"), entry(HIVE_METASTORE_DATABASE_PORT, "5432"), entry(HIVE_METASTORE_DATABASE_TYPE, "postgresql"), entry(HIVE_METASTORE_DATABASE_USER, "heyitsme"), entry(HIVE_METASTORE_ENABLE_LDAP_AUTH, Boolean.TRUE.toString()), entry(HIVE_METASTORE_LDAP_URI, "ldap://localhost:389"), entry(HIVE_METASTORE_LDAP_BASEDN, "cn=users,dc=example,dc=org"));
Map<String, String> configNameToVariableNameMap = getConfigNameToVariableNameMap(result);
assertThat(configNameToVariableNameMap).isEmpty();
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HiveMetastoreConfigProviderTest method getRoleConfigsTest.
@Test
void getRoleConfigsTest() {
TemplatePreparationObject tpo = new TemplatePreparationObject.Builder().build();
List<ApiClusterTemplateConfig> result = underTest.getRoleConfigs(HiveRoles.HIVEMETASTORE, tpo);
Map<String, String> configNameToValueMap = getConfigNameToValueMap(result);
assertThat(configNameToValueMap).containsOnly(entry(METASTORE_CANARY_HEALTH_ENABLED, Boolean.FALSE.toString()));
Map<String, String> configNameToVariableNameMap = getConfigNameToVariableNameMap(result);
assertThat(configNameToVariableNameMap).isEmpty();
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HiveMetastoreConfigProviderTest method getServiceConfigsTestDbOnlyWithSsl.
@Test
void getServiceConfigsTestDbOnlyWithSsl() {
TemplatePreparationObject tpo = new TemplatePreparationObject.Builder().withRdsConfigs(Set.of(createRdsConfig(RdsSslMode.ENABLED))).withRdsSslCertificateFilePath(SSL_CERTS_FILE_PATH).withProductDetails(generateCmRepo(CMRepositoryVersionUtil.CLOUDERAMANAGER_VERSION_7_2_2), null).build();
List<ApiClusterTemplateConfig> result = underTest.getServiceConfigs(templateProcessor, tpo);
verifyDbOnlySslResult(result);
}
Aggregations