@Test public void testPrefixBuilder() throws Throwable { String built = RestClientBindings.buildSwiftInstancePrefix(SERVICE); assertEquals("fs.swift.service." + SERVICE, built); }
@Test(expected = SwiftConfigurationException.class) public void testBindAgainstConfIncompleteInstance() throws Exception { String instance = RestClientBindings.buildSwiftInstancePrefix(SERVICE); conf.unset(instance + DOT_PASSWORD); RestClientBindings.bind(filesysURI, conf); }
private void setInstanceVal(Configuration conf, String host, String key, String val) { String instance = RestClientBindings.buildSwiftInstancePrefix(host); String confkey = instance + key; conf.set(confkey, val); }