use of org.apache.whirr.service.ClusterSpec in project whirr by apache.
the class ClusterSpecCommandTest method testOverrides.
@Test
public void testOverrides() throws Exception {
ClusterSpecCommand clusterSpecCommand = new ClusterSpecCommand("name", "description", new ServiceFactory()) {
@Override
public int run(InputStream in, PrintStream out, PrintStream err, List<String> args) throws Exception {
return 0;
}
};
OptionSet optionSet = clusterSpecCommand.parser.parse("--service-name", "overridden-test-service", "--config", "whirr-override-test.properties");
ClusterSpec clusterSpec = clusterSpecCommand.getClusterSpec(optionSet);
assertThat(clusterSpec.getServiceName(), is("overridden-test-service"));
assertThat(clusterSpec.getClusterName(), is("test-cluster"));
}
Aggregations