use of co.cask.cdap.proto.Version in project cdap by caskdata.
the class MetaClientTestRun method testAll.
@Test
public void testAll() throws IOException, UnauthenticatedException, UnauthorizedException {
MetaClient metaClient = new MetaClient(clientConfig);
metaClient.ping();
Version version = metaClient.getVersion();
String expectedVersion = Resources.toString(Resources.getResource("VERSION"), Charsets.UTF_8).trim();
Assert.assertEquals(expectedVersion, version.getVersion());
// check a key that we know exists, to ensure that we retrieved the configurations
Map<String, ConfigEntry> cdapConfig = metaClient.getCDAPConfig();
ConfigEntry configEntry = cdapConfig.get(Constants.Dangerous.UNRECOVERABLE_RESET);
Assert.assertNotNull(configEntry);
Assert.assertEquals(Constants.Dangerous.UNRECOVERABLE_RESET, configEntry.getName());
Assert.assertNotNull(configEntry.getValue());
Map<String, ConfigEntry> hadoopConfig = metaClient.getHadoopConfig();
configEntry = hadoopConfig.get("hadoop.tmp.dir");
Assert.assertNotNull(configEntry);
Assert.assertEquals("hadoop.tmp.dir", configEntry.getName());
Assert.assertNotNull(configEntry.getValue());
}
Aggregations