use of com.sequenceiq.common.api.cloudstorage.query.ConfigQueryEntry in project cloudbreak by hortonworks.
the class CmCloudStorageConfigDetailsTest method testWhenOnlyRangerAdminIsPresentedThenShouldReturnWithOnlyRangerAdminConfigs.
@Test
public void testWhenOnlyRangerAdminIsPresentedThenShouldReturnWithOnlyRangerAdminConfigs() {
prepareBlueprintProcessorFactoryMock(RANGER_ADMIN, NAMENODE);
FileSystemConfigQueryObject fileSystemConfigQueryObject = FileSystemConfigQueryObject.Builder.builder().withStorageName(STORAGE_NAME).withClusterName(CLUSTER_NAME).withBlueprintText(BLUEPRINT_TEXT).withAttachedCluster(false).withFileSystemType(FileSystemType.S3.name()).build();
Set<ConfigQueryEntry> bigCluster = underTest.queryParameters(fileSystemConfigQueryObject);
Assert.assertEquals(1L, bigCluster.size());
Set<ConfigQueryEntry> rangerAdmins = serviceEntry(bigCluster, RANGER_ADMIN);
Assert.assertEquals(1, rangerAdmins.size());
Assert.assertTrue(rangerAdmins.stream().anyMatch(cqe -> cqe.getDefaultPath().equals("hwx-remote/ranger/audit")));
}
Aggregations