rippled
Loading...
Searching...
No Matches
Connect_test.cpp
1#include <test/jtx.h>
2
3#include <xrpl/protocol/jss.h>
4
5namespace xrpl {
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(result[jss::result][jss::error_message] == "Not synced to the network.");
26 }
27 }
28
29public:
30 void
31 run() override
32 {
33 testErrors();
34 }
35};
36
37BEAST_DEFINE_TESTSUITE(Connect, rpc, xrpl);
38
39} // namespace xrpl
A testsuite class.
Definition suite.h:51
testcase_t testcase
Memberspace for declaring test cases.
Definition suite.h:147
void run() override
Runs the suite.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5