Browse Source

# This is a combination of 2 commits.

# The first commit's message is:

Merge pull request #454 from jorisbontje/423-dockerfile

update Dockerfile with cryptopp and jsonrpc dependencies, fixes #423

Cleaned up jsonrpc test

# This is the 2nd commit message:

Forgot the #if
cl-refactor
Christoph Jentzsch 10 years ago
parent
commit
b683d02f11
  1. 28
      test/jsonrpc.cpp

28
test/jsonrpc.cpp

@ -36,8 +36,6 @@
#include "TestHelper.h"
#include "webthreestubclient.h"
BOOST_AUTO_TEST_SUITE(jsonrpc)
using namespace std;
using namespace dev;
using namespace dev::eth;
@ -46,20 +44,12 @@ namespace js = json_spirit;
namespace jsonrpc_tests
{
string name = "Ethereum(++) tests";
string dbPath;
auto s = set<string>{"eth", "shh"};
dev::p2p::NetworkPreferences np(30303, std::string(), false);
dev::WebThreeDirect web3(name, dbPath, true, s, np);
unique_ptr<WebThreeStubServer> jsonrpcServer;
unique_ptr<WebThreeStubClient> jsonrpcClient;
struct JsonrpcFixture {
JsonrpcFixture()
JsonrpcFixture():web3(name, dbPath, true, set<string>{"eth", "shh"}, dev::p2p::NetworkPreferences(30303, std::string(), false))
{
cnote << "setup jsonrpc";
name = "Ethereum(++) tests";
web3.setIdealPeerCount(5);
web3.ethereum()->setForceMining(true);
jsonrpcServer = unique_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::CorsHttpServer(8080), web3, {}));
@ -72,9 +62,16 @@ struct JsonrpcFixture {
{
cnote << "teardown jsonrpc";
}
string name;
string dbPath;
unique_ptr<WebThreeStubServer> jsonrpcServer;
unique_ptr<WebThreeStubClient> jsonrpcClient;
dev::WebThreeDirect web3;
};
BOOST_GLOBAL_FIXTURE(JsonrpcFixture)
BOOST_FIXTURE_TEST_SUITE(jsonrpc, JsonrpcFixture)
BOOST_AUTO_TEST_CASE(jsonrpc_defaultBlock)
{
@ -242,9 +239,6 @@ BOOST_AUTO_TEST_CASE(jsonrpc_transact)
BOOST_CHECK_EQUAL(jsToDecimal(balanceString2), "750000000000000000");
BOOST_CHECK_EQUAL(txAmount, balance2);
}
}
BOOST_AUTO_TEST_SUITE_END()
}
#endif

Loading…
Cancel
Save