@Test public void buildUrl_insecureMode_noQueryParam() throws Exception { List<ComponentProcess> uiProcesses = buildUiComponentProcesses(); new Expectations() {{ securityContext.getAuthenticationScheme(); result = AUTHENTICATION_SCHEME_NOT_KERBEROS; stormUi.getId(); result = 2L; environmentService.listComponentProcesses(2L); result = uiProcesses; }}; final StormMetadataService stormMetadataService = new StormMetadataService .Builder(environmentService, 1L, securityContext, subject).build(); final String tpSumUrl = stormMetadataService.getTopologySummaryUrl(); Assert.assertTrue(tpSumUrl.equals(STORM_UI_URL_EXPECTED)); }
public String getTopologySummaryUrl() { return tplgySumUrl; }
StormMetadataService { public String getTopologySummaryUrl() { return tplgySumUrl; } }
StormMetadataService { public String getTopologySummaryUrl() { return tplgySumUrl; } StormMetadataService(Client httpClient, String tplgySumUrl, String mainPageUrl,
            SecurityContext securityContext, ServiceConfiguration stormEnvConfig, Subject subject,
                                Component nimbus, Collection<ComponentProcess> nimbusProcesses,
                                Component stormUi, Collection<ComponentProcess> stormUiProcesses); }
StormMetadataService { public String getTopologySummaryUrl() { return tplgySumUrl; } StormMetadataService(Client httpClient, String tplgySumUrl, String mainPageUrl,
            SecurityContext securityContext, ServiceConfiguration stormEnvConfig, Subject subject,
                                Component nimbus, Collection<ComponentProcess> nimbusProcesses,
                                Component stormUi, Collection<ComponentProcess> stormUiProcesses); StormTopologies getTopologies(); String getMainPageUrl(); String getTopologySummaryUrl(); Keytabs getKeytabs(); Principals getPrincipals(); Security getSecurity(); }
StormMetadataService { public String getTopologySummaryUrl() { return tplgySumUrl; } StormMetadataService(Client httpClient, String tplgySumUrl, String mainPageUrl,
            SecurityContext securityContext, ServiceConfiguration stormEnvConfig, Subject subject,
                                Component nimbus, Collection<ComponentProcess> nimbusProcesses,
                                Component stormUi, Collection<ComponentProcess> stormUiProcesses); StormTopologies getTopologies(); String getMainPageUrl(); String getTopologySummaryUrl(); Keytabs getKeytabs(); Principals getPrincipals(); Security getSecurity(); static final String STORM_REST_API_DO_AS_USER_QUERY_PARAM; static final String SERVICE_STORM_VIEW; static final String STORM_VIEW_CONFIGURATION_KEY_STORM_VIEW_URL; }