@ -1,5 +1,5 @@
--- a/test/block.cc
+++ b/test/block.cc
--- a/test/test_ block.cc
+++ b/test/test_ block.cc
@@ -24,9 +24,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <sstream>
#include <stdexcept>
@ -19,8 +19,8 @@
/** [ipfs::Client::BlockPut] */
ipfs::Json block;
--- a/test/config.cc
+++ b/test/config.cc
--- a/test/test_ config.cc
+++ b/test/test_ config.cc
@@ -23,9 +23,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <iostream>
#include <stdexcept>
@ -40,8 +40,8 @@
/** [ipfs::Client::ConfigSet] */
client.ConfigSet("Datastore.StorageMax", "20GB");
--- a/test/dht.cc
+++ b/test/dht.cc
--- a/test/test_ dht.cc
+++ b/test/test_ dht.cc
@@ -23,9 +23,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <iostream>
#include <stdexcept>
@ -61,8 +61,8 @@
ipfs::Json add_result;
client.FilesAdd(
--- a/test/error.cc
+++ b/test/error.cc
--- a/test/test_ error.cc
+++ b/test/test_ error.cc
@@ -35,16 +35,23 @@ extern std::string replace_body;
}
} // namespace ipfs
@ -90,9 +90,9 @@
std::string object_id;
client.ObjectNew(&object_id);
--- a/test/files.cc
+++ b/test/files.cc
@@ -24,9 +24,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
--- a/test/test_ files.cc
+++ b/test/test_ files.cc
@@ -24,10 +24,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <sstream>
#include <stdexcept>
@ -106,14 +106,15 @@
+ srvaddr=argv[1];
+
try {
- ipfs::Client client("localhost", 5001);
+ ipfs::Client client(srvaddr, 5001);
// Try Files API tests with time-out setting of 20 seconds
- ipfs::Client client("localhost", 5001, "20s");
+ ipfs::Client client(srvaddr, 5001, "20s");
/** [ipfs::Client::FilesGet] */
std::stringstream contents;
--- a/test/generic.cc
+++ b/test/generic.cc
@@ -24,16 +24,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE
--- a/test/test_ generic.cc
+++ b/test/test_ generic.cc
@@ -24,11 +24,18 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <stdexcept>
#include <utility>
@ -127,11 +128,14 @@
+ srvaddr=argv[1];
+
try {
// Test client constructor
/** [ipfs::Client::Client] */
- ipfs::Client client("localhost", 5001);
+ ipfs::Client client(srvaddr, 5001);
/** [ipfs::Client::Client] */
// Test client constructor with additional parameters
@@ -38,7 +45,7 @@ int main(int, char**) {
ipfs::Client clientA(client);
clientA = client;
ipfs::Client clientB(std::move(clientA));
@ -140,8 +144,8 @@
clientC = std::move(clientB);
#pragma GCC diagnostic push
--- a/test/key.cc
+++ b/test/key.cc
--- a/test/test_ key.cc
+++ b/test/test_ key.cc
@@ -26,9 +26,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
using Json = nlohmann::json;
@ -161,8 +165,8 @@
/** [ipfs::Client::KeyGen] */
std::string key_id;
--- a/test/name.cc
+++ b/test/name.cc
--- a/test/test_ name.cc
+++ b/test/test_ name.cc
@@ -24,9 +24,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <sstream>
#include <stdexcept>
@ -182,8 +186,8 @@
// We need a key here, so as not to clobber the "self" key.
std::string key_id;
--- a/test/object.cc
+++ b/test/object.cc
--- a/test/test_ object.cc
+++ b/test/test_ object.cc
@@ -24,9 +24,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <stdexcept>
#include <string>
@ -203,8 +207,8 @@
/** [ipfs::Client::ObjectNew] */
std::string object_id;
--- a/test/pin.cc
+++ b/test/pin.cc
--- a/test/test_ pin.cc
+++ b/test/test_ pin.cc
@@ -23,9 +23,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <stdexcept>
#include <string>
@ -224,8 +228,8 @@
std::string object_id;
--- a/test/swarm.cc
+++ b/test/swarm.cc
--- a/test/test_ swarm.cc
+++ b/test/test_ swarm.cc
@@ -23,9 +23,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <stdexcept>
#include <string>