use of com.sequenceiq.it.cloudbreak.search.Searchable in project cloudbreak by hortonworks.
the class ReportListener method logUrl.
private void logUrl(ITestResult tr) {
TestContext testContext;
Object[] parameters = tr.getParameters();
if (parameters == null || parameters.length == 0) {
return;
}
try {
testContext = (TestContext) parameters[0];
} catch (ClassCastException e) {
return;
}
Iterable<Searchable> searchables = Iterables.filter(testContext.getResourceNames().values(), Searchable.class);
List<Searchable> listOfSearchables = StreamSupport.stream(searchables.spliterator(), false).collect(Collectors.toList());
if (listOfSearchables.size() == 0) {
return;
}
SearchUrl searchUrl = new KibanaSearchUrl();
tr.getTestContext().setAttribute(tr.getName() + SEARCH_URL, searchUrl.getSearchUrl(listOfSearchables, new Date(tr.getStartMillis()), new Date(tr.getEndMillis())));
String baseLocation = getCloudStorageBaseLocation(testContext);
CloudProviderProxy cloudProvider = testContext.getCloudProvider();
generateClusterLogsUrl(FreeIpaTestDto.class, tr, testContext.getResourceNames(), testContext.getResourceCrns(), baseLocation, cloudProvider);
generateClusterLogsUrl(SdxTestDto.class, tr, testContext.getResourceNames(), testContext.getResourceCrns(), baseLocation, cloudProvider);
generateClusterLogsUrl(SdxInternalTestDto.class, tr, testContext.getResourceNames(), testContext.getResourceCrns(), baseLocation, cloudProvider);
generateClusterLogsUrl(DistroXTestDto.class, tr, testContext.getResourceNames(), testContext.getResourceCrns(), baseLocation, cloudProvider);
}
Aggregations