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