use of com.sequenceiq.cloudbreak.template.TemplatePreparationObject.Builder in project cloudbreak by hortonworks.
the class DasConfigProviderTest method getRoleConfigs.
@Test
public void getRoleConfigs() {
TemplatePreparationObject tpo = new Builder().build();
List<ApiClusterTemplateConfig> result = underTest.getRoleConfigs(DasRoles.WEBAPP, tpo);
Map<String, String> paramToVariable = result.stream().collect(Collectors.toMap(ApiClusterTemplateConfig::getName, ApiClusterTemplateConfig::getValue));
assertThat(paramToVariable).containsOnly(new SimpleEntry<>("data_analytics_studio_user_authentication", "KNOX_PROXY"));
result = underTest.getRoleConfigs(DasRoles.EVENTPROCESSOR, tpo);
assertThat(result.isEmpty()).isTrue();
}
use of com.sequenceiq.cloudbreak.template.TemplatePreparationObject.Builder in project cloudbreak by hortonworks.
the class QueryProcessorConfigProviderTest method isConfigurationNeededFalseWhenNoDBRegistered.
@Test
@SuppressWarnings("unchecked")
public void isConfigurationNeededFalseWhenNoDBRegistered() {
CmTemplateProcessor mockTemplateProcessor = mock(CmTemplateProcessor.class);
when(mockTemplateProcessor.isRoleTypePresentInService(QueryStoreRoles.QUERY_PROCESSOR, List.of(QueryStoreRoles.QUERY_PROCESSOR))).thenReturn(true);
TemplatePreparationObject tpo = new Builder().build();
boolean result = underTest.isConfigurationNeeded(mockTemplateProcessor, tpo);
assertThat(result).isFalse();
}
Aggregations