mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-20 11:45:53 +00:00
style: Mark JSON literal strings with R"JSON (#2169)
This commit is contained in:
@@ -66,7 +66,7 @@ using namespace util::prometheus;
|
||||
|
||||
namespace {
|
||||
|
||||
constinit auto const kTWO_SOURCES_LEDGER_RESPONSE = R"({
|
||||
constinit auto const kTWO_SOURCES_LEDGER_RESPONSE = R"JSON({
|
||||
"etl_sources": [
|
||||
{
|
||||
"ip": "127.0.0.1",
|
||||
@@ -79,9 +79,9 @@ constinit auto const kTWO_SOURCES_LEDGER_RESPONSE = R"({
|
||||
"grpc_port": "source2"
|
||||
}
|
||||
]
|
||||
})";
|
||||
})JSON";
|
||||
|
||||
constinit auto const kTHREE_SOURCES_LEDGER_RESPONSE = R"({
|
||||
constinit auto const kTHREE_SOURCES_LEDGER_RESPONSE = R"JSON({
|
||||
"etl_sources": [
|
||||
{
|
||||
"ip": "127.0.0.1",
|
||||
@@ -99,7 +99,7 @@ constinit auto const kTHREE_SOURCES_LEDGER_RESPONSE = R"({
|
||||
"grpc_port": "source3"
|
||||
}
|
||||
]
|
||||
})";
|
||||
})JSON";
|
||||
|
||||
inline ClioConfigDefinition
|
||||
getParseLoadBalancerConfig(boost::json::value val)
|
||||
@@ -247,8 +247,8 @@ TEST_F(LoadBalancerConstructorNgTests, fetchETLState_Source0Fails1OK)
|
||||
|
||||
TEST_F(LoadBalancerConstructorNgTests, fetchETLState_DifferentNetworkID)
|
||||
{
|
||||
auto const source1Json = boost::json::parse(R"({"result": {"info": {"network_id": 0}}})");
|
||||
auto const source2Json = boost::json::parse(R"({"result": {"info": {"network_id": 1}}})");
|
||||
auto const source1Json = boost::json::parse(R"JSON({"result": {"info": {"network_id": 0}}})JSON");
|
||||
auto const source2Json = boost::json::parse(R"JSON({"result": {"info": {"network_id": 1}}})JSON");
|
||||
|
||||
EXPECT_CALL(sourceFactory_, makeSource).Times(2);
|
||||
EXPECT_CALL(sourceFactory_.sourceAt(0), forwardToRippled).WillOnce(Return(source1Json.as_object()));
|
||||
@@ -271,8 +271,8 @@ TEST_F(LoadBalancerConstructorNgTests, fetchETLState_AllSourcesFailButAllowNoEtl
|
||||
|
||||
TEST_F(LoadBalancerConstructorNgTests, fetchETLState_DifferentNetworkIDButAllowNoEtlIsTrue)
|
||||
{
|
||||
auto const source1Json = boost::json::parse(R"({"result": {"info": {"network_id": 0}}})");
|
||||
auto const source2Json = boost::json::parse(R"({"result": {"info": {"network_id": 1}}})");
|
||||
auto const source1Json = boost::json::parse(R"JSON({"result": {"info": {"network_id": 0}}})JSON");
|
||||
auto const source2Json = boost::json::parse(R"JSON({"result": {"info": {"network_id": 1}}})JSON");
|
||||
EXPECT_CALL(sourceFactory_, makeSource).Times(2);
|
||||
EXPECT_CALL(sourceFactory_.sourceAt(0), forwardToRippled).WillOnce(Return(source1Json.as_object()));
|
||||
EXPECT_CALL(sourceFactory_.sourceAt(0), run);
|
||||
|
||||
Reference in New Issue
Block a user