mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-21 04:05:51 +00:00
@@ -163,7 +163,8 @@ CustomValidator SubscribeStreamValidator =
|
|||||||
static std::unordered_set<std::string> const validStreams = {
|
static std::unordered_set<std::string> const validStreams = {
|
||||||
"ledger", "transactions", "transactions_proposed", "book_changes", "manifests", "validations"};
|
"ledger", "transactions", "transactions_proposed", "book_changes", "manifests", "validations"};
|
||||||
|
|
||||||
static std::unordered_set<std::string> const reportingNotSupportStreams = {"peer_status", "consensus"};
|
static std::unordered_set<std::string> const reportingNotSupportStreams = {
|
||||||
|
"peer_status", "consensus", "server"};
|
||||||
for (auto const& v : value.as_array())
|
for (auto const& v : value.as_array())
|
||||||
{
|
{
|
||||||
if (!v.is_string())
|
if (!v.is_string())
|
||||||
|
|||||||
@@ -136,6 +136,11 @@ generateTestValuesForParametersTest()
|
|||||||
R"({"streams": ["consensus"]})",
|
R"({"streams": ["consensus"]})",
|
||||||
"reportingUnsupported",
|
"reportingUnsupported",
|
||||||
"Requested operation not supported by reporting mode server"},
|
"Requested operation not supported by reporting mode server"},
|
||||||
|
SubscribeParamTestCaseBundle{
|
||||||
|
"StreamServerNotSupport",
|
||||||
|
R"({"streams": ["server"]})",
|
||||||
|
"reportingUnsupported",
|
||||||
|
"Requested operation not supported by reporting mode server"},
|
||||||
SubscribeParamTestCaseBundle{"BooksNotArray", R"({"books": "1"})", "invalidParams", "booksNotArray"},
|
SubscribeParamTestCaseBundle{"BooksNotArray", R"({"books": "1"})", "invalidParams", "booksNotArray"},
|
||||||
SubscribeParamTestCaseBundle{
|
SubscribeParamTestCaseBundle{
|
||||||
"BooksItemNotObject", R"({"books": ["1"]})", "invalidParams", "booksItemNotObject"},
|
"BooksItemNotObject", R"({"books": ["1"]})", "invalidParams", "booksItemNotObject"},
|
||||||
|
|||||||
@@ -465,6 +465,21 @@ generateTestValuesForParametersTest()
|
|||||||
})",
|
})",
|
||||||
"invalidParams",
|
"invalidParams",
|
||||||
"bothNotBool"},
|
"bothNotBool"},
|
||||||
|
UnsubscribeParamTestCaseBundle{
|
||||||
|
"StreamPeerStatusNotSupport",
|
||||||
|
R"({"streams": ["peer_status"]})",
|
||||||
|
"reportingUnsupported",
|
||||||
|
"Requested operation not supported by reporting mode server"},
|
||||||
|
UnsubscribeParamTestCaseBundle{
|
||||||
|
"StreamConsensusNotSupport",
|
||||||
|
R"({"streams": ["consensus"]})",
|
||||||
|
"reportingUnsupported",
|
||||||
|
"Requested operation not supported by reporting mode server"},
|
||||||
|
UnsubscribeParamTestCaseBundle{
|
||||||
|
"StreamServerNotSupport",
|
||||||
|
R"({"streams": ["server"]})",
|
||||||
|
"reportingUnsupported",
|
||||||
|
"Requested operation not supported by reporting mode server"},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user