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