@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(); }
@Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) { switch (roleType) { case DasRoles.WEBAPP: return List.of(config("data_analytics_studio_user_authentication", "KNOX_PROXY")); default: return List.of(); } }
DasConfigProvider extends AbstractRdsRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) { switch (roleType) { case DasRoles.WEBAPP: return List.of(config("data_analytics_studio_user_authentication", "KNOX_PROXY")); default: return List.of(); } } }
DasConfigProvider extends AbstractRdsRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) { switch (roleType) { case DasRoles.WEBAPP: return List.of(config("data_analytics_studio_user_authentication", "KNOX_PROXY")); default: return List.of(); } }  }
DasConfigProvider extends AbstractRdsRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) { switch (roleType) { case DasRoles.WEBAPP: return List.of(config("data_analytics_studio_user_authentication", "KNOX_PROXY")); default: return List.of(); } }  @Override List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject source); @Override String getServiceType(); @Override List<String> getRoleTypes(); }
DasConfigProvider extends AbstractRdsRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) { switch (roleType) { case DasRoles.WEBAPP: return List.of(config("data_analytics_studio_user_authentication", "KNOX_PROXY")); default: return List.of(); } }  @Override List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject source); @Override String getServiceType(); @Override List<String> getRoleTypes();  }