Search in sources :

Example 6 with EmrClusterDefinitionKeys

use of org.finra.herd.model.api.xml.EmrClusterDefinitionKeys in project herd by FINRAOS.

the class EmrClusterDefinitionServiceTest method testGetEmrClusterDefinitions.

@Test
public void testGetEmrClusterDefinitions() throws Exception {
    // Create and persist an EMR cluster definition entity.
    emrClusterDefinitionDaoTestHelper.createEmrClusterDefinitionEntity(namespaceDaoTestHelper.createNamespaceEntity(NAMESPACE), EMR_CLUSTER_DEFINITION_NAME, IOUtils.toString(resourceLoader.getResource(EMR_CLUSTER_DEFINITION_XML_FILE_WITH_CLASSPATH).getInputStream()));
    // Create an EMR cluster definition key.
    EmrClusterDefinitionKey emrClusterDefinitionKey = new EmrClusterDefinitionKey(NAMESPACE, EMR_CLUSTER_DEFINITION_NAME);
    // Retrieve and validate EMR cluster definition keys.
    assertEquals(new EmrClusterDefinitionKeys(Arrays.asList(emrClusterDefinitionKey)), emrClusterDefinitionService.getEmrClusterDefinitions(NAMESPACE));
}
Also used : EmrClusterDefinitionKey(org.finra.herd.model.api.xml.EmrClusterDefinitionKey) EmrClusterDefinitionKeys(org.finra.herd.model.api.xml.EmrClusterDefinitionKeys) Test(org.junit.Test)

Aggregations

EmrClusterDefinitionKeys (org.finra.herd.model.api.xml.EmrClusterDefinitionKeys)6 EmrClusterDefinitionKey (org.finra.herd.model.api.xml.EmrClusterDefinitionKey)5 Test (org.junit.Test)5 NamespacePermission (org.finra.herd.model.annotation.NamespacePermission)1