use of org.apache.accumulo.test.ShellServerIT.TestShell in project accumulo by apache.
the class ShellConfigIT method experimentalPropTest.
@Test
public void experimentalPropTest() throws Exception {
// ensure experimental props do not show up in config output unless set
AuthenticationToken token = getAdminToken();
File clientConfFile = null;
switch(getClusterType()) {
case MINI:
MiniAccumuloClusterImpl mac = (MiniAccumuloClusterImpl) getCluster();
clientConfFile = mac.getConfig().getClientConfFile();
break;
case STANDALONE:
StandaloneAccumuloClusterConfiguration standaloneConf = (StandaloneAccumuloClusterConfiguration) getClusterConfiguration();
clientConfFile = standaloneConf.getClientConfFile();
break;
default:
Assert.fail("Unknown cluster type");
}
Assert.assertNotNull(clientConfFile);
TestShell ts = null;
if (token instanceof PasswordToken) {
String passwd = new String(((PasswordToken) token).getPassword(), UTF_8);
ts = new TestShell(getAdminPrincipal(), passwd, getCluster().getInstanceName(), getCluster().getZooKeepers(), clientConfFile);
} else if (token instanceof KerberosToken) {
ts = new TestShell(getAdminPrincipal(), null, getCluster().getInstanceName(), getCluster().getZooKeepers(), clientConfFile);
} else {
Assert.fail("Unknown token type");
}
assertTrue(Property.CRYPTO_CIPHER_KEY_ALGORITHM_NAME.isExperimental());
String configOutput = ts.exec("config");
assertTrue(configOutput.contains(PerTableVolumeChooser.TABLE_VOLUME_CHOOSER));
assertFalse(configOutput.contains(Property.CRYPTO_CIPHER_KEY_ALGORITHM_NAME.getKey()));
}
Aggregations