String name = component.getName();
if (name.equals("HIVE_METASTORE")) {
// dependencies
Assert.assertEquals(0, component.getDependencies().size());
// component auto deploy
AutoDeployInfo autoDeploy = component.getAutoDeploy();
Assert.assertTrue(autoDeploy.isEnabled());
Assert.assertEquals("HIVE/HIVE_SERVER", autoDeploy.getCoLocate());
// cardinality
Assert.assertEquals("1", component.getCardinality());
}
if (name.equals("HIVE_SERVER")) {
// dependencies
List<DependencyInfo> dependencyList = component.getDependencies();
Assert.assertEquals(1, dependencyList.size());
DependencyInfo dependency = dependencyList.get(0);
Assert.assertEquals("ZOOKEEPER/ZOOKEEPER_SERVER", dependency.getName());
Assert.assertEquals("cluster", dependency.getScope());
AutoDeployInfo autoDeploy = dependency.getAutoDeploy();
Assert.assertTrue(autoDeploy.isEnabled());
Assert.assertEquals("HIVE/HIVE_SERVER", autoDeploy.getCoLocate());
// component auto deploy
Assert.assertNull(component.getAutoDeploy());
// cardinality
Assert.assertEquals("1", component.getCardinality());
}
if (name.equals("MYSQL_SERVER")) {
// dependencies
Assert.assertEquals(0, component.getDependencies().size());
// component auto deploy
AutoDeployInfo autoDeploy = component.getAutoDeploy();
Assert.assertTrue(autoDeploy.isEnabled());
Assert.assertEquals("HIVE/HIVE_SERVER", autoDeploy.getCoLocate());
// cardinality
Assert.assertEquals("1", component.getCardinality());
}
if (name.equals("HIVE_CLIENT")) {
Assert.assertEquals(0, component.getDependencies().size());