Skip to content
Snippets Groups Projects
Commit da639e71 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] HTTP: Fix URL generated by HttpRequest

parent 643dec94
No related branches found
No related tags found
No related merge requests found
......@@ -198,8 +198,7 @@ public class HttpServiceImpl implements HttpService, Closeable, InitializingBean
}
public String getPath(Peer peer, String... absolutePath) {
return pathJoiner.join(peer.getUrl(),
pathJoiner.skipNulls().join(absolutePath));
return peer.getUrl() + pathJoiner.skipNulls().join(absolutePath).replaceAll("//+", "/");
}
......
......@@ -66,41 +66,4 @@ public class CurrencyRegistryRemoteServiceTest {
Assert.assertTrue(isNodeAlive);
}
@Test
public void getAllCurrencyNames() {
List<String> currencyNames = service.getAllCurrencyNames();
for (String currencyName: currencyNames) {
log.info(" - " + currencyName);
}
}
/* -- internal methods -- */
protected Wallet createTestWallet() {
Wallet wallet = new Wallet(
resource.getFixtures().getCurrency(),
resource.getFixtures().getUid(),
CryptoUtils.decodeBase58(resource.getFixtures().getUserPublicKey()),
CryptoUtils.decodeBase58(resource.getFixtures().getUserSecretKey()));
return wallet;
}
protected void assertResults(String queryText, List<Currency> result) {
log.info(String.format("Results for a search on [%s]", queryText));
Assert.assertNotNull(result);
Assert.assertTrue(result.size() > 0);
for (Currency currency: result) {
log.info(" - " + currency.getCurrencyName());
}
}
protected void assertSuggestions(String queryText, List<String> result) {
log.info(String.format("Suggestions for [%s]", queryText));
Assert.assertNotNull(result);
Assert.assertTrue(result.size() > 0);
for (String suggestion: result) {
log.info(" - " + suggestion);
}
}
}
duniter4j.node.host=g1-test.duniter.org
duniter4j.node.port=10900
duniter4j.node.host=g1-test.cgeek.fr
duniter4j.node.port=80
duniter4j.node.elasticsearch.host=localhost
duniter4j.node.elasticsearch.port=9200
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment