rippled
Loading...
Searching...
No Matches
Connect_test.cpp
1#include <test/jtx.h>
2
3#include <xrpl/protocol/jss.h>
4
5namespace ripple {
6
8{
9 void
11 {
12 testcase("Errors");
13
14 using namespace test::jtx;
15
16 {
17 // standalone mode should fail
18 Env env{*this};
19 BEAST_EXPECT(env.app().config().standalone());
20
21 auto const result = env.rpc("json", "connect", "{}");
22 BEAST_EXPECT(result[jss::result][jss::status] == "error");
23 BEAST_EXPECT(result[jss::result].isMember(jss::error));
24 BEAST_EXPECT(result[jss::result][jss::error] == "notSynced");
25 BEAST_EXPECT(
26 result[jss::result][jss::error_message] ==
27 "Not synced to the network.");
28 }
29 }
30
31public:
32 void
33 run() override
34 {
35 testErrors();
36 }
37};
38
39BEAST_DEFINE_TESTSUITE(Connect, rpc, ripple);
40
41} // namespace ripple
A testsuite class.
Definition suite.h:52
testcase_t testcase
Memberspace for declaring test cases.
Definition suite.h:152
void run() override
Runs the suite.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6